diff --git a/.dockerignore b/.dockerignore index 22a8cce1..170757f3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -11,6 +11,8 @@ data/ /testdata/ # Build +/.cache/ +telemetry.test bin/ fanout ui/host/node_modules/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63bcd73a..c6b665c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,25 @@ env: CGO_ENABLED: "1" jobs: + duckdb: + name: DuckDB 2 (${{ matrix.runner }}) + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + runner: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, macos-15-intel] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version-file: go.mod + cache: true + - name: Verify pinned engine, typed Parquet and SQL boundary + run: >- + bash scripts/with-duckdb.sh go test ./internal/query ./internal/telemetry ./internal/observability ./internal/ingest + -run 'TestPinnedEngine|TestSQLBoundary|TestLogicalType|TestVariant|TestUnsupportedFormat|TestCommitBatchAllocation|TestDependencies|TestExportsBound|TestMaximumAttributeNesting|TestHTTPRejectsExcessiveAttributeNesting' + -count=1 + # Every step below runs a justfile recipe, named after it. Reproduce any # failure locally with the command in the step name — nothing about the gate # lives only in this file. @@ -40,7 +59,7 @@ jobs: # must be a deliberate commit rather than a surprise from a CI run. - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: - bun-version: 1.4.0 + bun-version: 1.4.2 # The documentation site is npm rather than bun: Astro and Starlight are # exercised on npm upstream, and the lockfile is what `just site-build` diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7918d7bf..9358b38d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -48,7 +48,7 @@ jobs: build-mode: ${{ matrix.build-mode }} - if: matrix.build-mode == 'manual' - run: go build ./... + run: bash scripts/with-duckdb.sh go build ./... - uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59b4e9d5..a863195a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ permissions: contents: read env: - GO_VERSION: "1.27.0" + GO_VERSION: "1.27.1" IMAGE: ghcr.io/labstack/fanout DOCKERHUB_IMAGE: docker.io/labstack/fanout MCP_PUBLISHER_VERSION: "1.8.1" @@ -52,7 +52,7 @@ jobs: - uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: - bun-version: 1.4.0 + bun-version: 1.4.2 - uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 with: version: v2.13.1 @@ -88,8 +88,9 @@ jobs: run: | set -euo pipefail version="${GITHUB_REF_NAME}" + bash scripts/with-duckdb.sh go test ./internal/query -run 'TestPinnedEngine|TestSQLBoundary' -count=1 mkdir -p stage - go build -trimpath -ldflags "-s -w -X main.version=${version}" -o stage/fanout ./cmd/fanout + bash scripts/with-duckdb.sh go build -trimpath -ldflags "-s -w -X main.version=${version}" -o stage/fanout ./cmd/fanout for doc in LICENSE NOTICE README.md THIRD_PARTY_NOTICES TRADEMARK.md; do if [ -f "${doc}" ]; then cp "${doc}" stage/; fi done diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index be30825c..45bf4148 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -32,6 +32,11 @@ on: - "internal/mcp/**" - "cmd/fanout/**" - "cmd/fanout-docgen/**" + - "internal/duckdb/**" + - "scripts/with-duckdb.sh" + - "scripts/go-build-tags.sh" + - "go.mod" + - "go.sum" - ".github/workflows/site.yml" # Publishing the current main on demand, without an empty commit. workflow_dispatch: @@ -77,7 +82,7 @@ jobs: - name: Refuse a reference that is behind the code env: CGO_ENABLED: "1" - run: go run ./cmd/fanout-docgen --check + run: bash scripts/with-duckdb.sh go run ./cmd/fanout-docgen --check - name: Install dependencies working-directory: site diff --git a/.gitignore b/.gitignore index 43165f98..1d18952f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Binaries /bin/ +/.cache/ *.exe # Data diff --git a/AGENTS.md b/AGENTS.md index e6a905a6..8968e35b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,6 +16,60 @@ with application tables must have a positive applied Goose version before initialization. An empty or zero-only version table is not sufficient. +## Telemetry engine and format + +- Use the pinned DuckDB 2 engine in `internal/duckdb`, built with + `scripts/with-duckdb.sh`. A Go driver version does not identify its bundled + native engine; verify `SELECT version()` when changing the pin. +- Build and test on native Linux or macOS, AMD64 or ARM64. The wrapper verifies + each platform archive's checksum and uses its matching headers and statically + linked core, JSON, Parquet, and time-zone extensions. Do not add dynamic + extension downloads or a second engine path. +- Store OTLP attributes and resource attributes as typed maps in canonical rows + and shredded Parquet VARIANT columns. Preserve integers, booleans, bytes, + nested values, and nanosecond UTC timestamps. Convert nested SQL results to + JSON only at the client boundary; attribute keys containing dots are literal. +- Dashboard file snapshots use each signal's actual event-time footer bounds, + including signed nanoseconds. Unknown statistics include the file. Never + substitute ingestion time or prune public arbitrary SQL from a dashboard scope. +- Endpoint histograms, log counts, and notable-trace candidates acknowledge + complete immutable batch IDs transactionally. Query cache markers and rows in + one read transaction under the pinned file snapshot; uncached active files + remain immediately visible. Compaction and retention must invalidate retired + contributions without double counting or losing late publications. +- Version disposable read-cache schema and semantics together; mismatches rebuild + all private read tables. Cache minute aggregates, per-batch trace bounds, + and one incremental candidate per trace, never individual event copies or + four globally rewritten scope indexes. Mixed trace scopes use batch parts. Exact + clipped minutes read footer-pruned Parquet, and compaction derives complete + output contributions from cached inputs. Body search matches redacted text. + Analytical service/edge watermark lag is separate. Completed-batch writes + have their own gate and write-pool slot; analytical writes use disjoint tables. + Maintenance must hold both gates for checkpointing. +- Batch format 3, including its physical schema, is the only accepted telemetry + format. Schema changes require a format version change. Disable schema unioning + and Hive partition inference; use native Parquet binding so VARIANT extracts + can reach the scan. Pre-project hot messaging fields into scalar read-view + columns; this preview does not push general VARIANT extracts across views. + Reject unsupported metadata before cleanup or schema rewriting, preserve those files, and add + no legacy reader or format fallback. +- Keep native `TIMESTAMPTZ_NS` columns in time predicates. Bind Go window + parameters as `?::TIMESTAMP_NS::TIMESTAMPTZ_NS` to preserve nanoseconds; + cast returned timestamps and datetime-function arguments only. Every engine + connection uses UTC. Do not change Parquet UTC-instant semantics for speed. +- Offline verification reuses one bounded, non-spilling native engine to decode + all Parquet columns and checks physical schemas, complete span sort tuples, + and exact index ranges. Operational errors and unsupported formats never + authorize quarantine. Discarded hashes force decoding; they are not checksums. +- Keep DuckDB 2's memory-governed asynchronous I/O defaults unless measurements + justify tuning them. Do not force an unbounded read-ahead depth. +- Arbitrary SQL is a single read-only SELECT over approved telemetry relations. + Parse its AST and describe/project results on the same connection and pinned + Parquet snapshot. Keep engine file access and configuration locked down. +- Rooted service traversal uses keyed recursion over the complete scoped edge + rollup, keeps namespaces separate, and enforces hop, accumulated-node, and + execution-time limits. Report truncation explicitly. + ## Product versioning Fanout uses CalVer with the format `YYYY.M.N[-alpha|-beta|-rc]`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fd30bac5..d32d4930 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,13 +10,37 @@ just build # browser assets, then the binaries just check # the full gate ``` -You need Go and a C compiler with `CGO_ENABLED=1` (DuckDB is a cgo dependency), +You need Go 1.27.1 and a C/C++ toolchain on native Linux or macOS (amd64 or arm64), [Bun](https://bun.sh), [just](https://just.systems), [golangci-lint](https://golangci-lint.run/), and [Lefthook](https://github.com/evilmartians/lefthook). Running in local auth mode also requires a 32-character authentication code secret; SMTP and an AI key are optional — see [README](README.md#requirements). +The DuckDB wrapper downloads the pinned, checksum-verified engine from +[Fanout's dependency artifact mirror](https://github.com/labstack/fanout/releases/tag/duckdb-v2.0.0-alpha43763) +on the first build. Linux needs the C++ runtime (`libstdc++`); macOS needs +Xcode Command Line Tools and `libc++`. Cross-compilation is unsupported. +Use `just` recipes or prefix Go commands with the wrapper: + +```sh +bash scripts/with-duckdb.sh go build ./cmd/fanout +bash scripts/with-duckdb.sh go test ./internal/ingest +``` + +Editor tooling also needs the same build tags, headers, and linker flags. +Launch a fresh editor process through the wrapper, for example +`bash scripts/with-duckdb.sh code .`, so its Go tools inherit that environment. +Alternatively configure your editor to launch `gopls` through +`bash scripts/with-duckdb.sh gopls serve`. An already-running editor process +must be restarted to inherit these variables. + +The dependency mirror preserves the original DuckDB `v2.0.0-alpha43763` +archives at upstream commit `96063b9e39` byte for byte. Its `duckdb-` tag +namespace is separate from Fanout's product CalVer releases; new engine bytes +require a new artifact tag and checksum pins. It never supplies a second engine +or downloads extensions at runtime. + ## Before you open a pull request Run `just check` and `just test-race`. Together they match the CI gate: diff --git a/Dockerfile b/Dockerfile index 62002139..01c69a8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Bun is a build compiler only. Neither Bun nor Node is copied into the final # image or launched by the Fanout process. -FROM oven/bun:1.4.0@sha256:5ff609364c049b54eb0ff560ec96319729a972078ef2c755d758f0c6ef89c2d6 AS ui-apps-build +FROM oven/bun:1.4.2@sha256:9114c058aeae42162ee16dd5084b95fe9473970bb6bcb5b232ab1630f0546895 AS ui-apps-build WORKDIR /app COPY ui/apps/package.json ui/apps/bun.lock ./ui/apps/ RUN cd ui/apps && bun install --frozen-lockfile @@ -11,7 +11,7 @@ COPY ui/apps/ ./ui/apps/ COPY internal/mcp/apps/ ./internal/mcp/apps/ RUN cd ui/apps && bun run build -FROM oven/bun:1.4.0@sha256:5ff609364c049b54eb0ff560ec96319729a972078ef2c755d758f0c6ef89c2d6 AS ui-host-build +FROM oven/bun:1.4.2@sha256:9114c058aeae42162ee16dd5084b95fe9473970bb6bcb5b232ab1630f0546895 AS ui-host-build WORKDIR /app COPY ui/host/package.json ui/host/bun.lock ./ui/host/ RUN cd ui/host && bun install --frozen-lockfile @@ -24,7 +24,7 @@ RUN cd ui/host && bun run build # is no cross toolchain here. `--platform=$BUILDPLATFORM` is therefore only # correct while TARGETPLATFORM equals BUILDPLATFORM. Adding an architecture to # the CI matrix means either a native runner for it or QEMU, not a GOARCH flag. -FROM --platform=$BUILDPLATFORM golang:1.27-bookworm@sha256:ded31c68586d2e49e760acc2e65a884b23d032e9bbbed0ae0c55abd3fcaf4452 AS build +FROM --platform=$BUILDPLATFORM golang:1.27.1-bookworm@sha256:69a7b9788769bec032d238959b61854e9ae87f57be9029ec04e9885fabf99195 AS build ARG TARGETOS ARG TARGETARCH ARG VERSION=dev @@ -37,7 +37,7 @@ COPY --from=ui-host-build /app/internal/ui/dist/ ./internal/ui/dist/ RUN --mount=type=cache,target=/go/pkg/mod \ --mount=type=cache,target=/root/.cache/go-build \ CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ - go build -ldflags="-s -w -X main.version=${VERSION}" -o fanout ./cmd/fanout + bash scripts/with-duckdb.sh go build -ldflags="-s -w -X main.version=${VERSION}" -o fanout ./cmd/fanout # Distroless has no shell with which to create mutable paths. Prepare the data # directory here, then copy it with the runtime user's ownership below. diff --git a/README.md b/README.md index 82e952cd..d39e9211 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,10 @@ browser client, an in-process agent, and any external MCP host all reach the same typed observability contract rather than issuing raw SQL. +Attribute and resource values support up to 128 nested arrays or objects. +An export that exceeds this limit is rejected in full with OTLP +`INVALID_ARGUMENT` (HTTP 400); accepted values retain their original types. + Parquet is authoritative telemetry, DuckDB query state is rebuildable, and SQLite is reserved for transactional product state. Native compaction prepares replacements while reads continue and briefly gates readers only for @@ -83,7 +87,10 @@ Fanout. ## Requirements -- **Go and a C compiler** with `CGO_ENABLED=1` — DuckDB is a cgo dependency +- **Go 1.27.1 and a C/C++ toolchain** on native Linux or macOS, amd64 or arm64. + Build with `just build` or `bash scripts/with-duckdb.sh go build ./cmd/fanout`; + the wrapper supplies DuckDB's pinned headers, static libraries, and CGO flags. + The first build needs network access to download the checksum-verified engine. - **[Bun](https://bun.sh)** — compiles the browser assets - **[just](https://just.systems)** — task runner - A 32-character **authentication code secret** diff --git a/THIRD_PARTY_NOTICES b/THIRD_PARTY_NOTICES index fc649155..9c28bd25 100644 --- a/THIRD_PARTY_NOTICES +++ b/THIRD_PARTY_NOTICES @@ -1,7 +1,7 @@ FANOUT THIRD-PARTY NOTICES This file is generated from the Go packages linked into the four supported -release targets and from the production dependency graphs of the two embedded +release targets, the pinned native DuckDB engine, and the production dependency graphs of the two embedded browser applications. Development-only dependencies are excluded. Regenerate it with `just notices`; CI verifies it with `just notices-check`. @@ -13,83 +13,80 @@ COMPONENT INVENTORY - Go: cel.dev/cel-go v0.32.0 - Go: cel.dev/expr v0.25.3 -- Go: github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260826145851-49e71f2b2d21 +- Go: github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260930215002-015baf5dc150 - Go: github.com/alexedwards/scs/v2 v2.9.0 -- Go: github.com/andybalholm/brotli v1.2.3 +- Go: github.com/andybalholm/brotli v1.2.6 - Go: github.com/antlr4-go/antlr/v4 v4.13.1 - Go: github.com/beorn7/perks v1.0.1 - Go: github.com/cespare/xxhash/v2 v2.3.0 -- Go: github.com/coreos/go-oidc/v3 v3.20.0 -- Go: github.com/duckdb/duckdb-go-bindings v0.10505.0 -- Go: github.com/duckdb/duckdb-go-bindings/lib/darwin-amd64 v0.10505.0 -- Go: github.com/duckdb/duckdb-go-bindings/lib/darwin-arm64 v0.10505.0 -- Go: github.com/duckdb/duckdb-go-bindings/lib/linux-amd64 v0.10505.0 -- Go: github.com/duckdb/duckdb-go-bindings/lib/linux-arm64 v0.10505.0 -- Go: github.com/duckdb/duckdb-go/v2 v2.10505.0 -- Go: github.com/dustin/go-humanize v1.0.1 +- Go: github.com/coreos/go-oidc/v3 v3.21.0 +- Go: github.com/duckdb/duckdb-go-bindings v0.10506.0 +- Go: github.com/duckdb/duckdb-go/v2 v2.10506.0 +- Go: github.com/dustin/go-humanize v1.1.0 - Go: github.com/fsnotify/fsnotify v1.10.1 -- Go: github.com/go-jose/go-jose/v4 v4.1.4 +- Go: github.com/go-jose/go-jose/v4 v4.1.5 - Go: github.com/go-viper/mapstructure/v2 v2.5.0 - Go: github.com/google/jsonschema-go v0.4.3 - Go: github.com/google/uuid v1.6.0 - Go: github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 -- Go: github.com/klauspost/compress v1.19.2 +- Go: github.com/klauspost/compress v1.20.1 - Go: github.com/klauspost/cpuid/v2 v2.4.0 - Go: github.com/knadh/koanf/maps v0.1.3 - Go: github.com/knadh/koanf/parsers/yaml v1.1.1 - Go: github.com/knadh/koanf/providers/confmap v1.0.1 - Go: github.com/knadh/koanf/providers/file v1.2.1 -- Go: github.com/knadh/koanf/v2 v2.3.6 -- Go: github.com/labstack/echo/v5 v5.3.1 +- Go: github.com/knadh/koanf/v2 v2.3.7 +- Go: github.com/labstack/echo/v5 v5.4.0 - Go: github.com/mattn/go-isatty v0.0.24 - Go: github.com/mfridman/interpolate v0.0.2 - Go: github.com/mitchellh/copystructure v1.2.0 - Go: github.com/mitchellh/reflectwalk v1.0.2 -- Go: github.com/modelcontextprotocol/go-sdk v1.7.0 +- Go: github.com/modelcontextprotocol/go-sdk v1.8.0 - Go: github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 -- Go: github.com/ncruces/go-strftime v1.0.0 -- Go: github.com/parquet-go/bitpack v1.0.0 -- Go: github.com/parquet-go/jsonlite v1.0.0 +- Go: github.com/ncruces/go-strftime v1.1.0 +- Go: github.com/parquet-go/bitpack v1.1.0 +- Go: github.com/parquet-go/jsonlite v1.5.5 - Go: github.com/parquet-go/parquet-go v0.32.0 -- Go: github.com/pierrec/lz4/v4 v4.1.29 +- Go: github.com/pierrec/lz4/v4 v4.1.31 - Go: github.com/pressly/goose/v3 v3.28.0 - Go: github.com/prometheus/client_golang v1.24.1 -- Go: github.com/prometheus/client_model v0.6.2 -- Go: github.com/prometheus/common v0.70.1 +- Go: github.com/prometheus/client_model v0.6.3 +- Go: github.com/prometheus/common v0.72.0 - Go: github.com/prometheus/procfs v0.22.0 - Go: github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec - Go: github.com/segmentio/asm v1.2.1 - Go: github.com/segmentio/encoding v0.5.4 - Go: github.com/sethvargo/go-retry v0.4.0 - Go: github.com/sirupsen/logrus v1.10.2 -- Go: github.com/twpayne/go-geom v1.6.1 +- Go: github.com/twpayne/go-geom v1.7.0 - Go: github.com/wneessen/go-mail v0.8.1 - Go: github.com/yosida95/uritemplate/v3 v3.0.2 - Go: github.com/zeebo/xxh3 v1.1.0 - Go: go.opentelemetry.io/proto/otlp v1.11.0 - Go: go.uber.org/multierr v1.11.0 - Go: go.yaml.in/yaml/v3 v3.0.5 -- Go: golang.org/x/crypto v0.55.0 -- Go: golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa -- Go: golang.org/x/net v0.58.0 -- Go: golang.org/x/oauth2 v0.36.0 -- Go: golang.org/x/sync v0.22.0 -- Go: golang.org/x/sys v0.47.0 -- Go: golang.org/x/text v0.41.0 -- Go: golang.org/x/time v0.15.0 -- Go: google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5 -- Go: google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a +- Go: golang.org/x/crypto v0.57.0 +- Go: golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba +- Go: golang.org/x/net v0.59.0 +- Go: golang.org/x/oauth2 v0.37.0 +- Go: golang.org/x/sync v0.23.0 +- Go: golang.org/x/sys v0.48.0 +- Go: golang.org/x/text v0.42.0 +- Go: golang.org/x/time v0.16.0 +- Go: google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc +- Go: google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc - Go: google.golang.org/grpc v1.83.2 - Go: google.golang.org/protobuf v1.36.12 -- Go: modernc.org/libc v1.75.6 +- Go: modernc.org/libc v1.77.1 - Go: modernc.org/mathutil v1.7.1 - Go: modernc.org/memory v1.12.1 -- Go: modernc.org/sqlite v1.57.0 -- npm: @ag-ui/client 0.0.59 (declared license: MIT) -- npm: @ag-ui/core 0.0.59 (declared license: MIT) -- npm: @ag-ui/encoder 0.0.59 (declared license: MIT) -- npm: @ag-ui/proto 0.0.59 (declared license: MIT) -- npm: @bufbuild/protobuf 2.14.1 (declared license: (Apache-2.0 AND BSD-3-Clause)); no license file was present in the installed package +- Go: modernc.org/sqlite v1.60.1 +- Native: DuckDB v2.0.0-alpha43763 (96063b9e39749cc0f087bb11501d7edbee527957) +- npm: @ag-ui/client 1.0.1 (declared license: MIT) +- npm: @ag-ui/core 1.0.1 (declared license: MIT) +- npm: @ag-ui/encoder 1.0.1 (declared license: MIT) +- npm: @ag-ui/proto 1.0.1 (declared license: MIT) +- npm: @bufbuild/protobuf 2.16.0 (declared license: (Apache-2.0 AND BSD-3-Clause)); no license file was present in the installed package - npm: @floating-ui/core 1.8.0 (declared license: MIT) - npm: @floating-ui/dom 1.8.0 (declared license: MIT) - npm: @floating-ui/react 0.27.20 (declared license: MIT) @@ -97,40 +94,33 @@ COMPONENT INVENTORY - npm: @floating-ui/utils 0.2.12 (declared license: MIT) - npm: @fontsource-variable/geist 5.3.0 (declared license: OFL-1.1) - npm: @fontsource-variable/geist-mono 5.3.0 (declared license: OFL-1.1) -- npm: @hono/node-server 1.19.15 (declared license: MIT) -- npm: @mantine/core 9.5.2 (declared license: MIT) -- npm: @mantine/hooks 9.5.2 (declared license: MIT) -- npm: @modelcontextprotocol/ext-apps 1.7.5 (declared license: MIT) -- npm: @modelcontextprotocol/sdk 1.30.0 (declared license: MIT) +- npm: @mantine/core 9.6.3 (declared license: MIT) +- npm: @mantine/hooks 9.6.3 (declared license: MIT) +- npm: @modelcontextprotocol/client 2.2.0 (declared license: MIT) +- npm: @modelcontextprotocol/core 2.2.0 (declared license: MIT) +- npm: @modelcontextprotocol/ext-apps 2.0.3 (declared license: MIT) - npm: @phosphor-icons/react 2.1.10 (declared license: MIT) - npm: @protobuf-ts/protoc 2.11.1 (declared license: Apache-2.0) - npm: @standard-schema/spec 1.1.0 (declared license: MIT) -- npm: @tanstack/history 1.162.1 (declared license: MIT) -- npm: @tanstack/query-core 5.102.8 (declared license: MIT) -- npm: @tanstack/react-query 5.102.8 (declared license: MIT) -- npm: @tanstack/react-router 1.170.32 (declared license: MIT) -- npm: @tanstack/react-store 0.9.3 (declared license: MIT) -- npm: @tanstack/router-core 1.171.27 (declared license: MIT) -- npm: @tanstack/store 0.9.3 (declared license: MIT) +- npm: @tanstack/history 1.162.4 (declared license: MIT) +- npm: @tanstack/query-core 5.104.0 (declared license: MIT) +- npm: @tanstack/react-query 5.104.0 (declared license: MIT) +- npm: @tanstack/react-router 1.170.41 (declared license: MIT) +- npm: @tanstack/react-store 0.11.2 (declared license: MIT) +- npm: @tanstack/router-core 1.171.34 (declared license: MIT) +- npm: @tanstack/store 0.11.2 (declared license: MIT) - npm: @types/debug 4.1.13 (declared license: MIT) - npm: @types/estree 1.0.9 (declared license: MIT) - npm: @types/estree-jsx 1.0.5 (declared license: MIT) - npm: @types/hast 3.0.5 (declared license: MIT) - npm: @types/mdast 4.0.4 (declared license: MIT) - npm: @types/ms 2.1.0 (declared license: MIT) -- npm: @types/react 19.2.18 (declared license: MIT) +- npm: @types/react 19.3.0 (declared license: MIT) - npm: @types/unist 2.0.11 (declared license: MIT) - npm: @types/unist 3.0.3 (declared license: MIT) - npm: @types/uuid 10.0.0 (declared license: MIT) - npm: @ungap/structured-clone 1.4.0 (declared license: ISC) -- npm: accepts 2.0.0 (declared license: MIT) -- npm: ajv 8.20.0 (declared license: MIT) -- npm: ajv-formats 3.0.1 (declared license: MIT) - npm: bail 2.0.2 (declared license: MIT) -- npm: body-parser 2.3.0 (declared license: MIT) -- npm: bytes 3.1.2 (declared license: MIT) -- npm: call-bind-apply-helpers 1.0.2 (declared license: MIT) -- npm: call-bound 1.0.4 (declared license: MIT) - npm: ccount 2.0.1 (declared license: MIT) - npm: character-entities 2.0.2 (declared license: MIT) - npm: character-entities-html4 2.1.0 (declared license: MIT) @@ -139,83 +129,45 @@ COMPONENT INVENTORY - npm: clsx 2.1.1 (declared license: MIT) - npm: comma-separated-tokens 2.0.3 (declared license: MIT) - npm: compare-versions 6.1.1 (declared license: MIT) -- npm: content-disposition 1.1.0 (declared license: MIT) -- npm: content-type 1.0.5 (declared license: MIT) -- npm: content-type 2.1.0 (declared license: MIT) -- npm: cookie 0.7.2 (declared license: MIT) - npm: cookie-es 3.1.1 (declared license: MIT) -- npm: cookie-signature 1.2.2 (declared license: MIT) -- npm: cors 2.8.6 (declared license: MIT) - npm: cross-spawn 7.0.6 (declared license: MIT) - npm: csstype 3.2.3 (declared license: MIT) - npm: debug 4.4.3 (declared license: MIT) - npm: decode-named-character-reference 1.3.0 (declared license: MIT) -- npm: depd 2.0.0 (declared license: MIT) - npm: dequal 2.0.3 (declared license: MIT) - npm: detect-node-es 1.1.0 (declared license: MIT) - npm: devlop 1.1.0 (declared license: MIT) -- npm: dunder-proto 1.0.1 (declared license: MIT) - npm: echarts 6.1.0 (declared license: Apache-2.0) -- npm: ee-first 1.1.1 (declared license: MIT) -- npm: encodeurl 2.0.0 (declared license: MIT) -- npm: es-define-property 1.0.1 (declared license: MIT) -- npm: es-errors 1.3.0 (declared license: MIT) -- npm: es-object-atoms 1.1.2 (declared license: MIT) -- npm: escape-html 1.0.3 (declared license: MIT) - npm: escape-string-regexp 5.0.0 (declared license: MIT) - npm: estree-util-is-identifier-name 3.0.0 (declared license: MIT) -- npm: etag 1.8.1 (declared license: MIT) - npm: eventsource 3.0.7 (declared license: MIT) - npm: eventsource-parser 3.1.1 (declared license: MIT) -- npm: express 5.2.1 (declared license: MIT) -- npm: express-rate-limit 8.7.0 (declared license: MIT) - npm: extend 3.0.2 (declared license: MIT) -- npm: fast-deep-equal 3.1.3 (declared license: MIT) - npm: fast-equals 4.0.3 (declared license: MIT) - npm: fast-json-patch 3.1.1 (declared license: MIT) -- npm: fast-uri 3.1.8 (declared license: BSD-3-Clause) -- npm: finalhandler 2.1.1 (declared license: MIT) -- npm: forwarded 0.2.0 (declared license: MIT) -- npm: fresh 2.0.0 (declared license: MIT) -- npm: function-bind 1.1.2 (declared license: MIT) -- npm: get-intrinsic 1.3.0 (declared license: MIT) - npm: get-nonce 1.0.1 (declared license: MIT) -- npm: get-proto 1.0.1 (declared license: MIT) -- npm: gopd 1.2.0 (declared license: MIT) -- npm: has-symbols 1.1.0 (declared license: MIT) -- npm: hasown 2.0.4 (declared license: MIT) - npm: hast-util-to-jsx-runtime 2.3.6 (declared license: MIT) - npm: hast-util-whitespace 3.0.0 (declared license: MIT) -- npm: hono 4.13.7 (declared license: MIT) - npm: html-url-attributes 3.0.1 (declared license: MIT) -- npm: http-errors 2.0.1 (declared license: MIT) -- npm: iconv-lite 0.7.3 (declared license: MIT) -- npm: inherits 2.0.4 (declared license: ISC) - npm: inline-style-parser 0.2.7 (declared license: MIT) -- npm: ip-address 10.7.1 (declared license: MIT) -- npm: ipaddr.js 1.9.1 (declared license: MIT) - npm: is-alphabetical 2.0.1 (declared license: MIT) - npm: is-alphanumerical 2.0.1 (declared license: MIT) - npm: is-decimal 2.0.1 (declared license: MIT) - npm: is-hexadecimal 2.0.1 (declared license: MIT) - npm: is-plain-obj 4.1.0 (declared license: MIT) -- npm: is-promise 4.0.0 (declared license: MIT) - npm: isbot 5.2.2 (declared license: Unlicense) - npm: isexe 2.0.0 (declared license: ISC) -- npm: jose 6.2.10 (declared license: MIT) +- npm: jose 6.2.12 (declared license: MIT) - npm: js-tokens 4.0.0 (declared license: MIT) -- npm: json-schema-traverse 1.0.0 (declared license: MIT) -- npm: json-schema-typed 8.0.2 (declared license: BSD-2-Clause) - npm: longest-streak 3.1.0 (declared license: MIT) - npm: loose-envify 1.4.0 (declared license: MIT) - npm: markdown-table 3.0.4 (declared license: MIT) -- npm: math-intrinsics 1.1.0 (declared license: MIT) - npm: mdast-util-find-and-replace 3.0.2 (declared license: MIT) - npm: mdast-util-from-markdown 2.0.3 (declared license: MIT) - npm: mdast-util-gfm 3.1.0 (declared license: MIT) - npm: mdast-util-gfm-autolink-literal 2.0.1 (declared license: MIT) - npm: mdast-util-gfm-footnote 2.1.0 (declared license: MIT) -- npm: mdast-util-gfm-strikethrough 2.0.0 (declared license: MIT) +- npm: mdast-util-gfm-strikethrough 2.0.1 (declared license: MIT) - npm: mdast-util-gfm-table 2.0.0 (declared license: MIT) - npm: mdast-util-gfm-task-list-item 2.0.0 (declared license: MIT) - npm: mdast-util-mdx-expression 2.0.1 (declared license: MIT) @@ -223,22 +175,20 @@ COMPONENT INVENTORY - npm: mdast-util-mdxjs-esm 2.0.1 (declared license: MIT) - npm: mdast-util-phrasing 4.1.0 (declared license: MIT) - npm: mdast-util-to-hast 13.2.1 (declared license: MIT) -- npm: mdast-util-to-markdown 2.1.2 (declared license: MIT) +- npm: mdast-util-to-markdown 2.1.3 (declared license: MIT) - npm: mdast-util-to-string 4.0.0 (declared license: MIT) -- npm: media-typer 1.1.1 (declared license: MIT) -- npm: merge-descriptors 2.0.0 (declared license: MIT) -- npm: micromark 4.0.2 (declared license: MIT) -- npm: micromark-core-commonmark 2.0.3 (declared license: MIT) +- npm: micromark 4.0.3 (declared license: MIT) +- npm: micromark-core-commonmark 2.0.4 (declared license: MIT) - npm: micromark-extension-gfm 3.0.0 (declared license: MIT) - npm: micromark-extension-gfm-autolink-literal 2.1.0 (declared license: MIT) - npm: micromark-extension-gfm-footnote 2.1.0 (declared license: MIT) - npm: micromark-extension-gfm-strikethrough 2.1.0 (declared license: MIT) -- npm: micromark-extension-gfm-table 2.1.1 (declared license: MIT) +- npm: micromark-extension-gfm-table 2.1.2 (declared license: MIT) - npm: micromark-extension-gfm-tagfilter 2.0.0 (declared license: MIT) - npm: micromark-extension-gfm-task-list-item 2.1.0 (declared license: MIT) - npm: micromark-factory-destination 2.0.1 (declared license: MIT) - npm: micromark-factory-label 2.0.1 (declared license: MIT) -- npm: micromark-factory-space 2.0.1 (declared license: MIT) +- npm: micromark-factory-space 2.1.0 (declared license: MIT) - npm: micromark-factory-title 2.0.1 (declared license: MIT) - npm: micromark-factory-whitespace 2.0.1 (declared license: MIT) - npm: micromark-util-character 2.1.1 (declared license: MIT) @@ -247,6 +197,7 @@ COMPONENT INVENTORY - npm: micromark-util-combine-extensions 2.0.1 (declared license: MIT) - npm: micromark-util-decode-numeric-character-reference 2.0.2 (declared license: MIT) - npm: micromark-util-decode-string 2.0.1 (declared license: MIT) +- npm: micromark-util-edit-map 1.0.0 (declared license: MIT) - npm: micromark-util-encode 2.0.1 (declared license: MIT) - npm: micromark-util-html-tag-name 2.0.1 (declared license: MIT) - npm: micromark-util-normalize-identifier 2.0.1 (declared license: MIT) @@ -254,29 +205,17 @@ COMPONENT INVENTORY - npm: micromark-util-sanitize-uri 2.0.1 (declared license: MIT) - npm: micromark-util-subtokenize 2.1.0 (declared license: MIT) - npm: micromark-util-symbol 2.0.1 (declared license: MIT) -- npm: micromark-util-types 2.0.2 (declared license: MIT) -- npm: mime-db 1.54.0 (declared license: MIT) -- npm: mime-types 3.0.2 (declared license: MIT) +- npm: micromark-util-types 2.0.3 (declared license: MIT) - npm: ms 2.1.3 (declared license: MIT) -- npm: negotiator 1.1.0 (declared license: MIT) - npm: object-assign 4.1.1 (declared license: MIT) -- npm: object-inspect 1.13.4 (declared license: MIT) -- npm: on-finished 2.4.1 (declared license: MIT) -- npm: once 1.4.0 (declared license: ISC) - npm: parse-entities 4.0.2 (declared license: MIT) -- npm: parseurl 1.3.3 (declared license: MIT) - npm: path-key 3.1.1 (declared license: MIT) -- npm: path-to-regexp 8.4.2 (declared license: MIT) - npm: pkce-challenge 5.0.1 (declared license: MIT) - npm: prop-types 15.8.1 (declared license: MIT) - npm: property-information 7.2.0 (declared license: MIT) -- npm: proxy-addr 2.0.7 (declared license: MIT) -- npm: qs 6.16.0 (declared license: BSD-3-Clause) -- npm: range-parser 1.3.0 (declared license: MIT) -- npm: raw-body 3.0.2 (declared license: MIT) -- npm: react 19.2.8 (declared license: MIT) -- npm: react-dom 19.2.8 (declared license: MIT) -- npm: react-draggable 4.7.1 (declared license: MIT) +- npm: react 19.3.0 (declared license: MIT) +- npm: react-dom 19.3.0 (declared license: MIT) +- npm: react-draggable 4.7.2 (declared license: MIT) - npm: react-grid-layout 2.2.4 (declared license: MIT) - npm: react-is 16.13.1 (declared license: MIT) - npm: react-markdown 10.1.0 (declared license: MIT) @@ -289,58 +228,41 @@ COMPONENT INVENTORY - npm: remark-parse 11.0.0 (declared license: MIT) - npm: remark-rehype 11.1.2 (declared license: MIT) - npm: remark-stringify 11.0.0 (declared license: MIT) -- npm: require-from-string 2.0.2 (declared license: MIT) - npm: resize-observer-polyfill 1.5.1 (declared license: MIT) -- npm: router 2.2.0 (declared license: MIT) - npm: rxjs 7.8.1 (declared license: Apache-2.0) -- npm: safer-buffer 2.1.2 (declared license: MIT) -- npm: scheduler 0.27.0 (declared license: MIT) -- npm: send 1.2.1 (declared license: MIT) -- npm: seroval 1.6.4 (declared license: MIT) -- npm: seroval-plugins 1.6.4 (declared license: MIT) -- npm: serve-static 2.2.1 (declared license: MIT) -- npm: setprototypeof 1.2.0 (declared license: ISC) +- npm: scheduler 0.28.0 (declared license: MIT) +- npm: seroval 1.6.8 (declared license: MIT) +- npm: seroval-plugins 1.6.8 (declared license: MIT) - npm: shebang-command 2.0.0 (declared license: MIT) - npm: shebang-regex 3.0.0 (declared license: MIT) -- npm: side-channel 1.1.1 (declared license: MIT) -- npm: side-channel-list 1.0.1 (declared license: MIT) -- npm: side-channel-map 1.0.1 (declared license: MIT) -- npm: side-channel-weakmap 1.0.2 (declared license: MIT) - npm: space-separated-tokens 2.0.2 (declared license: MIT) -- npm: statuses 2.0.2 (declared license: MIT) - npm: stringify-entities 4.0.4 (declared license: MIT) - npm: style-to-js 1.1.21 (declared license: MIT) - npm: style-to-object 1.0.14 (declared license: MIT) - npm: tabbable 6.5.0 (declared license: MIT) - npm: tagged-tag 1.0.0 (declared license: MIT) -- npm: toidentifier 1.0.1 (declared license: MIT) - npm: trim-lines 3.0.1 (declared license: MIT) - npm: trough 2.2.0 (declared license: MIT) - npm: tslib 2.3.0 (declared license: 0BSD) - npm: tslib 2.8.1 (declared license: 0BSD) -- npm: type-fest 5.9.0 (declared license: (MIT OR CC0-1.0)) -- npm: type-is 2.1.0 (declared license: MIT) +- npm: type-fest 5.10.0 (declared license: (MIT OR CC0-1.0)) - npm: unified 11.0.5 (declared license: MIT) - npm: unist-util-is 6.0.1 (declared license: MIT) - npm: unist-util-position 5.0.0 (declared license: MIT) - npm: unist-util-stringify-position 4.0.0 (declared license: MIT) - npm: unist-util-visit 5.1.0 (declared license: MIT) - npm: unist-util-visit-parents 6.0.2 (declared license: MIT) -- npm: unpipe 1.0.0 (declared license: MIT) - npm: untruncate-json 0.0.1 (declared license: MIT) - npm: use-callback-ref 1.3.3 (declared license: MIT) - npm: use-sidecar 1.1.3 (declared license: MIT) -- npm: use-sync-external-store 1.6.0 (declared license: MIT) +- npm: use-sync-external-store 1.7.0 (declared license: MIT) - npm: uuid 11.1.1 (declared license: MIT) - npm: uuid 14.0.2 (declared license: MIT) -- npm: vary 1.1.2 (declared license: MIT) - npm: vfile 6.0.3 (declared license: MIT) - npm: vfile-message 4.0.3 (declared license: MIT) - npm: which 2.0.2 (declared license: ISC) -- npm: wrappy 1.0.2 (declared license: ISC) - npm: zod 3.25.76 (declared license: MIT) -- npm: zod 4.5.4 (declared license: MIT) -- npm: zod-to-json-schema 3.25.2 (declared license: ISC) +- npm: zod 4.6.5 (declared license: MIT) - npm: zrender 6.1.0 (declared license: BSD-3-Clause) - npm: zwitch 2.0.4 (declared license: MIT) @@ -586,15 +508,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- Applies to ------------------------------------------------------------- - Go: cel.dev/expr v0.25.3 / LICENSE -- Go: github.com/go-jose/go-jose/v4 v4.1.4 / LICENSE +- Go: github.com/go-jose/go-jose/v4 v4.1.5 / LICENSE - Go: github.com/prometheus/client_golang v1.24.1 / LICENSE -- Go: github.com/prometheus/client_model v0.6.2 / LICENSE -- Go: github.com/prometheus/common v0.70.1 / LICENSE +- Go: github.com/prometheus/client_model v0.6.3 / LICENSE +- Go: github.com/prometheus/common v0.72.0 / LICENSE - Go: github.com/prometheus/procfs v0.22.0 / LICENSE - Go: github.com/sethvargo/go-retry v0.4.0 / LICENSE - Go: go.opentelemetry.io/proto/otlp v1.11.0 / LICENSE -- Go: google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5 / LICENSE -- Go: google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a / LICENSE +- Go: google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc / LICENSE +- Go: google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc / LICENSE - Go: google.golang.org/grpc v1.83.2 / LICENSE - npm: @protobuf-ts/protoc 2.11.1 / supplemental/LICENSE ---------------------------------------------------------------------------- @@ -802,11 +724,11 @@ Apache License limitations under the License. --- Applies to ------------------------------------------------------------- -- Go: github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260826145851-49e71f2b2d21 / LICENSE -- npm: @ag-ui/client 0.0.59 / LICENSE -- npm: @ag-ui/core 0.0.59 / LICENSE -- npm: @ag-ui/encoder 0.0.59 / LICENSE -- npm: @ag-ui/proto 0.0.59 / LICENSE +- Go: github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260930215002-015baf5dc150 / LICENSE +- npm: @ag-ui/client 1.0.1 / LICENSE +- npm: @ag-ui/core 1.0.1 / LICENSE +- npm: @ag-ui/encoder 1.0.1 / LICENSE +- npm: @ag-ui/proto 1.0.1 / LICENSE ---------------------------------------------------------------------------- MIT License @@ -858,7 +780,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- Go: github.com/andybalholm/brotli v1.2.3 / LICENSE +- Go: github.com/andybalholm/brotli v1.2.6 / LICENSE ---------------------------------------------------------------------------- Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. @@ -967,7 +889,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- Go: github.com/coreos/go-oidc/v3 v3.20.0 / LICENSE +- Go: github.com/coreos/go-oidc/v3 v3.21.0 / LICENSE ---------------------------------------------------------------------------- Apache License @@ -1173,7 +1095,7 @@ Apache License limitations under the License. --- Applies to ------------------------------------------------------------- -- Go: github.com/coreos/go-oidc/v3 v3.20.0 / NOTICE +- Go: github.com/coreos/go-oidc/v3 v3.21.0 / NOTICE ---------------------------------------------------------------------------- CoreOS Project @@ -1183,11 +1105,7 @@ This product includes software developed at CoreOS, Inc. (http://www.coreos.com/). --- Applies to ------------------------------------------------------------- -- Go: github.com/duckdb/duckdb-go-bindings v0.10505.0 / LICENSE -- Go: github.com/duckdb/duckdb-go-bindings/lib/darwin-amd64 v0.10505.0 / LICENSE -- Go: github.com/duckdb/duckdb-go-bindings/lib/darwin-arm64 v0.10505.0 / LICENSE -- Go: github.com/duckdb/duckdb-go-bindings/lib/linux-amd64 v0.10505.0 / LICENSE -- Go: github.com/duckdb/duckdb-go-bindings/lib/linux-arm64 v0.10505.0 / LICENSE +- Go: github.com/duckdb/duckdb-go-bindings v0.10506.0 / LICENSE ---------------------------------------------------------------------------- Copyright 2018-2026 Stichting DuckDB Foundation @@ -1199,7 +1117,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- Go: github.com/duckdb/duckdb-go/v2 v2.10505.0 / LICENSE +- Go: github.com/duckdb/duckdb-go/v2 v2.10506.0 / LICENSE ---------------------------------------------------------------------------- Copyright 2019-2024 Marc Boeker @@ -1212,7 +1130,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- Go: github.com/dustin/go-humanize v1.0.1 / LICENSE +- Go: github.com/dustin/go-humanize v1.1.0 / LICENSE ---------------------------------------------------------------------------- Copyright (c) 2005-2008 Dustin Sallings @@ -1385,7 +1303,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- Applies to ------------------------------------------------------------- -- Go: github.com/klauspost/compress v1.19.2 / LICENSE +- Go: github.com/klauspost/compress v1.20.1 / LICENSE ---------------------------------------------------------------------------- Copyright (c) 2012 The Go Authors. All rights reserved. @@ -1724,7 +1642,7 @@ SOFTWARE. - Go: github.com/knadh/koanf/parsers/yaml v1.1.1 / LICENSE - Go: github.com/knadh/koanf/providers/confmap v1.0.1 / LICENSE - Go: github.com/knadh/koanf/providers/file v1.2.1 / LICENSE -- Go: github.com/knadh/koanf/v2 v2.3.6 / LICENSE +- Go: github.com/knadh/koanf/v2 v2.3.7 / LICENSE ---------------------------------------------------------------------------- The MIT License @@ -1750,7 +1668,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- Go: github.com/labstack/echo/v5 v5.3.1 / LICENSE +- Go: github.com/labstack/echo/v5 v5.4.0 / LICENSE ---------------------------------------------------------------------------- The MIT License (MIT) @@ -1845,7 +1763,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- Go: github.com/modelcontextprotocol/go-sdk v1.7.0 / LICENSE +- Go: github.com/modelcontextprotocol/go-sdk v1.8.0 / LICENSE ---------------------------------------------------------------------------- The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0. @@ -2102,7 +2020,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- Applies to ------------------------------------------------------------- -- Go: github.com/ncruces/go-strftime v1.0.0 / LICENSE +- Go: github.com/ncruces/go-strftime v1.1.0 / LICENSE ---------------------------------------------------------------------------- MIT License @@ -2128,7 +2046,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- Go: github.com/parquet-go/bitpack v1.0.0 / LICENSE +- Go: github.com/parquet-go/bitpack v1.1.0 / LICENSE ---------------------------------------------------------------------------- Apache License @@ -2334,7 +2252,7 @@ Apache License limitations under the License. --- Applies to ------------------------------------------------------------- -- Go: github.com/parquet-go/jsonlite v1.0.0 / LICENSE +- Go: github.com/parquet-go/jsonlite v1.5.5 / LICENSE ---------------------------------------------------------------------------- MIT License @@ -2577,7 +2495,7 @@ Home page: https://github.com/apache/parquet-format License: http://www.apache.org/licenses/LICENSE-2.0 --- Applies to ------------------------------------------------------------- -- Go: github.com/pierrec/lz4/v4 v4.1.29 / LICENSE +- Go: github.com/pierrec/lz4/v4 v4.1.31 / LICENSE ---------------------------------------------------------------------------- Copyright (c) 2015, Pierre Curto @@ -2659,7 +2577,7 @@ Copyright 2010 The Go Authors See source code for license details. --- Applies to ------------------------------------------------------------- -- Go: github.com/prometheus/client_model v0.6.2 / NOTICE +- Go: github.com/prometheus/client_model v0.6.3 / NOTICE ---------------------------------------------------------------------------- Data model artifacts for Prometheus. @@ -2669,7 +2587,7 @@ This product includes software developed at SoundCloud Ltd. (http://soundcloud.com/). --- Applies to ------------------------------------------------------------- -- Go: github.com/prometheus/common v0.70.1 / NOTICE +- Go: github.com/prometheus/common v0.72.0 / NOTICE ---------------------------------------------------------------------------- Common libraries shared by Prometheus Go components. @@ -2796,7 +2714,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- Go: github.com/twpayne/go-geom v1.6.1 / LICENSE +- Go: github.com/twpayne/go-geom v1.7.0 / LICENSE ---------------------------------------------------------------------------- Copyright (c) 2013, Tom Payne @@ -3009,14 +2927,14 @@ See the License for the specific language governing permissions and limitations under the License. --- Applies to ------------------------------------------------------------- -- Go: golang.org/x/crypto v0.55.0 / LICENSE -- Go: golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa / LICENSE -- Go: golang.org/x/net v0.58.0 / LICENSE -- Go: golang.org/x/oauth2 v0.36.0 / LICENSE -- Go: golang.org/x/sync v0.22.0 / LICENSE -- Go: golang.org/x/sys v0.47.0 / LICENSE -- Go: golang.org/x/text v0.41.0 / LICENSE -- Go: golang.org/x/time v0.15.0 / LICENSE +- Go: golang.org/x/crypto v0.57.0 / LICENSE +- Go: golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba / LICENSE +- Go: golang.org/x/net v0.59.0 / LICENSE +- Go: golang.org/x/oauth2 v0.37.0 / LICENSE +- Go: golang.org/x/sync v0.23.0 / LICENSE +- Go: golang.org/x/sys v0.48.0 / LICENSE +- Go: golang.org/x/text v0.42.0 / LICENSE +- Go: golang.org/x/time v0.16.0 / LICENSE ---------------------------------------------------------------------------- Copyright 2009 The Go Authors. @@ -3098,7 +3016,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- Applies to ------------------------------------------------------------- -- Go: modernc.org/libc v1.75.6 / LICENSE +- Go: modernc.org/libc v1.77.1 / LICENSE ---------------------------------------------------------------------------- Copyright (c) 2017 The Libc Authors. All rights reserved. @@ -3130,7 +3048,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- Applies to ------------------------------------------------------------- -- Go: modernc.org/libc v1.75.6 / LICENSE-3RD-PARTY.md +- Go: modernc.org/libc v1.77.1 / LICENSE-3RD-PARTY.md ---------------------------------------------------------------------------- # Third-Party Software Notices @@ -3571,7 +3489,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- Applies to ------------------------------------------------------------- -- Go: modernc.org/sqlite v1.57.0 / LICENSE +- Go: modernc.org/sqlite v1.60.1 / LICENSE ---------------------------------------------------------------------------- Copyright (c) 2017 The Sqlite Authors. All rights reserved. @@ -3602,9 +3520,366 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- Applies to ------------------------------------------------------------- -- Go: modernc.org/sqlite v1.57.0 / LICENSE-SQLITE ----------------------------------------------------------------------------- +- Go: modernc.org/sqlite v1.60.1 / LICENSE-3RD-PARTY.md +---------------------------------------------------------------------------- + +# Third-Party Licenses + +`modernc.org/sqlite` is BSD-3-Clause; that license is in [LICENSE](LICENSE) and it is +not repeated here. This file accounts for everything else -- every other body of code, +of any origin, that reaches you through this repository. + +The list is **transitively flattened**. It is not the direct dependencies of +`go.mod`: it is the whole module graph, `go list -m all`, plus the third-party C that +was transpiled into Go and committed here, plus the upstream notices that dependencies +carry in turn -- musl libc, for one, reaches you through `modernc.org/libc` and appears +below on its own account. Each component is classified by what it actually does to a +program that imports this driver, because "a dependency" and "code in your binary" +are not the same question: + +- [1. Components linked into your program](#1-components-linked-into-your-program) +- [2. Components used only by the test suite](#2-components-used-only-by-the-test-suite) +- [3. Components in the module graph, not compiled into anything](#3-components-in-the-module-graph-not-compiled-into-anything) +- [4. Third-party material in the repository, outside any build](#4-third-party-material-in-the-repository-outside-any-build) +- [Appendix A: license texts](#appendix-a-license-texts) +- [Appendix B: inherited third-party notices](#appendix-b-inherited-third-party-notices) + +Every license text referenced by the tables is reproduced in full in Appendix A. Where +several components share one text, it appears once, with every copyright notice that +came with it merged in place -- nothing is summarized, truncated or linked away. + + + +## 1. Components linked into your program + +Everything below ends up in a binary that imports `modernc.org/sqlite`. This is the +section that matters when you redistribute software built on this driver: the notices +and license texts it points at are the ones you have to carry with you. + +| Component | Version | License | Reached via | Text | +| --- | --- | --- | --- | --- | +| [github.com/dustin/go-humanize](https://pkg.go.dev/github.com/dustin/go-humanize) | v1.0.1 | MIT | modernc.org/libc, `go.mod` | [L1](#L1) | +| [github.com/google/uuid](https://pkg.go.dev/github.com/google/uuid) | v1.6.0 | BSD-3-Clause | modernc.org/libc, `go.mod` | [L2](#L2) | +| [github.com/remyoudompheng/bigfft](https://pkg.go.dev/github.com/remyoudompheng/bigfft) | v0.0.0-20230129092748-24d4a6f8daec | BSD-3-Clause | modernc.org/fileutil, modernc.org/libc, modernc.org/mathutil, modernc.org/memory, `go.mod` | [L2](#L2) | +| [Go](https://github.com/golang/go) | -- | BSD-3-Clause | modernc.org/libc | [N1](#N1) | +| [go-netdb](https://github.com/dominikh/go-netdb) | -- | MIT | modernc.org/libc | [N1](#N1) | +| [golang.org/x/sys](https://pkg.go.dev/golang.org/x/sys) | v0.48.0 | BSD-3-Clause | github.com/google/pprof, github.com/mattn/go-isatty, modernc.org/libc, modernc.org/memory, `go.mod` | [L3](#L3) | +| [modernc.org/libc](https://pkg.go.dev/modernc.org/libc) | v1.77.1 | BSD-3-Clause | `go.mod` | [L4](#L4) | +| [modernc.org/mathutil](https://pkg.go.dev/modernc.org/mathutil) | v1.7.1 | BSD-3-Clause | modernc.org/fileutil, modernc.org/libc, modernc.org/memory, `go.mod` | [L4](#L4) | +| [modernc.org/memory](https://pkg.go.dev/modernc.org/memory) | v1.12.1 | BSD-3-Clause, attribution reference | modernc.org/libc, `go.mod` | [L4](#L4), [L2](#L2), [L5](#L5), [L6](#L6) | +| [musl libc](https://musl.libc.org/) | -- | MIT | modernc.org/libc | [N1](#N1) | +| [NixOS/nixpkgs](https://github.com/NixOS/nixpkgs) | -- | MIT | modernc.org/libc | [N1](#N1) | +| [SQLite](https://sqlite.org/) | 3.53.4 | public domain | transpiled into `lib/` | [L7](#L7) | +| [sqlite-vec](https://github.com/asg017/sqlite-vec) | v0.1.9 | MIT | transpiled into `vec/` | [L8](#L8) | +| [SQLite `test_demovfs.c`](https://www.sqlite.org/src/doc/trunk/src/test_demovfs.c) | -- | public domain | `vfs/c/vfs.c`, transpiled into `vfs/` | [L7](#L7) | + +- **SQLite** -- The SQLite C amalgamation, translated to Go by `modernc.org/ccgo`. Local copy of the upstream dedication: `LICENSE-SQLITE`. +- **sqlite-vec** -- Vector-search extension, linked only when `modernc.org/sqlite/vec` is imported. Local copy: `LICENSE-SQLITE_VEC`. +- **SQLite `test_demovfs.c`** -- Starting point of the Go-fs VFS bridge, linked only when `modernc.org/sqlite/vfs` is imported. Carries SQLite's own copyright disclaimer. + +## 2. Components used only by the test suite + +Compiled into this repository's own tests only. It is not part of the library and does +not reach a program that imports `modernc.org/sqlite`. + +| Component | Version | License | Reached via | Text | +| --- | --- | --- | --- | --- | +| [github.com/google/pprof](https://pkg.go.dev/github.com/google/pprof) | v0.0.0-20260802141513-ef3492d7dac3 | Apache-2.0, BSD-3-Clause | `go.mod` | [L9](#L9), [L10](#L10) | +| [modernc.org/fileutil](https://pkg.go.dev/modernc.org/fileutil) | v1.4.0 | BSD-3-Clause | modernc.org/libc, `go.mod` | [L4](#L4), [L11](#L11) | + +## 3. Components in the module graph, not compiled into anything + +Reachable in the module graph -- `go list -m all` reports them, and the Go module proxy +will fetch them -- but no package of theirs is compiled into the library or into its +tests. They are listed for completeness, because tools that read `go.sum` or an SBOM +generated from the module graph will report them. Note in particular that the only +copyleft-adjacent license anywhere in this project, MPL-2.0, appears here and only here. +`modernc.org/ccgo` and `modernc.org/cc` are in this section because `modernc.org/libc` +requires them; they are separately the transpilers that produced the Go code in `lib/` +and `vec/`, but that happens in the sibling `libsqlite3` repository, not in any build of +this one. + +| Component | Version | License | Reached via | Text | +| --- | --- | --- | --- | --- | +| [github.com/chzyer/readline](https://pkg.go.dev/github.com/chzyer/readline) | v1.5.1 | MIT | github.com/google/pprof | [L12](#L12) | +| [github.com/hashicorp/golang-lru/v2](https://pkg.go.dev/github.com/hashicorp/golang-lru/v2) | v2.0.7 | MPL-2.0, BSD-3-Clause | modernc.org/libc | [L13](#L13), [L14](#L14) | +| [github.com/ianlancetaylor/demangle](https://pkg.go.dev/github.com/ianlancetaylor/demangle) | v0.0.0-20250417193237-f615e6bd150b | BSD-3-Clause | github.com/google/pprof | [L2](#L2) | +| [github.com/mattn/go-isatty](https://pkg.go.dev/github.com/mattn/go-isatty) | v0.0.24 | MIT | modernc.org/libc, `go.mod` | [L15](#L15) | +| [github.com/ncruces/go-strftime](https://pkg.go.dev/github.com/ncruces/go-strftime) | v1.0.0 | MIT | modernc.org/libc, `go.mod` | [L8](#L8) | +| [golang.org/x/mod](https://pkg.go.dev/golang.org/x/mod) | v0.41.0 | BSD-3-Clause | modernc.org/libc | [L3](#L3) | +| [golang.org/x/sync](https://pkg.go.dev/golang.org/x/sync) | v0.23.0 | BSD-3-Clause | modernc.org/libc | [L3](#L3) | +| [golang.org/x/tools](https://pkg.go.dev/golang.org/x/tools) | v0.50.0 | BSD-3-Clause | modernc.org/libc | [L3](#L3) | +| [modernc.org/cc/v4](https://pkg.go.dev/modernc.org/cc/v4) | v4.29.7 | BSD-3-Clause | modernc.org/libc | [L4](#L4) | +| [modernc.org/ccgo/v4](https://pkg.go.dev/modernc.org/ccgo/v4) | v4.36.1 | BSD-3-Clause | modernc.org/libc | [L4](#L4) | +| [modernc.org/gc/v2](https://pkg.go.dev/modernc.org/gc/v2) | v2.6.5 | BSD-3-Clause | modernc.org/libc | [L16](#L16) | +| [modernc.org/gc/v3](https://pkg.go.dev/modernc.org/gc/v3) | v3.1.5 | BSD-3-Clause | modernc.org/libc | [L16](#L16) | +| [modernc.org/goabi0](https://pkg.go.dev/modernc.org/goabi0) | v0.2.0 | BSD-3-Clause | modernc.org/libc | [L17](#L17) | +| [modernc.org/opt](https://pkg.go.dev/modernc.org/opt) | v0.2.0 | BSD-3-Clause | modernc.org/libc | [L4](#L4) | +| [modernc.org/sortutil](https://pkg.go.dev/modernc.org/sortutil) | v1.2.1 | BSD-3-Clause | modernc.org/libc | [L4](#L4) | +| [modernc.org/strutil](https://pkg.go.dev/modernc.org/strutil) | v1.2.1 | BSD-3-Clause | modernc.org/libc | [L4](#L4) | +| [modernc.org/token](https://pkg.go.dev/modernc.org/token) | v1.1.0 | BSD-3-Clause | modernc.org/libc | [L2](#L2) | + +## 4. Third-party material in the repository, outside any build + +Present in a clone or a source tarball of this repository, compiled into nothing. Listed +so that a redistribution of the source tree is covered as well as a redistribution of a +binary. + +| Material | Location | Origin | License | Text | +| --- | --- | --- | --- | --- | +| SQLite TCL test suite | `testdata/tcl/`, `testdata/overlay/`, `testdata/mptest.c` | [SQLite](https://sqlite.org/) | public domain | [L7](#L7) | +| Sponsor logos and word marks | `sponsors/` | the respective sponsors | -- | -- | + +The sponsor logos and word marks in `sponsors/` are the trademarks of their owners. They +are reproduced to acknowledge sponsorship, are not licensed under this project's +license, and confer no right to use those marks. + +`vendor_libs/` is a second, self-contained Go module holding the regeneration tool +invoked by `make vendor`. Its own dependencies are a subset of the modules already +listed above. + +## Appendix A: license texts + +Verbatim. The only editing is the merging of copyright notices where one text is shared +by several components; where a component's text is unique, it is byte-for-byte the file +shipped upstream. + + + +### L1: MIT + +Applies to: + +- github.com/dustin/go-humanize -- Copyright (c) 2005-2008 Dustin Sallings + +```text +Copyright (c) 2005-2008 Dustin Sallings + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +``` + + + +### L2: BSD-3-Clause + +Applies to: + +- github.com/google/uuid -- Copyright (c) 2009,2014 Google Inc. All rights reserved. +- github.com/ianlancetaylor/demangle -- Copyright (c) 2015 The Go Authors. All rights reserved. +- github.com/remyoudompheng/bigfft -- Copyright (c) 2012 The Go Authors. All rights reserved. +- modernc.org/memory (`LICENSE-GO`) -- Copyright (c) 2009 The Go Authors. All rights reserved. +- modernc.org/token -- Copyright (c) 2009 The Go Authors. All rights reserved. + +```text +Copyright (c) 2009,2014 Google Inc. All rights reserved. +Copyright (c) 2015 The Go Authors. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + + + +### L3: BSD-3-Clause + +Applies to: + +- golang.org/x/mod -- Copyright 2009 The Go Authors. +- golang.org/x/sync -- Copyright 2009 The Go Authors. +- golang.org/x/sys -- Copyright 2009 The Go Authors. +- golang.org/x/tools -- Copyright 2009 The Go Authors. + +```text +Copyright 2009 The Go Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google LLC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + + + +### L4: BSD-3-Clause + +Applies to: + +- modernc.org/cc/v4 -- Copyright (c) 2014 The CC Authors. All rights reserved. +- modernc.org/ccgo/v4 -- Copyright (c) 2017 The CCGO Authors. All rights reserved. +- modernc.org/fileutil -- Copyright (c) 2014 The fileutil Authors. All rights reserved. +- modernc.org/libc -- Copyright (c) 2017 The Libc Authors. All rights reserved. +- modernc.org/mathutil -- Copyright (c) 2014 The mathutil Authors. All rights reserved. +- modernc.org/mathutil (`mersenne/LICENSE`) -- Copyright (c) 2014 The mersenne Authors. All rights reserved. +- modernc.org/memory -- Copyright (c) 2017 The Memory Authors. All rights reserved. +- modernc.org/opt -- Copyright (c) 2019 The Opt Authors. All rights reserved. +- modernc.org/sortutil -- Copyright (c) 2014 The sortutil Authors. All rights reserved. +- modernc.org/strutil -- Copyright (c) 2014 The strutil Authors. All rights reserved. + +```text +Copyright (c) 2014 The CC Authors. All rights reserved. +Copyright (c) 2017 The CCGO Authors. All rights reserved. +Copyright (c) 2014 The fileutil Authors. All rights reserved. +Copyright (c) 2017 The Libc Authors. All rights reserved. +Copyright (c) 2014 The mathutil Authors. All rights reserved. +Copyright (c) 2014 The mersenne Authors. All rights reserved. +Copyright (c) 2017 The Memory Authors. All rights reserved. +Copyright (c) 2019 The Opt Authors. All rights reserved. +Copyright (c) 2014 The sortutil Authors. All rights reserved. +Copyright (c) 2014 The strutil Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + + + +### L5: attribution reference + +Applies to: + +- modernc.org/memory (`LICENSE-LOGO`) + +```text +https://commons.wikimedia.org/wiki/File:Memory_infra_logo.png +``` + + +### L6: BSD-3-Clause + +Applies to: + +- modernc.org/memory (`LICENSE-MMAP-GO`) -- Copyright (c) 2011, Evan Shaw All rights reserved. + +```text +Copyright (c) 2011, Evan Shaw +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + + + +### L7: public domain + +Applies to: + +- SQLite 3.53.4 (`LICENSE-SQLITE`) +- SQLite `test_demovfs.c` +- SQLite test suite (`testdata/`) + +```text SQLite Is Public Domain All of the code and documentation in SQLite has been dedicated to the public @@ -3630,13 +3905,21 @@ has been taken from other projects or from the open internet. Every line of code can be traced back to its original author, and all of those authors have public domain dedications on file. So the SQLite code base is clean and is uncontaminated with licensed code from other projects. +``` ---- Applies to ------------------------------------------------------------- -- Go: modernc.org/sqlite v1.57.0 / LICENSE-SQLITE_VEC ----------------------------------------------------------------------------- + + +### L8: MIT +Applies to: + +- github.com/ncruces/go-strftime -- Copyright (c) 2022 Nuno Cruces +- sqlite-vec v0.1.9 (`LICENSE-SQLITE_VEC`) -- Copyright (c) 2024 Alex Garcia + +```text MIT License +Copyright (c) 2022 Nuno Cruces Copyright (c) 2024 Alex Garcia Permission is hereby granted, free of charge, to any person obtaining a copy @@ -3656,239 +3939,1667 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +``` ---- Applies to ------------------------------------------------------------- -- npm: @floating-ui/core 1.8.0 / LICENSE -- npm: @floating-ui/dom 1.8.0 / LICENSE -- npm: @floating-ui/react 0.27.20 / LICENSE -- npm: @floating-ui/react-dom 2.1.9 / LICENSE -- npm: @floating-ui/utils 0.2.12 / LICENSE ----------------------------------------------------------------------------- + -MIT License +### L9: Apache-2.0 -Copyright (c) 2021-present Floating UI contributors +Applies to: -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +- github.com/google/pprof -- Copyright [yyyy] [name of copyright owner] -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +```text + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION ---- Applies to ------------------------------------------------------------- -- npm: @fontsource-variable/geist 5.3.0 / LICENSE ----------------------------------------------------------------------------- + 1. Definitions. -Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font) Geist-Italic[wght].ttf: Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font) + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +``` + + + +### L10: BSD-3-Clause + +Applies to: + +- github.com/google/pprof (`third_party/svgpan/LICENSE`) -- Copyright 2009-2017 Andrea Leofreddi . All rights reserved. + +```text +Copyright 2009-2017 Andrea Leofreddi . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are +permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those of the +authors and should not be interpreted as representing official policies, either expressed +or implied, of Andrea Leofreddi. +``` + + + +### L11: BSD-3-Clause + +Applies to: + +- modernc.org/fileutil (`falloc/LICENSE`) -- Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. +- modernc.org/fileutil (`hdb/LICENSE`) -- Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. +- modernc.org/fileutil (`storage/LICENSE`) -- Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +```text +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + + + +### L12: MIT + +Applies to: + +- github.com/chzyer/readline -- Copyright (c) 2015 Chzyer + +```text +The MIT License (MIT) + +Copyright (c) 2015 Chzyer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` + + + +### L13: MPL-2.0 + +Applies to: + +- github.com/hashicorp/golang-lru/v2 -- Copyright (c) 2014 HashiCorp, Inc. + +```text +Copyright (c) 2014 HashiCorp, Inc. + +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. +``` + + + +### L14: BSD-3-Clause + +Applies to: + +- github.com/hashicorp/golang-lru/v2 (`simplelru/LICENSE_list`) -- Copyright (c) 2009 The Go Authors. All rights reserved. + +```text +This license applies to simplelru/list.go + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + + + +### L15: MIT + +Applies to: + +- github.com/mattn/go-isatty -- Copyright (c) Yasuhiro MATSUMOTO + +```text +Copyright (c) Yasuhiro MATSUMOTO + +MIT License (Expat) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +``` + + + +### L16: BSD-3-Clause + +Applies to: + +- modernc.org/gc/v2 -- Copyright (c) 2016 The GC Authors. All rights reserved. +- modernc.org/gc/v3 -- Copyright (c) 2016 The GC Authors. All rights reserved. + +```text +------------------------------------------------------------------------------- +Copyright (c) 2016 The GC Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------- + +Code in this repository contains or may contain + + - copied original code from + - code based on original code from + - code inspired by original code in + + "The Go Programming Language" project at https://go.googlesource.com/go/. + +Copy of the license of the original code follows below + +------------------------------------------------------------------------------- +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------- +``` + + + +### L17: BSD-3-Clause + +Applies to: + +- modernc.org/goabi0 -- Copyright (c) 2025 The goabi0 Authors. All rights reserved. + +```text +Copyright (c) 2025 The goabi0 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + +## Appendix B: inherited third-party notices + +These documents are the transitive tail: notices that a dependency carries for code of +its own that came from somewhere else. They are reproduced verbatim, with only the +Markdown heading levels shifted so they nest inside this file. + + + +### N1: `LICENSE-3RD-PARTY.md` from modernc.org/libc + +Covers: Go (BSD-3-Clause), musl libc (MIT), go-netdb (MIT), NixOS/nixpkgs (MIT). + +--- + +#### Third-Party Software Notices + +This repository contains code and assets acquired from third-party sources. +While the main project is licensed under the BSD-3 License, the components +listed below are subject to their own specific license terms and copyright +notices. + +The following is a list of third-party software included in this repository, +their locations, and their respective licenses. + + +---- + +##### Go + +* **URL:** https://github.com/golang/go +---- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---- + +##### musl libc + +* **URL:** https://musl.libc.org/ + +---- + +musl as a whole is licensed under the following standard MIT license: + +---------------------------------------------------------------------- +Copyright © 2005-2020 Rich Felker, et al. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +---------------------------------------------------------------------- + +Authors/contributors include: + +A. Wilcox +Ada Worcester +Alex Dowad +Alex Suykov +Alexander Monakov +Andre McCurdy +Andrew Kelley +Anthony G. Basile +Aric Belsito +Arvid Picciani +Bartosz Brachaczek +Benjamin Peterson +Bobby Bingham +Boris Brezillon +Brent Cook +Chris Spiegel +Clément Vasseur +Daniel Micay +Daniel Sabogal +Daurnimator +David Carlier +David Edelsohn +Denys Vlasenko +Dmitry Ivanov +Dmitry V. Levin +Drew DeVault +Emil Renner Berthing +Fangrui Song +Felix Fietkau +Felix Janda +Gianluca Anzolin +Hauke Mehrtens +He X +Hiltjo Posthuma +Isaac Dunham +Jaydeep Patil +Jens Gustedt +Jeremy Huntwork +Jo-Philipp Wich +Joakim Sindholt +John Spencer +Julien Ramseier +Justin Cormack +Kaarle Ritvanen +Khem Raj +Kylie McClain +Leah Neukirchen +Luca Barbato +Luka Perkov +M Farkas-Dyck (Strake) +Mahesh Bodapati +Markus Wichmann +Masanori Ogino +Michael Clark +Michael Forney +Mikhail Kremnyov +Natanael Copa +Nicholas J. Kain +orc +Pascal Cuoq +Patrick Oppenlander +Petr Hosek +Petr Skocik +Pierre Carrier +Reini Urban +Rich Felker +Richard Pennington +Ryan Fairfax +Samuel Holland +Segev Finer +Shiz +sin +Solar Designer +Stefan Kristiansson +Stefan O'Rear +Szabolcs Nagy +Timo Teräs +Trutz Behn +Valentin Ochs +Will Dietz +William Haddon +William Pitcock + +Portions of this software are derived from third-party works licensed +under terms compatible with the above MIT license: + +The TRE regular expression implementation (src/regex/reg* and +src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed +under a 2-clause BSD license (license text in the source files). The +included version has been heavily modified by Rich Felker in 2012, in +the interests of size, simplicity, and namespace cleanliness. + +Much of the math library code (src/math/* and src/complex/*) is +Copyright © 1993,2004 Sun Microsystems or +Copyright © 2003-2011 David Schultz or +Copyright © 2003-2009 Steven G. Kargl or +Copyright © 2003-2009 Bruce D. Evans or +Copyright © 2008 Stephen L. Moshier or +Copyright © 2017-2018 Arm Limited +and labelled as such in comments in the individual source files. All +have been licensed under extremely permissive terms. + +The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 +The Android Open Source Project and is licensed under a two-clause BSD +license. It was taken from Bionic libc, used on Android. + +The AArch64 memcpy and memset code (src/string/aarch64/*) are +Copyright © 1999-2019, Arm Limited. + +The implementation of DES for crypt (src/crypt/crypt_des.c) is +Copyright © 1994 David Burren. It is licensed under a BSD license. + +The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was +originally written by Solar Designer and placed into the public +domain. The code also comes with a fallback permissive license for use +in jurisdictions that may not recognize the public domain. + +The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 +Valentin Ochs and is licensed under an MIT-style license. + +The x86_64 port was written by Nicholas J. Kain and is licensed under +the standard MIT terms. + +The mips and microblaze ports were originally written by Richard +Pennington for use in the ellcc project. The original code was adapted +by Rich Felker for build system and code conventions during upstream +integration. It is licensed under the standard MIT terms. + +The mips64 port was contributed by Imagination Technologies and is +licensed under the standard MIT terms. + +The powerpc port was also originally written by Richard Pennington, +and later supplemented and integrated by John Spencer. It is licensed +under the standard MIT terms. + +All other files which have no copyright comments are original works +produced specifically for use as part of this library, written either +by Rich Felker, the main author of the library, or by one or more +contibutors listed above. Details on authorship of individual files +can be found in the git version control history of the project. The +omission of copyright and license comments in each file is in the +interest of source tree size. + +In addition, permission is hereby granted for all public header files +(include/* and arch/*/bits/*) and crt files intended to be linked into +applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit +the copyright notice and permission notice otherwise required by the +license, and to use these files without any requirement of +attribution. These files include substantial contributions from: + +Bobby Bingham +John Spencer +Nicholas J. Kain +Rich Felker +Richard Pennington +Stefan Kristiansson +Szabolcs Nagy + +all of whom have explicitly granted such permission. + +This file previously contained text expressing a belief that most of +the files covered by the above exception were sufficiently trivial not +to be subject to copyright, resulting in confusion over whether it +negated the permissions granted in the license. In the spirit of +permissive licensing, and of not having licensing issues being an +obstacle to adoption, that text has been removed. + +---- + +##### go-netdb + +* **URL:** https://github.com/dominikh/go-netdb + +---- + +Copyright (c) 2012 Dominik Honnef + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---- + +##### NixOS/nixpkgs + +* **URL:** https://github.com/NixOS/nixpkgs + +---- + +Copyright (c) 2003-2025 Eelco Dolstra and the Nixpkgs/NixOS contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +--- Applies to ------------------------------------------------------------- +- Go: modernc.org/sqlite v1.60.1 / LICENSE-SQLITE +---------------------------------------------------------------------------- + +SQLite Is Public Domain + +All of the code and documentation in SQLite has been dedicated to the public +domain by the authors. All code authors, and representatives of the companies +they work for, have signed affidavits dedicating their contributions to the +public domain and originals of those signed affidavits are stored in a firesafe +at the main offices of Hwaci. Anyone is free to copy, modify, publish, use, +compile, sell, or distribute the original SQLite code, either in source code +form or as a compiled binary, for any purpose, commercial or non-commercial, +and by any means. + +The previous paragraph applies to the deliverable code and documentation in +SQLite - those parts of the SQLite library that you actually bundle and ship +with a larger application. Some scripts used as part of the build process (for +example the "configure" scripts generated by autoconf) might fall under other +open-source licenses. Nothing from these build scripts ever reaches the final +deliverable SQLite library, however, and so the licenses associated with those +scripts should not be a factor in assessing your rights to copy and use the +SQLite library. + +All of the deliverable code in SQLite has been written from scratch. No code +has been taken from other projects or from the open internet. Every line of +code can be traced back to its original author, and all of those authors have +public domain dedications on file. So the SQLite code base is clean and is +uncontaminated with licensed code from other projects. + +--- Applies to ------------------------------------------------------------- +- Go: modernc.org/sqlite v1.60.1 / LICENSE-SQLITE_VEC +---------------------------------------------------------------------------- + +MIT License + +Copyright (c) 2024 Alex Garcia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. +--- Applies to ------------------------------------------------------------- +- Native: DuckDB v2.0.0-alpha43763 (96063b9e39749cc0f087bb11501d7edbee527957) / duckdb-NOTICE +---------------------------------------------------------------------------- -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. +DuckDB 96063b9e39749cc0f087bb11501d7edbee527957 — upstream license and bundled third-party notices. +Source: https://github.com/duckdb/duckdb/tree/96063b9e39749cc0f087bb11501d7edbee527957 -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: +--- LICENSE --- -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. +Copyright 2018-2026 Stichting DuckDB Foundation -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. +--- src/include/duckdb/storage/compression/alp/algorithm/LICENSE --- -TERMINATION -This license becomes null and void if any of the above conditions are -not met. +MIT License -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. +Copyright (c) 2023 CWI, Azim Afroozeh, Leonardo Xavier Kuffo Rivero ---- Applies to ------------------------------------------------------------- -- npm: @fontsource-variable/geist-mono 5.3.0 / LICENSE ----------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font.git) GeistMono-Italic[wght].ttf: Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font.git) +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +--- src/include/duckdb/storage/compression/alprd/algorithm/LICENSE --- ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ +MIT License -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. +Copyright (c) 2023 CWI, Azim Afroozeh, Leonardo Xavier Kuffo Rivero -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). +--- third_party/brotli/LICENSE --- -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. +--- third_party/concurrentqueue/LICENSE --- -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. +This license file applies to everything in this repository except that which +is explicitly annotated as being written by other authors, i.e. the Boost +queue (included in the benchmarks for comparison), Intel's TBB library (ditto), +the CDSChecker tool (used for verification), the Relacy model checker (ditto), +and Jeff Preshing's semaphore implementation (used in the blocking queue) which +has a zlib license (embedded in lightweightsempahore.h). -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. +--- -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. +Simplified BSD License: -TERMINATION -This license becomes null and void if any of the above conditions are -not met. +Copyright (c) 2013-2016, Cameron Desrochers. +All rights reserved. -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: ---- Applies to ------------------------------------------------------------- -- npm: @hono/node-server 1.19.15 / LICENSE ----------------------------------------------------------------------------- +- Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright notice, this list of +conditions and the following disclaimer in the documentation and/or other materials +provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + +I have also chosen to dual-license under the Boost Software License as an alternative to +the Simplified BSD license above: + +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +--- third_party/fast_float/LICENSE --- + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +--- third_party/fastpforlib/LICENSE --- + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--- third_party/fmt/LICENSE --- + +Copyright (c) 2012 - present, Victor Zverovich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- Optional exception to the license --- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into a machine-executable object form of such +source code, you may redistribute such embedded portions in such object form +without including the above copyright and permission notices. + +--- third_party/fsst/LICENSE --- MIT License -Copyright (c) 2022 - present, Yusuke Wada and Hono contributors +Copyright (c) 2018-2020, CWI, TU Munich, FSU Jena Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -3908,14 +5619,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: @mantine/core 9.5.2 / LICENSE -- npm: @mantine/hooks 9.5.2 / LICENSE ----------------------------------------------------------------------------- +--- third_party/httplib/LICENSE --- -MIT License +The MIT License (MIT) -Copyright (c) 2021 Vitaly Rtishchev +Copyright (c) 2017 yhirose Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -3935,17 +5643,117 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: @modelcontextprotocol/ext-apps 1.7.5 / LICENSE ----------------------------------------------------------------------------- +--- third_party/hyperloglog/LICENSE --- + +Copyright (c) 2012 Art.sy, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- third_party/jaro_winkler/LICENSE --- -The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0. +Copyright © 2022 Max Bachmann -Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License. +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -No rights beyond those granted by the applicable original license are conveyed for such contributions. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- third_party/jemalloc/LICENSE --- + +Unless otherwise specified, files in the jemalloc source distribution are +subject to the following license: +-------------------------------------------------------------------------------- +Copyright (C) 2002-present Jason Evans . +All rights reserved. +Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved. +Copyright (C) 2009-present Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice(s), + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice(s), + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- + +--- third_party/lz4/LICENSE --- + +LZ4 Library +Copyright (c) 2011-2020, Yann Collet +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- third_party/mbedtls/LICENSE --- + +Mbed TLS files are provided under a dual [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +OR [GPL-2.0-or-later](https://spdx.org/licenses/GPL-2.0-or-later.html) license. +This means that users may choose which of these licenses they take the code +under. + +The full text of each of these licenses is given below. ---- Apache License Version 2.0, January 2004 @@ -3997,9 +5805,9 @@ No rights beyond those granted by the applicable original license are conveyed f "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally - submitted to the Licensor for inclusion in the Work by the copyright - owner or by an individual or Legal Entity authorized to submit on behalf - of the copyright owner. For the purposes of this definition, "submitted" + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, @@ -4124,11 +5932,381 @@ No rights beyond those granted by the applicable original license are conveyed f END OF TERMS AND CONDITIONS ---- + APPENDIX: How to apply the Apache License to your work. -MIT License + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC. + +=============================================================================== + + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +--- third_party/miniz/LICENSE --- + +Copyright 2013-2014 RAD Game Tools and Valve Software +Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC + +All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -4137,114 +6315,239 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ---- +--- third_party/parquet/LICENSE --- -Creative Commons Attribution 4.0 International (CC-BY-4.0) +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Documentation in this project (excluding specifications) is licensed under -CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for -the full license text. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION ---- Applies to ------------------------------------------------------------- -- npm: @modelcontextprotocol/sdk 1.30.0 / LICENSE ----------------------------------------------------------------------------- + 1. Definitions. -MIT License + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -Copyright (c) 2024 Anthropic, PBC + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + END OF TERMS AND CONDITIONS -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +-------------------------------------------------------------------------------- ---- Applies to ------------------------------------------------------------- -- npm: @phosphor-icons/react 2.1.10 / LICENSE ----------------------------------------------------------------------------- +This product includes code from Apache Avro. -MIT License +Copyright: 2014 The Apache Software Foundation. +Home page: https://avro.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 -Copyright (c) 2020 Phosphor Icons +-------------------------------------------------------------------------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +This project includes code from Daniel Lemire's JavaFastPFOR project. The +"Lemire" bit packing source code produced by parquet-generator is derived from +the JavaFastPFOR project. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +Copyright: 2013 Daniel Lemire +Home page: http://lemire.me/en/ +Project page: https://github.com/lemire/JavaFastPFOR +License: Apache License Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +-------------------------------------------------------------------------------- ---- Applies to ------------------------------------------------------------- -- npm: @standard-schema/spec 1.1.0 / LICENSE ----------------------------------------------------------------------------- +This product includes code from Apache Spark. -MIT License +* dev/merge_parquet_pr.py is based on Spark's dev/merge_spark_pr.py -Copyright (c) 2024 Colin McDonnell +Copyright: 2014 The Apache Software Foundation. +Home page: https://spark.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +-------------------------------------------------------------------------------- -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +This product includes code from Twitter's ElephantBird project. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +* parquet-hadoop's UnmaterializableRecordCounter.java includes code from + ElephantBird's LzoRecordReader.java ---- Applies to ------------------------------------------------------------- -- npm: @tanstack/history 1.162.1 / LICENSE -- npm: @tanstack/query-core 5.102.8 / LICENSE -- npm: @tanstack/react-query 5.102.8 / LICENSE -- npm: @tanstack/react-router 1.170.32 / LICENSE -- npm: @tanstack/router-core 1.171.27 / LICENSE ----------------------------------------------------------------------------- +Copyright: 2012-2014 Twitter +Home page: https://github.com/twitter/elephant-bird +License: http://www.apache.org/licenses/LICENSE-2.0 -MIT License +--- third_party/pcg/LICENSE --- -Copyright (c) 2021-present Tanner Linsley +Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -4264,14 +6567,66 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: @tanstack/react-store 0.9.3 / LICENSE -- npm: @tanstack/store 0.9.3 / LICENSE ----------------------------------------------------------------------------- +--- third_party/pdqsort/LICENSE --- + +Copyright (c) 2021 Orson Peters + +This software is provided 'as-is', without any express or implied warranty. In no event will the +authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial +applications, and to alter it and redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the + original software. If you use this software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be misrepresented as + being the original software. + +3. This notice may not be removed or altered from any source distribution. + +--- third_party/re2/LICENSE --- + +// Copyright (c) 2009 The RE2 Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- third_party/ska_sort/LICENSE --- + +Copyright Malte Skarupke 2016. + Distributed under the Boost Software License, Version 1.0. + (See http://www.boost.org/LICENSE_1_0.txt) + +--- third_party/skiplist/LICENSE --- MIT License -Copyright (c) 2021 Tanner Linsley +Copyright (c) 2017-2023 Paul Ross Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -4291,523 +6646,618 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: @types/debug 4.1.13 / LICENSE -- npm: @types/estree 1.0.9 / LICENSE -- npm: @types/estree-jsx 1.0.5 / LICENSE -- npm: @types/hast 3.0.5 / LICENSE -- npm: @types/mdast 4.0.4 / LICENSE -- npm: @types/ms 2.1.0 / LICENSE -- npm: @types/react 19.2.18 / LICENSE -- npm: @types/unist 2.0.11 / LICENSE -- npm: @types/unist 3.0.3 / LICENSE -- npm: @types/uuid 10.0.0 / LICENSE ----------------------------------------------------------------------------- +--- third_party/snappy/LICENSE --- -MIT License +Copyright 2011, Google Inc. +All rights reserved. - Copyright (c) Microsoft Corporation. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE +=== ---- Applies to ------------------------------------------------------------- -- npm: @ungap/structured-clone 1.4.0 / LICENSE ----------------------------------------------------------------------------- +Some of the benchmark data in testdata/ is licensed differently: -ISC License + - fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and + is licensed under the Creative Commons Attribution 3.0 license + (CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/ + for more information. -Copyright (c) 2021, Andrea Giammarchi, @WebReflection + - kppkn.gtb is taken from the Gaviota chess tablebase set, and + is licensed under the MIT License. See + https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1 + for more information. -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. + - paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper + “Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA + Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro, + which is licensed under the CC-BY license. See + http://www.ploscompbiol.org/static/license for more ifnormation. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. + - alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project + Gutenberg. The first three have expired copyrights and are in the public + domain; the latter does not have expired copyright, but is still in the + public domain according to the license information + (http://www.gutenberg.org/ebooks/53). ---- Applies to ------------------------------------------------------------- -- npm: accepts 2.0.0 / LICENSE -- npm: mime-types 3.0.2 / LICENSE ----------------------------------------------------------------------------- +--- third_party/tdigest/LICENSE --- -(The MIT License) +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + 1. Definitions. -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. ---- Applies to ------------------------------------------------------------- -- npm: ajv 8.20.0 / LICENSE ----------------------------------------------------------------------------- + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -The MIT License (MIT) + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -Copyright (c) 2015-2021 Evgeny Poberezkin + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. ---- Applies to ------------------------------------------------------------- -- npm: ajv-formats 3.0.1 / LICENSE ----------------------------------------------------------------------------- + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -MIT License + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -Copyright (c) 2020 Evgeny Poberezkin + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and ---- Applies to ------------------------------------------------------------- -- npm: bail 2.0.2 / license -- npm: ccount 2.0.1 / license -- npm: character-entities 2.0.2 / license -- npm: character-entities-html4 2.1.0 / license -- npm: character-entities-legacy 3.0.0 / license -- npm: character-reference-invalid 2.0.1 / license -- npm: mdast-util-to-string 4.0.0 / license -- npm: unist-util-position 5.0.0 / license -- npm: unist-util-visit 5.1.0 / license ----------------------------------------------------------------------------- + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -(The MIT License) + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -Copyright (c) 2015 Titus Wormer + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. ---- Applies to ------------------------------------------------------------- -- npm: body-parser 2.3.0 / LICENSE -- npm: type-is 2.1.0 / LICENSE ----------------------------------------------------------------------------- + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -(The MIT License) + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2015 Douglas Christopher Wilson + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + END OF TERMS AND CONDITIONS -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + APPENDIX: How to apply the Apache License to your work. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. ---- Applies to ------------------------------------------------------------- -- npm: bytes 3.1.2 / LICENSE ----------------------------------------------------------------------------- + Copyright [yyyy] [name of copyright owner] -(The MIT License) + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -Copyright (c) 2012-2014 TJ Holowaychuk -Copyright (c) 2015 Jed Watson + http://www.apache.org/licenses/LICENSE-2.0 -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +--- third_party/tdigest/NOTICES --- -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +The Java version of the t-digest was originally authored by Ted Dunning ---- Applies to ------------------------------------------------------------- -- npm: call-bind-apply-helpers 1.0.2 / LICENSE -- npm: call-bound 1.0.4 / LICENSE -- npm: es-define-property 1.0.1 / LICENSE -- npm: es-errors 1.3.0 / LICENSE -- npm: es-object-atoms 1.1.2 / LICENSE -- npm: side-channel-list 1.0.1 / LICENSE -- npm: side-channel-map 1.0.1 / LICENSE ----------------------------------------------------------------------------- +A number of small but very helpful changes have been contributed by Adrien Grand (https://github.com/jpountz) to the Java version. -MIT License +The C++ version herein is a derivative of the Java version. It was written by Derrick R. Burns (https:://github.com/derrickburns). +The main modifications are 1) higher performance multi- t-digest merging and 2) faster quantile() and cdf() computation. -Copyright (c) 2024 Jordan Harband +--- third_party/thrift/thrift/LICENSE --- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + 1. Definitions. ---- Applies to ------------------------------------------------------------- -- npm: clsx 2.1.1 / license ----------------------------------------------------------------------------- + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -MIT License + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -Copyright (c) Luke Edwards (lukeed.com) + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). ---- Applies to ------------------------------------------------------------- -- npm: comma-separated-tokens 2.0.3 / license -- npm: hast-util-whitespace 3.0.0 / license -- npm: is-alphabetical 2.0.1 / license -- npm: is-alphanumerical 2.0.1 / license -- npm: is-decimal 2.0.1 / license -- npm: is-hexadecimal 2.0.1 / license -- npm: mdast-util-to-hast 13.2.1 / license -- npm: space-separated-tokens 2.0.2 / license -- npm: unist-util-stringify-position 4.0.0 / license -- npm: unist-util-visit-parents 6.0.2 / license -- npm: zwitch 2.0.4 / license ----------------------------------------------------------------------------- + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -(The MIT License) + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -Copyright (c) 2016 Titus Wormer + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: ---- Applies to ------------------------------------------------------------- -- npm: compare-versions 6.1.1 / LICENSE ----------------------------------------------------------------------------- + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -The MIT License (MIT) + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -Copyright (c) 2015-2021 Ole Michelsen + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. ---- Applies to ------------------------------------------------------------- -- npm: content-disposition 1.1.0 / LICENSE -- npm: forwarded 0.2.0 / LICENSE -- npm: media-typer 1.1.1 / LICENSE -- npm: vary 1.1.2 / LICENSE ----------------------------------------------------------------------------- + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -(The MIT License) + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -Copyright (c) 2014-2017 Douglas Christopher Wilson + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + END OF TERMS AND CONDITIONS -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + APPENDIX: How to apply the Apache License to your work. ---- Applies to ------------------------------------------------------------- -- npm: content-type 1.0.5 / LICENSE -- npm: content-type 2.1.0 / LICENSE ----------------------------------------------------------------------------- + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -(The MIT License) + Copyright [yyyy] [name of copyright owner] -Copyright (c) 2015 Douglas Christopher Wilson + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: + http://www.apache.org/licenses/LICENSE-2.0 -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +-------------------------------------------------- +SOFTWARE DISTRIBUTED WITH THRIFT: ---- Applies to ------------------------------------------------------------- -- npm: cookie 0.7.2 / LICENSE ----------------------------------------------------------------------------- +The Apache Thrift software includes a number of subcomponents with +separate copyright notices and license terms. Your use of the source +code for the these subcomponents is subject to the terms and +conditions of the following licenses. -(The MIT License) +-------------------------------------------------- +Portions of the following files are licensed under the MIT License: -Copyright (c) 2012-2014 Roman Shtylman -Copyright (c) 2015 Douglas Christopher Wilson + lib/erl/src/Makefile.am -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Please see doc/otp-base-license.txt for the full terms of this license. -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +-------------------------------------------------- +For the aclocal/ax_boost_base.m4 and contrib/fb303/aclocal/ax_boost_base.m4 components: -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# Copyright (c) 2007 Thomas Porschberg +# +# Copying and distribution of this file, with or without +# modification, are permitted in any medium without royalty provided +# the copyright notice and this notice are preserved. ---- Applies to ------------------------------------------------------------- -- npm: cookie-es 3.1.1 / LICENSE ----------------------------------------------------------------------------- +-------------------------------------------------- +For the lib/nodejs/lib/thrift/json_parse.js: -MIT License +/* + json_parse.js + 2015-05-02 + Public Domain. + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. -Cookie-es copyright (c) Pooya Parsa +*/ +(By Douglas Crockford ) +-------------------------------------------------- -Cookie parsing based on https://github.com/jshttp/cookie -Copyright (c) 2012-2014 Roman Shtylman -Copyright (c) 2015 Douglas Christopher Wilson +--- third_party/utf8proc/LICENSE --- -Set-Cookie parsing based on https://github.com/nfriedly/set-cookie-parser -Copyright (c) 2015 Nathan Friedly (http://nfriedly.com/) +## utf8proc license ## -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +**utf8proc** is a software package originally developed +by Jan Behrens and the rest of the Public Software Group, who +deserve nearly all of the credit for this library, that is now maintained by the Julia-language developers. Like the original utf8proc, +whose copyright and license statements are reproduced below, all new +work on the utf8proc library is licensed under the [MIT "expat" +license](http://opensource.org/licenses/MIT): -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +*Copyright © 2014-2019 by Steven G. Johnson, Jiahao Chen, Tony Kelman, Jonas Fonseca, and other contributors listed in the git history.* + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---- Applies to ------------------------------------------------------------- -- npm: cookie-signature 1.2.2 / LICENSE ----------------------------------------------------------------------------- - -(The MIT License) - -Copyright (c) 2012–2024 LearnBoost and other contributors; +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +## Original utf8proc license ## -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +*Copyright (c) 2009, 2013 Public Software Group e. V., Berlin, Germany* -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: ---- Applies to ------------------------------------------------------------- -- npm: cors 2.8.6 / LICENSE ----------------------------------------------------------------------------- +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -(The MIT License) +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. -Copyright (c) 2013 Troy Goode +## Unicode data license ## -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +This software contains data (`utf8proc_data.c`) derived from processing +the Unicode data files. The following license applies to that data: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +**COPYRIGHT AND PERMISSION NOTICE** -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*Copyright (c) 1991-2007 Unicode, Inc. All rights reserved. Distributed +under the Terms of Use in http://www.unicode.org/copyright.html.* ---- Applies to ------------------------------------------------------------- -- npm: cross-spawn 7.0.6 / LICENSE ----------------------------------------------------------------------------- +Permission is hereby granted, free of charge, to any person obtaining a +copy of the Unicode data files and any associated documentation (the "Data +Files") or Unicode software and any associated documentation (the +"Software") to deal in the Data Files or Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, and/or sell copies of the Data Files or Software, and +to permit persons to whom the Data Files or Software are furnished to do +so, provided that (a) the above copyright notice(s) and this permission +notice appear with all copies of the Data Files or Software, (b) both the +above copyright notice(s) and this permission notice appear in associated +documentation, and (c) there is clear notice in each modified Data File or +in the Software as well as in the documentation associated with the Data +File(s) or Software that the data or software has been modified. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS +INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR +CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. + +Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be +registered in some jurisdictions. All other trademarks and registered +trademarks mentioned herein are the property of their respective owners. + +--- third_party/vergesort/LICENSE --- The MIT License (MIT) -Copyright (c) 2018 Made With MOXY Lda +Copyright (c) 2015 Morwenn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -4827,11 +7277,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: csstype 3.2.3 / LICENSE ----------------------------------------------------------------------------- +--- third_party/yyjson/LICENSE --- -Copyright (c) 2017-2018 Fredrik Nicol +MIT License + +Copyright (c) 2020 YaoYuan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -4851,203 +7301,316 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +--- third_party/zstd/LICENSE --- + +BSD License + +For Zstandard software + +Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +=== Unicode data used by the bundled time-zone and collation extension === +Source: https://www.unicode.org/license.txt + +UNICODE LICENSE V3 + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 1991-2026 Unicode, Inc. + +NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR +SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT +DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. + --- Applies to ------------------------------------------------------------- -- npm: debug 4.4.3 / LICENSE +- npm: @floating-ui/core 1.8.0 / LICENSE +- npm: @floating-ui/dom 1.8.0 / LICENSE +- npm: @floating-ui/react 0.27.20 / LICENSE +- npm: @floating-ui/react-dom 2.1.9 / LICENSE +- npm: @floating-ui/utils 0.2.12 / LICENSE ---------------------------------------------------------------------------- -(The MIT License) +MIT License -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon +Copyright (c) 2021-present Floating UI contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: decode-named-character-reference 1.3.0 / license -- npm: hast-util-to-jsx-runtime 2.3.6 / license -- npm: markdown-table 3.0.4 / license -- npm: mdast-util-find-and-replace 3.0.2 / license -- npm: mdast-util-from-markdown 2.0.3 / license -- npm: mdast-util-gfm 3.1.0 / license -- npm: mdast-util-gfm-footnote 2.1.0 / license -- npm: mdast-util-to-markdown 2.1.2 / license -- npm: micromark 4.0.2 / license -- npm: micromark-core-commonmark 2.0.3 / license -- npm: micromark-extension-gfm-table 2.1.1 / license -- npm: micromark-factory-destination 2.0.1 / license -- npm: micromark-factory-label 2.0.1 / license -- npm: micromark-factory-space 2.0.1 / license -- npm: micromark-factory-title 2.0.1 / license -- npm: micromark-factory-whitespace 2.0.1 / license -- npm: micromark-util-character 2.1.1 / license -- npm: micromark-util-chunked 2.0.1 / license -- npm: micromark-util-classify-character 2.0.1 / license -- npm: micromark-util-combine-extensions 2.0.1 / license -- npm: micromark-util-decode-numeric-character-reference 2.0.2 / license -- npm: micromark-util-decode-string 2.0.1 / license -- npm: micromark-util-encode 2.0.1 / license -- npm: micromark-util-html-tag-name 2.0.1 / license -- npm: micromark-util-normalize-identifier 2.0.1 / license -- npm: micromark-util-resolve-all 2.0.1 / license -- npm: micromark-util-sanitize-uri 2.0.1 / license -- npm: micromark-util-subtokenize 2.1.0 / license -- npm: micromark-util-symbol 2.0.1 / license -- npm: micromark-util-types 2.0.2 / license -- npm: remark-gfm 4.0.1 / license -- npm: remark-rehype 11.1.2 / license -- npm: vfile-message 4.0.3 / license +- npm: @fontsource-variable/geist 5.3.0 / LICENSE ---------------------------------------------------------------------------- -(The MIT License) +Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font) Geist-Italic[wght].ttf: Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font) -Copyright (c) Titus Wormer +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. ---- Applies to ------------------------------------------------------------- -- npm: depd 2.0.0 / LICENSE ----------------------------------------------------------------------------- +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. -(The MIT License) +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. -Copyright (c) 2014-2018 Douglas Christopher Wilson +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +TERMINATION +This license becomes null and void if any of the above conditions are +not met. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: dequal 2.0.3 / license +- npm: @fontsource-variable/geist-mono 5.3.0 / LICENSE ---------------------------------------------------------------------------- -The MIT License (MIT) +Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font.git) GeistMono-Italic[wght].ttf: Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font.git) -Copyright (c) Luke Edwards (lukeed.com) +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. ---- Applies to ------------------------------------------------------------- -- npm: detect-node-es 1.1.0 / LICENSE ----------------------------------------------------------------------------- +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. -MIT License +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. -Copyright (c) 2017 Ilya Kantor +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. ---- Applies to ------------------------------------------------------------- -- npm: devlop 1.1.0 / license ----------------------------------------------------------------------------- +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: -(The MIT License) +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. -Copyright (c) 2023 Titus Wormer +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: dunder-proto 1.0.1 / LICENSE -- npm: math-intrinsics 1.1.0 / LICENSE +- npm: @mantine/core 9.6.3 / LICENSE +- npm: @mantine/hooks 9.6.3 / LICENSE ---------------------------------------------------------------------------- MIT License -Copyright (c) 2024 ECMAScript Shims +Copyright (c) 2021 Vitaly Rtishchev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5068,10 +7631,20 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: echarts 6.1.0 / LICENSE +- npm: @modelcontextprotocol/client 2.2.0 / LICENSE +- npm: @modelcontextprotocol/core 2.2.0 / LICENSE +- npm: @modelcontextprotocol/ext-apps 2.0.3 / LICENSE ---------------------------------------------------------------------------- -Apache License +The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0. + +Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License. + +No rights beyond those granted by the applicable original license are conveyed for such contributions. + +--- + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -5121,9 +7694,9 @@ Apache License "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" + submitted to the Licensor for inclusion in the Work by the copyright + owner or by an individual or Legal Entity authorized to submit on behalf + of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, @@ -5248,68 +7821,71 @@ Apache License END OF TERMS AND CONDITIONS - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - +--- +MIT License +Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC. -======================================================================== -Apache ECharts Subcomponents: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The Apache ECharts project contains subcomponents with separate copyright -notices and license terms. Your use of the source code for these -subcomponents is also subject to the terms and conditions of the following -licenses. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -BSD 3-Clause (d3.js): -The following files embed [d3.js](https://github.com/d3/d3) BSD 3-Clause: - `/src/chart/treemap/treemapLayout.ts`, - `/src/chart/tree/layoutHelper.ts`, - `/src/chart/graph/forceHelper.ts`, - `/src/util/number.ts` -See `/licenses/LICENSE-d3` for details of the license. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Creative Commons Attribution 4.0 International (CC-BY-4.0) + +Documentation in this project (excluding specifications) is licensed under +CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for +the full license text. --- Applies to ------------------------------------------------------------- -- npm: echarts 6.1.0 / NOTICE +- npm: @phosphor-icons/react 2.1.10 / LICENSE ---------------------------------------------------------------------------- -Apache ECharts -Copyright 2017-2026 The Apache Software Foundation +MIT License -This product includes software developed at -The Apache Software Foundation (https://www.apache.org/). +Copyright (c) 2020 Phosphor Icons + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: ee-first 1.1.1 / LICENSE +- npm: @standard-schema/spec 1.1.0 / LICENSE ---------------------------------------------------------------------------- -The MIT License (MIT) +MIT License -Copyright (c) 2014 Jonathan Ong me@jongleberry.com +Copyright (c) 2024 Colin McDonnell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5318,137 +7894,144 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: encodeurl 2.0.0 / LICENSE +- npm: @tanstack/history 1.162.4 / LICENSE +- npm: @tanstack/query-core 5.104.0 / LICENSE +- npm: @tanstack/react-query 5.104.0 / LICENSE +- npm: @tanstack/react-router 1.170.41 / LICENSE +- npm: @tanstack/router-core 1.171.34 / LICENSE ---------------------------------------------------------------------------- -(The MIT License) +MIT License -Copyright (c) 2016 Douglas Christopher Wilson +Copyright (c) 2021-present Tanner Linsley -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: escape-html 1.0.3 / LICENSE +- npm: @tanstack/react-store 0.11.2 / LICENSE +- npm: @tanstack/store 0.11.2 / LICENSE ---------------------------------------------------------------------------- -(The MIT License) +MIT License -Copyright (c) 2012-2013 TJ Holowaychuk -Copyright (c) 2015 Andreas Lubbe -Copyright (c) 2015 Tiancheng "Timothy" Gu +Copyright (c) 2021 Tanner Linsley -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: escape-string-regexp 5.0.0 / license -- npm: is-plain-obj 4.1.0 / license -- npm: tagged-tag 1.0.0 / license -- npm: type-fest 5.9.0 / license-mit +- npm: @types/debug 4.1.13 / LICENSE +- npm: @types/estree 1.0.9 / LICENSE +- npm: @types/estree-jsx 1.0.5 / LICENSE +- npm: @types/hast 3.0.5 / LICENSE +- npm: @types/mdast 4.0.4 / LICENSE +- npm: @types/ms 2.1.0 / LICENSE +- npm: @types/react 19.3.0 / LICENSE +- npm: @types/unist 2.0.11 / LICENSE +- npm: @types/unist 3.0.3 / LICENSE +- npm: @types/uuid 10.0.0 / LICENSE ---------------------------------------------------------------------------- MIT License -Copyright (c) Sindre Sorhus (https://sindresorhus.com) + Copyright (c) Microsoft Corporation. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE --- Applies to ------------------------------------------------------------- -- npm: estree-util-is-identifier-name 3.0.0 / license -- npm: mdast-util-gfm-autolink-literal 2.0.1 / license -- npm: mdast-util-gfm-strikethrough 2.0.0 / license -- npm: mdast-util-gfm-table 2.0.0 / license -- npm: mdast-util-gfm-task-list-item 2.0.0 / license -- npm: mdast-util-mdx-expression 2.0.1 / license -- npm: mdast-util-mdx-jsx 3.2.0 / license -- npm: mdast-util-mdxjs-esm 2.0.1 / license -- npm: micromark-extension-gfm 3.0.0 / license -- npm: micromark-extension-gfm-autolink-literal 2.1.0 / license -- npm: micromark-extension-gfm-strikethrough 2.1.0 / license -- npm: micromark-extension-gfm-tagfilter 2.0.0 / license -- npm: micromark-extension-gfm-task-list-item 2.1.0 / license +- npm: @ungap/structured-clone 1.4.0 / LICENSE ---------------------------------------------------------------------------- -(The MIT License) - -Copyright (c) 2020 Titus Wormer +ISC License -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Copyright (c) 2021, Andrea Giammarchi, @WebReflection -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: etag 1.8.1 / LICENSE -- npm: proxy-addr 2.0.7 / LICENSE +- npm: bail 2.0.2 / license +- npm: ccount 2.0.1 / license +- npm: character-entities 2.0.2 / license +- npm: character-entities-html4 2.1.0 / license +- npm: character-entities-legacy 3.0.0 / license +- npm: character-reference-invalid 2.0.1 / license +- npm: mdast-util-to-string 4.0.0 / license +- npm: unist-util-position 5.0.0 / license +- npm: unist-util-visit 5.1.0 / license ---------------------------------------------------------------------------- (The MIT License) -Copyright (c) 2014-2016 Douglas Christopher Wilson +Copyright (c) 2015 Titus Wormer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -5470,67 +8053,36 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: eventsource 3.0.7 / LICENSE ----------------------------------------------------------------------------- - -The MIT License - -Copyright (c) EventSource GitHub organisation - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- Applies to ------------------------------------------------------------- -- npm: eventsource-parser 3.1.1 / LICENSE +- npm: clsx 2.1.1 / license ---------------------------------------------------------------------------- MIT License -Copyright (c) 2026 Espen Hovlandsdal +Copyright (c) Luke Edwards (lukeed.com) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: express 5.2.1 / LICENSE +- npm: comma-separated-tokens 2.0.3 / license +- npm: hast-util-whitespace 3.0.0 / license +- npm: is-alphabetical 2.0.1 / license +- npm: is-alphanumerical 2.0.1 / license +- npm: is-decimal 2.0.1 / license +- npm: is-hexadecimal 2.0.1 / license +- npm: mdast-util-to-hast 13.2.1 / license +- npm: space-separated-tokens 2.0.2 / license +- npm: unist-util-stringify-position 4.0.0 / license +- npm: unist-util-visit-parents 6.0.2 / license +- npm: zwitch 2.0.4 / license ---------------------------------------------------------------------------- (The MIT License) -Copyright (c) 2009-2014 TJ Holowaychuk -Copyright (c) 2013-2014 Roman Shtylman -Copyright (c) 2014-2015 Douglas Christopher Wilson +Copyright (c) 2016 Titus Wormer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -5552,19 +8104,19 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: express-rate-limit 8.7.0 / license +- npm: compare-versions 6.1.1 / LICENSE ---------------------------------------------------------------------------- -MIT License +The MIT License (MIT) -Copyright 2023 Nathan Friedly, Vedant K +Copyright (c) 2015-2021 Ole Michelsen -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -5578,40 +8130,45 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: extend 3.0.2 / LICENSE +- npm: cookie-es 3.1.1 / LICENSE ---------------------------------------------------------------------------- -The MIT License (MIT) +MIT License -Copyright (c) 2014 Stefan Thomas +Cookie-es copyright (c) Pooya Parsa -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Cookie parsing based on https://github.com/jshttp/cookie +Copyright (c) 2012-2014 Roman Shtylman +Copyright (c) 2015 Douglas Christopher Wilson -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Set-Cookie parsing based on https://github.com/nfriedly/set-cookie-parser +Copyright (c) 2015 Nathan Friedly (http://nfriedly.com/) -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: fast-deep-equal 3.1.3 / LICENSE -- npm: json-schema-traverse 1.0.0 / LICENSE +- npm: cross-spawn 7.0.6 / LICENSE ---------------------------------------------------------------------------- -MIT License +The MIT License (MIT) -Copyright (c) 2017 Evgeny Poberezkin +Copyright (c) 2018 Made With MOXY Lda Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5620,24 +8177,22 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: fast-equals 4.0.3 / LICENSE +- npm: csstype 3.2.3 / LICENSE ---------------------------------------------------------------------------- -MIT License - -Copyright (c) 2017 Tony Quetano +Copyright (c) 2017-2018 Fredrik Nicol Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -5658,12 +8213,70 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: fast-json-patch 3.1.1 / LICENSE.txt +- npm: debug 4.4.3 / LICENSE ---------------------------------------------------------------------------- (The MIT License) -Copyright (c) 2013, 2014, 2020 Joachim Wester +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- Applies to ------------------------------------------------------------- +- npm: decode-named-character-reference 1.3.0 / license +- npm: hast-util-to-jsx-runtime 2.3.6 / license +- npm: markdown-table 3.0.4 / license +- npm: mdast-util-find-and-replace 3.0.2 / license +- npm: mdast-util-from-markdown 2.0.3 / license +- npm: mdast-util-gfm 3.1.0 / license +- npm: mdast-util-gfm-footnote 2.1.0 / license +- npm: mdast-util-gfm-strikethrough 2.0.1 / license +- npm: mdast-util-to-markdown 2.1.3 / license +- npm: micromark 4.0.3 / license +- npm: micromark-core-commonmark 2.0.4 / license +- npm: micromark-extension-gfm-table 2.1.2 / license +- npm: micromark-factory-destination 2.0.1 / license +- npm: micromark-factory-label 2.0.1 / license +- npm: micromark-factory-space 2.1.0 / license +- npm: micromark-factory-title 2.0.1 / license +- npm: micromark-factory-whitespace 2.0.1 / license +- npm: micromark-util-character 2.1.1 / license +- npm: micromark-util-chunked 2.0.1 / license +- npm: micromark-util-classify-character 2.0.1 / license +- npm: micromark-util-combine-extensions 2.0.1 / license +- npm: micromark-util-decode-numeric-character-reference 2.0.2 / license +- npm: micromark-util-decode-string 2.0.1 / license +- npm: micromark-util-edit-map 1.0.0 / license +- npm: micromark-util-encode 2.0.1 / license +- npm: micromark-util-html-tag-name 2.0.1 / license +- npm: micromark-util-normalize-identifier 2.0.1 / license +- npm: micromark-util-resolve-all 2.0.1 / license +- npm: micromark-util-sanitize-uri 2.0.1 / license +- npm: micromark-util-subtokenize 2.1.0 / license +- npm: micromark-util-symbol 2.0.1 / license +- npm: micromark-util-types 2.0.3 / license +- npm: remark-gfm 4.0.1 / license +- npm: remark-rehype 11.1.2 / license +- npm: vfile-message 4.0.3 / license +---------------------------------------------------------------------------- + +(The MIT License) + +Copyright (c) Titus Wormer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -5685,75 +8298,64 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: fast-uri 3.1.8 / LICENSE +- npm: dequal 2.0.3 / license ---------------------------------------------------------------------------- -Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae -Copyright (c) 2021-present The Fastify team -All rights reserved. +The MIT License (MIT) -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. +Copyright (c) Luke Edwards (lukeed.com) -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - * * * +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -The complete list of contributors can be found at: -- https://github.com/garycourt/uri-js/graphs/contributors +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: finalhandler 2.1.1 / LICENSE +- npm: detect-node-es 1.1.0 / LICENSE ---------------------------------------------------------------------------- -(The MIT License) +MIT License -Copyright (c) 2014-2022 Douglas Christopher Wilson +Copyright (c) 2017 Ilya Kantor -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: fresh 2.0.0 / LICENSE +- npm: devlop 1.1.0 / license ---------------------------------------------------------------------------- (The MIT License) -Copyright (c) 2012 TJ Holowaychuk -Copyright (c) 2016-2017 Douglas Christopher Wilson +Copyright (c) 2023 Titus Wormer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -5774,246 +8376,331 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: function-bind 1.1.2 / LICENSE ----------------------------------------------------------------------------- +--- Applies to ------------------------------------------------------------- +- npm: echarts 6.1.0 / LICENSE +---------------------------------------------------------------------------- + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -Copyright (c) 2013 Raynos. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: ---- Applies to ------------------------------------------------------------- -- npm: get-intrinsic 1.3.0 / LICENSE ----------------------------------------------------------------------------- + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -MIT License + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -Copyright (c) 2020 Jordan Harband + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. ---- Applies to ------------------------------------------------------------- -- npm: get-nonce 1.0.1 / LICENSE ----------------------------------------------------------------------------- + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -MIT License + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -Copyright (c) 2020 Anton Korzunov + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + END OF TERMS AND CONDITIONS -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + APPENDIX: How to apply the Apache License to your work. ---- Applies to ------------------------------------------------------------- -- npm: get-proto 1.0.1 / LICENSE ----------------------------------------------------------------------------- + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -MIT License + Copyright [yyyy] [name of copyright owner] -Copyright (c) 2025 Jordan Harband + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + http://www.apache.org/licenses/LICENSE-2.0 -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: gopd 1.2.0 / LICENSE ----------------------------------------------------------------------------- -MIT License -Copyright (c) 2022 Jordan Harband -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +======================================================================== +Apache ECharts Subcomponents: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The Apache ECharts project contains subcomponents with separate copyright +notices and license terms. Your use of the source code for these +subcomponents is also subject to the terms and conditions of the following +licenses. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +BSD 3-Clause (d3.js): +The following files embed [d3.js](https://github.com/d3/d3) BSD 3-Clause: + `/src/chart/treemap/treemapLayout.ts`, + `/src/chart/tree/layoutHelper.ts`, + `/src/chart/graph/forceHelper.ts`, + `/src/util/number.ts` +See `/licenses/LICENSE-d3` for details of the license. --- Applies to ------------------------------------------------------------- -- npm: has-symbols 1.1.0 / LICENSE +- npm: echarts 6.1.0 / NOTICE ---------------------------------------------------------------------------- -MIT License - -Copyright (c) 2016 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +Apache ECharts +Copyright 2017-2026 The Apache Software Foundation -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +This product includes software developed at +The Apache Software Foundation (https://www.apache.org/). --- Applies to ------------------------------------------------------------- -- npm: hasown 2.0.4 / LICENSE +- npm: escape-string-regexp 5.0.0 / license +- npm: is-plain-obj 4.1.0 / license +- npm: tagged-tag 1.0.0 / license +- npm: type-fest 5.10.0 / license-mit ---------------------------------------------------------------------------- MIT License -Copyright (c) Jordan Harband and contributors +Copyright (c) Sindre Sorhus (https://sindresorhus.com) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: hono 4.13.7 / LICENSE +- npm: estree-util-is-identifier-name 3.0.0 / license +- npm: mdast-util-gfm-autolink-literal 2.0.1 / license +- npm: mdast-util-gfm-table 2.0.0 / license +- npm: mdast-util-gfm-task-list-item 2.0.0 / license +- npm: mdast-util-mdx-expression 2.0.1 / license +- npm: mdast-util-mdx-jsx 3.2.0 / license +- npm: mdast-util-mdxjs-esm 2.0.1 / license +- npm: micromark-extension-gfm 3.0.0 / license +- npm: micromark-extension-gfm-autolink-literal 2.1.0 / license +- npm: micromark-extension-gfm-strikethrough 2.1.0 / license +- npm: micromark-extension-gfm-tagfilter 2.0.0 / license +- npm: micromark-extension-gfm-task-list-item 2.1.0 / license ---------------------------------------------------------------------------- -MIT License +(The MIT License) -Copyright (c) 2021 - present, Yusuke Wada and Hono contributors +Copyright (c) 2020 Titus Wormer -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: html-url-attributes 3.0.1 / license +- npm: eventsource 3.0.7 / LICENSE ---------------------------------------------------------------------------- -(The MIT License) +The MIT License -Copyright (c) Titus Wormer +Copyright (c) EventSource GitHub organisation -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: http-errors 2.0.1 / LICENSE +- npm: eventsource-parser 3.1.1 / LICENSE ---------------------------------------------------------------------------- -The MIT License (MIT) +MIT License -Copyright (c) 2014 Jonathan Ong me@jongleberry.com -Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com +Copyright (c) 2026 Espen Hovlandsdal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -6022,22 +8709,24 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: iconv-lite 0.7.3 / LICENSE +- npm: extend 3.0.2 / LICENSE ---------------------------------------------------------------------------- -Copyright (c) 2011 Alexander Shtuchkin +The MIT License (MIT) + +Copyright (c) 2014 Stefan Thomas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -6059,44 +8748,65 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: inherits 2.0.4 / LICENSE +- npm: fast-equals 4.0.3 / LICENSE ---------------------------------------------------------------------------- -The ISC License +MIT License -Copyright (c) Isaac Z. Schlueter +Copyright (c) 2017 Tony Quetano -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: inline-style-parser 0.2.7 / LICENSE +- npm: fast-json-patch 3.1.1 / LICENSE.txt ---------------------------------------------------------------------------- (The MIT License) -Copyright (c) 2012 TJ Holowaychuk +Copyright (c) 2013, 2014, 2020 Joachim Wester -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: ip-address 10.7.1 / LICENSE +- npm: get-nonce 1.0.1 / LICENSE ---------------------------------------------------------------------------- -Copyright (C) 2011 by Beau Gunderson +MIT License + +Copyright (c) 2020 Anton Korzunov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -6105,22 +8815,24 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: ipaddr.js 1.9.1 / LICENSE +- npm: html-url-attributes 3.0.1 / license ---------------------------------------------------------------------------- -Copyright (C) 2011-2017 whitequark +(The MIT License) + +Copyright (c) Titus Wormer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -6141,28 +8853,18 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: is-promise 4.0.0 / LICENSE +- npm: inline-style-parser 0.2.7 / LICENSE ---------------------------------------------------------------------------- -Copyright (c) 2014 Forbes Lindesay +(The MIT License) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Copyright (c) 2012 TJ Holowaychuk -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- - npm: isbot 5.2.2 / LICENSE @@ -6197,9 +8899,7 @@ For more information, please refer to --- Applies to ------------------------------------------------------------- - npm: isexe 2.0.0 / LICENSE -- npm: once 1.4.0 / LICENSE - npm: which 2.0.2 / LICENSE -- npm: wrappy 1.0.2 / LICENSE ---------------------------------------------------------------------------- The ISC License @@ -6219,7 +8919,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: jose 6.2.10 / LICENSE.md +- npm: jose 6.2.12 / LICENSE.md ---------------------------------------------------------------------------- The MIT License (MIT) @@ -6262,75 +8962,13 @@ furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ---- Applies to ------------------------------------------------------------- -- npm: json-schema-typed 8.0.2 / LICENSE.md ----------------------------------------------------------------------------- - -BSD 2-Clause License - -Original source code is copyright (c) 2019-2025 Remy Rylan - - -All JSON Schema documentation and descriptions are copyright (c): - -2009 [draft-0] IETF Trust , Kris Zyp , -and SitePen (USA) . - -2009 [draft-1] IETF Trust , Kris Zyp , -and SitePen (USA) . - -2010 [draft-2] IETF Trust , Kris Zyp , -and SitePen (USA) . - -2010 [draft-3] IETF Trust , Kris Zyp , -Gary Court , and SitePen (USA) . - -2013 [draft-4] IETF Trust ), Francis Galiegue -, Kris Zyp , Gary Court -, and SitePen (USA) . - -2018 [draft-7] IETF Trust , Austin Wright , -Henry Andrews , Geraint Luff , and -Cloudflare, Inc. . - -2019 [draft-2019-09] IETF Trust , Austin Wright -, Henry Andrews , Ben Hutton -, and Greg Dennis . - -2020 [draft-2020-12] IETF Trust , Austin Wright -, Henry Andrews , Ben Hutton -, and Greg Dennis . - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. --- Applies to ------------------------------------------------------------- - npm: longest-streak 3.1.0 / license @@ -6415,22 +9053,6 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: merge-descriptors 2.0.0 / license ----------------------------------------------------------------------------- - -MIT License - -Copyright (c) Jonathan Ong -Copyright (c) Douglas Christopher Wilson -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: micromark-extension-gfm-footnote 2.1.0 / license ---------------------------------------------------------------------------- @@ -6458,34 +9080,6 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: mime-db 1.54.0 / LICENSE ----------------------------------------------------------------------------- - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: ms 2.1.3 / license.md ---------------------------------------------------------------------------- @@ -6512,35 +9106,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: negotiator 1.1.0 / LICENSE ----------------------------------------------------------------------------- - -(The MIT License) - -Copyright (c) 2012-2014 Federico Romero -Copyright (c) 2012-2014 Isaac Z. Schlueter -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: object-assign 4.1.1 / license ---------------------------------------------------------------------------- @@ -6567,60 +9132,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: object-inspect 1.13.4 / LICENSE ----------------------------------------------------------------------------- - -MIT License - -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---- Applies to ------------------------------------------------------------- -- npm: on-finished 2.4.1 / LICENSE ----------------------------------------------------------------------------- - -(The MIT License) - -Copyright (c) 2013 Jonathan Ong -Copyright (c) 2014 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: parse-entities 4.0.2 / license - npm: property-information 7.2.0 / license @@ -6649,34 +9160,6 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: parseurl 1.3.3 / LICENSE ----------------------------------------------------------------------------- - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: path-key 3.1.1 / license - npm: shebang-regex 3.0.0 / license @@ -6692,32 +9175,6 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: path-to-regexp 8.4.2 / LICENSE ----------------------------------------------------------------------------- - -The MIT License (MIT) - -Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: pkce-challenge 5.0.1 / LICENSE ---------------------------------------------------------------------------- @@ -6759,111 +9216,22 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---- Applies to ------------------------------------------------------------- -- npm: qs 6.16.0 / LICENSE.md ----------------------------------------------------------------------------- - -BSD 3-Clause License - -Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ---- Applies to ------------------------------------------------------------- -- npm: range-parser 1.3.0 / LICENSE ----------------------------------------------------------------------------- - -(The MIT License) - -Copyright (c) 2012-2014 TJ Holowaychuk -Copyright (c) 2015-2016 Douglas Christopher Wilson -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: react 19.2.8 / LICENSE -- npm: react-dom 19.2.8 / LICENSE -- npm: scheduler 0.27.0 / LICENSE -- npm: use-sync-external-store 1.6.0 / LICENSE +- npm: react 19.3.0 / LICENSE +- npm: react-dom 19.3.0 / LICENSE +- npm: scheduler 0.28.0 / LICENSE +- npm: use-sync-external-store 1.7.0 / LICENSE ---------------------------------------------------------------------------- MIT License @@ -6889,7 +9257,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: react-draggable 4.7.1 / LICENSE +- npm: react-draggable 4.7.2 / LICENSE ---------------------------------------------------------------------------- (MIT License) @@ -7126,32 +9494,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: require-from-string 2.0.2 / license ----------------------------------------------------------------------------- - -The MIT License (MIT) - -Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: resize-observer-polyfill 1.5.1 / LICENSE ---------------------------------------------------------------------------- @@ -7178,34 +9520,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: router 2.2.0 / LICENSE ----------------------------------------------------------------------------- - -(The MIT License) - -Copyright (c) 2013 Roman Shtylman -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: rxjs 7.8.1 / LICENSE.txt ---------------------------------------------------------------------------- @@ -7413,62 +9727,8 @@ Apache License limitations under the License. --- Applies to ------------------------------------------------------------- -- npm: safer-buffer 2.1.2 / LICENSE ----------------------------------------------------------------------------- - -MIT License - -Copyright (c) 2018 Nikita Skovoroda - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---- Applies to ------------------------------------------------------------- -- npm: send 1.2.1 / LICENSE ----------------------------------------------------------------------------- - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- Applies to ------------------------------------------------------------- -- npm: seroval 1.6.4 / LICENSE -- npm: seroval-plugins 1.6.4 / LICENSE +- npm: seroval 1.6.8 / LICENSE +- npm: seroval-plugins 1.6.8 / LICENSE ---------------------------------------------------------------------------- MIT License Copyright (c) 2025 Alexis Munsayac @@ -7479,54 +9739,6 @@ The above copyright notice and this permission notice (including the next paragr THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: serve-static 2.2.1 / LICENSE ----------------------------------------------------------------------------- - -(The MIT License) - -Copyright (c) 2010 Sencha Inc. -Copyright (c) 2011 LearnBoost -Copyright (c) 2011 TJ Holowaychuk -Copyright (c) 2014-2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ---- Applies to ------------------------------------------------------------- -- npm: setprototypeof 1.2.0 / LICENSE ----------------------------------------------------------------------------- - -Copyright (c) 2015, Wes Todd - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: shebang-command 2.0.0 / license ---------------------------------------------------------------------------- @@ -7541,60 +9753,6 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: side-channel 1.1.1 / LICENSE -- npm: side-channel-weakmap 1.0.2 / LICENSE ----------------------------------------------------------------------------- - -MIT License - -Copyright (c) 2019 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---- Applies to ------------------------------------------------------------- -- npm: statuses 2.0.2 / LICENSE ----------------------------------------------------------------------------- - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: style-to-js 1.1.21 / LICENSE ---------------------------------------------------------------------------- @@ -7675,32 +9833,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: toidentifier 1.0.1 / LICENSE ----------------------------------------------------------------------------- - -MIT License - -Copyright (c) 2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: trough 2.2.0 / license ---------------------------------------------------------------------------- @@ -7746,7 +9878,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- Applies to ------------------------------------------------------------- -- npm: type-fest 5.9.0 / license-cc0 +- npm: type-fest 5.10.0 / license-cc0 ---------------------------------------------------------------------------- Creative Commons Legal Code @@ -7925,33 +10057,6 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: unpipe 1.0.0 / LICENSE ----------------------------------------------------------------------------- - -(The MIT License) - -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: untruncate-json 0.0.1 / LICENSE ---------------------------------------------------------------------------- @@ -7995,7 +10100,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --- Applies to ------------------------------------------------------------- - npm: zod 3.25.76 / LICENSE -- npm: zod 4.5.4 / LICENSE +- npm: zod 4.6.5 / LICENSE ---------------------------------------------------------------------------- MIT License @@ -8020,26 +10125,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Applies to ------------------------------------------------------------- -- npm: zod-to-json-schema 3.25.2 / LICENSE ----------------------------------------------------------------------------- - -ISC License - -Copyright (c) 2020, Stefan Terdell - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - --- Applies to ------------------------------------------------------------- - npm: zrender 6.1.0 / LICENSE ---------------------------------------------------------------------------- diff --git a/docs/benchmarks/duckdb2-followups-2026-10-01.json b/docs/benchmarks/duckdb2-followups-2026-10-01.json new file mode 100644 index 00000000..8fa9a6f3 --- /dev/null +++ b/docs/benchmarks/duckdb2-followups-2026-10-01.json @@ -0,0 +1,1372 @@ +{ + "engine": "v2.0.0-alpha43763", + "platform": "linux/arm64", + "container_cpus": 4, + "container_memory_bytes": 6442450944, + "harness_commit": "a9843c1fd55b9465d4d77a42fcf8805c467af731", + "fanout_binary_sha256": "5b61295e7c3ca5d4b0173864b7b2ced166668f073292975a2783d79b65ea2093", + "read_fixture": { + "batches": 312, + "rows_per_signal": 1200000, + "repetitions_per_case": 10, + "backfill_seconds": 3.593804327, + "binary_sha256": "fc75986a8a3ff43d8817d97e73a0f7d79f963e959fb663b6fff33c3d57eba5b5" + }, + "reads": [ + { + "cpu_seconds_per_request": 0.16519580000000006, + "implementation": "raw", + "median_ms": 47.126116499999995, + "method": "endpoints", + "p95_ms": 50.549057, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.049093300000000006, + "implementation": "completed", + "median_ms": 32.376495500000004, + "method": "endpoints", + "p95_ms": 35.043831, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.18912960000000006, + "implementation": "raw", + "median_ms": 60.809444, + "method": "trace", + "p95_ms": 66.316576, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.042178200000000034, + "implementation": "completed", + "median_ms": 20.041398, + "method": "trace", + "p95_ms": 31.82162, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.19311000000000006, + "implementation": "raw", + "median_ms": 61.007069, + "method": "logs", + "p95_ms": 63.729781, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.026694700000000182, + "implementation": "completed", + "median_ms": 18.208583, + "method": "logs", + "p95_ms": 19.203231, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.0719815999999998, + "implementation": "raw", + "median_ms": 30.054243, + "method": "trace", + "p95_ms": 30.696535, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.05076199999999993, + "implementation": "completed", + "median_ms": 29.025575, + "method": "trace", + "p95_ms": 30.262701, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.10608470000000025, + "implementation": "raw", + "median_ms": 39.626587, + "method": "logs", + "p95_ms": 42.288423, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.021031200000000184, + "implementation": "completed", + "median_ms": 15.439538500000001, + "method": "logs", + "p95_ms": 17.121895, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.02312410000000007, + "implementation": "raw", + "median_ms": 12.844431499999999, + "method": "endpoints", + "p95_ms": 15.067225, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.036625700000000094, + "implementation": "completed", + "median_ms": 23.9797975, + "method": "endpoints", + "p95_ms": 25.478737, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + } + ], + "mixed_summary": { + "peak_traces": { + "trial_name": "traces-p8-r1", + "offered_items_per_second": 160000, + "accepted_items_per_second": 95028.53951124784, + "average_cpu_cores": 2.444410773479345, + "peak_rss_bytes": 1079513088 + }, + "peak_logs": { + "trial_name": "logs-p8-r1", + "offered_items_per_second": 160000, + "accepted_items_per_second": 95678.62310134368, + "average_cpu_cores": 1.557826576029755, + "peak_rss_bytes": 1249972224 + }, + "peak_metrics": { + "trial_name": "metrics-p8-r1", + "offered_items_per_second": 160000, + "accepted_items_per_second": 96356.74388603629, + "average_cpu_cores": 1.0301004296651772, + "peak_rss_bytes": 1362259968 + }, + "peak_mixed": { + "trial_name": "mixed-p8-r1", + "offered_items_per_second": 480000, + "accepted_items_per_second": 141714.59332933233, + "average_cpu_cores": 2.8879418275981976, + "peak_rss_bytes": 1924915200 + }, + "sustained_mixed": { + "trial_name": "mixed-sustained", + "offered_items_per_second": 120000, + "accepted_items_per_second": 58962.631044860806, + "average_cpu_cores": 3.5281080676064134, + "peak_rss_bytes": 2799415296 + }, + "accepted_total": { + "spans": 5645254, + "log_records": 5667882, + "metric_points": 5769163 + }, + "cooldown_rss_bytes": 1591586816, + "cooldown_heap_bytes": 331751664, + "quality_gates": [ + { + "name": "generator-processes", + "passed": true, + "detail": "all exited successfully" + }, + { + "name": "server-dropped-rows", + "passed": true, + "detail": "zero" + }, + { + "name": "server-restarts", + "passed": true, + "detail": "none" + }, + { + "name": "authoritative-counters", + "passed": true, + "detail": "Fanout accepted rows in every phase" + }, + { + "name": "sustained-query-load", + "passed": false, + "detail": "6.5/20.0 completed/s, 47 errors, 768 shed" + }, + { + "name": "storage-repair-verify", + "passed": true, + "detail": "authoritative Parquet storage verified" + } + ], + "passed": false, + "warnings": [ + "Results describe this exact host, Fanout build, configuration, dataset, and workload; they are not universal capacity claims.", + "telemetrygen payloads are intentionally synthetic and highly compressible; storage size is not representative of production telemetry.", + "Offered load is a target. Headline throughput uses Fanout's accepted-row counters, never telemetrygen's intended or generated count.", + "Fanout and load generators shared one host; generator contention can make the observed peak lower than Fanout's backend ceiling." + ] + }, + "mixed_trials": [ + { + "settings": { + "name": "warmup", + "kind": "warmup", + "signal": "mixed", + "duration_seconds": 10, + "processes_per_signal": 1, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 10.163, + "offered_items_per_second": 60000, + "accepted": { + "spans": 125456, + "log_records": 114202, + "metric_points": 116548 + }, + "accepted_items_per_second": 35043.43055315175, + "acceptance_ratio": 0.5936766666666666, + "rows_dropped": 0, + "generator_processes": 3, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 0.6404516849828973, + "peak_rss_bytes": 471748608, + "end_rss_bytes": 471748608, + "peak_heap_bytes": 269988296, + "end_heap_bytes": 246992400, + "peak_queue_depth": 0, + "parquet_files_end": 0, + "parquet_bytes_end": 0, + "disk_growth_bytes": 38297695, + "allocated_bytes": 2034669184, + "gc_pause_seconds": 0.019587247000000002 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "traces-p1-r1", + "kind": "sweep", + "signal": "traces", + "duration_seconds": 15, + "processes_per_signal": 1, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.045, + "offered_items_per_second": 20000, + "accepted": { + "spans": 182926, + "log_records": 0, + "metric_points": 0 + }, + "accepted_items_per_second": 12155.446738419034, + "acceptance_ratio": 0.6097533333333334, + "rows_dropped": 0, + "generator_processes": 1, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 0.7435763587620623, + "peak_rss_bytes": 755339264, + "end_rss_bytes": 302735360, + "peak_heap_bytes": 361256744, + "end_heap_bytes": 12234400, + "peak_queue_depth": 0, + "parquet_files_end": 0, + "parquet_bytes_end": 0, + "disk_growth_bytes": 41871740, + "allocated_bytes": 2844720288, + "gc_pause_seconds": 0.014678532999999997 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "traces-p2-r1", + "kind": "sweep", + "signal": "traces", + "duration_seconds": 15, + "processes_per_signal": 2, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.054, + "offered_items_per_second": 40000, + "accepted": { + "spans": 383604, + "log_records": 0, + "metric_points": 0 + }, + "accepted_items_per_second": 25477.031115631533, + "acceptance_ratio": 0.63934, + "rows_dropped": 0, + "generator_processes": 2, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 1.0659595557029804, + "peak_rss_bytes": 800251904, + "end_rss_bytes": 642793472, + "peak_heap_bytes": 376765224, + "end_heap_bytes": 343188456, + "peak_queue_depth": 0, + "parquet_files_end": 0, + "parquet_bytes_end": 0, + "disk_growth_bytes": 66002033, + "allocated_bytes": 3902989912, + "gc_pause_seconds": 0.032851125999999994 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "traces-p4-r1", + "kind": "sweep", + "signal": "traces", + "duration_seconds": 15, + "processes_per_signal": 4, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.128, + "offered_items_per_second": 80000, + "accepted": { + "spans": 776440, + "log_records": 0, + "metric_points": 0 + }, + "accepted_items_per_second": 51294.19525963265, + "acceptance_ratio": 0.6470333333333333, + "rows_dropped": 0, + "generator_processes": 4, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 1.9164965798798916, + "peak_rss_bytes": 1002156032, + "end_rss_bytes": 992190464, + "peak_heap_bytes": 504169848, + "end_heap_bytes": 504169848, + "peak_queue_depth": 0, + "parquet_files_end": 0, + "parquet_bytes_end": 0, + "disk_growth_bytes": 97746839, + "allocated_bytes": 9298965232, + "gc_pause_seconds": 0.076670153 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "traces-p8-r1", + "kind": "sweep", + "signal": "traces", + "duration_seconds": 15, + "processes_per_signal": 8, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.089, + "offered_items_per_second": 160000, + "accepted": { + "spans": 1434130, + "log_records": 0, + "metric_points": 0 + }, + "accepted_items_per_second": 95028.53951124784, + "acceptance_ratio": 0.5975541666666667, + "rows_dropped": 0, + "generator_processes": 8, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 2.444410773479345, + "peak_rss_bytes": 1079513088, + "end_rss_bytes": 882618368, + "peak_heap_bytes": 470294240, + "end_heap_bytes": 470294240, + "peak_queue_depth": 0, + "parquet_files_end": 306, + "parquet_bytes_end": 112041274, + "disk_growth_bytes": 88845891, + "allocated_bytes": 12774862800, + "gc_pause_seconds": 0.19572627399999998 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "logs-p1-r1", + "kind": "sweep", + "signal": "logs", + "duration_seconds": 15, + "processes_per_signal": 1, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.043, + "offered_items_per_second": 20000, + "accepted": { + "spans": 0, + "log_records": 176000, + "metric_points": 0 + }, + "accepted_items_per_second": 11698.23787103301, + "acceptance_ratio": 0.5866666666666667, + "rows_dropped": 0, + "generator_processes": 1, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 1.2529078628918884, + "peak_rss_bytes": 1392234496, + "end_rss_bytes": 558174208, + "peak_heap_bytes": 478157376, + "end_heap_bytes": 18119232, + "peak_queue_depth": 0, + "parquet_files_end": 306, + "parquet_bytes_end": 112041274, + "disk_growth_bytes": 220365320, + "allocated_bytes": 2359544472, + "gc_pause_seconds": 0.01021732000000003 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "logs-p2-r1", + "kind": "sweep", + "signal": "logs", + "duration_seconds": 15, + "processes_per_signal": 2, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.065, + "offered_items_per_second": 40000, + "accepted": { + "spans": 0, + "log_records": 351895, + "metric_points": 0 + }, + "accepted_items_per_second": 23355.407160630726, + "acceptance_ratio": 0.5864916666666666, + "rows_dropped": 0, + "generator_processes": 2, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 0.4745482635402876, + "peak_rss_bytes": 967979008, + "end_rss_bytes": 672571392, + "peak_heap_bytes": 233895840, + "end_heap_bytes": 25513472, + "peak_queue_depth": 0, + "parquet_files_end": 306, + "parquet_bytes_end": 112041274, + "disk_growth_bytes": 23779647, + "allocated_bytes": 2166288496, + "gc_pause_seconds": 0.01639634299999998 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "logs-p4-r1", + "kind": "sweep", + "signal": "logs", + "duration_seconds": 15, + "processes_per_signal": 4, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.054, + "offered_items_per_second": 80000, + "accepted": { + "spans": 0, + "log_records": 720570, + "metric_points": 0 + }, + "accepted_items_per_second": 47857.40530173436, + "acceptance_ratio": 0.600475, + "rows_dropped": 0, + "generator_processes": 4, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 0.3845488664488413, + "peak_rss_bytes": 708808704, + "end_rss_bytes": 642408448, + "peak_heap_bytes": 70058856, + "end_heap_bytes": 36165304, + "peak_queue_depth": 0, + "parquet_files_end": 306, + "parquet_bytes_end": 112041274, + "allocated_bytes": 2956584192, + "gc_pause_seconds": 0.041946786999999985 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "logs-p8-r1", + "kind": "sweep", + "signal": "logs", + "duration_seconds": 15, + "processes_per_signal": 8, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.102, + "offered_items_per_second": 160000, + "accepted": { + "spans": 0, + "log_records": 1445166, + "metric_points": 0 + }, + "accepted_items_per_second": 95678.62310134368, + "acceptance_ratio": 0.6021525, + "rows_dropped": 0, + "generator_processes": 8, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 1.557826576029755, + "peak_rss_bytes": 1249972224, + "end_rss_bytes": 775282688, + "peak_heap_bytes": 92475808, + "end_heap_bytes": 73124928, + "peak_queue_depth": 0, + "parquet_files_end": 103, + "parquet_bytes_end": 161934790, + "disk_growth_bytes": 32122800, + "allocated_bytes": 6202282688, + "gc_pause_seconds": 0.17198322700000007 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "metrics-p1-r1", + "kind": "sweep", + "signal": "metrics", + "duration_seconds": 15, + "processes_per_signal": 1, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.057, + "offered_items_per_second": 20000, + "accepted": { + "spans": 0, + "log_records": 0, + "metric_points": 173872 + }, + "accepted_items_per_second": 11545.553317774495, + "acceptance_ratio": 0.5795733333333334, + "rows_dropped": 0, + "generator_processes": 1, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 0.13346923120874338, + "peak_rss_bytes": 863858688, + "end_rss_bytes": 689082368, + "peak_heap_bytes": 34484168, + "end_heap_bytes": 13210152, + "peak_queue_depth": 0, + "parquet_files_end": 103, + "parquet_bytes_end": 161934790, + "allocated_bytes": 797385984, + "gc_pause_seconds": 0.016522996999999928 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "metrics-p2-r1", + "kind": "sweep", + "signal": "metrics", + "duration_seconds": 15, + "processes_per_signal": 2, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.041, + "offered_items_per_second": 40000, + "accepted": { + "spans": 0, + "log_records": 0, + "metric_points": 352000 + }, + "accepted_items_per_second": 23398.84715791845, + "acceptance_ratio": 0.5866666666666667, + "rows_dropped": 0, + "generator_processes": 2, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 0.09904625643550768, + "peak_rss_bytes": 710774784, + "end_rss_bytes": 681082880, + "peak_heap_bytes": 34729632, + "end_heap_bytes": 25248712, + "peak_queue_depth": 0, + "parquet_files_end": 103, + "parquet_bytes_end": 161934790, + "disk_growth_bytes": 2488802, + "allocated_bytes": 1368284816, + "gc_pause_seconds": 0.02855761899999998 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "metrics-p4-r1", + "kind": "sweep", + "signal": "metrics", + "duration_seconds": 15, + "processes_per_signal": 4, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.069, + "offered_items_per_second": 80000, + "accepted": { + "spans": 0, + "log_records": 0, + "metric_points": 726320 + }, + "accepted_items_per_second": 48193.40330390228, + "acceptance_ratio": 0.6052666666666666, + "rows_dropped": 0, + "generator_processes": 4, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 0.2879713767195397, + "peak_rss_bytes": 728825856, + "end_rss_bytes": 634359808, + "peak_heap_bytes": 60396008, + "end_heap_bytes": 27385208, + "peak_queue_depth": 0, + "parquet_files_end": 103, + "parquet_bytes_end": 161934790, + "disk_growth_bytes": 11074546, + "allocated_bytes": 2856073680, + "gc_pause_seconds": 0.07447297900000005 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "metrics-p8-r1", + "kind": "sweep", + "signal": "metrics", + "duration_seconds": 15, + "processes_per_signal": 8, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "repetition": 1 + }, + "elapsed_seconds": 15.132, + "offered_items_per_second": 160000, + "accepted": { + "spans": 0, + "log_records": 0, + "metric_points": 1458306 + }, + "accepted_items_per_second": 96356.74388603629, + "acceptance_ratio": 0.6076275, + "rows_dropped": 0, + "generator_processes": 8, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 1.0301004296651772, + "peak_rss_bytes": 1362259968, + "end_rss_bytes": 829861888, + "peak_heap_bytes": 69150144, + "end_heap_bytes": 36629536, + "peak_queue_depth": 1, + "parquet_files_end": 206, + "parquet_bytes_end": 183788729, + "disk_growth_bytes": 10407877, + "allocated_bytes": 5270018288, + "gc_pause_seconds": 0.205670951 + }, + "query_latency_ms": { + "count": 0, + "mean_ms": 0, + "p50_ms": 0, + "p95_ms": 0, + "p99_ms": 0, + "max_ms": 0 + }, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "mixed-p1-r1", + "kind": "sweep", + "signal": "mixed", + "duration_seconds": 15, + "processes_per_signal": 1, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "query_rate": 20, + "repetition": 1 + }, + "elapsed_seconds": 15.105, + "offered_items_per_second": 60000, + "accepted": { + "spans": 178638, + "log_records": 166238, + "metric_points": 169703 + }, + "accepted_items_per_second": 34025.17120551659, + "acceptance_ratio": 0.5717544444444445, + "rows_dropped": 0, + "generator_processes": 3, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 2.810199748210586, + "peak_rss_bytes": 1226956800, + "end_rss_bytes": 1071779840, + "peak_heap_bytes": 200814480, + "end_heap_bytes": 25165320, + "peak_queue_depth": 0, + "parquet_files_end": 206, + "parquet_bytes_end": 183788729, + "disk_growth_bytes": 20469831, + "allocated_bytes": 4143554184, + "gc_pause_seconds": 0.313339707 + }, + "query_latency_ms": { + "count": 302, + "mean_ms": 76.44, + "p50_ms": 54.22, + "p95_ms": 232.46, + "p99_ms": 577.03, + "max_ms": 664.91 + }, + "query_attempts": 302, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "mixed-p2-r1", + "kind": "sweep", + "signal": "mixed", + "duration_seconds": 15, + "processes_per_signal": 2, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "query_rate": 20, + "repetition": 1 + }, + "elapsed_seconds": 15.151, + "offered_items_per_second": 120000, + "accepted": { + "spans": 304612, + "log_records": 279083, + "metric_points": 297167 + }, + "accepted_items_per_second": 57541.90946573893, + "acceptance_ratio": 0.4893677777777778, + "rows_dropped": 0, + "generator_processes": 6, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 3.353108901140449, + "peak_rss_bytes": 1529233408, + "end_rss_bytes": 1244499968, + "peak_heap_bytes": 290514592, + "end_heap_bytes": 58865600, + "peak_queue_depth": 1, + "parquet_files_end": 206, + "parquet_bytes_end": 183788729, + "allocated_bytes": 5983231848, + "gc_pause_seconds": 0.5904725389999999 + }, + "query_latency_ms": { + "count": 306, + "mean_ms": 579.46, + "p50_ms": 332.05, + "p95_ms": 1853.81, + "p99_ms": 2626.92, + "max_ms": 3481.45 + }, + "query_attempts": 306, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit" + ] + }, + { + "settings": { + "name": "mixed-p4-r1", + "kind": "sweep", + "signal": "mixed", + "duration_seconds": 15, + "processes_per_signal": 4, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "query_rate": 20, + "repetition": 1 + }, + "elapsed_seconds": 15.311, + "offered_items_per_second": 240000, + "accepted": { + "spans": 593658, + "log_records": 533307, + "metric_points": 544276 + }, + "accepted_items_per_second": 108195.93052474891, + "acceptance_ratio": 0.4642336111111111, + "rows_dropped": 0, + "generator_processes": 12, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 3.2603000173083094, + "peak_rss_bytes": 1586159616, + "end_rss_bytes": 1428008960, + "peak_heap_bytes": 353143856, + "end_heap_bytes": 132104912, + "peak_queue_depth": 7, + "parquet_files_end": 206, + "parquet_bytes_end": 183788729, + "disk_growth_bytes": 325161567, + "allocated_bytes": 8585677136, + "gc_pause_seconds": 0.9356431259999998 + }, + "query_latency_ms": { + "count": 262, + "mean_ms": 2777.53, + "p50_ms": 2394.97, + "p95_ms": 6950.86, + "p99_ms": 10047.83, + "max_ms": 10665.08 + }, + "query_attempts": 308, + "query_shed": 46, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit", + "the requested query rate was not sustained" + ] + }, + { + "settings": { + "name": "mixed-p8-r1", + "kind": "sweep", + "signal": "mixed", + "duration_seconds": 15, + "processes_per_signal": 8, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "query_rate": 20, + "repetition": 1 + }, + "elapsed_seconds": 15.6, + "offered_items_per_second": 480000, + "accepted": { + "spans": 565430, + "log_records": 839637, + "metric_points": 866436 + }, + "accepted_items_per_second": 141714.59332933233, + "acceptance_ratio": 0.3154865277777778, + "rows_dropped": 0, + "generator_processes": 24, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 2.8879418275981976, + "peak_rss_bytes": 1924915200, + "end_rss_bytes": 1614061568, + "peak_heap_bytes": 290342376, + "end_heap_bytes": 283401632, + "peak_queue_depth": 55, + "parquet_files_end": 206, + "parquet_bytes_end": 183788729, + "disk_growth_bytes": 56715770, + "allocated_bytes": 9935051928, + "gc_pause_seconds": 0.7110637479999999 + }, + "query_latency_ms": { + "count": 155, + "mean_ms": 5035.68, + "p50_ms": 4833.55, + "p95_ms": 11558.23, + "p99_ms": 14173.79, + "max_ms": 14820.64 + }, + "query_attempts": 320, + "query_failures": 8, + "query_shed": 157, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit", + "the requested query rate was not sustained" + ] + }, + { + "settings": { + "name": "mixed-sustained", + "kind": "sustained", + "signal": "mixed", + "duration_seconds": 60, + "processes_per_signal": 2, + "workers_per_process": 8, + "rate_per_worker": 2500, + "batch_size": 1000, + "query_rate": 20, + "repetition": 1 + }, + "elapsed_seconds": 60.201, + "offered_items_per_second": 120000, + "accepted": { + "spans": 1225816, + "log_records": 1155986, + "metric_points": 1181083 + }, + "accepted_items_per_second": 58962.631044860806, + "acceptance_ratio": 0.49484513888888887, + "rows_dropped": 0, + "generator_processes": 6, + "generator_failures": 0, + "fanout_restarted": false, + "resources": { + "average_cpu_cores": 3.5281080676064134, + "peak_rss_bytes": 2799415296, + "end_rss_bytes": 2799415296, + "peak_heap_bytes": 335405800, + "end_heap_bytes": 62366256, + "peak_queue_depth": 1, + "parquet_files_end": 1961, + "parquet_bytes_end": 311126046, + "allocated_bytes": 20909988768, + "gc_pause_seconds": 2.9660317000000003 + }, + "query_latency_ms": { + "count": 393, + "mean_ms": 5097.47, + "p50_ms": 4527, + "p95_ms": 12470.1, + "p99_ms": 14548.95, + "max_ms": 14963.32 + }, + "query_attempts": 1208, + "query_failures": 47, + "query_shed": 768, + "classification": "saturated-or-generator-limited", + "classification_notes": [ + "the target was not sustained; separate load-generator hosts are needed to attribute the limit", + "the requested query rate was not sustained" + ] + } + ], + "durable_ingestion": { + "baseline": { + "repetitions": [ + { + "allocated_bytes_per_row": 3841.016279264214, + "concurrency": 16, + "cpu_cores_client_and_server": 1.386670723965906, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 32.983173, + "p95_ms": 37.233546, + "p99_ms": 46.579118, + "rows": 4784000, + "rows_per_second": 478232.5354001488, + "seconds": 10.00350174, + "cpu_seconds_per_million_rows": 2.8995742056856186 + }, + { + "allocated_bytes_per_row": 3827.215571197411, + "concurrency": 16, + "cpu_cores_client_and_server": 1.3389345902710774, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 32.267016, + "p95_ms": 35.18989, + "p99_ms": 36.741222, + "rows": 4944000, + "rows_per_second": 493113.6031033487, + "seconds": 10.026087232, + "cpu_seconds_per_million_rows": 2.715265978964401 + }, + { + "allocated_bytes_per_row": 3827.789229773463, + "concurrency": 16, + "cpu_cores_client_and_server": 1.3422942175040822, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 32.22202, + "p95_ms": 35.682391, + "p99_ms": 37.382098, + "rows": 4944000, + "rows_per_second": 493050.47558628663, + "seconds": 10.027370918, + "cpu_seconds_per_million_rows": 2.722427588996764 + } + ], + "median": { + "rows_per_second": 493050.47558628663, + "allocated_bytes_per_row": 3827.789229773463, + "cpu_cores_client_and_server": 1.3422942175040822, + "cpu_seconds_per_million_rows": 2.722427588996764, + "p50_ms": 32.267016, + "p95_ms": 35.682391, + "p99_ms": 37.382098 + }, + "binary_sha256": "d588363630fa003e81a8582acd50416ab77bed189b3f2daa662d32ed30dd49ce" + }, + "final": { + "repetitions": [ + { + "allocated_bytes_per_row": 4018.0189930362117, + "concurrency": 16, + "cpu_cores_client_and_server": 2.0168743622096437, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 27.349099, + "p95_ms": 32.508177, + "p99_ms": 44.273124, + "rows": 5744000, + "rows_per_second": 573131.9162908524, + "seconds": 10.022125512, + "cpu_seconds_per_million_rows": 3.5190403899721447 + }, + { + "allocated_bytes_per_row": 4017.786380108992, + "concurrency": 16, + "cpu_cores_client_and_server": 2.017148073950804, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 26.789268, + "p95_ms": 31.753598, + "p99_ms": 43.314047, + "rows": 5872000, + "rows_per_second": 586812.7884127768, + "seconds": 10.006598554, + "cpu_seconds_per_million_rows": 3.437464407356948 + }, + { + "allocated_bytes_per_row": 4037.289988031915, + "concurrency": 16, + "cpu_cores_client_and_server": 2.0203992820509, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 26.447858, + "p95_ms": 29.780439, + "p99_ms": 32.90123, + "rows": 6016000, + "rows_per_second": 600172.8755069904, + "seconds": 10.023778557, + "cpu_seconds_per_million_rows": 3.366362200797873 + } + ], + "median": { + "rows_per_second": 586812.7884127768, + "allocated_bytes_per_row": 4018.0189930362117, + "cpu_cores_client_and_server": 2.017148073950804, + "cpu_seconds_per_million_rows": 3.437464407356948, + "p50_ms": 26.789268, + "p95_ms": 31.753598, + "p99_ms": 43.314047 + }, + "binary_sha256": "1ea1109e8d50ec07ecd9a2269a7cdbbfc1e82ee04301eb525fccbcaaad655d36" + } + }, + "prior_read_trial": [ + { + "cpu_seconds_per_request": 0.16752330000000004, + "implementation": "raw", + "median_ms": 47.8396225, + "method": "endpoints", + "p95_ms": 50.53142, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.046351799999999874, + "implementation": "completed", + "median_ms": 31.010892, + "method": "endpoints", + "p95_ms": 33.511919, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.18807199999999985, + "implementation": "raw", + "median_ms": 60.092862, + "method": "trace", + "p95_ms": 64.072038, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.036477199999999856, + "implementation": "completed", + "median_ms": 19.475008000000003, + "method": "trace", + "p95_ms": 20.060926, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.18967860000000022, + "implementation": "raw", + "median_ms": 60.604592499999995, + "method": "logs", + "p95_ms": 65.922501, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.027257000000000177, + "implementation": "completed", + "median_ms": 18.129984, + "method": "logs", + "p95_ms": 22.312432, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.02699890000000025, + "implementation": "raw", + "median_ms": 14.6436625, + "method": "endpoints", + "p95_ms": 17.652086, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.0363745999999999, + "implementation": "completed", + "median_ms": 23.761456, + "method": "endpoints", + "p95_ms": 35.10009, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.0638614999999998, + "implementation": "raw", + "median_ms": 27.057069, + "method": "trace", + "p95_ms": 28.324614, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.04826499999999996, + "implementation": "completed", + "median_ms": 28.1259885, + "method": "trace", + "p95_ms": 29.4372, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.10301620000000007, + "implementation": "raw", + "median_ms": 38.5614945, + "method": "logs", + "p95_ms": 40.326145, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.020283799999999984, + "implementation": "completed", + "median_ms": 15.2523725, + "method": "logs", + "p95_ms": 16.176833, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + } + ] +} diff --git a/docs/benchmarks/duckdb2-followups-2026-10-01.md b/docs/benchmarks/duckdb2-followups-2026-10-01.md new file mode 100644 index 00000000..d9e74555 --- /dev/null +++ b/docs/benchmarks/duckdb2-followups-2026-10-01.md @@ -0,0 +1,154 @@ +# DuckDB 2 review follow-ups — 2026-10-01 + +This report retains the measurements before the nine-comment review at +`cd916d5`. They are historical results, not measurements of the subsequent +aggregate-only cache. See [the subsequent nine-comment review report](duckdb2-review-2026-10-01.md). #277 remains open for the encoding CPU regression. +These results do not establish general production capacity. +The complete measured values and binary identities are in +[the accompanying JSON](duckdb2-followups-2026-10-01.json). + +## Changes measured + +| Finding | Implementation | +|---|---| +| #273: file binding | Explicit immutable-file lists from actual span, log, and metric event-time footer bounds; unknown statistics include the file; newest event bounds first. | +| #274: endpoint tail | Completed-batch minute histograms plus exact partial minutes and uncached active files, without the five-minute endpoint watermark. | +| #275: notable traces | Exact candidate index for all namespace/service scope combinations; merge uncached contributions and recompute partial-window traces. | +| #276: log histogram | Scoped severity minute counts and exact boundary counts; text searches retain redacted-body matching. | +| #277: ingest regression | Reuse scalar buffers, dispatch by column, encode shared canonical resources once with a bounded identity cache, and shorten group admission from 20 to 10ms. | + +All derived contributions and the completed-batch marker commit atomically. +Dashboard reads pin immutable files and use one DuckDB transaction for cache +markers and rows. Compaction/retention invalidate retired contributions. +Narrow scalar projections answer partial windows without decoding attributes or +bodies. They consume additional rebuildable DuckDB storage. The cache worker +yields between bounded transactions and is independent of analytical rollup lag. +Format 3 and its physical schema are unchanged. No earlier-format reader exists. + +## Environment and method + +Native Linux ARM64, Go 1.27.1, pinned DuckDB `v2.0.0-alpha43763`, Docker limit +4 CPUs / 6 GiB. No concurrent benchmark containers. The baseline is the #270 +merge, `30ba9b9ba8a4217cc73637760d7acdcd5f89f15a`. + +The durable ingestion experiment uses 16 concurrent clients, 1,000 rows/export, +equal spans/logs/metrics, and no dashboard/background query work. Client and +server share the measured process. Three baseline and three final ten-second +measurement intervals alternate in the order baseline/final/final/baseline/ +baseline/final. CPU profiles cover the measurement intervals; post-load heap +profiles cover the whole experiment and must not be treated as interval-only +allocations. Every run waits for durable publication and then verifies storage. + +| Median metric | #270 | Final DuckDB 2 | +|---|---:|---:| +| Durable acknowledged rows/s | 493,050 | 586,813 | +| Go allocated bytes/row | 3,828 | 4,018 | +| Client + server CPU cores | 1.342 | 2.017 | +| CPU seconds per million rows | 2.722 | 3.437 | +| Export p50 | 32.27ms | 26.79ms | +| Export p95 | 35.68ms | 31.75ms | + +All six runs have zero export errors and pass durable storage verification. +Throughput increases **19%**, and p95 decreases **11%**. This closed-loop fixture is admission-limited: halving the admission window +accounts for most of the throughput gain. It does not demonstrate that the +encoding regression is resolved. Typed ingestion still costs +**26% more CPU per row** and **5% more Go allocation per row** than #270. +The admission change contributes to the throughput gain; this comparison does +not establish faster VARIANT encoding. Independent fixed-one-CPU trials from +the review measured 395k/373k rows/s for #270 versus 322k/298k for `cd916d5`, +about 19% slower. Keep #277 open; reducing acknowledgement latency does not +remove the normalized CPU regression. + +## Identical-file dashboard comparison + +The opt-in read fixture has 1.2 million spans and 1.2 million logs across twelve +hourly batches, plus 300 old tiny log/metric batches. Both paths read the same +format-3 files. The raw path runs the existing query kernels; the completed path +runs the actual production dashboard methods after cache backfill (3.59s). +No compaction or background rollup runs during measurement. Each case has a warmup +and ten measured requests. These p95 values are the maximum of ten samples, so +they are not a robust estimate of production tail latency. + +| Window / method | Raw median / p95 | Completed median / p95 | Raw / completed CPU ms per request | +|---|---:|---:|---:| +| 24h endpoints | 47.13 / 50.55ms | 32.38 / 35.04ms | 165.2 / 49.1 | +| 24h notable trace | 60.81 / 66.32ms | 20.04 / 31.82ms | 189.1 / 42.2 | +| 24h logs | 61.01 / 63.73ms | 18.21 / 19.20ms | 193.1 / 26.7 | +| 20m endpoints | 12.84 / 15.07ms | 23.98 / 25.48ms | 23.1 / 36.6 | +| 20m notable trace | 30.05 / 30.70ms | 29.03 / 30.26ms | 72.0 / 50.8 | +| 20m logs | 39.63 / 42.29ms | 15.44 / 17.12ms | 106.1 / 21.0 | + +Both windows end one second after the fixture's hour boundary and exercise exact +partial minutes. Broad reads improve with the caches fully built. This fixture measures +cache-current reads only; it contains no concurrent ingest or cache lag. Small endpoint windows still +pay additional histogram/union planning overhead, and narrow trace latency is +approximately flat. No claim of uniform latency improvement is made. Endpoints use +the established fixed-boundary histogram estimate rather than the raw kernel's +`approx_quantile`; cold and completed production reads use the same estimator. +The JSON also retains the prior identical-file trial; both show broad gains +and extra planning cost for narrow endpoint windows. + +## Mixed-load saturation diagnostic + +The unchanged adapted `../fanout-bench` harness at +`a9843c1fd55b9465d4d77a42fcf8805c467af731` runs the standard sweep with +telemetrygen 0.157.0 on the same host, 20 requested reads/s, fifteen-second sweep +phases, sixty-second sustained load, and fifteen-second cooldown. Sibling +repositories were not changed. The native server binary SHA256 is recorded in +JSON. Data and full logs are retained locally in the `fanout-review272-final` +Docker volume, under `/optimized`. + +| Diagnostic | Final result | +|---|---:| +| Mixed p1 accepted rows/s / completed reads/s | 34,025 / 20.0 | +| Mixed p2 accepted rows/s / completed reads/s | 57,542 / 20.2 | +| Mixed p8 accepted rows/s / completed reads/s | 141,715 / 9.9 | +| Sustained offered / accepted rows/s | 120,000 / 58,963 | +| Sustained completed reads/s / p95 | 6.5 / 12.47s | +| Sustained failed / shed reads | 47 / 768 | +| Cooldown RSS | 1.48 GiB | + +The p1 and p2 sweeps have zero failed or shed reads. The standard harness chooses +its sustained phase adaptively: this build selects **120,000** offered rows/s, +where the historical #270 and pre-follow-up runs selected **60,000**. Sustained +results therefore are **not a matched comparison**. Mixed p8 offered settings +match the historical baseline, which accepted 145,941 rows/s; the final +141,715 is within 3% in these single trials, with different accepted datasets. + +**The sustained 20-read/s capacity gate fails.** This is a failed saturation +diagnostic, not a publishable capacity result. Generator exits, server-dropped +rows, server restarts, and full authoritative storage verification all pass. +Same-host generators, adaptive sustained selection, short sweeps, and one trial +limit interpretation. CPU per row, narrow endpoint planning cost, and saturated +read capacity remain measured limitations. The independent review reproduced +cache backlog growth from 51 to 843 batches and read shedding under sustained +load; short sweeps and fully built-cache reads do not establish cache stability. + +## Reproduce + +On native Linux or macOS, build with the pinned wrapper: + +```sh +bash scripts/with-duckdb.sh go test -tags=transportbench ./internal/ingest \ + -run 'TestTransportComparison/durable=true/c=16/rep=1/shared' -v -count=1 +FANOUT_BENCH_PROFILE_DIR=/tmp/fanout-profiles \ + bash scripts/with-duckdb.sh go test -tags=transportbench ./internal/ingest \ + -run 'TestTransportComparison/durable=true/c=16/rep=1/shared' -v -count=1 +FANOUT_READ_BENCH_LARGE=1 \ + bash scripts/with-duckdb.sh go test -tags=readbench ./internal/observability \ + -run TestCompletedReadBenchmark -v -count=1 +``` + +Run one benchmark at a time. For the reported container limits, compile native +Linux test binaries with `go test -c` through the wrapper, then run each binary +in an otherwise idle `--cpus 4 --memory 6g` container. Repeat the ingestion +selector for repetitions 1, 2, and 3 on both builds. The baseline profiling overlay +changes only measurement collection, not the #270 writer. + +Local validation covers cold/warm parity, late publications, partial minutes, +trace scopes and ranking, duplicate log timestamps, compaction/retention, +transaction failure rollback, prompt worker draining and cancellation, public +SQL rejection of private caches, optional footer statistics and signed times, +and mixed shared/unique/null resources across chunks and row groups. The normal +`just check` gate and targeted query/observability/telemetry/storage race suite +pass; native Linux tests exercise the same pinned engine. diff --git a/docs/benchmarks/duckdb2-review-2026-10-01-harness.patch b/docs/benchmarks/duckdb2-review-2026-10-01-harness.patch new file mode 100644 index 00000000..609638aa --- /dev/null +++ b/docs/benchmarks/duckdb2-review-2026-10-01-harness.patch @@ -0,0 +1,69 @@ +--- a/cmd/fanout-bench/main.go ++++ b/cmd/fanout-bench/main.go +@@ -147,0 +148 @@ ++ fs.StringVar(&cfg.FanoutCommit, "fanout-commit", "", "Fanout source identity") +--- a/internal/bench/managed.go ++++ b/internal/bench/managed.go +@@ -31,0 +32 @@ ++ FanoutCommit string +@@ -68,8 +68,0 @@ +- grpcPort, err := freePort() +- if err != nil { +- return err +- } +- httpOTLPPort, err := freePort() +- if err != nil { +- return err +- } +@@ -81,2 +74,2 @@ +- grpcAddr := fmt.Sprintf("127.0.0.1:%d", grpcPort) +- metricsURL := "http://" + httpAddr + "/-/metrics" ++ grpcAddr := httpAddr ++ metricsURL := "http://" + httpAddr + "/metrics" +@@ -90,3 +83 @@ +- "FANOUT_HTTP_ADDR="+httpAddr, +- "FANOUT_OTLP_GRPC_ADDR="+grpcAddr, +- fmt.Sprintf("FANOUT_OTLP_HTTP_ADDR=127.0.0.1:%d", httpOTLPPort), ++ "FANOUT_ADDR="+httpAddr, +@@ -186 +177 @@ +- cfg := Config{Host: managed.ProvisionedHost, SSHPort: managed.ProvisionedSSHPort, SSHIdentity: managed.ProvisionedSSHIdentity, Preset: managed.Preset, Endpoint: grpcAddr, MetricsURL: metricsURL, Insecure: true, Telemetrygen: managed.TelemetrygenPath, Token: ingestToken, OutputDir: managed.OutputDir, FanoutVersion: actualVersion, FanoutArtifact: managed.FanoutArtifact, DataDir: dataDir, SampleInterval: managed.SampleInterval, GeneratorTimeout: 30 * time.Second, Cooldown: managed.Cooldown, Repeat: managed.Repeat, QueryURL: baseURL, QueryCookie: queryCookie, QueryRate: managed.QueryRate, SameHost: true, BatchSize: managed.BatchSize, TelemetrygenVersion: managed.TelemetrygenVersion, ProcessOverride: managed.ProcessOverride, WorkerOverride: managed.WorkerOverride, RateOverride: managed.RateOverride, DurationOverride: managed.DurationOverride} ++ cfg := Config{Host: managed.ProvisionedHost, SSHPort: managed.ProvisionedSSHPort, SSHIdentity: managed.ProvisionedSSHIdentity, Preset: managed.Preset, Endpoint: grpcAddr, MetricsURL: metricsURL, Insecure: true, Telemetrygen: managed.TelemetrygenPath, Token: ingestToken, OutputDir: managed.OutputDir, FanoutVersion: actualVersion, FanoutCommit: managed.FanoutCommit, FanoutArtifact: managed.FanoutArtifact, DataDir: dataDir, SampleInterval: managed.SampleInterval, GeneratorTimeout: 30 * time.Second, Cooldown: managed.Cooldown, Repeat: managed.Repeat, QueryURL: baseURL, QueryCookie: queryCookie, QueryRate: managed.QueryRate, SameHost: true, BatchSize: managed.BatchSize, TelemetrygenVersion: managed.TelemetrygenVersion, ProcessOverride: managed.ProcessOverride, WorkerOverride: managed.WorkerOverride, RateOverride: managed.RateOverride, DurationOverride: managed.DurationOverride} +--- a/internal/bench/preset.go ++++ b/internal/bench/preset.go +@@ -13,0 +14,8 @@ ++ } ++ // Fixed review reproduction: no adaptive phase selection and five full ++ // minutes of mixed ingest with the production open-loop reader scheduler. ++ if cfg.Preset == "review272" { ++ return []PhaseSpec{ ++ {Name: "warmup", Kind: "warmup", Signal: Mixed, Duration: 10 * time.Second, DurationSeconds: 10, ProcessesPerSignal: 1, WorkersPerProcess: 8, RatePerWorker: 2500, BatchSize: 1000, Repetition: 1}, ++ {Name: "mixed-sustained", Kind: "sustained", Signal: Mixed, Duration: 5 * time.Minute, DurationSeconds: 300, ProcessesPerSignal: 2, WorkersPerProcess: 8, RatePerWorker: 2500, BatchSize: 1000, QueryRate: 20, Repetition: 1}, ++ }, nil +--- a/internal/bench/runner.go ++++ b/internal/bench/runner.go +@@ -333 +333,2 @@ +- AtSeconds: round(at, 3), CPUSeconds: s.total("process_cpu_seconds_total", nil), ++ ReadCachePendingBatches: s.total("fanout_read_cache_pending_batches", nil), ++ AtSeconds: round(at, 3), CPUSeconds: s.total("process_cpu_seconds_total", nil), +--- a/internal/bench/types.go ++++ b/internal/bench/types.go +@@ -126,9 +126,10 @@ +- AtSeconds float64 `json:"at_seconds"` +- CPUSeconds float64 `json:"cpu_seconds"` +- RSSBytes float64 `json:"rss_bytes"` +- HeapBytes float64 `json:"heap_bytes"` +- QueueDepth float64 `json:"queue_depth"` +- ParquetFiles float64 `json:"parquet_files"` +- ParquetBytes float64 `json:"parquet_bytes"` +- PublishWaiters float64 `json:"publish_waiters"` +- PublishTimeouts float64 `json:"publish_timeouts_total"` ++ ReadCachePendingBatches float64 `json:"fanout_read_cache_pending_batches"` ++ AtSeconds float64 `json:"at_seconds"` ++ CPUSeconds float64 `json:"cpu_seconds"` ++ RSSBytes float64 `json:"rss_bytes"` ++ HeapBytes float64 `json:"heap_bytes"` ++ QueueDepth float64 `json:"queue_depth"` ++ ParquetFiles float64 `json:"parquet_files"` ++ ParquetBytes float64 `json:"parquet_bytes"` ++ PublishWaiters float64 `json:"publish_waiters"` ++ PublishTimeouts float64 `json:"publish_timeouts_total"` diff --git a/docs/benchmarks/duckdb2-review-2026-10-01.json b/docs/benchmarks/duckdb2-review-2026-10-01.json new file mode 100644 index 00000000..a37ad258 --- /dev/null +++ b/docs/benchmarks/duckdb2-review-2026-10-01.json @@ -0,0 +1,3137 @@ +{ + "review_head": "cd916d5c0a3ba12acd2f21a3007368b1740c3be5", + "engine_version": "v2.0.0-alpha43763", + "go_version": "1.27.1", + "platform": "linux/arm64", + "cpu_limit": 4, + "memory_limit_bytes": 6442450944, + "benchmark_artifact_sha256": { + "fanout-cache-v5": "d4df1d59e13da33624d52054ea9039827748fd00182b9f9680043c73a0c9ae0a", + "fanout-cache-v6": "ea73930b184ec646597e2e25d5e305f8e0946919e6ecaea1777231feed56163f", + "file-binder-v6.test": "04b7e1d9a7a002d2e84020a62d3c5f55d21eb9ac7df63505851429d35b1404b6", + "batch-reads-v7.test": "a96eb28840b8a574e695fbf7f9634e5ed731d618ece319d36d8e36efe966d603", + "batch-reads-before.test": "c85ae9126dad890985c4e703d6fdad4533ee1d2f46424d0ae592d790982a684e", + "baseline-ingest.test": "d588363630fa003e81a8582acd50416ab77bed189b3f2daa662d32ed30dd49ce", + "ingest-v3.test": "d4c5b97c3f579c72f89929534c87b978b3c268af060da6f9877340082a9a236a", + "fanout-bench-v4": "ea2b038c5e0789e42daab1edd8a69aa272d0f4158843aa9bcc0f294972c89207" + }, + "harness_source_base_commit": "a9843c1fd55b9465d4d77a42fcf8805c467af731", + "harness_source_patch": "duckdb2-review-2026-10-01-harness.patch", + "build_identity_note": "Harness Go build-info inherits the containing Fanout checkout. Harness source identity is its base commit plus the complete patch and binary hash, not the containing checkout VCS claim. The sustained cache-v6 artifact predates the scoped ambiguity probe: its unscoped workload path is unchanged. The final scoped probe is measured with batch-reads-v7.test.", + "sustained": { + "elapsed_seconds": 300.154, + "nominal_offered_rows_per_second": 120000, + "accepted": { + "spans": 6864204, + "log_records": 6516659, + "metric_points": 6607440 + }, + "accepted_rows_per_second": 66085.52706253018, + "resources": { + "average_cpu_cores": 3.053846981499492, + "peak_rss_bytes": 3562332160, + "end_rss_bytes": 3198099456, + "peak_heap_bytes": 435610216, + "end_heap_bytes": 61116888, + "peak_queue_depth": 1, + "parquet_files_end": 4342, + "parquet_bytes_end": 434447968, + "disk_growth_bytes": 1334017571, + "allocated_bytes": 136859988440, + "gc_pause_seconds": 8.892415844 + }, + "query_latency_ms": { + "count": 4931, + "mean_ms": 1106.96, + "p50_ms": 88.12, + "p95_ms": 5955.36, + "p99_ms": 10630.47, + "max_ms": 14978.67 + }, + "query_attempts": 6049, + "query_failures": 19, + "query_shed": 1099, + "completed_queries_per_second": 16.42823350679984, + "cooldown_rss_bytes": 1048268800, + "quality_gates": [ + { + "name": "generator-processes", + "passed": true, + "detail": "all exited successfully" + }, + { + "name": "server-dropped-rows", + "passed": true, + "detail": "zero" + }, + { + "name": "server-restarts", + "passed": true, + "detail": "none" + }, + { + "name": "authoritative-counters", + "passed": true, + "detail": "Fanout accepted rows in every phase" + }, + { + "name": "sustained-query-load", + "passed": false, + "detail": "16.4/20.0 completed/s, 19 errors, 1099 shed" + }, + { + "name": "storage-repair-verify", + "passed": true, + "detail": "authoritative Parquet storage verified" + } + ], + "samples": [ + { + "fanout_read_cache_pending_batches": 4, + "at_seconds": 2.003, + "cpu_seconds": 7.82, + "rss_bytes": 336797696, + "heap_bytes": 43707800, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 4, + "at_seconds": 4.003, + "cpu_seconds": 9.89, + "rss_bytes": 335478784, + "heap_bytes": 42220056, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 7, + "at_seconds": 6.004, + "cpu_seconds": 12.19, + "rss_bytes": 334188544, + "heap_bytes": 18581960, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 5, + "at_seconds": 8.003, + "cpu_seconds": 14.5, + "rss_bytes": 348209152, + "heap_bytes": 21289096, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 3, + "at_seconds": 10.003, + "cpu_seconds": 17.27, + "rss_bytes": 593018880, + "heap_bytes": 285277264, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 40, + "at_seconds": 12.004, + "cpu_seconds": 21.7, + "rss_bytes": 765079552, + "heap_bytes": 192168456, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 4, + "at_seconds": 14.005, + "cpu_seconds": 24.29, + "rss_bytes": 358281216, + "heap_bytes": 18158192, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 4, + "at_seconds": 16.002, + "cpu_seconds": 27.25, + "rss_bytes": 400695296, + "heap_bytes": 36773912, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 6, + "at_seconds": 18.006, + "cpu_seconds": 30.07, + "rss_bytes": 412983296, + "heap_bytes": 26200768, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 7, + "at_seconds": 20.003, + "cpu_seconds": 33.34, + "rss_bytes": 641957888, + "heap_bytes": 253290416, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 6, + "at_seconds": 22.028, + "cpu_seconds": 38.53, + "rss_bytes": 665243648, + "heap_bytes": 186261112, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 21, + "at_seconds": 24.003, + "cpu_seconds": 42.9, + "rss_bytes": 442142720, + "heap_bytes": 25373160, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 4, + "at_seconds": 26.003, + "cpu_seconds": 46.15, + "rss_bytes": 413257728, + "heap_bytes": 21351672, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 6, + "at_seconds": 28.01, + "cpu_seconds": 49.51, + "rss_bytes": 418480128, + "heap_bytes": 18689584, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 7, + "at_seconds": 30.003, + "cpu_seconds": 53.88, + "rss_bytes": 672423936, + "heap_bytes": 214358304, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 36, + "at_seconds": 32.222, + "cpu_seconds": 59.52, + "rss_bytes": 841682944, + "heap_bytes": 285799520, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 9, + "at_seconds": 34.004, + "cpu_seconds": 64.09, + "rss_bytes": 466870272, + "heap_bytes": 21048464, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 8, + "at_seconds": 36.003, + "cpu_seconds": 67.9, + "rss_bytes": 478158848, + "heap_bytes": 28370544, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 30, + "at_seconds": 38.017, + "cpu_seconds": 72.13, + "rss_bytes": 584593408, + "heap_bytes": 22750200, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 7, + "at_seconds": 40.006, + "cpu_seconds": 76.55, + "rss_bytes": 695418880, + "heap_bytes": 233002536, + "queue_depth": 1, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 42.011, + "cpu_seconds": 82.65, + "rss_bytes": 706039808, + "heap_bytes": 238168080, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 44.009, + "cpu_seconds": 87.46, + "rss_bytes": 517992448, + "heap_bytes": 20085240, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 9, + "at_seconds": 46.011, + "cpu_seconds": 92.02, + "rss_bytes": 514842624, + "heap_bytes": 11922096, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 9, + "at_seconds": 48.003, + "cpu_seconds": 96.29, + "rss_bytes": 519180288, + "heap_bytes": 15403992, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 11, + "at_seconds": 50.097, + "cpu_seconds": 101.14, + "rss_bytes": 671211520, + "heap_bytes": 151603632, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 52.004, + "cpu_seconds": 108.49, + "rss_bytes": 1020702720, + "heap_bytes": 361381008, + "queue_depth": 0, + "parquet_files": 0, + "parquet_bytes": 0, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 7, + "at_seconds": 54.01, + "cpu_seconds": 115.35, + "rss_bytes": 937611264, + "heap_bytes": 314400912, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 56.714, + "cpu_seconds": 121.92, + "rss_bytes": 743788544, + "heap_bytes": 32752392, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 58.004, + "cpu_seconds": 128.68, + "rss_bytes": 819073024, + "heap_bytes": 170097152, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 60.013, + "cpu_seconds": 133.73, + "rss_bytes": 629583872, + "heap_bytes": 24843736, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 9, + "at_seconds": 62.005, + "cpu_seconds": 137.98, + "rss_bytes": 564883456, + "heap_bytes": 17340432, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 64.017, + "cpu_seconds": 142.37, + "rss_bytes": 563535872, + "heap_bytes": 22579008, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 66.005, + "cpu_seconds": 146.92, + "rss_bytes": 579686400, + "heap_bytes": 25329208, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 68.005, + "cpu_seconds": 151.53, + "rss_bytes": 574836736, + "heap_bytes": 23666624, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 70.005, + "cpu_seconds": 156.81, + "rss_bytes": 777928704, + "heap_bytes": 214931216, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 51, + "at_seconds": 72.008, + "cpu_seconds": 163.05, + "rss_bytes": 840839168, + "heap_bytes": 205725592, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 11, + "at_seconds": 74.013, + "cpu_seconds": 169.66, + "rss_bytes": 898129920, + "heap_bytes": 178165040, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 76.005, + "cpu_seconds": 175.25, + "rss_bytes": 617504768, + "heap_bytes": 14660832, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 78.005, + "cpu_seconds": 179.79, + "rss_bytes": 661741568, + "heap_bytes": 18602352, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 9, + "at_seconds": 80.005, + "cpu_seconds": 184.6, + "rss_bytes": 796381184, + "heap_bytes": 141715608, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 82.004, + "cpu_seconds": 190.71, + "rss_bytes": 651091968, + "heap_bytes": 17920528, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 84.003, + "cpu_seconds": 195.17, + "rss_bytes": 626724864, + "heap_bytes": 18284048, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 86.011, + "cpu_seconds": 199.82, + "rss_bytes": 647811072, + "heap_bytes": 27671112, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 11, + "at_seconds": 88.002, + "cpu_seconds": 204.46, + "rss_bytes": 642605056, + "heap_bytes": 19882264, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 90.238, + "cpu_seconds": 209.6, + "rss_bytes": 947892224, + "heap_bytes": 206103064, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 92.009, + "cpu_seconds": 216.26, + "rss_bytes": 994648064, + "heap_bytes": 300378408, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 9, + "at_seconds": 94.007, + "cpu_seconds": 222.19, + "rss_bytes": 657219584, + "heap_bytes": 22210688, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 96.003, + "cpu_seconds": 227.02, + "rss_bytes": 672452608, + "heap_bytes": 20411744, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 8, + "at_seconds": 98.008, + "cpu_seconds": 231.95, + "rss_bytes": 649474048, + "heap_bytes": 34383560, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 11, + "at_seconds": 100.012, + "cpu_seconds": 237.27, + "rss_bytes": 831995904, + "heap_bytes": 206960560, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 15, + "at_seconds": 102.006, + "cpu_seconds": 243.82, + "rss_bytes": 1027526656, + "heap_bytes": 171023680, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 18, + "at_seconds": 104.008, + "cpu_seconds": 250.38, + "rss_bytes": 775327744, + "heap_bytes": 27949488, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 106.008, + "cpu_seconds": 255.51, + "rss_bytes": 691048448, + "heap_bytes": 21422256, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 8, + "at_seconds": 108.007, + "cpu_seconds": 260.82, + "rss_bytes": 710938624, + "heap_bytes": 36213328, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 9, + "at_seconds": 110.166, + "cpu_seconds": 266.38, + "rss_bytes": 852226048, + "heap_bytes": 183996256, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 112.223, + "cpu_seconds": 273.75, + "rss_bytes": 936796160, + "heap_bytes": 40766744, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 114.011, + "cpu_seconds": 281.15, + "rss_bytes": 833261568, + "heap_bytes": 20026912, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 116.054, + "cpu_seconds": 288.42, + "rss_bytes": 1191587840, + "heap_bytes": 48086496, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 11, + "at_seconds": 118.107, + "cpu_seconds": 295.75, + "rss_bytes": 1292636160, + "heap_bytes": 28044448, + "queue_depth": 0, + "parquet_files": 597, + "parquet_bytes": 98343244, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 120.003, + "cpu_seconds": 301.83, + "rss_bytes": 954802176, + "heap_bytes": 187458216, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 122.006, + "cpu_seconds": 308.63, + "rss_bytes": 1079488512, + "heap_bytes": 136380528, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 124.017, + "cpu_seconds": 315.2, + "rss_bytes": 1015812096, + "heap_bytes": 156226800, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 126.017, + "cpu_seconds": 321.58, + "rss_bytes": 844378112, + "heap_bytes": 30556736, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 9, + "at_seconds": 128.009, + "cpu_seconds": 327.79, + "rss_bytes": 765550592, + "heap_bytes": 24849672, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 11, + "at_seconds": 130.006, + "cpu_seconds": 333.23, + "rss_bytes": 940605440, + "heap_bytes": 238979992, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 132.007, + "cpu_seconds": 339.12, + "rss_bytes": 750379008, + "heap_bytes": 21905496, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 134.011, + "cpu_seconds": 344.28, + "rss_bytes": 760762368, + "heap_bytes": 21608400, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 136.009, + "cpu_seconds": 349.48, + "rss_bytes": 768393216, + "heap_bytes": 15457368, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 15, + "at_seconds": 138.004, + "cpu_seconds": 354.8, + "rss_bytes": 807518208, + "heap_bytes": 21171936, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 140.007, + "cpu_seconds": 360.52, + "rss_bytes": 925188096, + "heap_bytes": 195269760, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 142.004, + "cpu_seconds": 367.23, + "rss_bytes": 1107034112, + "heap_bytes": 312607480, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 144.015, + "cpu_seconds": 374.03, + "rss_bytes": 875528192, + "heap_bytes": 154544048, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 146.005, + "cpu_seconds": 380.46, + "rss_bytes": 782508032, + "heap_bytes": 21774920, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 148.004, + "cpu_seconds": 385.68, + "rss_bytes": 805621760, + "heap_bytes": 17597912, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 150.006, + "cpu_seconds": 391.37, + "rss_bytes": 948867072, + "heap_bytes": 185559008, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 15, + "at_seconds": 152.01, + "cpu_seconds": 398.21, + "rss_bytes": 1236824064, + "heap_bytes": 285143160, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 154.01, + "cpu_seconds": 403.64, + "rss_bytes": 838578176, + "heap_bytes": 25968904, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 11, + "at_seconds": 156.01, + "cpu_seconds": 409.08, + "rss_bytes": 829218816, + "heap_bytes": 29127392, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 158.01, + "cpu_seconds": 414.72, + "rss_bytes": 828338176, + "heap_bytes": 28287072, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 9, + "at_seconds": 160.014, + "cpu_seconds": 420.59, + "rss_bytes": 979824640, + "heap_bytes": 165093816, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 162.026, + "cpu_seconds": 427.52, + "rss_bytes": 1128681472, + "heap_bytes": 318549352, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 11, + "at_seconds": 164.011, + "cpu_seconds": 434.36, + "rss_bytes": 1132134400, + "heap_bytes": 207614984, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 16, + "at_seconds": 166.007, + "cpu_seconds": 441.3, + "rss_bytes": 1090134016, + "heap_bytes": 19977704, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 168.006, + "cpu_seconds": 446.9, + "rss_bytes": 860962816, + "heap_bytes": 29242768, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 170.138, + "cpu_seconds": 452.7, + "rss_bytes": 1006714880, + "heap_bytes": 170137336, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 172.028, + "cpu_seconds": 460.05, + "rss_bytes": 1554419712, + "heap_bytes": 435610216, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 18, + "at_seconds": 174.891, + "cpu_seconds": 467.42, + "rss_bytes": 1751400448, + "heap_bytes": 41800688, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 10, + "at_seconds": 176.807, + "cpu_seconds": 474.82, + "rss_bytes": 1655918592, + "heap_bytes": 28042184, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 18, + "at_seconds": 178.026, + "cpu_seconds": 482.23, + "rss_bytes": 1968574464, + "heap_bytes": 62504704, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 20, + "at_seconds": 180.788, + "cpu_seconds": 489.55, + "rss_bytes": 1396744192, + "heap_bytes": 42857584, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 15, + "at_seconds": 182.29, + "cpu_seconds": 496.9, + "rss_bytes": 1964470272, + "heap_bytes": 20750144, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 184.614, + "cpu_seconds": 504.28, + "rss_bytes": 2089271296, + "heap_bytes": 25290360, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 17, + "at_seconds": 187.343, + "cpu_seconds": 511.65, + "rss_bytes": 1753260032, + "heap_bytes": 42761088, + "queue_depth": 0, + "parquet_files": 890, + "parquet_bytes": 202463215, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 188.351, + "cpu_seconds": 518.99, + "rss_bytes": 1746817024, + "heap_bytes": 31526984, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 19, + "at_seconds": 192.596, + "cpu_seconds": 526.27, + "rss_bytes": 1301815296, + "heap_bytes": 40017888, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 193.119, + "cpu_seconds": 535.8, + "rss_bytes": 1650618368, + "heap_bytes": 22378976, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 16, + "at_seconds": 195.269, + "cpu_seconds": 540.93, + "rss_bytes": 1436434432, + "heap_bytes": 42070240, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 22, + "at_seconds": 196.988, + "cpu_seconds": 548.24, + "rss_bytes": 1515511808, + "heap_bytes": 20654560, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 17, + "at_seconds": 201.286, + "cpu_seconds": 555.57, + "rss_bytes": 1508245504, + "heap_bytes": 38182176, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 11, + "at_seconds": 202.021, + "cpu_seconds": 567.53, + "rss_bytes": 1429553152, + "heap_bytes": 23933880, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 8, + "at_seconds": 202.188, + "cpu_seconds": 570.19, + "rss_bytes": 1172783104, + "heap_bytes": 37921032, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 12, + "at_seconds": 204.068, + "cpu_seconds": 577.48, + "rss_bytes": 1576767488, + "heap_bytes": 14477264, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 16, + "at_seconds": 206.779, + "cpu_seconds": 584.8, + "rss_bytes": 1808478208, + "heap_bytes": 154871808, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 19, + "at_seconds": 208.114, + "cpu_seconds": 592.11, + "rss_bytes": 1070755840, + "heap_bytes": 30977080, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 11, + "at_seconds": 210.093, + "cpu_seconds": 599.48, + "rss_bytes": 1502879744, + "heap_bytes": 31563384, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 17, + "at_seconds": 212.3, + "cpu_seconds": 606.82, + "rss_bytes": 1714495488, + "heap_bytes": 32191080, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 29, + "at_seconds": 214.299, + "cpu_seconds": 613.99, + "rss_bytes": 1351618560, + "heap_bytes": 23175184, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 16, + "at_seconds": 216.43, + "cpu_seconds": 621.3, + "rss_bytes": 1301000192, + "heap_bytes": 36119984, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 15, + "at_seconds": 218.047, + "cpu_seconds": 628.63, + "rss_bytes": 1397272576, + "heap_bytes": 37225008, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 20, + "at_seconds": 220.986, + "cpu_seconds": 635.94, + "rss_bytes": 1762250752, + "heap_bytes": 63778288, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 18, + "at_seconds": 223.947, + "cpu_seconds": 643.14, + "rss_bytes": 2869264384, + "heap_bytes": 24409936, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 15, + "at_seconds": 224.251, + "cpu_seconds": 650.27, + "rss_bytes": 2094632960, + "heap_bytes": 26801184, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 17, + "at_seconds": 226.178, + "cpu_seconds": 657.6, + "rss_bytes": 2074718208, + "heap_bytes": 54883784, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 228.321, + "cpu_seconds": 664.96, + "rss_bytes": 1702998016, + "heap_bytes": 38919392, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 232.365, + "cpu_seconds": 672.28, + "rss_bytes": 1408356352, + "heap_bytes": 40437136, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 19, + "at_seconds": 232.47, + "cpu_seconds": 681.01, + "rss_bytes": 1168019456, + "heap_bytes": 38623224, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 25, + "at_seconds": 235.924, + "cpu_seconds": 687.12, + "rss_bytes": 1509343232, + "heap_bytes": 39735128, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 18, + "at_seconds": 236.897, + "cpu_seconds": 694.5, + "rss_bytes": 1518051328, + "heap_bytes": 31404728, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 238.037, + "cpu_seconds": 701.87, + "rss_bytes": 2159759360, + "heap_bytes": 30017344, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 242.849, + "cpu_seconds": 708.14, + "rss_bytes": 1559597056, + "heap_bytes": 166755976, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 63, + "at_seconds": 245.893, + "cpu_seconds": 718.58, + "rss_bytes": 1348485120, + "heap_bytes": 36724712, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 15, + "at_seconds": 250.9, + "cpu_seconds": 729.81, + "rss_bytes": 2638647296, + "heap_bytes": 55381936, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 19, + "at_seconds": 252.21, + "cpu_seconds": 748.12, + "rss_bytes": 3201306624, + "heap_bytes": 50870520, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 256.043, + "cpu_seconds": 752.67, + "rss_bytes": 2039754752, + "heap_bytes": 54909680, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 23, + "at_seconds": 257.177, + "cpu_seconds": 766.87, + "rss_bytes": 2472386560, + "heap_bytes": 32179976, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 24, + "at_seconds": 263.004, + "cpu_seconds": 774.03, + "rss_bytes": 2564640768, + "heap_bytes": 40456064, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 25, + "at_seconds": 265.019, + "cpu_seconds": 792.52, + "rss_bytes": 3562332160, + "heap_bytes": 27386880, + "queue_depth": 0, + "parquet_files": 1227, + "parquet_bytes": 307590170, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 18, + "at_seconds": 265.692, + "cpu_seconds": 799.66, + "rss_bytes": 1413971968, + "heap_bytes": 57489248, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 32, + "at_seconds": 268.703, + "cpu_seconds": 803.27, + "rss_bytes": 1213562880, + "heap_bytes": 54946272, + "queue_depth": 1, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 19, + "at_seconds": 270.304, + "cpu_seconds": 813.17, + "rss_bytes": 2406940672, + "heap_bytes": 22878352, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 23, + "at_seconds": 271.237, + "cpu_seconds": 818.9, + "rss_bytes": 2567802880, + "heap_bytes": 26971816, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 26, + "at_seconds": 272.81, + "cpu_seconds": 824.96, + "rss_bytes": 1256222720, + "heap_bytes": 34641008, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 26, + "at_seconds": 274.092, + "cpu_seconds": 832.27, + "rss_bytes": 1850556416, + "heap_bytes": 216637968, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 0, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 30, + "at_seconds": 281.006, + "cpu_seconds": 839.64, + "rss_bytes": 1860952064, + "heap_bytes": 28732104, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 15, + "at_seconds": 282.313, + "cpu_seconds": 858.04, + "rss_bytes": 1960357888, + "heap_bytes": 76102000, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 20, + "at_seconds": 282.639, + "cpu_seconds": 862.85, + "rss_bytes": 1770057728, + "heap_bytes": 40138848, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 21, + "at_seconds": 284.413, + "cpu_seconds": 869.02, + "rss_bytes": 2033672192, + "heap_bytes": 41213528, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 13, + "at_seconds": 286.989, + "cpu_seconds": 876.35, + "rss_bytes": 2119417856, + "heap_bytes": 31424568, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 24, + "at_seconds": 291.964, + "cpu_seconds": 883.7, + "rss_bytes": 1764507648, + "heap_bytes": 39184408, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 26, + "at_seconds": 292.277, + "cpu_seconds": 898.34, + "rss_bytes": 1899151360, + "heap_bytes": 41126928, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 14, + "at_seconds": 293.376, + "cpu_seconds": 899.51, + "rss_bytes": 1844273152, + "heap_bytes": 26290496, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 16, + "at_seconds": 294.718, + "cpu_seconds": 906, + "rss_bytes": 2165788672, + "heap_bytes": 36159792, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + }, + { + "fanout_read_cache_pending_batches": 16, + "at_seconds": 296.886, + "cpu_seconds": 913.29, + "rss_bytes": 1690193920, + "heap_bytes": 36233368, + "queue_depth": 0, + "parquet_files": 4342, + "parquet_bytes": 434447968, + "publish_waiters": 1, + "publish_timeouts_total": 0 + } + ], + "minute_bins": [ + { + "minute": 1, + "sample_count": 29, + "pending_median": 7, + "pending_max": 40, + "pending_last": 10, + "preceding_failed_iteration_pending_median": 8, + "preceding_failed_iteration_pending_last": 9, + "server_handler_latency_ms": { + "count": 1199, + "p50": 32.865469, + "p95": 203.274115 + } + }, + { + "minute": 2, + "sample_count": 30, + "pending_median": 11.0, + "pending_max": 51, + "pending_last": 11, + "preceding_failed_iteration_pending_median": 17.5, + "preceding_failed_iteration_pending_last": 29, + "server_handler_latency_ms": { + "count": 1200, + "p50": 60.913534, + "p95": 398.813089 + } + }, + { + "minute": 3, + "sample_count": 30, + "pending_median": 12.0, + "pending_max": 18, + "pending_last": 18, + "preceding_failed_iteration_pending_median": 82.5, + "preceding_failed_iteration_pending_last": 293, + "server_handler_latency_ms": { + "count": 1175, + "p50": 84.076258, + "p95": 2285.376599 + } + }, + { + "minute": 4, + "sample_count": 30, + "pending_median": 16.0, + "pending_max": 29, + "pending_last": 14, + "preceding_failed_iteration_pending_median": 579, + "preceding_failed_iteration_pending_last": 871, + "server_handler_latency_ms": { + "count": 871, + "p50": 2192.894489, + "p95": 8187.412754 + } + }, + { + "minute": 5, + "sample_count": 24, + "pending_median": 20.5, + "pending_max": 63, + "pending_last": 16, + "preceding_failed_iteration_pending_median": 1238, + "preceding_failed_iteration_pending_last": 1690, + "server_handler_latency_ms": { + "count": 457, + "p50": 4448.361887, + "p95": 13594.371239 + } + } + ] + }, + "failed_preceding_iteration": { + "accepted_rows_per_second": 65583.94647883318, + "query_latency_ms": { + "count": 4379, + "mean_ms": 1224.34, + "p50_ms": 93.19, + "p95_ms": 7499.14, + "p99_ms": 13011.96, + "max_ms": 14837.75 + }, + "query_failures": 60, + "query_shed": 1570, + "resources": { + "average_cpu_cores": 3.1289983482854327, + "peak_rss_bytes": 3257733120, + "end_rss_bytes": 1892614144, + "peak_heap_bytes": 335704864, + "end_heap_bytes": 45933096, + "peak_queue_depth": 3, + "parquet_files_end": 4868, + "parquet_bytes_end": 411585608, + "disk_growth_bytes": 1147436045, + "allocated_bytes": 130723389744, + "gc_pause_seconds": 9.509500441 + }, + "quality_gates": [ + { + "name": "generator-processes", + "passed": true, + "detail": "all exited successfully" + }, + { + "name": "server-dropped-rows", + "passed": true, + "detail": "zero" + }, + { + "name": "server-restarts", + "passed": true, + "detail": "none" + }, + { + "name": "authoritative-counters", + "passed": true, + "detail": "Fanout accepted rows in every phase" + }, + { + "name": "sustained-query-load", + "passed": false, + "detail": "14.6/20.0 completed/s, 60 errors, 1570 shed" + }, + { + "name": "storage-repair-verify", + "passed": true, + "detail": "authoritative Parquet storage verified" + } + ], + "pending_samples": [ + { + "at_seconds": 2.029, + "pending_batches": 24 + }, + { + "at_seconds": 4.003, + "pending_batches": 6 + }, + { + "at_seconds": 6.003, + "pending_batches": 5 + }, + { + "at_seconds": 8.003, + "pending_batches": 8 + }, + { + "at_seconds": 10.003, + "pending_batches": 3 + }, + { + "at_seconds": 12.007, + "pending_batches": 6 + }, + { + "at_seconds": 14.004, + "pending_batches": 27 + }, + { + "at_seconds": 16.004, + "pending_batches": 6 + }, + { + "at_seconds": 18.008, + "pending_batches": 5 + }, + { + "at_seconds": 20.007, + "pending_batches": 7 + }, + { + "at_seconds": 22.012, + "pending_batches": 5 + }, + { + "at_seconds": 24.008, + "pending_batches": 6 + }, + { + "at_seconds": 26.004, + "pending_batches": 6 + }, + { + "at_seconds": 28.003, + "pending_batches": 21 + }, + { + "at_seconds": 30.014, + "pending_batches": 8 + }, + { + "at_seconds": 32.008, + "pending_batches": 9 + }, + { + "at_seconds": 34.006, + "pending_batches": 5 + }, + { + "at_seconds": 36.004, + "pending_batches": 5 + }, + { + "at_seconds": 38.007, + "pending_batches": 6 + }, + { + "at_seconds": 40.013, + "pending_batches": 8 + }, + { + "at_seconds": 42.141, + "pending_batches": 39 + }, + { + "at_seconds": 44.003, + "pending_batches": 13 + }, + { + "at_seconds": 46.02, + "pending_batches": 8 + }, + { + "at_seconds": 48.006, + "pending_batches": 6 + }, + { + "at_seconds": 50.021, + "pending_batches": 8 + }, + { + "at_seconds": 52.012, + "pending_batches": 8 + }, + { + "at_seconds": 54.009, + "pending_batches": 11 + }, + { + "at_seconds": 56.009, + "pending_batches": 10 + }, + { + "at_seconds": 58.021, + "pending_batches": 9 + }, + { + "at_seconds": 60.009, + "pending_batches": 9 + }, + { + "at_seconds": 62.071, + "pending_batches": 51 + }, + { + "at_seconds": 64.009, + "pending_batches": 20 + }, + { + "at_seconds": 66.12, + "pending_batches": 60 + }, + { + "at_seconds": 68.008, + "pending_batches": 35 + }, + { + "at_seconds": 70.004, + "pending_batches": 14 + }, + { + "at_seconds": 72.007, + "pending_batches": 9 + }, + { + "at_seconds": 74.007, + "pending_batches": 8 + }, + { + "at_seconds": 76.009, + "pending_batches": 8 + }, + { + "at_seconds": 78.268, + "pending_batches": 5 + }, + { + "at_seconds": 80.01, + "pending_batches": 21 + }, + { + "at_seconds": 82.011, + "pending_batches": 44 + }, + { + "at_seconds": 84.005, + "pending_batches": 55 + }, + { + "at_seconds": 86.05, + "pending_batches": 15 + }, + { + "at_seconds": 88.01, + "pending_batches": 44 + }, + { + "at_seconds": 90.004, + "pending_batches": 13 + }, + { + "at_seconds": 92.391, + "pending_batches": 11 + }, + { + "at_seconds": 94.008, + "pending_batches": 28 + }, + { + "at_seconds": 96.008, + "pending_batches": 11 + }, + { + "at_seconds": 98.007, + "pending_batches": 34 + }, + { + "at_seconds": 100.014, + "pending_batches": 15 + }, + { + "at_seconds": 102.005, + "pending_batches": 9 + }, + { + "at_seconds": 104.112, + "pending_batches": 12 + }, + { + "at_seconds": 106.01, + "pending_batches": 11 + }, + { + "at_seconds": 108.004, + "pending_batches": 34 + }, + { + "at_seconds": 110.033, + "pending_batches": 5 + }, + { + "at_seconds": 112.005, + "pending_batches": 28 + }, + { + "at_seconds": 114.014, + "pending_batches": 34 + }, + { + "at_seconds": 116.063, + "pending_batches": 41 + }, + { + "at_seconds": 118.008, + "pending_batches": 29 + }, + { + "at_seconds": 120.004, + "pending_batches": 8 + }, + { + "at_seconds": 122.009, + "pending_batches": 8 + }, + { + "at_seconds": 124.012, + "pending_batches": 52 + }, + { + "at_seconds": 126.021, + "pending_batches": 26 + }, + { + "at_seconds": 128.057, + "pending_batches": 46 + }, + { + "at_seconds": 130.033, + "pending_batches": 46 + }, + { + "at_seconds": 132.03, + "pending_batches": 76 + }, + { + "at_seconds": 134.194, + "pending_batches": 21 + }, + { + "at_seconds": 136.003, + "pending_batches": 17 + }, + { + "at_seconds": 138.034, + "pending_batches": 65 + }, + { + "at_seconds": 140.011, + "pending_batches": 29 + }, + { + "at_seconds": 142.211, + "pending_batches": 19 + }, + { + "at_seconds": 144.058, + "pending_batches": 77 + }, + { + "at_seconds": 146.054, + "pending_batches": 124 + }, + { + "at_seconds": 148.017, + "pending_batches": 119 + }, + { + "at_seconds": 150.008, + "pending_batches": 81 + }, + { + "at_seconds": 153.353, + "pending_batches": 41 + }, + { + "at_seconds": 154.395, + "pending_batches": 84 + }, + { + "at_seconds": 156.079, + "pending_batches": 108 + }, + { + "at_seconds": 158.025, + "pending_batches": 116 + }, + { + "at_seconds": 160.173, + "pending_batches": 146 + }, + { + "at_seconds": 162.229, + "pending_batches": 161 + }, + { + "at_seconds": 164.123, + "pending_batches": 165 + }, + { + "at_seconds": 166.199, + "pending_batches": 170 + }, + { + "at_seconds": 168.359, + "pending_batches": 187 + }, + { + "at_seconds": 172.13, + "pending_batches": 209 + }, + { + "at_seconds": 172.188, + "pending_batches": 232 + }, + { + "at_seconds": 174.884, + "pending_batches": 243 + }, + { + "at_seconds": 176.375, + "pending_batches": 280 + }, + { + "at_seconds": 178.745, + "pending_batches": 293 + }, + { + "at_seconds": 181.514, + "pending_batches": 304 + }, + { + "at_seconds": 182.068, + "pending_batches": 327 + }, + { + "at_seconds": 184.329, + "pending_batches": 335 + }, + { + "at_seconds": 187.82, + "pending_batches": 367 + }, + { + "at_seconds": 190.101, + "pending_batches": 429 + }, + { + "at_seconds": 192.444, + "pending_batches": 446 + }, + { + "at_seconds": 192.982, + "pending_batches": 458 + }, + { + "at_seconds": 195.862, + "pending_batches": 468 + }, + { + "at_seconds": 197.598, + "pending_batches": 487 + }, + { + "at_seconds": 198.167, + "pending_batches": 513 + }, + { + "at_seconds": 201.156, + "pending_batches": 528 + }, + { + "at_seconds": 202.604, + "pending_batches": 545 + }, + { + "at_seconds": 205.323, + "pending_batches": 559 + }, + { + "at_seconds": 206.224, + "pending_batches": 579 + }, + { + "at_seconds": 209.76, + "pending_batches": 592 + }, + { + "at_seconds": 210.519, + "pending_batches": 604 + }, + { + "at_seconds": 213.682, + "pending_batches": 614 + }, + { + "at_seconds": 214.735, + "pending_batches": 629 + }, + { + "at_seconds": 216.389, + "pending_batches": 649 + }, + { + "at_seconds": 218.004, + "pending_batches": 652 + }, + { + "at_seconds": 224.39, + "pending_batches": 674 + }, + { + "at_seconds": 225.114, + "pending_batches": 737 + }, + { + "at_seconds": 226.338, + "pending_batches": 767 + }, + { + "at_seconds": 230.795, + "pending_batches": 777 + }, + { + "at_seconds": 231.334, + "pending_batches": 796 + }, + { + "at_seconds": 237.009, + "pending_batches": 810 + }, + { + "at_seconds": 238.06, + "pending_batches": 871 + }, + { + "at_seconds": 240.378, + "pending_batches": 882 + }, + { + "at_seconds": 242.056, + "pending_batches": 923 + }, + { + "at_seconds": 242.699, + "pending_batches": 938 + }, + { + "at_seconds": 249.011, + "pending_batches": 954 + }, + { + "at_seconds": 251.927, + "pending_batches": 1015 + }, + { + "at_seconds": 252.488, + "pending_batches": 1021 + }, + { + "at_seconds": 252.491, + "pending_batches": 1021 + }, + { + "at_seconds": 254.981, + "pending_batches": 1113 + }, + { + "at_seconds": 256.752, + "pending_batches": 1113 + }, + { + "at_seconds": 258.862, + "pending_batches": 1189 + }, + { + "at_seconds": 262.796, + "pending_batches": 1222 + }, + { + "at_seconds": 264.448, + "pending_batches": 1238 + }, + { + "at_seconds": 266.518, + "pending_batches": 1249 + }, + { + "at_seconds": 267.1, + "pending_batches": 1273 + }, + { + "at_seconds": 272.203, + "pending_batches": 1296 + }, + { + "at_seconds": 273.276, + "pending_batches": 1337 + }, + { + "at_seconds": 275.051, + "pending_batches": 1353 + }, + { + "at_seconds": 277.964, + "pending_batches": 1364 + }, + { + "at_seconds": 283.009, + "pending_batches": 1411 + }, + { + "at_seconds": 288.023, + "pending_batches": 1470 + }, + { + "at_seconds": 288.211, + "pending_batches": 1488 + }, + { + "at_seconds": 295.004, + "pending_batches": 1488 + }, + { + "at_seconds": 295.719, + "pending_batches": 1690 + } + ] + }, + "file_binding_and_index_append": [ + { + "median_ms": 57.7043635, + "mode": "list", + "p95_ms": 62.433517, + "selected_files": 1000, + "statement_bytes": 139610, + "uses_glob": false, + "window_minutes": 1440 + }, + { + "median_ms": 57.633155, + "mode": "snapshot_glob", + "p95_ms": 61.936017, + "selected_files": 1000, + "statement_bytes": 42760, + "uses_glob": true, + "window_minutes": 1440 + }, + { + "median_ms": 44.735218, + "mode": "glob", + "p95_ms": 46.542491, + "selected_files": 1000, + "statement_bytes": 709, + "uses_glob": true, + "window_minutes": 1440 + }, + { + "median_ms": 2.3448575, + "mode": "list", + "p95_ms": 4.541507, + "selected_files": 11, + "statement_bytes": 2139, + "uses_glob": false, + "window_minutes": 10 + }, + { + "median_ms": 2.2485665, + "mode": "snapshot_glob", + "p95_ms": 3.776714, + "selected_files": 11, + "statement_bytes": 2139, + "uses_glob": false, + "window_minutes": 10 + }, + { + "median_ms": 39.954272, + "mode": "glob", + "p95_ms": 42.018818, + "selected_files": 11, + "statement_bytes": 709, + "uses_glob": true, + "window_minutes": 10 + }, + { + "added_spans_per_pass": 1000, + "median_ms": 16.84786, + "p95_ms": 20.537199, + "passes": 5, + "retained_spans": 200000, + "retained_trace_rows": 100000 + }, + { + "experiment": "trace_candidate_materialization", + "hint": "MATERIALIZED", + "median_ms": 4.912174, + "p95_ms": 5.888426, + "retained_spans": 200000 + }, + { + "experiment": "trace_candidate_materialization", + "hint": "NOT MATERIALIZED", + "median_ms": 4.831132, + "p95_ms": 5.054925, + "retained_spans": 200000 + }, + { + "added_spans_per_pass": 1000, + "median_ms": 18.57703, + "p95_ms": 19.652865, + "passes": 5, + "retained_spans": 800000, + "retained_trace_rows": 400000 + }, + { + "experiment": "trace_candidate_materialization", + "hint": "MATERIALIZED", + "median_ms": 7.178844, + "p95_ms": 7.889804, + "retained_spans": 800000 + }, + { + "experiment": "trace_candidate_materialization", + "hint": "NOT MATERIALIZED", + "median_ms": 5.167633, + "p95_ms": 5.546509, + "retained_spans": 800000 + }, + { + "added_spans_per_pass": 1000, + "median_ms": 17.550153, + "p95_ms": 24.316747, + "passes": 5, + "retained_spans": 2000000, + "retained_trace_rows": 1000000 + }, + { + "experiment": "trace_candidate_materialization", + "hint": "MATERIALIZED", + "median_ms": 13.037687, + "p95_ms": 13.397063, + "retained_spans": 2000000 + }, + { + "experiment": "trace_candidate_materialization", + "hint": "NOT MATERIALIZED", + "median_ms": 8.883723, + "p95_ms": 9.212849, + "retained_spans": 2000000 + }, + { + "added_spans_per_pass": 1000, + "median_ms": 21.73816, + "p95_ms": 28.380629, + "passes": 5, + "retained_spans": 8000000, + "retained_trace_rows": 4000000 + }, + { + "experiment": "trace_candidate_materialization", + "hint": "MATERIALIZED", + "median_ms": 43.961445, + "p95_ms": 45.477032, + "retained_spans": 8000000 + }, + { + "experiment": "trace_candidate_materialization", + "hint": "NOT MATERIALIZED", + "median_ms": 26.385876, + "p95_ms": 26.949585, + "retained_spans": 8000000 + } + ], + "completed_read_and_footprint": [ + { + "catalog_bytes": 70004736, + "empty_catalog_bytes": 274432, + "experiment": "cache_footprint", + "parquet_bytes": 52287828, + "rows_per_signal": 1200000 + }, + { + "cpu_seconds_per_request": 0.16473080000000007, + "implementation": "raw", + "median_ms": 46.623008999999996, + "method": "endpoints", + "p95_ms": 48.805784, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.016570699999999938, + "implementation": "completed", + "median_ms": 14.225793, + "method": "endpoints", + "p95_ms": 17.075152, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.17839930000000007, + "implementation": "raw", + "median_ms": 56.7078375, + "method": "trace", + "p95_ms": 59.966135, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.030159000000000092, + "implementation": "completed", + "median_ms": 17.4647145, + "method": "trace", + "p95_ms": 19.199613, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.17325420000000005, + "implementation": "raw", + "median_ms": 55.712982, + "method": "logs", + "p95_ms": 59.063341, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.021732800000000017, + "implementation": "completed", + "median_ms": 15.309127499999999, + "method": "logs", + "p95_ms": 17.624319, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.08889969999999998, + "implementation": "raw", + "median_ms": 33.495781, + "method": "logs", + "p95_ms": 36.856432, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.019686499999999895, + "implementation": "completed", + "median_ms": 14.137314, + "method": "logs", + "p95_ms": 16.056149, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.020265400000000256, + "implementation": "raw", + "median_ms": 11.529101, + "method": "endpoints", + "p95_ms": 13.528313, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.023323800000000006, + "implementation": "completed", + "median_ms": 17.488506, + "method": "endpoints", + "p95_ms": 18.32132, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.06347800000000028, + "implementation": "raw", + "median_ms": 26.030061, + "method": "trace", + "p95_ms": 27.04175, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.0344379, + "implementation": "completed", + "median_ms": 20.7213235, + "method": "trace", + "p95_ms": 22.162451, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + } + ], + "review_head_read_and_footprint": [ + { + "catalog_bytes": 180891648, + "empty_catalog_bytes": 274432, + "experiment": "cache_footprint", + "parquet_bytes": 52287828, + "rows_per_signal": 1200000 + }, + { + "cpu_seconds_per_request": 0.15753640000000005, + "implementation": "raw", + "median_ms": 44.659694, + "method": "endpoints", + "p95_ms": 45.798738, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.04933440000000004, + "implementation": "completed", + "median_ms": 29.9615255, + "method": "endpoints", + "p95_ms": 32.952843, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.17756730000000012, + "implementation": "raw", + "median_ms": 56.189087, + "method": "trace", + "p95_ms": 60.878094, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.034318199999999875, + "implementation": "completed", + "median_ms": 17.9254235, + "method": "trace", + "p95_ms": 18.634737, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.20452259999999994, + "implementation": "raw", + "median_ms": 67.964147, + "method": "logs", + "p95_ms": 69.523066, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.03202080000000009, + "implementation": "completed", + "median_ms": 21.5996165, + "method": "logs", + "p95_ms": 26.303999, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.025213700000000117, + "implementation": "raw", + "median_ms": 12.020227, + "method": "endpoints", + "p95_ms": 14.169939, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.03471489999999981, + "implementation": "completed", + "median_ms": 22.4875555, + "method": "endpoints", + "p95_ms": 27.704209, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.06506910000000019, + "implementation": "raw", + "median_ms": 27.121813, + "method": "trace", + "p95_ms": 29.288129, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.04784429999999986, + "implementation": "completed", + "median_ms": 27.674459499999998, + "method": "trace", + "p95_ms": 30.064255, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.08966289999999973, + "implementation": "raw", + "median_ms": 34.116885999999994, + "method": "logs", + "p95_ms": 35.555971, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.01770870000000002, + "implementation": "completed", + "median_ms": 12.898854, + "method": "logs", + "p95_ms": 14.038855, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + } + ], + "warm_read_regression_diagnostic": [ + { + "catalog_bytes": 70004736, + "empty_catalog_bytes": 274432, + "experiment": "cache_footprint", + "parquet_bytes": 52287828, + "rows_per_signal": 1200000 + }, + { + "cpu_seconds_per_request": 0.1653568, + "implementation": "raw", + "median_ms": 46.113405, + "method": "endpoints", + "p95_ms": 71.05161, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.01688679999999998, + "implementation": "completed", + "median_ms": 14.6557315, + "method": "endpoints", + "p95_ms": 15.928317, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.1798228, + "implementation": "raw", + "median_ms": 56.227941, + "method": "trace", + "p95_ms": 63.336931, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.19180889999999984, + "implementation": "completed", + "median_ms": 62.389514000000005, + "method": "trace", + "p95_ms": 65.095851, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.18129619999999988, + "implementation": "raw", + "median_ms": 57.898174, + "method": "logs", + "p95_ms": 64.41385, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.021251200000000026, + "implementation": "completed", + "median_ms": 14.7375235, + "method": "logs", + "p95_ms": 18.146528, + "rows_per_signal": 1200000, + "window_minutes": 1440.0166666666667 + }, + { + "cpu_seconds_per_request": 0.022954599999999915, + "implementation": "raw", + "median_ms": 11.9913725, + "method": "endpoints", + "p95_ms": 12.753978, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.022601900000000084, + "implementation": "completed", + "median_ms": 16.3775045, + "method": "endpoints", + "p95_ms": 18.251862, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.06422249999999999, + "implementation": "raw", + "median_ms": 27.0913545, + "method": "trace", + "p95_ms": 28.676086, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.10683830000000008, + "implementation": "completed", + "median_ms": 43.268254999999996, + "method": "trace", + "p95_ms": 47.001156, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.09288650000000018, + "implementation": "raw", + "median_ms": 35.0072835, + "method": "logs", + "p95_ms": 37.805225, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + }, + { + "cpu_seconds_per_request": 0.01983619999999995, + "implementation": "completed", + "median_ms": 14.198293, + "method": "logs", + "p95_ms": 16.45965, + "rows_per_signal": 1200000, + "window_minutes": 20.016666666666666 + } + ], + "limitations": [ + "Single trials and small per-case read samples do not establish production capacity.", + "Same-host generators are CPU-limited; offered is nominal, accepted counters are authoritative.", + "The sustained 20-read/s gate still fails despite stable cache backlog.", + "Peak RSS increased relative to the earlier sustained run; cache catalog reduction is not proof of lower peak process memory.", + "The snapshot-preserving broad glob remains slower than an unguarded glob.", + "CPU-limited writer regression remains open in #277." + ], + "cpu_limited_ingestion": { + "cpu_limit": 1, + "memory_limit_bytes": 6442450944, + "order": [ + "baseline1", + "final1", + "final2", + "baseline2", + "baseline3", + "final3" + ], + "baseline_commit": "30ba9b9ba8a4217cc73637760d7acdcd5f89f15a", + "writer_note": "Cache follow-up does not modify writer code; final is the earlier current-writer binary ingest-v3.test with measurement profiles.", + "all_six_storage_verifications_pass": true, + "baseline": { + "repetitions": [ + { + "allocated_bytes_per_row": 3756.246417666827, + "concurrency": 16, + "cpu_cores_client_and_server": 0.9974945835137421, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 35.203179, + "p95_ms": 64.048766, + "p99_ms": 70.4594, + "rows": 4166000, + "rows_per_second": 414699.6813000996, + "seconds": 10.045823973, + "cpu_seconds_per_million_rows": 2.4053420547287567 + }, + { + "allocated_bytes_per_row": 3737.617022498803, + "concurrency": 16, + "cpu_cores_client_and_server": 0.9954562546948289, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 34.901804, + "p95_ms": 64.566558, + "p99_ms": 76.955827, + "rows": 4178000, + "rows_per_second": 415984.279287794, + "seconds": 10.043648782, + "cpu_seconds_per_million_rows": 2.393014121589277 + }, + { + "allocated_bytes_per_row": 3745.67462644545, + "concurrency": 16, + "cpu_cores_client_and_server": 0.9975928171836536, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 35.680805, + "p95_ms": 65.671809, + "p99_ms": 73.680738, + "rows": 3978000, + "rows_per_second": 396682.0441252176, + "seconds": 10.028182669, + "cpu_seconds_per_million_rows": 2.514842383107089 + } + ], + "median": { + "allocated_bytes_per_row": 3745.67462644545, + "concurrency": 16, + "cpu_cores_client_and_server": 0.9974945835137421, + "errors": 0, + "p50_ms": 35.203179, + "p95_ms": 64.566558, + "p99_ms": 73.680738, + "rows": 4166000, + "rows_per_second": 414699.6813000996, + "seconds": 10.043648782, + "cpu_seconds_per_million_rows": 2.4053420547287567 + } + }, + "final": { + "repetitions": [ + { + "allocated_bytes_per_row": 3945.571900704873, + "concurrency": 16, + "cpu_cores_client_and_server": 1.0045131767164426, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 37.824641, + "p95_ms": 76.653076, + "p99_ms": 81.539876, + "rows": 3263000, + "rows_per_second": 325908.3559937839, + "seconds": 10.012016998, + "cpu_seconds_per_million_rows": 3.0821952191235065 + }, + { + "allocated_bytes_per_row": 3927.4635657568238, + "concurrency": 16, + "cpu_cores_client_and_server": 1.0003739569750103, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 45.957195, + "p95_ms": 79.843706, + "p99_ms": 87.479593, + "rows": 3224000, + "rows_per_second": 320543.3561450339, + "seconds": 10.05792177, + "cpu_seconds_per_million_rows": 3.1208694168734494 + }, + { + "allocated_bytes_per_row": 3943.2126353745725, + "concurrency": 16, + "cpu_cores_client_and_server": 1.0017059400170478, + "durable": true, + "errors": 0, + "mode": "shared", + "p50_ms": 43.514858, + "p95_ms": 76.853409, + "p99_ms": 81.000792, + "rows": 3217000, + "rows_per_second": 321598.33610887046, + "seconds": 10.003161207, + "cpu_seconds_per_million_rows": 3.114773391358409 + } + ], + "median": { + "allocated_bytes_per_row": 3943.2126353745725, + "concurrency": 16, + "cpu_cores_client_and_server": 1.0017059400170478, + "errors": 0, + "p50_ms": 43.514858, + "p95_ms": 76.853409, + "p99_ms": 81.539876, + "rows": 3224000, + "rows_per_second": 321598.33610887046, + "seconds": 10.012016998, + "cpu_seconds_per_million_rows": 3.114773391358409 + } + } + } +} diff --git a/docs/benchmarks/duckdb2-review-2026-10-01.md b/docs/benchmarks/duckdb2-review-2026-10-01.md new file mode 100644 index 00000000..bed57cd9 --- /dev/null +++ b/docs/benchmarks/duckdb2-review-2026-10-01.md @@ -0,0 +1,124 @@ +# DuckDB 2 cache review — 2026-10-01 + +This report addresses the nine comments in [review 5383705777](https://github.com/labstack/fanout/pull/272#pullrequestreview-5383705777) at `cd916d5`. The [previous report](duckdb2-followups-2026-10-01.md) retains the admission-limited ingestion results and failed short saturation diagnostic. Neither fully built-cache reads nor short sweeps establish sustained cache stability. #277 remains open for encoding CPU cost. [#278](https://github.com/labstack/fanout/issues/278) tracks the remaining sustained read-capacity and peak-memory limits. + +## Implementation + +| Finding | Change | +|---|---| +| Cache worker lag | Separate completed-batch and analytical write gates, with two writer connections over disjoint tables; checkpointing holds both gates. Bind each signal once per pass, rather than one UNION branch per file. Derive candidates from newly aggregated trace parts without a third Parquet scan. | +| Retained trace-index rewrite | One candidate row per trace, incrementally upserted from new contributions; no global DELETE/reinsert on normal append. Temporary trace parts contain only the current pass. | +| Compaction markers disable the index | Transfer complete cached contributions before the namespace swap. Follow replacement lineage across multiple compaction levels. Retention and incomplete replacements repair only affected trace IDs. | +| Cache footprint | Remove full span-event and log-timestamp copies and the four scope-expanded trace indexes. Keep minute counts, scoped per-batch trace parts, and one candidate per trace. | +| Stale severity semantics | A schema/aggregation version atomically discards all private read tables on mismatch and rebuilds from format-3 Parquet. Matching versions preserve acknowledgements. The already-existing endpoint_rollup/watermark cleanup now has regression coverage. | +| Broad file lists | Use a glob at 64+ selected files when at least 80% of active signal files overlap; retain a captured-ID filename filter. Narrow selections retain explicit lists. Only relations actually referenced are bound. | +| Ingestion throughput interpretation | Keep #277 open. The 20→10ms admission change helps closed-loop acknowledgement latency; it does not remove CPU cost per row. | +| Warm read comparison | Explicitly label cache-current reads and add the five-minute mixed run with pending-batch samples. | + +A worker pass admits at most 64 files and 64,000 new span/log rows, except that one oversized immutable file must be admitted to make progress. These are work-selection bounds, not a hard elapsed-time limit. Completed files and their aggregates/acknowledgements commit atomically. A pinned read sees active files and cache contributions from one transaction. Uncached format-3 files remain immediately visible through the authoritative Parquet path. Publication preparation releases the cache gate before waiting for readers to drain; prepared output markers are protected until publication finishes. No prior-format reader or schema conversion is introduced. + +Mixed namespace/service traces use exact scoped batch parts. Single-scope traces use the one candidate row; a snapshot-local ambiguity probe avoids adding an unused batch-parts aggregation to scoped plans. Clipped event-time windows retain exact boundary reads; a complete file contained entirely within the window can contribute its cached minute counts even when the window clips that minute. Trace candidate CTEs are not materialized into a full temporary relation for every request. Ranking still scans candidates; this is not a claim that DuckDB provides an ordered top-one index. + +## Environment and evidence + +Native Linux ARM64, Go 1.27.1, pinned DuckDB `v2.0.0-alpha43763`, Docker limits 4 CPUs / 6 GiB except the explicitly labelled one-CPU ingestion runs. Benchmarks run sequentially. Same-host telemetrygen 0.157.0 and the benchmark scheduler consume part of the same CPU allowance. The nominal offered rate is a configured target; accepted Fanout counters measure the actual ingestion rate. + +[Measured JSON](duckdb2-review-2026-10-01.json) records binary SHA256 values, samples, limits and failed iterations. Full local data/evidence are retained in `fanout-review272-cache-v6`, under `/runs/optimized`; the preceding failed gate remains in `fanout-review272-cache-v5`. These are development measurements of the worktree following `cd916d5`, not a production capacity guarantee. + +## Five-minute mixed workload + +The 300.154-second phase accepted **66,086 rows/s**, with Fanout using **3.05 CPU cores** on average. The scheduler completed **16.4/20 reads/s**, with **19 failed** and **1,099 shed** requests. Successful-client latency was **88.12ms p50 / 5,955.36ms p95 / 10,630.47ms p99**. **The sustained read-capacity gate fails.** Generator exits, dropped rows, restarts, and complete authoritative storage verification pass. + +| Minute | Pending batches median / sampled max / last | Preceding failed iteration, last pending | Server handler p50 / p95 | +|---|---:|---:|---:| +| 1 | 7 / 40 / 10 | 9 | 32.87 / 203.27ms | +| 2 | 11 / 51 / 11 | 29 | 60.91 / 398.81ms | +| 3 | 12 / 18 / 18 | 293 | 84.08 / 2285.38ms | +| 4 | 16 / 29 / 14 | 871 | 2192.89 / 8187.41ms | +| 5 | 20.5 / 63 / 16 | 1690 | 4448.36 / 13594.37ms | + +The cache stays near the incoming batch rate instead of accumulating 1,690 pending batches as the preceding iteration did. A manual cooldown scrape observed zero pending batches. Read latency nevertheless deteriorates late in the run: cache-current ranking/file scans, analytical work and publication scheduling still share finite resources. The gate failure is retained as a separate capacity limitation; cache backlog improvement does not establish that all overload problems are solved. The per-minute latency values above come from server request logs grouped by request start, not client latencies or completed-read rates. Requested two-second metric samples occasionally stall during overloaded scrapes; their actual timestamps and sample counts are retained. + +Peak process RSS is **3.32 GiB**, with **0.98 GiB** at the end of cooldown. The preceding failed iteration peaked at **3.03 GiB**. This does not show lower peak process memory, even though the derived catalog is smaller. Different accepted datasets, cache lifecycles, concurrent queries and compaction prevent treating process RSS as cache size. Full logs and failed gates remain inspectable. + +The later scoped ambiguity probe is measured separately by the fully built-cache fixture below. It does not change the unscoped sustained workload's query path; the JSON distinguishes the two measured binaries. + + +The fixed preset has a ten-second warmup, six generator processes (two per signal, eight workers each, 2,500 rows/s per worker), a full 300-second mixed phase, 1,000 rows/export, 20 open-loop reads/s, and a thirty-second cooldown. The unchanged reader scheduler uses 40 workers and a 40-item queue. The pending-batch gauge is sampled every two seconds. The review's shell driver used a different scheduling/in-flight limit, so the runs are not exact matched throughput comparisons. + +## Retained-index append and read experiment + +Five disjoint 1,000-span files are appended at each retained size, with one trace per two spans. Fixture creation is excluded. These synthetic caches exercise normal append only: no stale cleanup, compaction, publication wait, or concurrent workload. The pass must still bind/aggregate its new file and mutate the keyed index; constant-time behavior is not claimed. + +| Retained spans / trace rows | Append median / max | Materialized / non-materialized candidate read median | +|---|---:|---:| +| 200k / 100k | 16.85 / 20.54ms | 4.91 / 4.83ms | +| 800k / 400k | 18.58 / 19.65ms | 7.18 / 5.17ms | +| 2M / 1M | 17.55 / 24.32ms | 13.04 / 8.88ms | +| 8M / 4M | 21.74 / 28.38ms | 43.96 / 26.39ms | + +The synthetic read measures the top-one and touched-trace branches over the same candidate table. It does not include file capture, scoped ambiguity, dashboard serialization or concurrent writes. EXPLAIN shows no retained-candidate CTE materialization in the non-materialized form; the table scans remain. Maxima of five samples are not robust tail estimates. + +## File binding + +One thousand one-row log files span one thousand minutes. Each case warms once and measures ten requests. Counts agree for the captured data. + +| Window | Explicit list median | Captured-ID glob median | Unguarded glob median | Selected files | +|---|---:|---:|---:|---:| +| 24h | 57.70ms | 57.63ms | 44.74ms | 1,000 | +| 10m | 2.34ms | 2.25ms (explicit list selected) | 39.95ms | 11 | + +The broad statement shrinks from 139,610 to 42,760 bytes. The exact captured-ID glob is effectively flat with the explicit list in this fixture and still slower than an unguarded glob. An unguarded glob can admit new files published after snapshot capture; it is not substituted for the snapshot contract. A regression test publishes a new batch after capture and verifies exclusion, including a Unicode data path. Rollup-only queries no longer construct unused Parquet lists. + +## Cache-current dashboard reads and footprint + +| Window / method | Raw median / p95 | Completed median / p95 | Completed CPU ms / request | +|---|---:|---:|---:| +| 24h endpoints | 46.62 / 48.81ms | 14.23 / 17.08ms | 16.57 | +| 24h trace | 56.71 / 59.97ms | 17.46 / 19.20ms | 30.16 | +| 24h logs | 55.71 / 59.06ms | 15.31 / 17.62ms | 21.73 | +| 20m endpoints | 11.53 / 13.53ms | 17.49 / 18.32ms | 23.32 | +| 20m trace | 26.03 / 27.04ms | 20.72 / 22.16ms | 34.44 | +| 20m logs | 33.50 / 36.86ms | 14.14 / 16.06ms | 19.69 | + +Using the same fixture and footprint instrumentation, the review head's catalog is **180,891,648 bytes** versus **70,004,736 bytes** now (**61.3% smaller**). Parquet is **52,287,828 bytes** for both, and the empty catalog is **274,432 bytes**. The new catalog is still **1.34×** the highly compressible Parquet fixture; caches are not free. Backfill changes from **3.355s to 1.856s**. This is one trial, not a universal storage ratio. + +The persisted-cache experiment caught a transient scoped-trace regression (**62.39ms** broad median): an unnecessary mixed-scope batch-parts branch was duplicated by the non-materialized plan even when no ambiguity existed. The snapshot-local ambiguity probe removes that branch in those scopes; the final broad trace median is **17.46ms**, versus **17.93ms** at the review head. The regression diagnostic is retained in JSON. Mixed scopes still use exact active parts. + + +The fixture contains 1.2 million spans and 1.2 million logs in twelve hourly batches plus 300 old tiny log/metric files. Both paths read identical format-3 data; caches are completely built, no background worker or ingest runs. Ten requests follow one warmup per case. Endpoint production reads use the established histogram estimate rather than the raw kernel's approx_quantile. Narrow endpoint planning cost remains an explicit limitation. Catalog sizes are measured after CHECKPOINT and include the empty cache/catalog baseline; they are not peak memory measurements. The sustained run supplies process RSS. + +## CPU-limited ingestion + +| Median metric | #270 | Current typed writer | +|---|---:|---:| +| Durable acknowledged rows/s | 414,700 | 321,598 | +| CPU seconds / million rows | 2.405 | 3.115 | +| Go allocated bytes / row | 3,746 | 3,943 | +| Export p50 (ms) | 35.20 | 43.51 | +| Export p95 (ms) | 64.57 | 76.85 | + +All six runs have zero export errors and pass storage verification. With CPU saturated at approximately one core, current throughput is **22.5% lower**, normalized CPU cost **29.5% higher**, and Go allocation/row **5.3% higher**. This independently confirms the review's direction. **#277 remains open; the encoding regression is not resolved.** The earlier four-CPU +19% throughput result remains labelled admission-limited in the historical report. + + +The baseline is #270 merge `30ba9b9ba8a4217cc73637760d7acdcd5f89f15a`, with a measurement-only profiling overlay. The current writer is unchanged by this cache follow-up. Three alternating baseline/current repetitions use one CPU / 6 GiB, durable mode, 16 in-process clients, equal signals, 1,000 rows/export, and ten-second measurement intervals. No dashboard/cache worker runs. CPU profiles cover the interval; heap profiles cover the whole experiment. Every run verifies authoritative storage. These single-host fixture medians do not prove broader capacity. + +## Reproduce and validation + +Run opt-in fixtures alone with the pinned wrapper: + +```sh +bash scripts/with-duckdb.sh go test -tags=filebench ./internal/query \ + -run 'TestSnapshotFileBindingBenchmark|TestReadCacheAppendScalingBenchmark' -v -count=1 +FANOUT_READ_BENCH_LARGE=1 bash scripts/with-duckdb.sh go test -tags=readbench \ + ./internal/observability -run TestCompletedReadBenchmark -v -count=1 +FANOUT_BENCH_PROFILE_DIR=/tmp/fanout-profiles \ + bash scripts/with-duckdb.sh go test -tags=transportbench ./internal/ingest \ + -run 'TestTransportComparison/durable=true/c=16/rep=1/shared' -v -count=1 +``` + +For CPU-capped measurements, compile native Linux test binaries with `go test -c` through the wrapper, then execute them in otherwise idle `--cpus 4 --memory 6g` containers (one CPU for the CPU-limited ingestion comparison). + +For the sustained test, copy `fanout-bench` at `a9843c1fd55b9465d4d77a42fcf8805c467af731` into a temporary workspace and apply [the complete local harness patch](duckdb2-review-2026-10-01-harness.patch) with `git apply --unidiff-zero`. The patch adapts current Fanout addresses/metrics, adds source identity, installs the fixed preset, and records the gauge. Build the harness and Fanout for native Linux, then run `fanout-bench managed --fanout /tools/fanout --telemetrygen /tools/telemetrygen --preset review272 --query-rate 20 --sample-interval 2s --cooldown 30s --output /runs/optimized/evidence` in a 4-CPU/6-GiB container. Sibling repositories are not modified. + +Local validation passes: `just check`, the full `just test-race` suite with the documented CGO checkptr workaround, and the full native Linux ARM64 Go suite. New regression coverage exercises schema/semantic rebuild and matching-version preservation, original severity labels, captured-glob isolation with Unicode and relative paths, protected publication preparation and cancellation, cache progress during a disjoint analytical transaction, row-budget/oversized-file progress, two-level compaction lineage, retention scope/error repair, rollback and public-SQL cache rejection. Existing cold/warm, clipped-window, late-publication, trace-ranking and typed-data parity tests continue to pass. diff --git a/go.mod b/go.mod index 0829ff96..61efae0e 100644 --- a/go.mod +++ b/go.mod @@ -1,61 +1,61 @@ module github.com/labstack/fanout -go 1.27.0 +go 1.27.1 require ( cel.dev/cel-go v0.32.0 github.com/DATA-DOG/go-sqlmock v1.5.2 - github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260826145851-49e71f2b2d21 + github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260930215002-015baf5dc150 github.com/alexedwards/scs/v2 v2.9.0 - github.com/coreos/go-oidc/v3 v3.20.0 - github.com/duckdb/duckdb-go/v2 v2.10505.0 + github.com/coreos/go-oidc/v3 v3.21.0 + github.com/duckdb/duckdb-go/v2 v2.10506.0 github.com/go-viper/mapstructure/v2 v2.5.0 github.com/golang-jwt/jwt/v5 v5.3.1 github.com/google/uuid v1.6.0 github.com/knadh/koanf/parsers/yaml v1.1.1 github.com/knadh/koanf/providers/confmap v1.0.1 github.com/knadh/koanf/providers/file v1.2.1 - github.com/knadh/koanf/v2 v2.3.6 - github.com/labstack/echo/v5 v5.3.1 - github.com/modelcontextprotocol/go-sdk v1.7.0 + github.com/knadh/koanf/v2 v2.3.7 + github.com/labstack/echo/v5 v5.4.0 + github.com/modelcontextprotocol/go-sdk v1.8.0 github.com/parquet-go/parquet-go v0.32.0 github.com/pressly/goose/v3 v3.28.0 github.com/prometheus/client_golang v1.24.1 - github.com/prometheus/client_model v0.6.2 + github.com/prometheus/client_model v0.6.3 github.com/wneessen/go-mail v0.8.1 github.com/zeebo/xxh3 v1.1.0 go.opentelemetry.io/proto/otlp v1.11.0 - golang.org/x/oauth2 v0.36.0 - golang.org/x/sync v0.22.0 - golang.org/x/sys v0.47.0 - golang.org/x/time v0.15.0 + golang.org/x/oauth2 v0.37.0 + golang.org/x/sync v0.23.0 + golang.org/x/sys v0.48.0 + golang.org/x/time v0.16.0 google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 - modernc.org/sqlite v1.57.0 + modernc.org/sqlite v1.60.1 ) require ( cel.dev/expr v0.25.3 // indirect - github.com/andybalholm/brotli v1.2.3 // indirect + github.com/andybalholm/brotli v1.2.6 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/apache/arrow-go/v18 v18.5.1 // indirect - github.com/apache/thrift v0.24.0 // indirect + github.com/apache/arrow-go/v18 v18.8.0 // indirect + github.com/apache/thrift v0.25.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/duckdb/duckdb-go-bindings v0.10505.0 // indirect - github.com/duckdb/duckdb-go-bindings/lib/darwin-amd64 v0.10505.0 // indirect - github.com/duckdb/duckdb-go-bindings/lib/darwin-arm64 v0.10505.0 // indirect - github.com/duckdb/duckdb-go-bindings/lib/linux-amd64 v0.10505.0 // indirect - github.com/duckdb/duckdb-go-bindings/lib/linux-arm64 v0.10505.0 // indirect - github.com/duckdb/duckdb-go-bindings/lib/windows-amd64 v0.10505.0 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect + github.com/duckdb/duckdb-go-bindings v0.10506.0 // indirect + github.com/duckdb/duckdb-go-bindings/lib/darwin-amd64 v0.10506.0 // indirect + github.com/duckdb/duckdb-go-bindings/lib/darwin-arm64 v0.10506.0 // indirect + github.com/duckdb/duckdb-go-bindings/lib/linux-amd64 v0.10506.0 // indirect + github.com/duckdb/duckdb-go-bindings/lib/linux-arm64 v0.10506.0 // indirect + github.com/duckdb/duckdb-go-bindings/lib/windows-amd64 v0.10506.0 // indirect + github.com/dustin/go-humanize v1.1.0 // indirect github.com/fsnotify/fsnotify v1.10.1 // indirect - github.com/go-jose/go-jose/v4 v4.1.4 // indirect - github.com/goccy/go-json v0.10.6 // indirect + github.com/go-jose/go-jose/v4 v4.1.5 // indirect + github.com/goccy/go-json v0.11.2 // indirect github.com/google/flatbuffers v25.12.19+incompatible // indirect github.com/google/jsonschema-go v0.4.3 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect - github.com/klauspost/compress v1.19.2 // indirect + github.com/klauspost/compress v1.20.1 // indirect github.com/klauspost/cpuid/v2 v2.4.0 // indirect github.com/knadh/koanf/maps v0.1.3 // indirect github.com/kylelemons/godebug v1.1.0 // indirect @@ -64,32 +64,28 @@ require ( github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/ncruces/go-strftime v1.0.0 // indirect - github.com/parquet-go/bitpack v1.0.0 // indirect - github.com/parquet-go/jsonlite v1.0.0 // indirect - github.com/pierrec/lz4/v4 v4.1.29 // indirect - github.com/prometheus/common v0.70.1 // indirect + github.com/ncruces/go-strftime v1.1.0 // indirect + github.com/parquet-go/bitpack v1.1.0 // indirect + github.com/parquet-go/jsonlite v1.5.5 // indirect + github.com/pierrec/lz4/v4 v4.1.31 // indirect + github.com/prometheus/common v0.72.0 // indirect github.com/prometheus/procfs v0.22.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/segmentio/asm v1.2.1 // indirect github.com/segmentio/encoding v0.5.4 // indirect github.com/sethvargo/go-retry v0.4.0 // indirect github.com/sirupsen/logrus v1.10.2 // indirect - github.com/twpayne/go-geom v1.6.1 // indirect + github.com/twpayne/go-geom v1.7.0 // indirect github.com/yosida95/uritemplate/v3 v3.0.2 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect - golang.org/x/crypto v0.55.0 // indirect - golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa // indirect - golang.org/x/mod v0.40.0 // indirect - golang.org/x/net v0.58.0 // indirect - golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5 // indirect - golang.org/x/text v0.41.0 // indirect - golang.org/x/tools v0.49.0 // indirect - golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a // indirect - modernc.org/libc v1.75.6 // indirect + golang.org/x/crypto v0.57.0 // indirect + golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba // indirect + golang.org/x/net v0.59.0 // indirect + golang.org/x/text v0.42.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc // indirect + modernc.org/libc v1.77.1 // indirect modernc.org/mathutil v1.7.1 // indirect modernc.org/memory v1.12.1 // indirect ) diff --git a/go.sum b/go.sum index 56ebb34e..4a76e83b 100644 --- a/go.sum +++ b/go.sum @@ -4,62 +4,60 @@ cel.dev/expr v0.25.3 h1:A2jO8jwOugrrovveCWfj0KEZOfqiLgAcwjpHPhzIGw0= cel.dev/expr v0.25.3/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= -github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260826145851-49e71f2b2d21 h1:3VNXocOAUREE2xNT6wr24U19xcLgvqjQ6zfQ9VIuXwA= -github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260826145851-49e71f2b2d21/go.mod h1:ERAMOexUee4AIuoxksuuGoEcHl3aqLwaazjGwlR9ZCI= -github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY= -github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= -github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260930215002-015baf5dc150 h1:aMyhbPnEk/t9a6zOlvYmuFw5/uF2pjN9R95V8ua1d7w= +github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260930215002-015baf5dc150/go.mod h1:ERAMOexUee4AIuoxksuuGoEcHl3aqLwaazjGwlR9ZCI= +github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= +github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/repr v0.5.4 h1:OVP7JEcuzU9CCDsT6STCr3rg17oQfWILtPWd2EG0uN4= +github.com/alecthomas/repr v0.5.4/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alexedwards/scs/v2 v2.9.0 h1:xa05mVpwTBm1iLeTMNFfAWpKUm4fXAW7CeAViqBVS90= github.com/alexedwards/scs/v2 v2.9.0/go.mod h1:ToaROZxyKukJKT/xLcVQAChi5k6+Pn1Gvmdl7h3RRj8= -github.com/andybalholm/brotli v1.2.3 h1:8H1qwOkl2LPfjf3YezB90JnCliZb6SInJ/OJkEbA5NQ= -github.com/andybalholm/brotli v1.2.3/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= +github.com/andybalholm/brotli v1.2.6 h1:ftYnfj6usCp+UGV5kSJ3+chpMQgU+gJf/AxsUQ52REI= +github.com/andybalholm/brotli v1.2.6/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/apache/arrow-go/v18 v18.5.1 h1:yaQ6zxMGgf9YCYw4/oaeOU3AULySDlAYDOcnr4LdHdI= -github.com/apache/arrow-go/v18 v18.5.1/go.mod h1:OCCJsmdq8AsRm8FkBSSmYTwL/s4zHW9CqxeBxEytkNE= -github.com/apache/thrift v0.24.0 h1:zy31L1a49QTNB2bG1BBfMXol3yJrTH975G3pPubQVLQ= -github.com/apache/thrift v0.24.0/go.mod h1:zPt6WxgvTOM6hF92y8C+MkEM5LMxZuk4JcQOiU4Esvs= +github.com/apache/arrow-go/v18 v18.8.0 h1:BLOzbPv7bxMPgXPacAg6HQjnxupYsZzC4tf+FkqPU/M= +github.com/apache/arrow-go/v18 v18.8.0/go.mod h1:uJCFfCwq0KsxCmsCfQg4ft+LsW+iHYzAXiSDh5ug/8U= +github.com/apache/thrift v0.25.0 h1:6LLlvoPjy8Cc/0b5TYRcTR3RZa2W0at3WQRcOkDwVGs= +github.com/apache/thrift v0.25.0/go.mod h1:4lwyToijD9T70w7GlevFk7FnpY60Wv8I8krMkF6FkAo= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/coreos/go-oidc/v3 v3.20.0 h1:EtE0WIBHk03N+DqGkY4+UONzzZHk7amKt6IyNd7OsZE= -github.com/coreos/go-oidc/v3 v3.20.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4= -github.com/duckdb/duckdb-go-bindings v0.10505.0 h1:/0pPsTLrcCsTGxT0VrHgJWnOcPe1tQL1vrki1v3jbAI= -github.com/duckdb/duckdb-go-bindings v0.10505.0/go.mod h1:HoD5xePkDj3VZbBnVVfxVVYIljZ9khCprWA7FgwIiC4= -github.com/duckdb/duckdb-go-bindings/lib/darwin-amd64 v0.10505.0 h1:FrMqquFBQlMsi34h2KZgCku54rqA8xEbXZ0NLVDKwYs= -github.com/duckdb/duckdb-go-bindings/lib/darwin-amd64 v0.10505.0/go.mod h1:EnAvZh1kNJHp5yF+M1ZHNEvapnmt6anq1xXHVrAGqMo= -github.com/duckdb/duckdb-go-bindings/lib/darwin-arm64 v0.10505.0 h1:lbRbpQwT1MmUhh/VTwukV9K8bxKByV3UghAP3MvsbBo= -github.com/duckdb/duckdb-go-bindings/lib/darwin-arm64 v0.10505.0/go.mod h1:IGLSeEcFhNeZF16aVjQCULD7TsFZKG5G7SyKJAXKp5c= -github.com/duckdb/duckdb-go-bindings/lib/linux-amd64 v0.10505.0 h1:nrsaVYj3XYCRbS2FpdOMD/KHE7egRMr+/NR1IHmjT84= -github.com/duckdb/duckdb-go-bindings/lib/linux-amd64 v0.10505.0/go.mod h1:KAIynZ0GHCS7X5fRyuFnQMg/SZBPK/bS9OCOVojClxw= -github.com/duckdb/duckdb-go-bindings/lib/linux-arm64 v0.10505.0 h1:qM6oGDgwXBILJGbTY4fCy6QOczLpucUA6yn6g3ORjh4= -github.com/duckdb/duckdb-go-bindings/lib/linux-arm64 v0.10505.0/go.mod h1:81SGOYoEUs8qaAfSk1wRfM5oobrIJ5KI7AzYhK6/bvQ= -github.com/duckdb/duckdb-go-bindings/lib/windows-amd64 v0.10505.0 h1:DjqZl9rYreHkSOqnqLmkrqH5T8UdQNcxZLJVZzGmXXA= -github.com/duckdb/duckdb-go-bindings/lib/windows-amd64 v0.10505.0/go.mod h1:K25pJL26ARblGDeuAkrdblFvUen92+CwksLtPEHRqqQ= -github.com/duckdb/duckdb-go/v2 v2.10505.0 h1:SWwvLn2Qx/RQSnQNupwgIF8VbnJ5A6OQU9lYb/mDETI= -github.com/duckdb/duckdb-go/v2 v2.10505.0/go.mod h1:m0PW4J4FG9hlFlVdXi6Ds9owpyIDaBdE2jyce00fGcE= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/coreos/go-oidc/v3 v3.21.0 h1:wZo4Q9Pum8dYEj0eMUPrqR+kvuGkeUplbLpNCkBqoWM= +github.com/coreos/go-oidc/v3 v3.21.0/go.mod h1:DYCf24+ncYi+XkIH97GY1+dqoRlbaSI26KVTCI9SrY4= +github.com/duckdb/duckdb-go-bindings v0.10506.0 h1:+s/v55ghAy8MV/QJnwuafD9n+ZoYQkrRd/ceSU0KReA= +github.com/duckdb/duckdb-go-bindings v0.10506.0/go.mod h1:BKswa3lVlgeqO0nzDEQdtVPqPoUbXsVM6zdjhgEDFgU= +github.com/duckdb/duckdb-go-bindings/lib/darwin-amd64 v0.10506.0 h1:bMccC8xWnr/3BjUKQfQxD8MUJPeME3GSHvddWvBKK+M= +github.com/duckdb/duckdb-go-bindings/lib/darwin-amd64 v0.10506.0/go.mod h1:EnAvZh1kNJHp5yF+M1ZHNEvapnmt6anq1xXHVrAGqMo= +github.com/duckdb/duckdb-go-bindings/lib/darwin-arm64 v0.10506.0 h1:TzekQov7ntc+Xahq/puCqVHZgJh4ApJLsqEBpOiIXSA= +github.com/duckdb/duckdb-go-bindings/lib/darwin-arm64 v0.10506.0/go.mod h1:IGLSeEcFhNeZF16aVjQCULD7TsFZKG5G7SyKJAXKp5c= +github.com/duckdb/duckdb-go-bindings/lib/linux-amd64 v0.10506.0 h1:yy2TUU+YWxiBiOQryYseUl0AcUzoFFYRmmrCGijUxiU= +github.com/duckdb/duckdb-go-bindings/lib/linux-amd64 v0.10506.0/go.mod h1:KAIynZ0GHCS7X5fRyuFnQMg/SZBPK/bS9OCOVojClxw= +github.com/duckdb/duckdb-go-bindings/lib/linux-arm64 v0.10506.0 h1:HWUiLpeaZwUFg08Rs2eSpPbbaw3yEB2t96r+5NEbAgs= +github.com/duckdb/duckdb-go-bindings/lib/linux-arm64 v0.10506.0/go.mod h1:81SGOYoEUs8qaAfSk1wRfM5oobrIJ5KI7AzYhK6/bvQ= +github.com/duckdb/duckdb-go-bindings/lib/windows-amd64 v0.10506.0 h1:6PtbnpeUum+J/iNbI56QhZmSfbvy1syhvzWsoH1NKJc= +github.com/duckdb/duckdb-go-bindings/lib/windows-amd64 v0.10506.0/go.mod h1:K25pJL26ARblGDeuAkrdblFvUen92+CwksLtPEHRqqQ= +github.com/duckdb/duckdb-go/v2 v2.10506.0 h1:mcZjUQ/kSNeZdtGCqyj5/JEDUdj7/kvILfIOUTzQIu0= +github.com/duckdb/duckdb-go/v2 v2.10506.0/go.mod h1:6pLO+4GMcb0q36+z+RlQ7h+MMxum1lL0eAVf4GsPAxs= +github.com/dustin/go-humanize v1.1.0 h1:dbKTrvD0klcbBV/h4AWJdMuZogJACoMlvWIWZ5b2xWg= +github.com/dustin/go-humanize v1.1.0/go.mod h1:hc1CvRkJMsgxqjmjMQF3QNRAZBwY8AXBAzKYoSX9sFI= github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho= github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo= -github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= -github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= +github.com/go-jose/go-jose/v4 v4.1.5 h1:RjgjO2LOtWOJKUC5wpwY9LR3B3vwVAz6JS2YHfYU6eA= +github.com/go-jose/go-jose/v4 v4.1.5/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/goccy/go-json v0.10.6 h1:p8HrPJzOakx/mn/bQtjgNjdTcN+/S6FcG2CTtQOrHVU= -github.com/goccy/go-json v0.10.6/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-json v0.11.2 h1:jdZv93Tt4ioR8yW1CoNsvSxrcZlCXAUU1aZXN7gpXUA= +github.com/goccy/go-json v0.11.2/go.mod h1:3NdmfEkZlB7YI5UFw/qdFKq8XN1aiWR0YyRPWZNQltY= github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= -github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/flatbuffers v25.12.19+incompatible h1:haMV2JRRJCe1998HeW/p0X9UaMTK6SDo0ffLn2+DbLs= github.com/google/flatbuffers v25.12.19+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -77,10 +75,8 @@ github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyf github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE= -github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= -github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.19.2 h1:hMRETovs/pu/dVWN7zIT1PGG8t509MwT6bO7XSi26R8= -github.com/klauspost/compress v1.19.2/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= +github.com/klauspost/compress v1.20.1 h1:T7kKElXUMXrUJ2E9QhQhxFtcK5rPyLdsGZvdbLMPdiQ= +github.com/klauspost/compress v1.20.1/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw= github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU= github.com/knadh/koanf/maps v0.1.3 h1:P1z7EvTqdFBrPYbzSvorvrpib+sjkUMxf0FVvA5NKK4= @@ -91,46 +87,42 @@ github.com/knadh/koanf/providers/confmap v1.0.1 h1:L15hbvMqlvhwUuCtL9BkL+rqiMAjk github.com/knadh/koanf/providers/confmap v1.0.1/go.mod h1:txHYHiI2hAtF0/0sCmcuol4IDcuQbKTybiB1nOcUo1A= github.com/knadh/koanf/providers/file v1.2.1 h1:bEWbtQwYrA+W2DtdBrQWyXqJaJSG3KrP3AESOJYp9wM= github.com/knadh/koanf/providers/file v1.2.1/go.mod h1:bp1PM5f83Q+TOUu10J/0ApLBd9uIzg+n9UgthfY+nRA= -github.com/knadh/koanf/v2 v2.3.6 h1:JoQPSJmvS4aP0xNc8xMDr5tcrkSEInL23/Il7pITAKo= -github.com/knadh/koanf/v2 v2.3.6/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28= +github.com/knadh/koanf/v2 v2.3.7 h1:amceufOeoQcq6VFKjm7/ggJ3t0Dkqaxy5fza4j3YgTA= +github.com/knadh/koanf/v2 v2.3.7/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v5 v5.3.1 h1:75maCxkQVGualckLc/5s/ihgpH1a1Dc6AuGWNVNs6bw= -github.com/labstack/echo/v5 v5.3.1/go.mod h1:4iEGNQiPPZnkfYpNR/L6fINd3NLiGWUD5+eBotFALas= +github.com/labstack/echo/v5 v5.4.0 h1:iY674460IvSmUcj7MziL3YrgyTClghz5BpdZoKiGxR4= +github.com/labstack/echo/v5 v5.4.0/go.mod h1:4iEGNQiPPZnkfYpNR/L6fINd3NLiGWUD5+eBotFALas= github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modelcontextprotocol/go-sdk v1.7.0 h1:yqjY2dsbKAC0LSuWZVBMrHgiG8ukXv6NRo0JiALay44= -github.com/modelcontextprotocol/go-sdk v1.7.0/go.mod h1:dL7u98E/zjJTGzEq+j30jQ8K2k1mb6LeAH4inEcSGts= +github.com/modelcontextprotocol/go-sdk v1.8.0 h1:KIvahhYqwtbeniWVPs3TcXEA7b8jEtwfBpOTAI+Urx4= +github.com/modelcontextprotocol/go-sdk v1.8.0/go.mod h1:dL7u98E/zjJTGzEq+j30jQ8K2k1mb6LeAH4inEcSGts= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= -github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= -github.com/parquet-go/bitpack v1.0.0 h1:AUqzlKzPPXf2bCdjfj4sTeacrUwsT7NlcYDMUQxPcQA= -github.com/parquet-go/bitpack v1.0.0/go.mod h1:XnVk9TH+O40eOOmvpAVZ7K2ocQFrQwysLMnc6M/8lgs= -github.com/parquet-go/jsonlite v1.0.0 h1:87QNdi56wOfsE5bdgas0vRzHPxfJgzrXGml1zZdd7VU= -github.com/parquet-go/jsonlite v1.0.0/go.mod h1:nDjpkpL4EOtqs6NQugUsi0Rleq9sW/OtC1NnZEnxzF0= +github.com/ncruces/go-strftime v1.1.0 h1:vtPmPWMkb539RGV9WpWT9EwJGvrOCKvMNI4obWL47Hk= +github.com/ncruces/go-strftime v1.1.0/go.mod h1:yVaq7iwCN09vHRrKBrrflXT0M9tTMG2KmZ9Fj7xeG/g= +github.com/parquet-go/bitpack v1.1.0 h1:b80hfKZwIJ3Ku684xJSEj/9G0tywQPKOtmTV8si30mo= +github.com/parquet-go/bitpack v1.1.0/go.mod h1:XnVk9TH+O40eOOmvpAVZ7K2ocQFrQwysLMnc6M/8lgs= +github.com/parquet-go/jsonlite v1.5.5 h1:TIqJ+b+mYoTvvEt1/ICS4fBacQO0xWwAbvtcrKjEcC8= +github.com/parquet-go/jsonlite v1.5.5/go.mod h1:hN57TVzxtr04kaax5XwNgCCsh1KE7BT6dvY6X/zNH90= github.com/parquet-go/parquet-go v0.32.0 h1:NWDqTUHfrCS4cJP/Fj2HlxvqsrVedWG3sayMkf+znzM= github.com/parquet-go/parquet-go v0.32.0/go.mod h1:navtkAYr2LGoJVp141oXPlO/sxLvaOe3la2JEoD8+rg= -github.com/pierrec/lz4/v4 v4.1.29 h1:CDQY6qZOLI4DW0Nx6R1vRrifrCeQHnNXkMb0hZWXFjg= -github.com/pierrec/lz4/v4 v4.1.29/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= +github.com/pierrec/lz4/v4 v4.1.31 h1:TI8ck6XSudzSzotzAmy0+kh/KpRHaVsKLPzS97gRyNg= +github.com/pierrec/lz4/v4 v4.1.31/go.mod h1:7SE9MC2STkNtL4PIwGhjmyVwvILaGI9/COYQNBhKM/c= github.com/pressly/goose/v3 v3.28.0 h1:D2M+iL31GmpZxSHOhX8mqyqAT3CXnokUmm0eKoSP+Vc= github.com/pressly/goose/v3 v3.28.0/go.mod h1:v26MOuB8bL3kzzrt3Vqhb3R0PRVsl8hFQKdrht/L6Rk= github.com/prometheus/client_golang v1.24.1 h1:JnJkREXzWxUdCuPFpIWZiPispT9xVV59uiuyR2bPlnU= github.com/prometheus/client_golang v1.24.1/go.mod h1:F+oSRECHg4sse5ucfYpYDeIv/hu68Zo0uoHKetWnzcE= -github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= -github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.70.1 h1:1HvjP4D5oL3t8RsPlwxA9onvvStjtIHYE5XuuwOi/PY= -github.com/prometheus/common v0.70.1/go.mod h1:VdFUQDMZK3VLkurFUVhia6uys/0suUp86TJz5qbJRhc= +github.com/prometheus/client_model v0.6.3 h1:O0jaTVAYNxTHYInEPFJt5I3+sN8zqBtVMPTB1qyxiEo= +github.com/prometheus/client_model v0.6.3/go.mod h1:gpN5P9S7Rr6Yr92PiQ+Ixvhf6JZEkF1dnxsYL2aPBEM= +github.com/prometheus/common v0.72.0 h1:tAYsE+sPJxIncDAobm4H5aQjmox9ZxEIIqPbiffa8G4= +github.com/prometheus/common v0.72.0/go.mod h1:77NWqAQ2tXT7BIK40qjJdw5Acrsrg1TlHAnsQi3i6mk= github.com/prometheus/procfs v0.22.0 h1:6q9+/JL9IKAPbCmBrv9n5O5Ty3NKnciV5X7YGw0oics= github.com/prometheus/procfs v0.22.0/go.mod h1:CvmFr/GVhIjIvWJZW3tgkODBQMRIf0EyWMQLHCHab58= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= @@ -145,8 +137,8 @@ github.com/sirupsen/logrus v1.10.2 h1:G2SED73/qrAu6YwbdxOD6peLkCBI3z7L+ykJFTXJBB github.com/sirupsen/logrus v1.10.2/go.mod h1:SLEg8TqYulVKKfIGHldVp2K2aYz2DKSVBq4g/H5bR7Q= github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= -github.com/twpayne/go-geom v1.6.1 h1:iLE+Opv0Ihm/ABIcvQFGIiFBXd76oBIar9drAwHFhR4= -github.com/twpayne/go-geom v1.6.1/go.mod h1:Kr+Nly6BswFsKM5sd31YaoWS5PeDDH2NftJTK7Gd028= +github.com/twpayne/go-geom v1.7.0 h1:zMHTHNlenoHAc2ZSiHFh7SMoG0Wdw8gF0orBnrBhfjE= +github.com/twpayne/go-geom v1.7.0/go.mod h1:y9Q2YcKKaC2PHXwtRvwEunOPx5Oa+U8aAxPmFvscROk= github.com/wneessen/go-mail v0.8.1 h1:tVcncj02/QySVFw3zr/kXOzZcuFQqBNT6K+Rbgm/pcM= github.com/wneessen/go-mail v0.8.1/go.mod h1:dWZ61zadzCIyvB4y1/YzC5O7MrbbzBfPkARmbosdf8w= github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= @@ -179,44 +171,40 @@ go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M= -golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis= -golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa h1:QSyA8ishJCyT21kER9KwNt0b7BM3iRK4x9QXhjN5Fdk= -golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa/go.mod h1:zeBbvyFKDaLwa7CH/zI8KXt7gTl14SF7sO08Pl5jBCM= -golang.org/x/mod v0.40.0 h1:hUv+3cXcdRHz08UmSiOob7sadHig73uo5bkXxQ/tvUs= -golang.org/x/mod v0.40.0/go.mod h1:0/weTWkPWGBikyTWAX3dkjVztMmBA5hM0DH6BElSupE= -golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= -golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= -golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= -golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= -golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= -golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= -golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= -golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5 h1:ZUSxONxc981v7AW7QUg+I9WwZzSTTJ019ENBYr5pV/Q= -golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5/go.mod h1:LVehoXe41cL5SCVQilsV7Gg6BNG+Js6P9PhSbYTIUkQ= -golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= -golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= -golang.org/x/time v0.15.0 h1:bbrp8t3bGUeFOx08pvsMYRTCVSMk89u4tKbNOZbp88U= -golang.org/x/time v0.15.0/go.mod h1:Y4YMaQmXwGQZoFaVFk4YpCt4FLQMYKZe9oeV/f4MSno= -golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= -golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= -golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= -golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M= +golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA= +golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba h1:Ck8QetSgk912qxWLMCKxd0in+aiyBQyDSMae6e/xmpU= +golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba/go.mod h1:50RgIsmK7OwqzTTeqcSXQW8SswW0o8fRcDxmqGluJ8E= +golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= +golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= +golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues= +golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= +golang.org/x/oauth2 v0.37.0 h1:JUlcxA8oAtauLfiH8FX2/FkAWHAdi0QtGCGc+hofE98= +golang.org/x/oauth2 v0.37.0/go.mod h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58= +golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= +golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= +golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= +golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= +golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= +golang.org/x/time v0.16.0 h1:vMb6ptszcQMkcwiRTAuNNU50gom6++Q/6gY2hDM6VDE= +golang.org/x/time v0.16.0/go.mod h1:rVKOqvZeKvrDKTQiAHJ7wmwP0RzleSphoEA9RcdLA0s= +golang.org/x/tools v0.50.0 h1:c2ifzfcuY7L90lZ2aKd8S4K2NpASF08SZx9ZuJkHmSU= +golang.org/x/tools v0.50.0/go.mod h1:7ulVMw3831Mwi5EZD6RomGyffr4VFjuNYXf2BbCEAV0= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5 h1:izFU9hz7aeLI/Mi1J0991ae+xcwRLr7hTqWnB/9aIIU= -google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5/go.mod h1:3LhxRw4YYkf+ylAfgaY9JlVLFKhokkCV8duhLLe7+t0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a h1:3Dnd1cDaZlB68lziofO+bJXpjOy8UfRv8Unt+yH8tQ4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a/go.mod h1:DjtHYE8FKJLivXcBEjGwndXfIC23G0VpXiXKqG179uA= +google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc h1:rZHRz0ogq4Pid1IKtA/ivHi8XONVF5tqUQXA2TtgpkE= +google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc/go.mod h1:K/n0XLazCJHjD73YuMyNJsN38BPPy1kfFnKxUXaThFU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc h1:4bNTbnb44EqGVy9HaQxSY2jnafSUdgV3qHtedvNpDKg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc= google.golang.org/grpc v1.83.2 h1:EManeRomTObA0BU7I8vXgg/78uE5MJ9M8B39EX2WscU= google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= -modernc.org/cc/v4 v4.29.2 h1:h6+9ciCnPKutf4I03CvheAvDLX7+IHlqR6Iy6J+cgd8= -modernc.org/cc/v4 v4.29.2/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI= -modernc.org/ccgo/v4 v4.35.0 h1:F+TUsmw09QxLzmi3aeYYGxjAXarmZaKgj3mKQHNaA8w= -modernc.org/ccgo/v4 v4.35.0/go.mod h1:qrVGs9S3Sr2Ztcg9ve+kTAYMp5a3YvWjo+SoN06kJ5I= +modernc.org/cc/v4 v4.29.7 h1:q+NXGJ0bK3b4TXFYQQVr9pYETGnmwFWkrUzJnMya/Tg= +modernc.org/cc/v4 v4.29.7/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI= +modernc.org/ccgo/v4 v4.36.1 h1:ZNIUZAryN0UgnJwtyxrdEzcFc3yD4Cu4AzjfPXsLsIE= +modernc.org/ccgo/v4 v4.36.1/go.mod h1:rrtGc2QkS239nYb/mQNuBMyjq3/y3ZXWbBjPoV3wqzA= modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM= modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU= modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= @@ -225,8 +213,8 @@ modernc.org/gc/v3 v3.1.5 h1:21ldfPfRYE31Tb7B3mwAK8gy1AxP4+dKjrOQPfqakoc= modernc.org/gc/v3 v3.1.5/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY= modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= -modernc.org/libc v1.75.6 h1:yKk8qo+Di4gkmvRboK8ocCqH22FiUCR6jRy2OwtCRus= -modernc.org/libc v1.75.6/go.mod h1:bO5o2ztHxBb2rjz0PgdHN0sSMw57CgxGFLZ3Qd/QpVQ= +modernc.org/libc v1.77.1 h1:Ct8j47QtiZ1Enj2DtFXQtUqrPCAjdCmPjtCuvrYQ0Hs= +modernc.org/libc v1.77.1/go.mod h1:87/pZ4L6nD1zqW4nItuS12YO7hN1igAah34xjnQo/W0= modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= modernc.org/memory v1.12.1 h1:nFMiWrpStgZczNl6XI9GnIk/rWhYIyHGUaR04pGbp9g= @@ -235,8 +223,8 @@ modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg= modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= -modernc.org/sqlite v1.57.0 h1:qNQP6xnx5M0ISNtlnxoOX0+cD5bJ0/gr9aMmndFczzg= -modernc.org/sqlite v1.57.0/go.mod h1:yCJ2cmAaIkHQ25oXWrF8H4O1lIfPYPR26yCEDj2P3pQ= +modernc.org/sqlite v1.60.1 h1:/blz53O951KWFOso4QQvEs/Fq6cDBKLtMVrYNSeJVKw= +modernc.org/sqlite v1.60.1/go.mod h1:1dIoEagfDE72QytD5scH1lxARtaUgKgHC/NuApA27r0= modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= diff --git a/internal/agent/runtime.go b/internal/agent/runtime.go index 9bbfdd75..40780fd9 100644 --- a/internal/agent/runtime.go +++ b/internal/agent/runtime.go @@ -23,7 +23,7 @@ import ( appid "github.com/labstack/fanout/internal/id" ) -const systemPrompt = `You are Fanout's observability assistant. When a view is attached to your reply it is the picture: never draw diagrams, trees, or charts in text, never use code fences to draw boxes, arrows, or trees, and never add a table or list that restates what an attached view already shows; your prose adds only what the view omits. Use get_observability_overview first for broad health questions, get_intelligence_snapshot for the latest precomputed anomalies and recurring log patterns, get_service_topology for dependencies, get_service_performance for activity/latency/endpoints/comparisons, inspect_trace for trace or root-cause inspection, and search_logs for log questions. Treat structured outputs as authoritative. You can also list, inspect, create, and replace the user's named dashboards. When asked to create a dashboard, compose a useful complete layout using overview, topology, activity, performance, trace, logs, and assistant widgets; use unique stable widget IDs, valid non-overlapping 12-column positions, and the requested time window. Creating is additive. Only replace an existing dashboard after the user explicitly asks to change or replace it; inspect it first and preserve unrelated views. State the time window you used, distinguish missing data from healthy behavior, and never invent services, metrics, or causal claims. Keep answers concise because attached views provide interactive details. Never expose implementation details to the user: do not mention protocol names, tool names, schemas, query IDs, data-source names, storage engines, providers, or internal execution steps. Refer to attached interactive content simply as a view.` +const systemPrompt = `You are Fanout's observability assistant. When a view is attached to your reply it is the picture: never draw diagrams, trees, or charts in text, never use code fences to draw boxes, arrows, or trees, and never add a table or list that restates what an attached view already shows; your prose adds only what the view omits. Use get_observability_overview first for broad health questions, get_intelligence_snapshot for the latest precomputed anomalies and recurring log patterns, get_service_topology for direct dependency edges, get_service_dependencies for bounded upstream or downstream reachability from a service, get_service_performance for activity/latency/endpoints/comparisons, inspect_trace for trace or root-cause inspection, and search_logs for log questions. Treat structured outputs as authoritative. You can also list, inspect, create, and replace the user's named dashboards. When asked to create a dashboard, compose a useful complete layout using overview, topology, activity, performance, trace, logs, and assistant widgets; use unique stable widget IDs, valid non-overlapping 12-column positions, and the requested time window. Creating is additive. Only replace an existing dashboard after the user explicitly asks to change or replace it; inspect it first and preserve unrelated views. State the time window you used, distinguish missing data from healthy behavior, and never invent services, metrics, or causal claims. Keep answers concise because attached views provide interactive details. Never expose implementation details to the user: do not mention protocol names, tool names, schemas, query IDs, data-source names, storage engines, providers, or internal execution steps. Refer to attached interactive content simply as a view.` // Error categories used to pick a client-safe RUN_ERROR message; the raw // error (which can include provider response bodies) stays server-side. diff --git a/internal/agent/tools_integration_test.go b/internal/agent/tools_integration_test.go index 57a8c0cf..320d9ae2 100644 --- a/internal/agent/tools_integration_test.go +++ b/internal/agent/tools_integration_test.go @@ -25,6 +25,10 @@ func (registryQueries) Topology(context.Context, observability.Scope, int) (obse return observability.Result[observability.Topology]{}, nil } +func (registryQueries) Dependencies(context.Context, observability.Scope, observability.DependencyOptions) (observability.Result[observability.Dependencies], error) { + return observability.Result[observability.Dependencies]{}, nil +} + func (registryQueries) Performance(context.Context, observability.Scope, observability.PerformanceOptions) (observability.Result[observability.Performance], error) { return observability.Result[observability.Performance]{}, nil } diff --git a/internal/api/observability.go b/internal/api/observability.go index 7da6cae1..cd200fe3 100644 --- a/internal/api/observability.go +++ b/internal/api/observability.go @@ -15,6 +15,7 @@ import ( type ObservabilityQueries interface { Overview(context.Context, observability.Scope, int) (observability.Result[observability.Overview], error) Topology(context.Context, observability.Scope, int) (observability.Result[observability.Topology], error) + Dependencies(context.Context, observability.Scope, observability.DependencyOptions) (observability.Result[observability.Dependencies], error) Performance(context.Context, observability.Scope, observability.PerformanceOptions) (observability.Result[observability.Performance], error) Trace(context.Context, observability.Scope, string, string, int) (observability.Result[observability.TraceDetail], error) Logs(context.Context, observability.Scope, string, string, string, int) (observability.Result[observability.Logs], error) @@ -36,9 +37,9 @@ func NewObservabilityHandler(queries ObservabilityQueries) *ObservabilityHandler // connection until the client gave up, and the client's own timeout is not // something the server can rely on. // -// Twenty seconds is well clear of the slowest query measured under load here, -// about two seconds, and stricter than the SQL API's own ceiling. It is -// deliberately shorter than the worst legitimate wait behind a stuck +// Twenty seconds bounds execution and pool waits under load and is stricter +// than the SQL API's own ceiling. It is deliberately shorter than the worst +// legitimate wait behind a stuck // publication — the drain remainder plus the swap budget can exceed a minute — // so a publication that goes wrong answers the dashboard instead of holding // every widget's connection until it finishes. @@ -50,6 +51,7 @@ const observabilityDeadline = 20 * time.Second func (h *ObservabilityHandler) Register(group *echo.Group) { group.GET("/overview", h.bounded(h.overview)) group.GET("/topology", h.bounded(h.topology)) + group.GET("/services/dependencies", h.bounded(h.dependencies)) group.GET("/performance", h.bounded(h.performance)) group.GET("/trace", h.bounded(h.trace)) group.GET("/logs", h.bounded(h.logs)) @@ -154,15 +156,44 @@ func (h *ObservabilityHandler) request(c *echo.Context) (observability.Scope, in }, limit, nil } +func (h *ObservabilityHandler) dependencies(c *echo.Context) error { + scope, _, err := h.request(c) + if err != nil { + return err + } + options := observability.DependencyOptions{Service: c.QueryParam("service"), Direction: c.QueryParam("direction")} + for _, field := range []struct { + name string + value *int + }{{"max_depth", &options.MaxDepth}, {"max_nodes", &options.MaxNodes}} { + if raw := c.QueryParam(field.name); raw != "" { + value, err := strconv.Atoi(raw) + if err != nil || value < 1 { + return echo.NewHTTPError(http.StatusBadRequest, field.name+" must be a positive integer") + } + *field.value = value + } + } + result, err := h.queries.Dependencies(c.Request().Context(), scope, options) + if err != nil { + return mapQueryError(err) + } + return c.JSON(http.StatusOK, result) +} + func mapQueryError(err error) error { if errors.Is(err, observability.ErrInvalidScope) || errors.Is(err, observability.ErrInvalidLimit) { return echo.NewHTTPError(http.StatusBadRequest, err.Error()) } - // A query that ran out of time is a load condition, not a fault: reporting - // it as a server error logs it at ERROR and counts it towards the 5xx rate - // that pages someone. + // A server deadline is a service-unavailable response; it remains a failed + // server request. Client cancellations below have a separate classification. if errors.Is(err, context.DeadlineExceeded) { return echo.NewHTTPError(http.StatusServiceUnavailable, "telemetry query took too long").Wrap(err) } + if errors.Is(err, context.Canceled) { + // A disconnected client is not a server failure. The nonstandard 499 + // status is used by our request logger to keep this out of the 5xx rate. + return echo.NewHTTPError(499, "telemetry query canceled by client").Wrap(err) + } return echo.NewHTTPError(http.StatusInternalServerError, "telemetry query failed").Wrap(err) } diff --git a/internal/api/observability_test.go b/internal/api/observability_test.go index c6023eaf..4452c736 100644 --- a/internal/api/observability_test.go +++ b/internal/api/observability_test.go @@ -15,8 +15,14 @@ import ( ) type fakeQueries struct { - overviewScope observability.Scope - topologyScope observability.Scope + overviewScope observability.Scope + topologyScope observability.Scope + dependencyScope observability.Scope +} + +func (f *fakeQueries) Dependencies(_ context.Context, scope observability.Scope, options observability.DependencyOptions) (observability.Result[observability.Dependencies], error) { + f.dependencyScope = scope + return observability.Result[observability.Dependencies]{Schema: observability.DependenciesSchema, Data: observability.Dependencies{Service: options.Service, Direction: options.Direction, MaxDepth: options.MaxDepth, MaxNodes: options.MaxNodes}}, nil } func (f *fakeQueries) Overview(_ context.Context, scope observability.Scope, _ int) (observability.Result[observability.Overview], error) { @@ -94,11 +100,41 @@ func TestRouteRejectsInvalidWindow(t *testing.T) { } } -// A dashboard query that runs out of time is a load condition. Reporting it as -// a server error logs it at ERROR and counts towards the 5xx rate that pages -// someone; the deadline itself exists so a pathological query stops holding a -// connection once the answer can no longer be useful. -func TestObservabilityQueryDeadlineIsNotAServerError(t *testing.T) { +func TestDependencyRouteForwardsScopeAndBounds(t *testing.T) { + backend := &fakeQueries{} + h := NewObservabilityHandler(backend) + now := time.Date(2026, 9, 30, 12, 0, 0, 0, time.UTC) + h.now = func() time.Time { return now } + e := echo.New() + h.Register(e.Group("/api/observability")) + rec := httptest.NewRecorder() + e.ServeHTTP(rec, httptest.NewRequest(http.MethodGet, "/api/observability/services/dependencies?window=15m&namespace=prod&service=checkout&direction=upstream&max_depth=3&max_nodes=25", nil)) + if rec.Code != http.StatusOK { + t.Fatalf("status = %d: %s", rec.Code, rec.Body) + } + var result observability.Result[observability.Dependencies] + if err := json.Unmarshal(rec.Body.Bytes(), &result); err != nil { + t.Fatal(err) + } + if result.Schema != observability.DependenciesSchema || result.Data.Service != "checkout" || result.Data.Direction != "upstream" || result.Data.MaxDepth != 3 || result.Data.MaxNodes != 25 || backend.dependencyScope.Namespace != "prod" || !backend.dependencyScope.Start.Equal(now.Add(-15*time.Minute)) { + t.Fatalf("scope or parameters lost: %#v %#v", result, backend.dependencyScope) + } + for _, bounds := range []string{"max_depth=0", "max_nodes=-1", "max_nodes=invalid"} { + rec := httptest.NewRecorder() + e.ServeHTTP(rec, httptest.NewRequest(http.MethodGet, "/api/observability/services/dependencies?service=checkout&"+bounds, nil)) + if rec.Code != http.StatusBadRequest { + t.Fatalf("invalid %s accepted: %d", bounds, rec.Code) + } + } +} + +// A canceled client is distinct from a server deadline or an execution fault. +// Wrapped backend errors must retain that distinction at the HTTP boundary. +func TestObservabilityQueryErrorClassification(t *testing.T) { + var canceled *echo.HTTPError + if !errors.As(mapQueryError(fmt.Errorf("query endpoints: %w", context.Canceled)), &canceled) || canceled.Code != 499 { + t.Fatal("client cancellation must map to 499") + } err := mapQueryError(fmt.Errorf("query endpoints: %w", context.DeadlineExceeded)) var httpErr *echo.HTTPError if !errors.As(err, &httpErr) { @@ -122,7 +158,7 @@ func TestRegisteredObservabilityRoutesCarryADeadline(t *testing.T) { handler := &ObservabilityHandler{queries: deadlineProbe{seen: deadlines}, now: time.Now} e := echo.New() handler.Register(e.Group("/api/observability")) - for _, path := range []string{"/api/observability/overview", "/api/observability/topology", "/api/observability/performance", "/api/observability/logs", "/api/observability/trace"} { + for _, path := range []string{"/api/observability/overview", "/api/observability/topology", "/api/observability/services/dependencies", "/api/observability/performance", "/api/observability/logs", "/api/observability/trace"} { recorder := httptest.NewRecorder() e.ServeHTTP(recorder, httptest.NewRequest(http.MethodGet, path+"?window=1h", nil)) if !deadlines[path] { @@ -135,6 +171,11 @@ func TestRegisteredObservabilityRoutesCarryADeadline(t *testing.T) { // deadline. It answers every query with an empty result. type deadlineProbe struct{ seen map[string]bool } +func (p deadlineProbe) Dependencies(ctx context.Context, _ observability.Scope, _ observability.DependencyOptions) (observability.Result[observability.Dependencies], error) { + p.note(ctx, "/api/observability/services/dependencies") + return observability.Result[observability.Dependencies]{}, nil +} + func (p deadlineProbe) note(ctx context.Context, path string) { if _, ok := ctx.Deadline(); ok { p.seen[path] = true diff --git a/internal/cmd/notices/main.go b/internal/cmd/notices/main.go index d864b49d..257984b4 100644 --- a/internal/cmd/notices/main.go +++ b/internal/cmd/notices/main.go @@ -16,6 +16,8 @@ import ( "slices" "sort" "strings" + + engine "github.com/labstack/fanout/internal/duckdb" ) type component struct { @@ -114,6 +116,12 @@ func collect(root string) ([]component, error) { if err := collectGo(root, all); err != nil { return nil, err } + data, err := os.ReadFile(filepath.Join(root, "third_party", "notices", "duckdb-NOTICE.txt")) + if err != nil { + return nil, err + } + id := "Native: DuckDB " + engine.Version + " (" + engine.SourceCommit + ")" + all[id] = component{id: id, kind: "native engine and static extensions", documents: []document{{name: "duckdb-NOTICE", text: string(data)}}} for _, workspace := range []string{"ui/host", "ui/apps"} { if err := collectNPM(root, filepath.Join(root, workspace), all); err != nil { return nil, err @@ -389,7 +397,7 @@ func render(components []component) []byte { var out strings.Builder out.WriteString("FANOUT THIRD-PARTY NOTICES\n\n") out.WriteString("This file is generated from the Go packages linked into the four supported\n") - out.WriteString("release targets and from the production dependency graphs of the two embedded\n") + out.WriteString("release targets, the pinned native DuckDB engine, and the production dependency graphs of the two embedded\n") out.WriteString("browser applications. Development-only dependencies are excluded. Regenerate it\n") out.WriteString("with `just notices`; CI verifies it with `just notices-check`.\n\n") out.WriteString("The following components are provided under their own terms. Fanout's Apache-2.0\n") diff --git a/internal/config/config.go b/internal/config/config.go index 5226b877..f59741db 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -35,11 +35,12 @@ type Config struct { // MaintenanceInterval controls Parquet retention and compaction, and // query-cache checkpointing. MaintenanceInterval time.Duration `koanf:"storage.maintenance_interval" env:"FANOUT_MAINTENANCE_INTERVAL" default:"1h"` - // RollupSkipToLatest, set once at boot, advances every rollup watermark to the - // current max ingested timestamp so existing data is treated as already-rolled-up - // instead of aggregated as a backlog. Stands up a large pre-seeded historical - // dataset (benchmarks, restores) without a multi-minute first-rollup catch-up - // that monopolizes DuckDB write capacity. Off in normal operation. + // RollupSkipToLatest, set once at boot, advances the service and edge rollup + // watermarks to the current max ingested timestamp. Existing history is not + // aggregated into those analytical rollups. Completed-batch endpoint, log, + // and trace caches still rebuild all retained history in bounded passes; + // uncached files remain immediately queryable. Useful for large pre-seeded + // datasets (benchmarks, restores); off in normal operation. RollupSkipToLatest bool `koanf:"storage.rollup_skip_to_latest" env:"FANOUT_ROLLUP_SKIP_TO_LATEST" default:"false"` DefaultNamespace string `koanf:"ingest.default_namespace" env:"FANOUT_DEFAULT_NAMESPACE" default:"default"` // PprofEnabled exposes Go's net/http/pprof handlers at /debug/pprof/* for diff --git a/internal/duckdb/native.go b/internal/duckdb/native.go new file mode 100644 index 00000000..2634533b --- /dev/null +++ b/internal/duckdb/native.go @@ -0,0 +1,31 @@ +// Package duckdb registers the extensions compiled into Fanout's pinned +// DuckDB engine. Building requires scripts/with-duckdb.sh; there is one engine. +package duckdb + +/* +#include "duckdb.h" +#include "duckdb_static_extension.h" +extern int32_t duckdb_extension_core_functions_describe(duckdb_extension_descriptor *); +extern int32_t duckdb_extension_json_describe(duckdb_extension_descriptor *); +extern int32_t duckdb_extension_parquet_describe(duckdb_extension_descriptor *); +extern int32_t duckdb_extension_icu_describe(duckdb_extension_descriptor *); +static int register_extensions(void) { + return duckdb_register_static_extension(duckdb_extension_core_functions_describe) + | duckdb_register_static_extension(duckdb_extension_json_describe) + | duckdb_register_static_extension(duckdb_extension_parquet_describe) + | duckdb_register_static_extension(duckdb_extension_icu_describe); +} +*/ +import "C" + +const Version = "v2.0.0-alpha43763" +const SourceCommit = "96063b9e39749cc0f087bb11501d7edbee527957" + +func init() { + if C.GoString(C.duckdb_library_version()) != Version { + panic("Fanout requires DuckDB " + Version + "; build with scripts/with-duckdb.sh") + } + if C.register_extensions() != 0 { + panic("DuckDB static extension registration failed") + } +} diff --git a/internal/duckdb/policy.go b/internal/duckdb/policy.go new file mode 100644 index 00000000..6986223e --- /dev/null +++ b/internal/duckdb/policy.go @@ -0,0 +1,42 @@ +package duckdb + +import ( + "context" + "database/sql" + "fmt" + "path/filepath" + "strings" +) + +// Configure once, after trusted schema initialization and before public SQL. +// Static extensions need no network or extension installation directory. +func ConfigurePolicy(ctx context.Context, db *sql.DB, directories ...string) error { + paths := make([]string, 0, len(directories)) + for _, directory := range directories { + absolute, err := filepath.Abs(directory) + if err != nil { + return err + } + paths = append(paths, sqlLiteral(filepath.ToSlash(absolute)+"/")) + } + statements := []string{ + "LOAD core_functions", "LOAD json", "LOAD parquet", "LOAD icu", + "SET autoinstall_known_extensions=false", + "SET autoload_known_extensions=false", + "SET allow_community_extensions=false", + "SET allowed_directories=[" + strings.Join(paths, ",") + "]", + "SET enable_external_access=false", + // UTC is set on each newly pooled connection. Public SQL cannot SET + // options; memory and worker limits remain available to the operator. + "SET allowed_configs=['memory_limit','threads','TimeZone']", + "SET lock_configuration=true", + } + for _, statement := range statements { + if _, err := db.ExecContext(ctx, statement); err != nil { + return fmt.Errorf("configure DuckDB: %s: %w", statement, err) + } + } + return nil +} + +func sqlLiteral(value string) string { return "'" + strings.ReplaceAll(value, "'", "''") + "'" } diff --git a/internal/ingest/attrs_test.go b/internal/ingest/attrs_test.go index 261491c7..d076c604 100644 --- a/internal/ingest/attrs_test.go +++ b/internal/ingest/attrs_test.go @@ -1,144 +1,40 @@ package ingest import ( - "bytes" - "encoding/json" + common "go.opentelemetry.io/proto/otlp/common/v1" "math" "reflect" - "sync" "testing" - - common "go.opentelemetry.io/proto/otlp/common/v1" ) -func kvDouble(k string, v float64) *common.KeyValue { - return &common.KeyValue{Key: k, Value: &common.AnyValue{Value: &common.AnyValue_DoubleValue{DoubleValue: v}}} -} - -// The direct JSON-string encoder must be byte-for-byte identical to -// encoding/json.Marshal — including its default HTML escaping (< > &), control -// chars, U+2028/U+2029, and invalid UTF-8. Any divergence corrupts stored -// attributes_json. -func TestAppendJSONString_MatchesEncodingJSON(t *testing.T) { - cases := []string{ - "", "simple", "with space", `quote " and \ backslash`, - "newline\ntab\tcr\r", "bell\x07null\x00", "html < > & chars", - "unicode ☃ 日本語 😀", "line
sep
para", - "slash / ok", string([]byte{0xff, 0xfe}), "trailing\x1f", - } - // Brute-force every single byte 0x00-0xff so no control char (incl. \b 0x08 - // and \f 0x0c, which json shortens but others \u-escape) can diverge unseen. - for b := 0; b < 256; b++ { - cases = append(cases, string([]byte{byte(b)})) - } - for _, s := range cases { - want, _ := json.Marshal(s) - var buf bytes.Buffer - appendJSONString(&buf, s) - if got := buf.Bytes(); !bytes.Equal(got, want) { - t.Errorf("appendJSONString(%q):\n got %s\n want %s", s, got, want) - } - } -} - -// The fast path and the reflection path must be semantically identical (key -// order may differ, so compare parsed values, not bytes) — across every scalar -// type, the nil value, and the nested fallback. -func TestAttrsJSON_MatchesReflect(t *testing.T) { - cases := [][]*common.KeyValue{ - {kvStr("k", "v")}, - {kvStr("http.method", "GET"), kvInt("code", 200), kvBool("ok", true), kvDouble("ratio", 0.25)}, - {kvStr("esc", "a\"b\\c\ndf&g")}, - {kvDouble("big", 1e20), kvDouble("small", -3.5), kvDouble("whole", 200)}, - {{Key: "nilval", Value: nil}}, - {{Key: "bytes", Value: &common.AnyValue{Value: &common.AnyValue_BytesValue{BytesValue: []byte{1, 2, 3}}}}}, - { // nested kvlist → both must route through the reflect encoder - {Key: "outer", Value: &common.AnyValue{Value: &common.AnyValue_KvlistValue{ - KvlistValue: &common.KeyValueList{Values: []*common.KeyValue{kvStr("inner", "v")}}, - }}}, - kvStr("flat", "x"), - }, - { // nested array → reflect fallback (distinct from kvlist) - {Key: "arr", Value: &common.AnyValue{Value: &common.AnyValue_ArrayValue{ - ArrayValue: &common.ArrayValue{Values: []*common.AnyValue{ - {Value: &common.AnyValue_StringValue{StringValue: "a"}}, - {Value: &common.AnyValue_IntValue{IntValue: 2}}, - }}, - }}}, - }, - } - for i, attrs := range cases { - fast := attrsJSON(attrs) - slow := attrsJSONReflect(attrs) - var mf, ms map[string]any - if err := json.Unmarshal([]byte(fast), &mf); err != nil { - t.Fatalf("case %d: fast output invalid JSON: %v (%s)", i, err, fast) +func TestAttributesPreserveTypesAndOwnBytes(t *testing.T) { + bytes := []byte{0, 255, 7} + input := []*common.KeyValue{ + kvStr("http.method", "GET"), kvInt("big", math.MaxInt64), kvBool("false", false), kvInt("zero", 0), + {Key: "null"}, + {Key: "bytes", Value: &common.AnyValue{Value: &common.AnyValue_BytesValue{BytesValue: bytes}}}, + {Key: "array", Value: &common.AnyValue{Value: &common.AnyValue_ArrayValue{ArrayValue: &common.ArrayValue{Values: []*common.AnyValue{nil, kvInt("", 9).Value}}}}}, + {Key: "object", Value: &common.AnyValue{Value: &common.AnyValue_KvlistValue{KvlistValue: &common.KeyValueList{Values: []*common.KeyValue{kvBool("ok", true)}}}}}, + {Key: "nan", Value: &common.AnyValue{Value: &common.AnyValue_DoubleValue{DoubleValue: math.NaN()}}}, + } + got, err := attributes(input) + if err != nil { + t.Fatal(err) + } + want := map[string]any{"http.method": "GET", "big": int64(math.MaxInt64), "false": false, "zero": int64(0), "null": nil, "bytes": []byte{0, 255, 7}, "array": []any{nil, int64(9)}, "object": map[string]any{"ok": true}} + if !math.IsNaN(got["nan"].(float64)) { + t.Fatal("nonfinite double lost") + } + delete(got, "nan") + bytes[0] = 42 + if !reflect.DeepEqual(got, want) { + t.Fatalf("typed attributes: %#v", got) + } + for _, input := range [][]*common.KeyValue{nil, {}, {nil, {Key: ""}}} { + if got, err := attributes(input); got != nil || err != nil { + t.Fatal("empty attributes should be nil") } - if err := json.Unmarshal([]byte(slow), &ms); err != nil { - t.Fatalf("case %d: reflect output invalid JSON: %v", i, err) - } - if !reflect.DeepEqual(mf, ms) { - t.Errorf("case %d mismatch:\n fast=%s\n slow=%s", i, fast, slow) - } - } -} - -// Non-finite floats route to the reflect path (json.Marshal errors on Inf/NaN), -// so attrsJSON must never emit invalid JSON like {"k":Inf} — it returns an -// empty string for the whole object (the reflect encoder's documented -// behavior). -func TestAttrsJSON_NonFiniteFloatIsSafe(t *testing.T) { - for _, v := range []float64{math.Inf(1), math.Inf(-1), math.NaN()} { - got := attrsJSON([]*common.KeyValue{kvDouble("k", v)}) - if got != "" { - var m map[string]any - if err := json.Unmarshal([]byte(got), &m); err != nil { - t.Errorf("attrsJSON(%v) produced invalid JSON: %s", v, got) - } - } - } -} - -// attrsJSON shares a sync.Pool buffer across calls; it must copy the result out -// before returning the buffer. Run under -race to catch a regression that -// aliased the pooled buffer (corrupting attributes_json under concurrent ingest). -func TestAttrsJSON_ConcurrentSafe(t *testing.T) { - attrs := []*common.KeyValue{kvStr("svc", "checkout"), kvInt("code", 200), kvStr("user", "u-1")} - want := attrsJSON(attrs) - var wg sync.WaitGroup - for i := 0; i < 16; i++ { - wg.Add(1) - go func() { - defer wg.Done() - for j := 0; j < 1000; j++ { - if got := attrsJSON(attrs); got != want { - t.Errorf("concurrent attrsJSON = %s, want %s", got, want) - return - } - } - }() } - wg.Wait() -} - -func BenchmarkAttrsJSON(b *testing.B) { - attrs := []*common.KeyValue{ - kvStr("http.method", "POST"), kvStr("http.route", "/api/orders/:id"), - kvInt("http.status_code", 200), kvStr("user.id", "u-48217"), - kvBool("cache.hit", false), kvDouble("duration_ms", 12.7), - } - b.Run("fast", func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - _ = attrsJSON(attrs) - } - }) - b.Run("reflect", func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - _ = attrsJSONReflect(attrs) - } - }) } func kvStr(k, v string) *common.KeyValue { @@ -170,51 +66,3 @@ func TestSpanDurationMs(t *testing.T) { }) } } - -func TestAttrsJSON_FlatObject(t *testing.T) { - attrs := []*common.KeyValue{ - kvStr("http.method", "GET"), - kvInt("http.status_code", 200), - kvBool("error", true), - } - got := attrsJSON(attrs) - - var m map[string]any - if err := json.Unmarshal([]byte(got), &m); err != nil { - t.Fatalf("output is not a JSON object: %v (%s)", err, got) - } - if m["http.method"] != "GET" { - t.Errorf("http.method = %v, want GET", m["http.method"]) - } - if m["http.status_code"].(float64) != 200 { - t.Errorf("http.status_code = %v, want 200", m["http.status_code"]) - } - if m["error"] != true { - t.Errorf("error = %v, want true", m["error"]) - } -} - -func TestAttrsJSON_EmptyIsNil(t *testing.T) { - if got := attrsJSON(nil); got != "" { - t.Errorf("attrsJSON(nil) = %s, want nil", got) - } - if got := attrsJSON([]*common.KeyValue{}); got != "" { - t.Errorf("attrsJSON([]) = %s, want nil", got) - } -} - -func TestAttrsJSON_NestedKvlist(t *testing.T) { - attrs := []*common.KeyValue{ - {Key: "outer", Value: &common.AnyValue{Value: &common.AnyValue_KvlistValue{ - KvlistValue: &common.KeyValueList{Values: []*common.KeyValue{kvStr("inner", "v")}}, - }}}, - } - var m map[string]any - if err := json.Unmarshal([]byte(attrsJSON(attrs)), &m); err != nil { - t.Fatalf("unmarshal: %v", err) - } - outer, ok := m["outer"].(map[string]any) - if !ok || outer["inner"] != "v" { - t.Errorf("nested kvlist not preserved: %v", m["outer"]) - } -} diff --git a/internal/ingest/http.go b/internal/ingest/http.go index 2ce17a44..687e575f 100644 --- a/internal/ingest/http.go +++ b/internal/ingest/http.go @@ -13,6 +13,8 @@ import ( collectorlogs "go.opentelemetry.io/proto/otlp/collector/logs/v1" collectormetrics "go.opentelemetry.io/proto/otlp/collector/metrics/v1" collectortrace "go.opentelemetry.io/proto/otlp/collector/trace/v1" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" "github.com/labstack/fanout/internal/settings" @@ -111,8 +113,13 @@ func (h *httpIngestHandler) handleExport( } resp, err := export(r.Context()) if err != nil { - // The only current processing failure is cancellation/backpressure. Do not - // acknowledge a request whose rows were not accepted by the shared pipeline. + // Invalid payloads are permanent failures; exporters must not retry them. + if status.Code(err) == codes.InvalidArgument { + http.Error(w, status.Convert(err).Message(), http.StatusBadRequest) + return + } + // Cancellation/backpressure remains retryable. Never acknowledge rows + // that were not accepted by the shared pipeline. http.Error(w, "telemetry was not accepted", http.StatusServiceUnavailable) return } diff --git a/internal/ingest/nesting_test.go b/internal/ingest/nesting_test.go new file mode 100644 index 00000000..f42d7f91 --- /dev/null +++ b/internal/ingest/nesting_test.go @@ -0,0 +1,183 @@ +package ingest + +import ( + "context" + "database/sql" + "encoding/json" + "fmt" + "net/http" + "path/filepath" + "reflect" + "testing" + + "github.com/labstack/fanout/internal/config" + _ "github.com/labstack/fanout/internal/duckdb" + telemetrystore "github.com/labstack/fanout/internal/telemetry/store" + collectorlogs "go.opentelemetry.io/proto/otlp/collector/logs/v1" + collectormetrics "go.opentelemetry.io/proto/otlp/collector/metrics/v1" + collectortrace "go.opentelemetry.io/proto/otlp/collector/trace/v1" + common "go.opentelemetry.io/proto/otlp/common/v1" + logspb "go.opentelemetry.io/proto/otlp/logs/v1" + metricspb "go.opentelemetry.io/proto/otlp/metrics/v1" + resourcepb "go.opentelemetry.io/proto/otlp/resource/v1" + tracepb "go.opentelemetry.io/proto/otlp/trace/v1" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +type nestingSubmitter func(context.Context, telemetrystore.Batch) error + +func (f nestingSubmitter) Submit(ctx context.Context, batch telemetrystore.Batch) error { + return f(ctx, batch) +} + +func nestedAttribute(depth int, object bool) *common.AnyValue { + v := kvInt("", 7).Value + for range depth { + if object { + v = &common.AnyValue{Value: &common.AnyValue_KvlistValue{KvlistValue: &common.KeyValueList{Values: []*common.KeyValue{{Key: "child", Value: v}}}}} + } else { + v = &common.AnyValue{Value: &common.AnyValue_ArrayValue{ArrayValue: &common.ArrayValue{Values: []*common.AnyValue{v}}}} + } + } + return v +} + +// Decode actual OTLP wire payloads at depths accepted by the default protobuf +// decoder, then exercise every canonical attributes/resource ingest path. +func TestExportsBoundAttributeNestingBeforeSubmit(t *testing.T) { + for _, object := range []bool{false, true} { + deep := 4800 + if object { + deep = 3000 + } + for _, depth := range []int{maxAttributeNesting, maxAttributeNesting + 1, deep} { + for _, resource := range []bool{false, true} { + attrs := []*common.KeyValue{{Key: "nested", Value: nestedAttribute(depth, object)}} + r := &resourcepb.Resource{} + if resource { + r.Attributes, attrs = attrs, nil + } + requests := []proto.Message{ + &collectortrace.ExportTraceServiceRequest{ResourceSpans: []*tracepb.ResourceSpans{{Resource: r, ScopeSpans: []*tracepb.ScopeSpans{{Spans: []*tracepb.Span{{}, {Attributes: attrs}}}}}}}, + &collectorlogs.ExportLogsServiceRequest{ResourceLogs: []*logspb.ResourceLogs{{Resource: r, ScopeLogs: []*logspb.ScopeLogs{{LogRecords: []*logspb.LogRecord{{}, {Attributes: attrs}}}}}}}, + } + for _, m := range []*metricspb.Metric{ + {Data: &metricspb.Metric_Gauge{Gauge: &metricspb.Gauge{DataPoints: []*metricspb.NumberDataPoint{{}, {Attributes: attrs}}}}}, + {Data: &metricspb.Metric_Sum{Sum: &metricspb.Sum{DataPoints: []*metricspb.NumberDataPoint{{}, {Attributes: attrs}}}}}, + {Data: &metricspb.Metric_Histogram{Histogram: &metricspb.Histogram{DataPoints: []*metricspb.HistogramDataPoint{{}, {Attributes: attrs}}}}}, + {Data: &metricspb.Metric_ExponentialHistogram{ExponentialHistogram: &metricspb.ExponentialHistogram{DataPoints: []*metricspb.ExponentialHistogramDataPoint{{}, {Attributes: attrs}}}}}, + {Data: &metricspb.Metric_Summary{Summary: &metricspb.Summary{DataPoints: []*metricspb.SummaryDataPoint{{}, {Attributes: attrs}}}}}, + } { + requests = append(requests, &collectormetrics.ExportMetricsServiceRequest{ResourceMetrics: []*metricspb.ResourceMetrics{{Resource: r, ScopeMetrics: []*metricspb.ScopeMetrics{{Metrics: []*metricspb.Metric{m}}}}}}) + } + for i, request := range requests { + t.Run(fmt.Sprintf("object=%t/depth=%d/resource=%t/signal=%d", object, depth, resource, i), func(t *testing.T) { + wire, err := proto.Marshal(request) + if err != nil { + t.Fatal(err) + } + decoded := request.ProtoReflect().Type().New().Interface() + if err := proto.Unmarshal(wire, decoded); err != nil { + t.Fatalf("fixture must decode with default OTLP options: %v", err) + } + submitted := false + srv := NewServer(config.Config{}, nestingSubmitter(func(_ context.Context, _ telemetrystore.Batch) error { submitted = true; return nil })) + switch req := decoded.(type) { + case *collectortrace.ExportTraceServiceRequest: + _, err = srv.exportTraces(context.Background(), req) + case *collectorlogs.ExportLogsServiceRequest: + _, err = srv.exportLogs(context.Background(), req) + case *collectormetrics.ExportMetricsServiceRequest: + _, err = srv.exportMetrics(context.Background(), req) + } + if depth <= maxAttributeNesting { + if err != nil || !submitted { + t.Fatalf("valid nesting rejected: %v", err) + } + } else if status.Code(err) != codes.InvalidArgument || submitted { + t.Fatalf("invalid nesting: error=%v submitted=%t", err, submitted) + } + }) + } + } + } + } +} + +func TestMaximumAttributeNestingRoundTripsNativeVariant(t *testing.T) { + for _, object := range []bool{false, true} { + t.Run(fmt.Sprintf("object=%t", object), func(t *testing.T) { + attrs, err := attributes([]*common.KeyValue{{Key: "nested", Value: nestedAttribute(maxAttributeNesting, object)}}) + if err != nil { + t.Fatal(err) + } + repo, err := telemetrystore.Open(t.TempDir()) + if err != nil { + t.Fatal(err) + } + defer repo.Close() + srv := NewServer(config.Config{}, nestingSubmitter(func(ctx context.Context, batch telemetrystore.Batch) error { + batch.ID = "nested" + return repo.Commit(ctx, batch) + })) + raw := []*common.KeyValue{{Key: "nested", Value: nestedAttribute(maxAttributeNesting, object)}} + req := &collectortrace.ExportTraceServiceRequest{ResourceSpans: []*tracepb.ResourceSpans{{Resource: &resourcepb.Resource{Attributes: raw}, ScopeSpans: []*tracepb.ScopeSpans{{Spans: []*tracepb.Span{{Attributes: raw}}}}}}} + if _, err := srv.exportTraces(context.Background(), req); err != nil { + t.Fatal(err) + } + db, err := sql.Open("duckdb", "") + if err != nil { + t.Fatal(err) + } + defer db.Close() + var attributeJSON, resourceJSON string + if err := db.QueryRow("SELECT to_json(attributes)::VARCHAR, to_json(resource)::VARCHAR FROM read_parquet(?)", filepath.Join(repo.Parquet.BatchPath("nested"), "spans.parquet")).Scan(&attributeJSON, &resourceJSON); err != nil { + t.Fatal(err) + } + want, err := json.Marshal(attrs) + if err != nil { + t.Fatal(err) + } + for _, got := range []string{attributeJSON, resourceJSON} { + var actual, expected any + if err := json.Unmarshal([]byte(got), &actual); err != nil { + t.Fatal(err) + } + if err := json.Unmarshal(want, &expected); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(actual, expected) { + t.Fatal("nested VARIANT types or values changed") + } + } + }) + } +} + +func TestHTTPRejectsExcessiveAttributeNestingWithoutRetry(t *testing.T) { + for _, resource := range []bool{false, true} { + attrs := []*common.KeyValue{{Key: "nested", Value: nestedAttribute(4800, false)}} + r := &resourcepb.Resource{} + if resource { + r.Attributes, attrs = attrs, nil + } + for _, test := range []struct { + path string + request proto.Message + }{ + {"/v1/traces", &collectortrace.ExportTraceServiceRequest{ResourceSpans: []*tracepb.ResourceSpans{{Resource: r, ScopeSpans: []*tracepb.ScopeSpans{{Spans: []*tracepb.Span{{}, {Attributes: attrs}}}}}}}}, + {"/v1/logs", &collectorlogs.ExportLogsServiceRequest{ResourceLogs: []*logspb.ResourceLogs{{Resource: r, ScopeLogs: []*logspb.ScopeLogs{{LogRecords: []*logspb.LogRecord{{}, {Attributes: attrs}}}}}}}}, + {"/v1/metrics", &collectormetrics.ExportMetricsServiceRequest{ResourceMetrics: []*metricspb.ResourceMetrics{{Resource: r, ScopeMetrics: []*metricspb.ScopeMetrics{{Metrics: []*metricspb.Metric{{Data: &metricspb.Metric_Gauge{Gauge: &metricspb.Gauge{DataPoints: []*metricspb.NumberDataPoint{{}, {Attributes: attrs}}}}}}}}}}}}, + } { + t.Run(fmt.Sprintf("resource=%t/%s", resource, test.path), func(t *testing.T) { + fixture := newHTTPIngestFixture(t, true) + assertOTLPHTTPStatus(t, fixture.handler, http.MethodPost, test.path, test.request, fixture.token, http.StatusBadRequest) + if len(fixture.spans)+len(fixture.logs)+len(fixture.metrics) != 0 { + t.Fatal("invalid export partially submitted") + } + }) + } + } +} diff --git a/internal/ingest/server.go b/internal/ingest/server.go index 648e1a1b..06fe246c 100644 --- a/internal/ingest/server.go +++ b/internal/ingest/server.go @@ -3,17 +3,13 @@ package ingest import ( "bytes" "context" - "encoding/base64" "encoding/json" "errors" "fmt" "log/slog" "math" - "strconv" "strings" - "sync" "time" - "unicode/utf8" collectorlogs "go.opentelemetry.io/proto/otlp/collector/logs/v1" collectormetrics "go.opentelemetry.io/proto/otlp/collector/metrics/v1" @@ -76,7 +72,10 @@ func (s *Server) exportTraces(ctx context.Context, req *collectortrace.ExportTra now := time.Now().UnixNano() batch := telemetrystore.Batch{} for _, rs := range req.ResourceSpans { - resourceJSON := resourceAttrsJSON(rs.Resource) + resources, err := resourceAttributes(rs.Resource) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } svc := getServiceName(rs.Resource) namespace := getServiceNamespace(rs.Resource) if namespace == "" { @@ -85,6 +84,10 @@ func (s *Server) exportTraces(ctx context.Context, req *collectortrace.ExportTra for _, ss := range rs.ScopeSpans { scopeName, scopeVer := scopeInfo(ss.Scope) for _, sp := range ss.Spans { + attrs, err := attributes(sp.Attributes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } row := telemetry.Span{ Namespace: namespace, TraceID: fmt.Sprintf("%x", sp.TraceId), @@ -100,17 +103,17 @@ func (s *Server) exportTraces(ctx context.Context, req *collectortrace.ExportTra // for an unset status, so these read through generated // getters: dereferencing sp.Status panicked the handler and // lost the whole export, not just the span. - StatusCode: sp.GetStatus().GetCode().String(), - StatusMsg: sp.GetStatus().GetMessage(), - ResourceJSON: resourceJSON, - AttributesJSON: attrsJSON(sp.Attributes), - EventsJSON: eventsToJSON(sp.Events), - LinksJSON: linksToJSON(sp.Links), - TraceState: sp.TraceState, - Flags: sp.Flags, - ScopeName: scopeName, - ScopeVersion: scopeVer, - IngestedAt: now, + StatusCode: sp.GetStatus().GetCode().String(), + StatusMsg: sp.GetStatus().GetMessage(), + Resource: resources, + Attributes: attrs, + EventsJSON: eventsToJSON(sp.Events), + LinksJSON: linksToJSON(sp.Links), + TraceState: sp.TraceState, + Flags: sp.Flags, + ScopeName: scopeName, + ScopeVersion: scopeVer, + IngestedAt: now, // Pre-extracted OTel semantic convention attributes. HTTPMethod: spanAttr(sp.Attributes, "http.method", "http.request.method"), HTTPStatusCode: spanAttrInt(sp.Attributes, "http.status_code", "http.response.status_code"), @@ -158,7 +161,10 @@ func (s *Server) exportLogs(ctx context.Context, req *collectorlogs.ExportLogsSe now := time.Now().UnixNano() batch := telemetrystore.Batch{} for _, rl := range req.ResourceLogs { - resourceJSON := resourceAttrsJSON(rl.Resource) + resources, err := resourceAttributes(rl.Resource) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } svc := getServiceName(rl.Resource) namespace := getServiceNamespace(rl.Resource) if namespace == "" { @@ -167,6 +173,10 @@ func (s *Server) exportLogs(ctx context.Context, req *collectorlogs.ExportLogsSe for _, sl := range rl.ScopeLogs { scopeName, scopeVer := scopeInfo(sl.Scope) for _, lr := range sl.LogRecords { + attrs, err := attributes(lr.Attributes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } body := bodyString(lr.Body) tmpl := safeNormalizeTemplate(body) row := telemetry.Log{ @@ -181,8 +191,8 @@ func (s *Server) exportLogs(ctx context.Context, req *collectorlogs.ExportLogsSe TraceID: hexOrEmpty(lr.TraceId), SpanID: hexOrEmpty(lr.SpanId), Flags: lr.Flags, - ResourceJSON: resourceJSON, - AttributesJSON: attrsJSON(lr.Attributes), + Resource: resources, + Attributes: attrs, ScopeName: scopeName, ScopeVersion: scopeVer, IngestedAt: now, @@ -208,7 +218,10 @@ func (s *Server) exportMetrics(ctx context.Context, req *collectormetrics.Export now := time.Now().UnixNano() batch := telemetrystore.Batch{} for _, rm := range req.ResourceMetrics { - resourceJSON := resourceAttrsJSON(rm.Resource) + resources, err := resourceAttributes(rm.Resource) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } svc := getServiceName(rm.Resource) namespace := getServiceNamespace(rm.Resource) if namespace == "" { @@ -220,21 +233,25 @@ func (s *Server) exportMetrics(ctx context.Context, req *collectormetrics.Export switch d := m.Data.(type) { case *metricspb.Metric_Gauge: for _, dp := range d.Gauge.DataPoints { + attrs, err := attributes(dp.Attributes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } row := telemetry.Metric{ - Namespace: namespace, - TimeUnixNanos: int64(dp.TimeUnixNano), - Name: m.Name, - Description: m.Description, - Unit: m.Unit, - Type: "gauge", - ServiceName: svc, - Value: number(dp.Value), - ExemplarsJSON: exemplarsToJSON(dp.Exemplars), - AttributesJSON: attrsJSON(dp.Attributes), - ResourceJSON: resourceJSON, - ScopeName: scopeName, - ScopeVersion: scopeVer, - IngestedAt: now, + Namespace: namespace, + TimeUnixNanos: int64(dp.TimeUnixNano), + Name: m.Name, + Description: m.Description, + Unit: m.Unit, + Type: "gauge", + ServiceName: svc, + Value: number(dp.Value), + ExemplarsJSON: exemplarsToJSON(dp.Exemplars), + Attributes: attrs, + Resource: resources, + ScopeName: scopeName, + ScopeVersion: scopeVer, + IngestedAt: now, } batch.Metrics = append(batch.Metrics, row) } @@ -244,26 +261,34 @@ func (s *Server) exportMetrics(ctx context.Context, req *collectormetrics.Export kind = "sum_delta" } for _, dp := range d.Sum.DataPoints { + attrs, err := attributes(dp.Attributes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } row := telemetry.Metric{ - Namespace: namespace, - TimeUnixNanos: int64(dp.TimeUnixNano), - Name: m.Name, - Description: m.Description, - Unit: m.Unit, - Type: kind, - ServiceName: svc, - Value: number(dp.Value), - ExemplarsJSON: exemplarsToJSON(dp.Exemplars), - AttributesJSON: attrsJSON(dp.Attributes), - ResourceJSON: resourceJSON, - ScopeName: scopeName, - ScopeVersion: scopeVer, - IngestedAt: now, + Namespace: namespace, + TimeUnixNanos: int64(dp.TimeUnixNano), + Name: m.Name, + Description: m.Description, + Unit: m.Unit, + Type: kind, + ServiceName: svc, + Value: number(dp.Value), + ExemplarsJSON: exemplarsToJSON(dp.Exemplars), + Attributes: attrs, + Resource: resources, + ScopeName: scopeName, + ScopeVersion: scopeVer, + IngestedAt: now, } batch.Metrics = append(batch.Metrics, row) } case *metricspb.Metric_Histogram: for _, dp := range d.Histogram.DataPoints { + attrs, err := attributes(dp.Attributes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } histSum := 0.0 if dp.Sum != nil { histSum = *dp.Sum @@ -281,8 +306,8 @@ func (s *Server) exportMetrics(ctx context.Context, req *collectormetrics.Export HistCount: int64(dp.Count), HistSum: histSum, ExemplarsJSON: exemplarsToJSON(dp.Exemplars), - AttributesJSON: attrsJSON(dp.Attributes), - ResourceJSON: resourceJSON, + Attributes: attrs, + Resource: resources, ScopeName: scopeName, ScopeVersion: scopeVer, IngestedAt: now, @@ -291,6 +316,10 @@ func (s *Server) exportMetrics(ctx context.Context, req *collectormetrics.Export } case *metricspb.Metric_ExponentialHistogram: for _, dp := range d.ExponentialHistogram.DataPoints { + attrs, err := attributes(dp.Attributes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } histSum := 0.0 if dp.Sum != nil { histSum = *dp.Sum @@ -308,8 +337,8 @@ func (s *Server) exportMetrics(ctx context.Context, req *collectormetrics.Export HistCount: int64(dp.Count), HistSum: histSum, ExemplarsJSON: exemplarsToJSON(dp.Exemplars), - AttributesJSON: attrsJSON(dp.Attributes), - ResourceJSON: resourceJSON, + Attributes: attrs, + Resource: resources, ScopeName: scopeName, ScopeVersion: scopeVer, IngestedAt: now, @@ -318,6 +347,10 @@ func (s *Server) exportMetrics(ctx context.Context, req *collectormetrics.Export } case *metricspb.Metric_Summary: for _, dp := range d.Summary.DataPoints { + attrs, err := attributes(dp.Attributes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } row := telemetry.Metric{ Namespace: namespace, TimeUnixNanos: int64(dp.TimeUnixNano), @@ -330,8 +363,8 @@ func (s *Server) exportMetrics(ctx context.Context, req *collectormetrics.Export HistCountsJSON: toJSON(summaryValues(dp)), HistCount: int64(dp.Count), HistSum: dp.Sum, - AttributesJSON: attrsJSON(dp.Attributes), - ResourceJSON: resourceJSON, + Attributes: attrs, + Resource: resources, ScopeName: scopeName, ScopeVersion: scopeVer, IngestedAt: now, @@ -373,254 +406,91 @@ func toJSON(v interface{}) string { return string(b) } -// attrBufPool holds the buffers attrsJSON's fast path writes into. -var attrBufPool = sync.Pool{New: func() any { return new(bytes.Buffer) }} +// maxAttributeNesting bounds native VARIANT decoding recursion on macOS stacks. +// Reject the whole export; never silently change or drop an attribute type. +const maxAttributeNesting = 128 -// attrsJSON flattens an OTLP attribute list into a flat JSON object keyed by -// the literal (dotted) attribute name, e.g. -// {"http.method":"GET","http.status_code":200}. That is the shape the attr() -// macro and json_extract_string(col, '$."key"') paths expect; marshaling the -// raw []*KeyValue, as the old toJSON path did, produced an array of -// {Key,Value} structs that no JSON-path query could read. Returns "" for an -// empty list so the column stays NULL. -// -// The fast path writes the object directly into a pooled buffer, skipping the -// map[string]any + interface boxing + reflection that json.Marshal needs — that -// path dominated ingest allocations under load (profiled: ~7GB / 14% of -// alloc_space at 175k rows/s). Attributes whose values are nested (array/kvlist) -// or non-finite floats fall back to the reflection encoder for exactness. -// -// The fast path preserves the OTLP attribute order and keeps duplicate keys, -// whereas the reflect fallback (a map) sorts keys and keeps last-wins. This is -// immaterial for fanout: OTLP attribute keys are unique by spec, and queries -// read attributes_json by key via attr()/json_extract (order-independent). -func attrsJSON(attrs []*common.KeyValue) string { +// attributes owns typed OTel values; resource maps are shared within one request. +func attributes(attrs []*common.KeyValue) (map[string]any, error) { if len(attrs) == 0 { - return "" - } - if attrsNeedReflect(attrs) { - return attrsJSONReflect(attrs) + return nil, nil } - - buf := attrBufPool.Get().(*bytes.Buffer) - buf.Reset() - buf.WriteByte('{') - n := 0 + values := make(map[string]any, len(attrs)) for _, kv := range attrs { - if kv == nil || kv.Key == "" { - continue - } - if n > 0 { - buf.WriteByte(',') - } - appendJSONString(buf, kv.Key) - buf.WriteByte(':') - appendScalarJSON(buf, kv.Value) - n++ - } - var out string - if n > 0 { - buf.WriteByte('}') - out = buf.String() // copies out of the pooled buffer, as []byte did - } - attrBufPool.Put(buf) - return out -} - -// attrsNeedReflect reports whether any value is nested (array/kvlist) or a -// non-finite float — the cases the direct encoder doesn't handle. -func attrsNeedReflect(attrs []*common.KeyValue) bool { - for _, kv := range attrs { - if kv == nil || kv.Value == nil { - continue - } - switch x := kv.Value.Value.(type) { - case *common.AnyValue_ArrayValue, *common.AnyValue_KvlistValue: - return true - case *common.AnyValue_DoubleValue: - if math.IsInf(x.DoubleValue, 0) || math.IsNaN(x.DoubleValue) { - return true - } - } - } - return false -} - -// appendScalarJSON writes a scalar OTLP value as JSON. Callers guarantee no -// nested/non-finite values reach here (see attrsNeedReflect). -func appendScalarJSON(buf *bytes.Buffer, v *common.AnyValue) { - if v == nil { - buf.WriteString("null") - return - } - var tmp [32]byte - switch x := v.Value.(type) { - case *common.AnyValue_StringValue: - appendJSONString(buf, x.StringValue) - case *common.AnyValue_IntValue: - buf.Write(strconv.AppendInt(tmp[:0], x.IntValue, 10)) - case *common.AnyValue_DoubleValue: - buf.Write(strconv.AppendFloat(tmp[:0], x.DoubleValue, 'g', -1, 64)) - case *common.AnyValue_BoolValue: - if x.BoolValue { - buf.WriteString("true") - } else { - buf.WriteString("false") - } - case *common.AnyValue_BytesValue: - appendJSONString(buf, base64.StdEncoding.EncodeToString(x.BytesValue)) - default: - buf.WriteString("null") - } -} - -// jsonHTMLSafe[b] is true for ASCII bytes that need no escaping — matching -// encoding/json's default htmlSafeSet (escapes " \ control chars and < > &). -var jsonHTMLSafe = func() (s [utf8.RuneSelf]bool) { - for b := 0; b < utf8.RuneSelf; b++ { - s[b] = b >= 0x20 && b != '"' && b != '\\' && b != '<' && b != '>' && b != '&' - } - return -}() - -const jsonHex = "0123456789abcdef" - -// appendJSONString writes s as a JSON string, byte-for-byte identical to -// encoding/json.Marshal(s) with the default HTML escaping (verified by test). -func appendJSONString(buf *bytes.Buffer, s string) { - buf.WriteByte('"') - start := 0 - for i := 0; i < len(s); { - if b := s[i]; b < utf8.RuneSelf { - if jsonHTMLSafe[b] { - i++ - continue - } - if start < i { - buf.WriteString(s[start:i]) - } - switch b { - case '\\', '"': - buf.WriteByte('\\') - buf.WriteByte(b) - case '\n': - buf.WriteString(`\n`) - case '\r': - buf.WriteString(`\r`) - case '\t': - buf.WriteString(`\t`) - case '\b': - buf.WriteString(`\b`) - case '\f': - buf.WriteString(`\f`) - default: - buf.WriteString(`\u00`) - buf.WriteByte(jsonHex[b>>4]) - buf.WriteByte(jsonHex[b&0xF]) - } - i++ - start = i - continue - } - c, size := utf8.DecodeRuneInString(s[i:]) - if c == utf8.RuneError && size == 1 { - if start < i { - buf.WriteString(s[start:i]) + if kv != nil && kv.Key != "" { + value, err := attrValue(kv.Value, 1) + if err != nil { + return nil, fmt.Errorf("attribute %q: %w", kv.Key, err) } - buf.WriteRune(utf8.RuneError) - i += size - start = i - continue - } - // U+2028/U+2029 are valid JSON but break JS; encoding/json escapes them. - if c == '\u2028' || c == '\u2029' { - if start < i { - buf.WriteString(s[start:i]) - } - buf.WriteString(`\u202`) - buf.WriteByte(jsonHex[c&0xF]) - i += size - start = i - continue + values[kv.Key] = value } - i += size } - if start < len(s) { - buf.WriteString(s[start:]) + if len(values) == 0 { + return nil, nil } - buf.WriteByte('"') + return values, nil } -// attrsJSONReflect is the reflection-based encoder, retained for nested values. -func attrsJSONReflect(attrs []*common.KeyValue) string { - m := make(map[string]any, len(attrs)) - for _, kv := range attrs { - if kv == nil || kv.Key == "" { - continue - } - m[kv.Key] = attrValue(kv.Value) +func resourceAttributes(resource *resourcepb.Resource) (map[string]any, error) { + if resource == nil { + return nil, nil } - if len(m) == 0 { - return "" - } - b, err := json.Marshal(m) - if err != nil { - slog.Error("attrs json marshal failed", "err", err) - return "" - } - return string(b) + return attributes(resource.Attributes) } -// resourceAttrsJSON flattens a resource's attributes into the same flat object -// shape as attrsJSON, so attr(resource_json, 'key') resolves. -func resourceAttrsJSON(r *resourcepb.Resource) string { - if r == nil { - return "" - } - return attrsJSON(r.Attributes) -} - -// attrValue converts an OTLP AnyValue into a native Go value for JSON encoding, -// preserving scalar types (string/int/double/bool) and recursing into arrays and -// key-value lists. -func attrValue(v *common.AnyValue) any { +// attrValue preserves OTel types without an intermediate JSON encoding. +func attrValue(v *common.AnyValue, depth int) (any, error) { if v == nil { - return nil + return nil, nil } switch x := v.Value.(type) { case *common.AnyValue_StringValue: - return x.StringValue + return x.StringValue, nil case *common.AnyValue_IntValue: - return x.IntValue + return x.IntValue, nil case *common.AnyValue_DoubleValue: - return x.DoubleValue + return x.DoubleValue, nil case *common.AnyValue_BoolValue: - return x.BoolValue + return x.BoolValue, nil case *common.AnyValue_BytesValue: - return base64.StdEncoding.EncodeToString(x.BytesValue) + return bytes.Clone(x.BytesValue), nil case *common.AnyValue_ArrayValue: + if depth > maxAttributeNesting { + return nil, fmt.Errorf("nesting exceeds %d containers", maxAttributeNesting) + } if x.ArrayValue == nil { - return nil + return nil, nil } arr := make([]any, 0, len(x.ArrayValue.Values)) for _, e := range x.ArrayValue.Values { - arr = append(arr, attrValue(e)) + child, err := attrValue(e, depth+1) + if err != nil { + return nil, err + } + arr = append(arr, child) } - return arr + return arr, nil case *common.AnyValue_KvlistValue: + if depth > maxAttributeNesting { + return nil, fmt.Errorf("nesting exceeds %d containers", maxAttributeNesting) + } if x.KvlistValue == nil { - return nil + return nil, nil } m := make(map[string]any, len(x.KvlistValue.Values)) for _, e := range x.KvlistValue.Values { if e == nil || e.Key == "" { continue } - m[e.Key] = attrValue(e.Value) + child, err := attrValue(e.Value, depth+1) + if err != nil { + return nil, err + } + m[e.Key] = child } - return m + return m, nil default: - return nil + return nil, nil } } diff --git a/internal/ingest/transport_bench_test.go b/internal/ingest/transport_bench_test.go index 29e5299d..113cce60 100644 --- a/internal/ingest/transport_bench_test.go +++ b/internal/ingest/transport_bench_test.go @@ -8,7 +8,10 @@ import ( "fmt" "net" "net/http" + "os" + "path/filepath" "runtime" + "runtime/pprof" "sort" "sync" "sync/atomic" @@ -32,6 +35,8 @@ import ( // conversion; durable also waits for the production writer's Parquet commit. // Client and server share this process: CPU/allocations include both sides. // Run: go test -tags transportbench ./internal/ingest -run '^TestTransportComparison$' -v -count=1 -timeout=10m +// FANOUT_BENCH_PROFILE_DIR writes a CPU profile of each measurement interval +// and a post-load heap profile under a separate directory for every subtest. func TestTransportComparison(t *testing.T) { t.Logf("environment go=%s os=%s arch=%s CPUs=%d GOMAXPROCS=%d", runtime.Version(), runtime.GOOS, runtime.GOARCH, runtime.NumCPU(), runtime.GOMAXPROCS(0)) for _, durable := range []bool{false, true} { @@ -168,6 +173,22 @@ func runTransportComparison(t *testing.T, mode string, durable bool, concurrency runtime.GC() var before, after runtime.MemStats runtime.ReadMemStats(&before) + profileDir := os.Getenv("FANOUT_BENCH_PROFILE_DIR") + var cpuFile *os.File + if profileDir != "" { + profileDir = filepath.Join(profileDir, t.Name()) + if err := os.MkdirAll(profileDir, 0755); err != nil { + t.Fatal(err) + } + cpuFile, err = os.Create(filepath.Join(profileDir, "cpu.pprof")) + if err != nil { + t.Fatal(err) + } + if err := pprof.StartCPUProfile(cpuFile); err != nil { + cpuFile.Close() + t.Fatal(err) + } + } cpuBefore := transportCPU() rowsBefore := sink.rows.Load() start := time.Now() @@ -193,6 +214,23 @@ func runTransportComparison(t *testing.T, mode string, durable bool, concurrency elapsed := time.Since(start).Seconds() cpu := transportCPU() - cpuBefore runtime.ReadMemStats(&after) + if cpuFile != nil { + pprof.StopCPUProfile() + if err := cpuFile.Close(); err != nil { + t.Fatal(err) + } + heapFile, err := os.Create(filepath.Join(profileDir, "heap.pprof")) + if err != nil { + t.Fatal(err) + } + if err := pprof.WriteHeapProfile(heapFile); err != nil { + heapFile.Close() + t.Fatal(err) + } + if err := heapFile.Close(); err != nil { + t.Fatal(err) + } + } var samples []float64 for i := range concurrency { if errors[i] != nil { diff --git a/internal/intelligence/detector.go b/internal/intelligence/detector.go index e92f9c1a..90130268 100644 --- a/internal/intelligence/detector.go +++ b/internal/intelligence/detector.go @@ -184,7 +184,7 @@ func errorRateAnomalySQL(startNano, endNano int64, scope string) string { FROM spans WHERE start_unix_nano >= %d AND start_unix_nano < %d %s - GROUP BY service, time_bucket(INTERVAL '5 minutes', start_time) + GROUP BY service, time_bucket(INTERVAL '5 minutes', start_time::TIMESTAMP_NS) ) buckets GROUP BY service_name ), @@ -200,7 +200,7 @@ func errorRateAnomalySQL(startNano, endNano int64, scope string) string { FROM spans WHERE start_unix_nano >= %d AND start_unix_nano < %d %s - GROUP BY service, time_bucket(INTERVAL '5 minutes', start_time) + GROUP BY service, time_bucket(INTERVAL '5 minutes', start_time::TIMESTAMP_NS) ) buckets GROUP BY service_name ) @@ -286,7 +286,7 @@ func (d *Detector) detectLatencyAnomalies(ctx context.Context, start, end time.T baseline_buckets AS ( SELECT service as service_name, - time_bucket(INTERVAL '5 minutes', start_time) AS bucket, + time_bucket(INTERVAL '5 minutes', start_time::TIMESTAMP_NS) AS bucket, approx_quantile(duration_ms, 0.95) AS p95_latency FROM spans WHERE start_unix_nano >= %d AND start_unix_nano < %d @@ -370,7 +370,7 @@ func volumeAnomalySQL(startNano, endNano int64, scope string) string { FROM spans WHERE start_unix_nano >= %d AND start_unix_nano < %d %s - GROUP BY service, time_bucket(INTERVAL '5 minutes', start_time) + GROUP BY service, time_bucket(INTERVAL '5 minutes', start_time::TIMESTAMP_NS) ) subq GROUP BY service_name ), @@ -386,7 +386,7 @@ func volumeAnomalySQL(startNano, endNano int64, scope string) string { FROM spans WHERE start_unix_nano >= %d AND start_unix_nano < %d %s - GROUP BY service, time_bucket(INTERVAL '5 minutes', start_time) + GROUP BY service, time_bucket(INTERVAL '5 minutes', start_time::TIMESTAMP_NS) ) subq GROUP BY service_name ) diff --git a/internal/intelligence/parquet_test.go b/internal/intelligence/parquet_test.go new file mode 100644 index 00000000..03df6ec7 --- /dev/null +++ b/internal/intelligence/parquet_test.go @@ -0,0 +1,74 @@ +package intelligence + +import ( + "fmt" + "testing" + "time" + + "github.com/labstack/fanout/internal/config" + "github.com/labstack/fanout/internal/query" + "github.com/labstack/fanout/internal/telemetry" + telemetrystore "github.com/labstack/fanout/internal/telemetry/store" +) + +// Exercise the production Parquet timestamp type, not a mutable TIMESTAMP table. +// Detector methods return nil on SQL errors, so require an actual anomaly from +// each query rather than merely accepting an empty snapshot. +func TestDetectorsReadNativeParquetTimestamps(t *testing.T) { + ctx := t.Context() + cfg := config.Config{DataDir: t.TempDir(), DuckDBMemory: "256MB", DuckDBThreads: 2, DuckDBMaxConns: 1} + repository, err := telemetrystore.Open(cfg.TelemetryDir()) + if err != nil { + t.Fatal(err) + } + defer repository.Close() + duck, err := query.NewDuck(ctx, cfg, repository) + if err != nil { + t.Fatal(err) + } + defer duck.Close() + start := time.Date(2026, 10, 1, 12, 0, 0, 123456789, time.UTC) + end := start.Add(15 * time.Minute) + batch := telemetrystore.Batch{ID: "detectors"} + for bucket, count := range []int{1, 2, 3, 30, 30, 30} { + at := start.Add(time.Duration(bucket-3) * 5 * time.Minute) + latency := float64(bucket+1) * 10 + status := "STATUS_CODE_OK" + if bucket >= 3 { + latency = 1000 + status = "STATUS_CODE_ERROR" + } + for i := range count { + nanos := at.Add(time.Duration(i) * time.Second).UnixNano() + batch.Spans = append(batch.Spans, telemetry.Span{ + Namespace: "prod", ServiceName: "checkout", TraceID: fmt.Sprintf("trace-%d-%d", bucket, i), SpanID: "span", + Kind: "SPAN_KIND_SERVER", StatusCode: status, DurationMS: latency, + StartUnixNanos: nanos, EndUnixNanos: nanos + int64(latency*1e6), IngestedAt: nanos, + }) + } + } + for i := range 3 { + nanos := start.Add(time.Duration(i) * time.Second).UnixNano() + batch.Logs = append(batch.Logs, telemetry.Log{Namespace: "prod", ServiceName: "checkout", Severity: "ERROR", Body: "checkout failed", TimeUnixNanos: nanos, IngestedAt: nanos}) + } + if err := repository.Commit(ctx, batch); err != nil { + t.Fatal(err) + } + detector := NewDetector(duck, DefaultDetectorConfig()) + for name, detect := range map[string]func() []Anomaly{ + "error rate": func() []Anomaly { return detector.detectErrorRateAnomalies(ctx, start, end) }, + "latency": func() []Anomaly { return detector.detectLatencyAnomalies(ctx, start, end) }, + "volume": func() []Anomaly { return detector.detectVolumeAnomalies(ctx, start, end) }, + } { + t.Run(name, func(t *testing.T) { + anomalies := detect() + if len(anomalies) != 1 || anomalies[0].ServiceName != "checkout" || anomalies[0].Current <= anomalies[0].Baseline { + t.Fatalf("expected checkout anomaly, got %#v", anomalies) + } + }) + } + patterns := detector.detectLogPatterns(ctx, start, end) + if len(patterns) != 1 || patterns[0].Count != 3 || patterns[0].FirstSeen.UnixNano() != start.UnixNano() { + t.Fatalf("log patterns: %#v", patterns) + } +} diff --git a/internal/mcp/apps/logs.html b/internal/mcp/apps/logs.html index 73290891..a1202255 100644 --- a/internal/mcp/apps/logs.html +++ b/internal/mcp/apps/logs.html @@ -1,39 +1,44 @@ -Fanout log explorer -
diff --git a/internal/mcp/apps/overview.html b/internal/mcp/apps/overview.html index 9db9f30f..2c7d79c7 100644 --- a/internal/mcp/apps/overview.html +++ b/internal/mcp/apps/overview.html @@ -1,22 +1,27 @@ - System health -
diff --git a/internal/mcp/apps/performance.html b/internal/mcp/apps/performance.html index b0eb22d7..0eb03609 100644 --- a/internal/mcp/apps/performance.html +++ b/internal/mcp/apps/performance.html @@ -1,39 +1,44 @@ -Fanout service performance -
diff --git a/internal/mcp/apps/topology.html b/internal/mcp/apps/topology.html index 141699e1..1a92220c 100644 --- a/internal/mcp/apps/topology.html +++ b/internal/mcp/apps/topology.html @@ -1,41 +1,46 @@ - Service topology -
diff --git a/internal/mcp/apps/trace.html b/internal/mcp/apps/trace.html index fb1e5495..fdaf4a4b 100644 --- a/internal/mcp/apps/trace.html +++ b/internal/mcp/apps/trace.html @@ -1,19 +1,24 @@ -Fanout trace detail -
diff --git a/internal/mcp/server.go b/internal/mcp/server.go index 64e5e5fb..6560b466 100644 --- a/internal/mcp/server.go +++ b/internal/mcp/server.go @@ -18,11 +18,12 @@ const mcpUIExtension = "io.modelcontextprotocol/ui" const staticCatalogTTLMs = 5 * 60 * 1000 -const serverInstructions = "Start with get_observability_overview for system health, use get_intelligence_snapshot for the latest precomputed anomalies and log patterns, get_service_topology for dependencies, get_service_performance for latency and errors, inspect_trace for one trace, and search_logs for application events. Treat schema, timestamps, provenance, and bounded time windows as authoritative. Dashboard tools are scoped to the authenticated user: list or get a dashboard before changing it, create only when asked, and replace an existing dashboard only with explicit user intent." +const serverInstructions = "Start with get_observability_overview for system health, use get_intelligence_snapshot for the latest precomputed anomalies and log patterns, get_service_topology for direct dependency edges, get_service_dependencies for bounded upstream or downstream reachability from a service, get_service_performance for latency and errors, inspect_trace for one trace, and search_logs for application events. Treat schema, timestamps, provenance, and bounded time windows as authoritative. Dashboard tools are scoped to the authenticated user: list or get a dashboard before changing it, create only when asked, and replace an existing dashboard only with explicit user intent." type Observability interface { Overview(context.Context, observability.Scope, int) (observability.Result[observability.Overview], error) Topology(context.Context, observability.Scope, int) (observability.Result[observability.Topology], error) + Dependencies(context.Context, observability.Scope, observability.DependencyOptions) (observability.Result[observability.Dependencies], error) Performance(context.Context, observability.Scope, observability.PerformanceOptions) (observability.Result[observability.Performance], error) Trace(context.Context, observability.Scope, string, string, int) (observability.Result[observability.TraceDetail], error) Logs(context.Context, observability.Scope, string, string, string, int) (observability.Result[observability.Logs], error) @@ -38,6 +39,15 @@ type QueryInput struct { Limit int `json:"limit,omitempty" jsonschema:"Maximum services or edges to return, from 1 to 500"` } +type DependencyInput struct { + Window string `json:"window,omitempty" jsonschema:"Bounded telemetry window, defaults to 1h"` + Namespace string `json:"namespace,omitempty" jsonschema:"Filter by namespace; traversal always keeps namespaces separate"` + Service string `json:"service" jsonschema:"Root service name"` + Direction string `json:"direction,omitempty" jsonschema:"upstream or downstream; defaults to downstream"` + MaxDepth int `json:"max_depth,omitempty" jsonschema:"Maximum hops from 1 to 32; defaults to 8"` + MaxNodes int `json:"max_nodes,omitempty" jsonschema:"Maximum accumulated nodes from 1 to 500 including roots; defaults to 100"` +} + type PerformanceInput struct { Window string `json:"window,omitempty" jsonschema:"Time window such as 15m, 1h, 24h, 168h, or 720h; defaults to 1h"` Namespace string `json:"namespace,omitempty" jsonschema:"OpenTelemetry service namespace; empty queries all namespaces"` @@ -205,6 +215,11 @@ func (s *Server) HTTPHandler() http.Handler { func (s *Server) registerTools() { readOnly := &mcp.ToolAnnotations{ReadOnlyHint: true, OpenWorldHint: boolPtr(false)} + mcp.AddTool(s.mcp, &mcp.Tool{ + Name: "get_service_dependencies", Title: "Service dependency traversal", + Description: "Find upstream or downstream dependencies of one service with minimum hop counts. Uses the full scoped edge rollup, handles cycles, and reports truncation from depth or node limits.", + Annotations: readOnly, + }, s.dependencies) mcp.AddTool(s.mcp, &mcp.Tool{ Name: "get_observability_overview", Title: "System health overview", @@ -250,6 +265,18 @@ func (s *Server) registerTools() { } } +func (s *Server) dependencies(ctx context.Context, _ *mcp.CallToolRequest, input DependencyInput) (*mcp.CallToolResult, observability.Result[observability.Dependencies], error) { + scope, err := s.scope(QueryInput{Window: input.Window, Namespace: input.Namespace}) + if err != nil { + return nil, observability.Result[observability.Dependencies]{}, err + } + output, err := s.queries.Dependencies(ctx, scope, observability.DependencyOptions{Service: input.Service, Direction: input.Direction, MaxDepth: input.MaxDepth, MaxNodes: input.MaxNodes}) + if err != nil { + return nil, output, err + } + return summary(output.Summary), output, nil +} + func (s *Server) intelligenceSnapshot(_ context.Context, _ *mcp.CallToolRequest, _ struct{}) (*mcp.CallToolResult, intelligence.IntelligenceSnapshot, error) { snapshot := s.intelligence.LatestSnapshot() if snapshot == nil { diff --git a/internal/mcp/server_test.go b/internal/mcp/server_test.go index d87fbd6c..5049246f 100644 --- a/internal/mcp/server_test.go +++ b/internal/mcp/server_test.go @@ -2,6 +2,7 @@ package mcp import ( "context" + "encoding/json" "strings" "testing" "time" @@ -118,6 +119,11 @@ func (f *fakeObservability) Overview(_ context.Context, scope observability.Scop }, nil } +func (f *fakeObservability) Dependencies(_ context.Context, scope observability.Scope, options observability.DependencyOptions) (observability.Result[observability.Dependencies], error) { + f.scope = scope + return observability.Result[observability.Dependencies]{Schema: observability.DependenciesSchema, Data: observability.Dependencies{Service: options.Service, Direction: options.Direction, MaxDepth: options.MaxDepth, MaxNodes: options.MaxNodes}}, nil +} + func (f *fakeObservability) Topology(_ context.Context, scope observability.Scope, _ int) (observability.Result[observability.Topology], error) { f.scope = scope return observability.Result[observability.Topology]{ @@ -172,6 +178,31 @@ func TestInvalidWindowIsToolError(t *testing.T) { } } +func TestDependencyToolForwardsScopeAndBounds(t *testing.T) { + backend := &fakeObservability{} + server := New(backend, nil, "test") + now := time.Date(2026, 9, 30, 12, 0, 0, 0, time.UTC) + server.now = func() time.Time { return now } + session := connectTestClient(t, server, nil) + result, err := session.CallTool(context.Background(), &mcp.CallToolParams{Name: "get_service_dependencies", Arguments: map[string]any{ + "window": "15m", "namespace": "prod", "service": "checkout", "direction": "upstream", "max_depth": 3, "max_nodes": 25, + }}) + if err != nil || result.IsError { + t.Fatalf("dependency call: %#v %v", result, err) + } + data, err := json.Marshal(result.StructuredContent) + if err != nil { + t.Fatal(err) + } + var output observability.Result[observability.Dependencies] + if err := json.Unmarshal(data, &output); err != nil { + t.Fatal(err) + } + if output.Schema != observability.DependenciesSchema || output.Data.Service != "checkout" || output.Data.Direction != "upstream" || output.Data.MaxDepth != 3 || output.Data.MaxNodes != 25 || backend.scope.Namespace != "prod" || !backend.scope.Start.Equal(now.Add(-15*time.Minute)) { + t.Fatalf("scope or parameters lost: %#v %#v", output, backend.scope) + } +} + func TestIntelligenceSnapshotReturnsStructuredOutput(t *testing.T) { want := &intelligence.IntelligenceSnapshot{ GeneratedAt: time.Date(2026, 8, 26, 12, 0, 0, 0, time.UTC), @@ -214,11 +245,17 @@ func TestToolsAdvertiseReadableMCPApps(t *testing.T) { if err != nil { t.Fatal(err) } - if len(listed.Tools) != 5 { - t.Fatalf("tool count = %d, want 5", len(listed.Tools)) + if len(listed.Tools) != 6 { + t.Fatalf("tool count = %d, want 6", len(listed.Tools)) } resources := map[string]bool{} for _, tool := range listed.Tools { + if tool.Name == "get_service_dependencies" { + if _, ok := tool.Meta["ui"]; ok { + t.Fatal("dependency traversal advertised a UI resource") + } + continue + } ui, ok := tool.Meta["ui"].(map[string]any) if !ok { t.Fatalf("tool %s has no nested ui metadata: %#v", tool.Name, tool.Meta) @@ -257,8 +294,8 @@ func TestToolsAdvertiseReadableMCPApps(t *testing.T) { if err != nil { t.Fatal(err) } - if len(listed.Tools) != 5 { - t.Fatalf("tool count = %d, want 5", len(listed.Tools)) + if len(listed.Tools) != 6 { + t.Fatalf("tool count = %d, want 6", len(listed.Tools)) } for _, tool := range listed.Tools { if _, ok := tool.Meta["ui"]; ok { diff --git a/internal/metrics/metrics.go b/internal/metrics/metrics.go index 57fbf856..0cf8c761 100644 --- a/internal/metrics/metrics.go +++ b/internal/metrics/metrics.go @@ -13,9 +13,9 @@ import ( type RollupComponent string const ( - RollupService RollupComponent = "service" - RollupEndpoint RollupComponent = "endpoint" - RollupEdge RollupComponent = "edge" + RollupService RollupComponent = "service" + RollupReadCache RollupComponent = "read_cache" + RollupEdge RollupComponent = "edge" ) type RollupResult string @@ -45,6 +45,8 @@ const ( ) var ( + ReadCachePendingBatches = promauto.NewGauge(prometheus.GaugeOpts{Name: "fanout_read_cache_pending_batches", Help: "Active immutable batches not covered at the start of the last read-cache pass"}) + // Ingest metrics IngestTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "fanout_ingest_rows_total", @@ -552,7 +554,7 @@ func UpdateQueueDepth(signal string, depth int) { func validateRollupComponent(component RollupComponent) { switch component { - case RollupService, RollupEndpoint, RollupEdge: + case RollupService, RollupReadCache, RollupEdge: return default: panic("metrics: invalid rollup component: " + string(component)) diff --git a/internal/metrics/metrics_test.go b/internal/metrics/metrics_test.go index c6e71e74..ca328ffc 100644 --- a/internal/metrics/metrics_test.go +++ b/internal/metrics/metrics_test.go @@ -95,15 +95,15 @@ func TestRecordRollupComponentAndProgress(t *testing.T) { RollupBacklogChunks.Reset() RecordRollupComponent(RollupService, RollupSuccess, 12, 0.25) - RecordRollupComponent(RollupEndpoint, RollupDisabled, 0, 0.01) + RecordRollupComponent(RollupReadCache, RollupDisabled, 0, 0.01) if got := testutil.ToFloat64(RollupComponentTotal.WithLabelValues("service", "success")); got != 1 { t.Errorf("service success count = %f, want 1", got) } if got := testutil.ToFloat64(RollupComponentRows.WithLabelValues("service")); got != 12 { t.Errorf("service rows = %f, want 12", got) } - if got := testutil.ToFloat64(RollupComponentTotal.WithLabelValues("endpoint", "disabled")); got != 1 { - t.Errorf("endpoint disabled count = %f, want 1", got) + if got := testutil.ToFloat64(RollupComponentTotal.WithLabelValues("read_cache", "disabled")); got != 1 { + t.Errorf("read cache disabled count = %f, want 1", got) } UpdateRollupProgress(RollupService, true, 10_000_000_000, 13_500_000_000, 2) @@ -123,9 +123,9 @@ func TestRecordRollupComponentAndProgress(t *testing.T) { t.Errorf("service backlog chunks = %f, want 2", got) } - UpdateRollupProgress(RollupEndpoint, false, 0, 0, 0) - if got := testutil.ToFloat64(RollupEnabled.WithLabelValues("endpoint")); got != 0 { - t.Errorf("endpoint enabled = %f, want 0", got) + UpdateRollupProgress(RollupReadCache, false, 0, 0, 0) + if got := testutil.ToFloat64(RollupEnabled.WithLabelValues("read_cache")); got != 0 { + t.Errorf("read cache enabled = %f, want 0", got) } } diff --git a/internal/observability/batch_reads_bench_test.go b/internal/observability/batch_reads_bench_test.go new file mode 100644 index 00000000..f50d1b68 --- /dev/null +++ b/internal/observability/batch_reads_bench_test.go @@ -0,0 +1,148 @@ +//go:build readbench + +package observability + +import ( + "encoding/json" + "fmt" + "os" + "runtime" + "sort" + "syscall" + "testing" + "time" + + "github.com/labstack/fanout/internal/config" + "github.com/labstack/fanout/internal/query" + "github.com/labstack/fanout/internal/telemetry" + telemetrystore "github.com/labstack/fanout/internal/telemetry/store" +) + +// TestCompletedReadBenchmark measures actual dashboard methods over identical +// immutable format-3 files. Run with the readbench tag on an otherwise idle +// machine; the normal test gate does not run this resource-intensive fixture. +func TestCompletedReadBenchmark(t *testing.T) { + cfg := config.Config{DataDir: t.TempDir(), DuckDBMemory: "2GB", DuckDBThreads: 4, DuckDBMaxConns: 4, RollupInterval: 100 * time.Millisecond} + repo, err := telemetrystore.Open(cfg.TelemetryDir()) + if err != nil { + t.Fatal(err) + } + defer repo.Close() + at := time.Now().UTC().Truncate(time.Hour) + rowsPerBatch := 25000 + if os.Getenv("FANOUT_READ_BENCH_LARGE") == "1" { + rowsPerBatch = 100000 + } + for batch := range 12 { + b := telemetrystore.Batch{ID: fmt.Sprint("hour", batch)} + for i := range rowsPerBatch { + n := at.Add(-time.Duration(batch)*time.Hour - time.Duration(i%1800)*time.Second).UnixNano() + trace := fmt.Sprintf("trace%d-%d", batch, i/2) + service := fmt.Sprint("service", i%4) + status := "OK" + if i%101 == 0 { + status = "ERROR" + } + b.Spans = append(b.Spans, telemetry.Span{Namespace: "prod", ServiceName: service, TraceID: trace, SpanID: fmt.Sprint(i), StartUnixNanos: n, EndUnixNanos: n + int64(i%1000+1)*1000000, DurationMS: float64(i%1000 + 1), StatusCode: status, HTTPMethod: "GET", HTTPRoute: fmt.Sprint("/route", i%8), IngestedAt: at.UnixNano(), Attributes: map[string]any{"http.route": fmt.Sprint("/route", i%8)}, Resource: map[string]any{"service.name": service}}) + b.Logs = append(b.Logs, telemetry.Log{Namespace: "prod", ServiceName: service, TraceID: trace, TimeUnixNanos: n, Severity: []string{"INFO", "WARN", "ERROR"}[i%3], Body: "request complete", IngestedAt: at.UnixNano()}) + } + if err := repo.Commit(t.Context(), b); err != nil { + t.Fatal(err) + } + } + // Many old immutable files exercise binder/file selection without changing + // the hot window's row count. The newest entry query can bind newest first. + for i := range 300 { + n := at.Add(-time.Duration(24+i) * time.Hour).UnixNano() + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: fmt.Sprint("old", i), Logs: []telemetry.Log{{TimeUnixNanos: n, IngestedAt: at.UnixNano(), Body: "old"}}, Metrics: []telemetry.Metric{{TimeUnixNanos: n, IngestedAt: at.UnixNano(), Value: 1}}}); err != nil { + t.Fatal(err) + } + } + d, err := query.NewDuck(t.Context(), cfg, repo) + if err != nil { + t.Fatal(err) + } + defer d.Close() + svc := New(d, d, 30) + raw := New(SQLDB(d.DB), d, 30) + if _, err := d.DB.Exec(`CHECKPOINT`); err != nil { + t.Fatal(err) + } + emptyCatalog, err := os.Stat(cfg.QueryDuckDBPath()) + if err != nil { + t.Fatal(err) + } + started := time.Now() + for attempt := 0; ; attempt++ { + if attempt > 312 { + t.Fatal("cache backfill made no progress") + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + var count int + if err := d.DB.QueryRow(`SELECT count(*) FROM read_batches`).Scan(&count); err != nil { + t.Fatal(err) + } + if count == 312 { + break + } + } + + t.Logf("backfill=%s rows_per_signal=%d immutable_batches=312", time.Since(started), rowsPerBatch*12) + if _, err := d.DB.Exec(`CHECKPOINT`); err != nil { + t.Fatal(err) + } + catalog, err := os.Stat(cfg.QueryDuckDBPath()) + if err != nil { + t.Fatal(err) + } + stats, err := repo.Parquet.Stats() + if err != nil { + t.Fatal(err) + } + var parquetBytes int64 + for _, stat := range stats { + parquetBytes += stat.Bytes + } + footprint, _ := json.Marshal(map[string]any{"experiment": "cache_footprint", "rows_per_signal": rowsPerBatch * 12, "empty_catalog_bytes": emptyCatalog.Size(), "catalog_bytes": catalog.Size(), "parquet_bytes": parquetBytes}) + t.Log("RESULT", string(footprint)) + broad := Scope{Start: at.Add(-24 * time.Hour), End: at.Add(time.Second), Namespace: "prod"} + narrow := Scope{Start: at.Add(-20 * time.Minute), End: at.Add(time.Second), Namespace: "prod"} + for _, scope := range []Scope{broad, narrow} { + for name, method := range map[string]func(*Service) error{ + "endpoints": func(s *Service) error { _, _, err := s.queryEndpoints(t.Context(), scope, "", 100); return err }, + "trace": func(s *Service) error { _, err := s.Trace(t.Context(), scope, "", "", 100); return err }, + "logs": func(s *Service) error { _, err := s.Logs(t.Context(), scope, "", "", "", 100); return err }, + } { + for _, implementation := range []struct { + name string + service *Service + }{{"raw", raw}, {"completed", svc}} { + if err := method(implementation.service); err != nil { + t.Fatal(err) + } + runtime.GC() + before := readCPU() + timings := []float64{} + for range 10 { + start := time.Now() + if err := method(implementation.service); err != nil { + t.Fatal(err) + } + timings = append(timings, float64(time.Since(start))/float64(time.Millisecond)) + } + cpu := readCPU() - before + sort.Float64s(timings) + report := map[string]any{"method": name, "implementation": implementation.name, "window_minutes": scope.End.Sub(scope.Start).Minutes(), "median_ms": (timings[4] + timings[5]) / 2, "p95_ms": timings[9], "cpu_seconds_per_request": cpu / 10, "rows_per_signal": rowsPerBatch * 12} + data, _ := json.Marshal(report) + t.Log("RESULT", string(data)) + } + } + } +} +func readCPU() float64 { + var r syscall.Rusage + _ = syscall.Getrusage(syscall.RUSAGE_SELF, &r) + return float64(r.Utime.Sec+r.Stime.Sec) + float64(r.Utime.Usec+r.Stime.Usec)/1e6 +} diff --git a/internal/observability/batch_reads_test.go b/internal/observability/batch_reads_test.go new file mode 100644 index 00000000..b618e379 --- /dev/null +++ b/internal/observability/batch_reads_test.go @@ -0,0 +1,272 @@ +package observability + +import ( + "fmt" + "math/rand/v2" + "reflect" + "testing" + "time" + + "github.com/labstack/fanout/internal/config" + "github.com/labstack/fanout/internal/query" + "github.com/labstack/fanout/internal/telemetry" + telemetrystore "github.com/labstack/fanout/internal/telemetry/store" +) + +func newCompletedReadTest(t *testing.T) (*query.Duck, *telemetrystore.Repository, *Service) { + t.Helper() + cfg := config.Config{DataDir: t.TempDir(), DuckDBMemory: "256MB", DuckDBThreads: 2, DuckDBMaxConns: 2, RollupInterval: time.Hour} + repo, err := telemetrystore.Open(cfg.TelemetryDir()) + if err != nil { + t.Fatal(err) + } + d, err := query.NewDuck(t.Context(), cfg, repo) + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { _ = d.Close(); _ = repo.Close() }) + return d, repo, New(d, d, 30) +} +func warmCompletedReads(t *testing.T, d *query.Duck, want int) { + t.Helper() + for attempt := 0; attempt <= want; attempt++ { + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + var count int + if err := d.DB.QueryRow(`SELECT count(*) FROM read_batches`).Scan(&count); err != nil { + t.Fatal(err) + } + if count == want { + return + } + if count > want { + t.Fatalf("cached %d batches, want %d", count, want) + } + } + t.Fatal("cache backfill made no progress") +} +func TestCompletedDashboardReadsMatchColdAndLateData(t *testing.T) { + d, repo, svc := newCompletedReadTest(t) + at := time.Date(2026, 10, 1, 12, 0, 0, 0, time.UTC) + commit := func(id string, offset int) { + t.Helper() + b := telemetrystore.Batch{ID: id} + for i := range 8 { + ns := "prod" + if i%3 == 0 { + ns = "other" + } + service := "api" + if i%2 == 0 { + service = "worker" + } + n := at.Add(time.Duration(offset+i*20) * time.Second).UnixNano() + trace := fmt.Sprint("trace", i%3) + status := "OK" + if i == 5 { + status = "ERROR" + } + b.Spans = append(b.Spans, telemetry.Span{Namespace: ns, ServiceName: service, TraceID: trace, SpanID: fmt.Sprint(id, i), StartUnixNanos: n, EndUnixNanos: n + int64((i+1)*1000000), DurationMS: float64(i + 1), StatusCode: status, HTTPMethod: "GET", HTTPRoute: "/test", IngestedAt: at.UnixNano()}) + sev := []string{"Error", "warn", "", "İ", "i"}[i%5] + b.Logs = append(b.Logs, telemetry.Log{Namespace: ns, ServiceName: service, TimeUnixNanos: n, Severity: sev, Body: fmt.Sprint("event", i, " password=secret"), TraceID: trace, IngestedAt: at.UnixNano()}) + if i%3 == 1 { + b.Logs = append(b.Logs, b.Logs[len(b.Logs)-1]) + } + } + if err := repo.Commit(t.Context(), b); err != nil { + t.Fatal(err) + } + } + commit("first", 0) + scope := Scope{Start: at.Add(10 * time.Second), End: at.Add(150 * time.Second), Namespace: "prod"} + cold, _, err := svc.queryEndpoints(t.Context(), scope, "", 100) + if err != nil { + t.Fatal(err) + } + logsCold, err := svc.Logs(t.Context(), scope, "", "", "", 100) + if err != nil { + t.Fatal(err) + } + warmCompletedReads(t, d, 1) + warm, _, err := svc.queryEndpoints(t.Context(), scope, "", 100) + if err != nil { + t.Fatal(err) + } + logsWarm, err := svc.Logs(t.Context(), scope, "", "", "", 100) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(cold, warm) { + t.Fatalf("endpoints cold=%#v warm=%#v", cold, warm) + } + if !reflect.DeepEqual(logsCold.Data, logsWarm.Data) { + t.Fatalf("logs cold=%#v warm=%#v", logsCold.Data, logsWarm.Data) + } + commit("late", 5) + raw := New(SQLDB(d.DB), d, 30) + for _, ns := range []string{"", "prod", "other"} { + for _, service := range []string{"", "api", "worker"} { + for _, window := range [][2]int{{-60, 300}, {10, 150}, {65, 95}} { + selected := Scope{Namespace: ns, Start: at.Add(time.Duration(window[0]) * time.Second), End: at.Add(time.Duration(window[1]) * time.Second)} + got, err := svc.Trace(t.Context(), selected, "", service, 100) + if err != nil { + t.Fatal(err) + } + want, err := raw.Trace(t.Context(), selected, "", service, 100) + if err != nil { + t.Fatal(err) + } + if got.Data.TraceID != want.Data.TraceID { + t.Fatalf("candidate ns=%s service=%s window=%v: %s != %s", ns, service, window, got.Data.TraceID, want.Data.TraceID) + } + for _, severity := range []string{"", "error", "warn", "unspecified", "i", "İ"} { + for _, search := range []string{"", "event5", "secret"} { + got, err := svc.Logs(t.Context(), selected, service, severity, search, 100) + if err != nil { + t.Fatal(err) + } + want, err := raw.Logs(t.Context(), selected, service, severity, search, 100) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(got.Data, want.Data) { + t.Fatalf("logs ns=%s svc=%s window=%v severity=%s search=%s: %#v != %#v", ns, service, window, severity, search, got.Data, want.Data) + } + } + } + } + } + } + warmCompletedReads(t, d, 2) + got, err := svc.Trace(t.Context(), scope, "", "", 100) + if err != nil { + t.Fatal(err) + } + want, err := raw.Trace(t.Context(), scope, "", "", 100) + if err != nil || got.Data.TraceID != want.Data.TraceID { + t.Fatalf("fully warm trace: %s != %s: %v", got.Data.TraceID, want.Data.TraceID, err) + } +} + +// When every cached file overlapping the window lies inside it, a trace whose +// other cached spans sit in a file outside the window is still a candidate: +// its in-window spans decide the ranking, as they do for the raw query. +func TestCompletedTraceKeepsTraceWithSpansOutsideWindow(t *testing.T) { + d, repo, svc := newCompletedReadTest(t) + raw := New(SQLDB(d.DB), d, 30) + t0 := time.Date(2026, 10, 1, 12, 0, 0, 0, time.UTC) + span := func(trace, id string, at time.Time, dur time.Duration, status string) telemetry.Span { + return telemetry.Span{Namespace: "prod", ServiceName: "api", TraceID: trace, SpanID: id, StartUnixNanos: at.UnixNano(), EndUnixNanos: at.Add(dur).UnixNano(), + DurationMS: float64(dur.Milliseconds()), StatusCode: status, HTTPMethod: "GET", HTTPRoute: "/x", IngestedAt: t0.UnixNano()} + } + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "before", Spans: []telemetry.Span{span("T", "t1", t0.Add(-30*time.Second), time.Second, "OK")}}); err != nil { + t.Fatal(err) + } + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "inside", Spans: []telemetry.Span{ + span("T", "t2", t0.Add(10*time.Second), time.Second, "ERROR"), + span("U", "u1", t0.Add(20*time.Second), 5*time.Second, "OK"), + }}); err != nil { + t.Fatal(err) + } + warmCompletedReads(t, d, 2) + for _, service := range []string{"", "api"} { + scope := Scope{Start: t0, End: t0.Add(time.Minute)} + want, err := raw.Trace(t.Context(), scope, "", service, 100) + if err != nil { + t.Fatal(err) + } + got, err := svc.Trace(t.Context(), scope, "", service, 100) + if err != nil { + t.Fatal(err) + } + if want.Data.TraceID != "T" || got.Data.TraceID != want.Data.TraceID { + t.Fatalf("service=%q: completed trace %q, raw %q, want T", service, got.Data.TraceID, want.Data.TraceID) + } + } +} + +// Time-local batches put most window edges between files, so cached candidates +// must combine index rows with the in-window parts of partially covered traces. +func TestCompletedTraceMatchesRawAcrossTimeLocalBatches(t *testing.T) { + d, repo, svc := newCompletedReadTest(t) + raw := New(SQLDB(d.DB), d, 30) + rng := rand.New(rand.NewPCG(11, 104729)) + t0 := time.Date(2026, 10, 1, 12, 0, 0, 0, time.UTC) + statuses := []string{"OK", "ERROR", "error", "UNSET", ""} + commit := func(k int, ingest time.Time) { + t.Helper() + lo := t0.Add(-40*time.Minute + time.Duration(k)*37*time.Second) + batch := telemetrystore.Batch{ID: fmt.Sprintf("local%03d", k)} + for i := 0; i < 6; i++ { + at := lo.Add(time.Duration(rng.Int64N(int64(37 * time.Second)))) + dur := time.Duration(rng.Int64N(int64(2 * time.Second))) + batch.Spans = append(batch.Spans, telemetry.Span{Namespace: []string{"prod", "dev"}[rng.IntN(2)], ServiceName: []string{"api", "worker"}[rng.IntN(2)], + TraceID: fmt.Sprintf("t%03d", k/2+rng.IntN(3)), SpanID: fmt.Sprintf("%s-%d", batch.ID, i), StartUnixNanos: at.UnixNano(), EndUnixNanos: at.Add(dur).UnixNano(), + DurationMS: float64(dur) / 1e6, StatusCode: statuses[rng.IntN(len(statuses))], HTTPMethod: "GET", HTTPRoute: "/a", IngestedAt: ingest.UnixNano()}) + } + if err := repo.Commit(t.Context(), batch); err != nil { + t.Fatal(err) + } + } + refresh := func() { + t.Helper() + warmCompletedReads(t, d, len(repo.Parquet.BatchMetadata())) + } + check := func(stage string) { + t.Helper() + var edges []time.Time + for _, b := range repo.Parquet.BatchMetadata() { + if b.SpanTime.Known { + edges = append(edges, time.Unix(0, b.SpanTime.MinNanos).UTC(), time.Unix(0, b.SpanTime.MaxNanos).UTC()) + } + } + for i := 0; i < 8; i++ { + start := edges[rng.IntN(len(edges))].Add(time.Duration(rng.Int64N(int64(2*time.Second))) - time.Second) + if i%3 == 0 { + start = t0.Add(-41*time.Minute + time.Duration(rng.Int64N(int64(42*time.Minute)))) + } + end := start.Add(5*time.Second + time.Duration(rng.Int64N(int64(6*time.Minute)))) + for _, ns := range []string{"", "prod"} { + for _, service := range []string{"", "api"} { + scope := Scope{Namespace: ns, Start: start, End: end} + want, err := raw.Trace(t.Context(), scope, "", service, 100) + if err != nil { + t.Fatal(err) + } + got, err := svc.Trace(t.Context(), scope, "", service, 100) + if err != nil { + t.Fatal(err) + } + if got.Data.TraceID != want.Data.TraceID { + t.Fatalf("%s ns=%q service=%q [%s, %s): completed %q, raw %q", stage, ns, service, + start.Format(time.RFC3339Nano), end.Format(time.RFC3339Nano), got.Data.TraceID, want.Data.TraceID) + } + } + } + } + } + for k := 0; k < 24; k++ { + commit(k, t0.Add(-2*time.Hour+time.Duration(k)*time.Second)) + } + refresh() + check("cached") + for pass := 0; pass < 3; pass++ { + if n, err := repo.CompactParquet(t.Context(), d, 8); err != nil || n == 0 { + t.Fatalf("compact pass %d: %d %v", pass, n, err) + } + } + check("compacted before refresh") + refresh() + check("compacted") + for k := 24; k < 28; k++ { + commit(k, t0.Add(time.Duration(k)*time.Second)) + } + refresh() + if n, err := repo.PruneParquet(t.Context(), d, t0.Add(-time.Hour).UnixNano(), 100); err != nil || n == 0 { + t.Fatalf("prune: %d %v", n, err) + } + check("pruned before refresh") + refresh() + check("pruned") +} diff --git a/internal/observability/dependencies.go b/internal/observability/dependencies.go new file mode 100644 index 00000000..95328280 --- /dev/null +++ b/internal/observability/dependencies.go @@ -0,0 +1,129 @@ +package observability + +import ( + "context" + "fmt" + "strings" + "time" +) + +const DependenciesSchema = "fanout.dependencies.result@1" + +const dependencyDeadline = 20 * time.Second + +type DependencyOptions struct { + Service string + Direction string + MaxDepth int + MaxNodes int +} + +type DependencyNode struct { + Namespace string `json:"namespace"` + Service string `json:"service"` + Hops int `json:"hops"` +} + +type Dependencies struct { + Service string `json:"service"` + Direction string `json:"direction"` + Nodes []DependencyNode `json:"nodes"` + MaxDepth int `json:"max_depth"` + MaxNodes int `json:"max_nodes"` + Truncated bool `json:"truncated"` + DepthLimitReached bool `json:"depth_limit_reached"` + NodeLimitReached bool `json:"node_limit_reached"` +} + +// Keyed recursion retains one minimum-hop entry per namespace/service rather +// than every path through a cyclic graph. Admission caps the accumulated map, +// not merely the returned page. The complete scoped rollup is the edge source. +const dependencyQuery = ` +WITH RECURSIVE +settings AS (SELECT ?::VARCHAR AS root, ?::VARCHAR AS direction, ?::INTEGER AS depth, ?::INTEGER AS nodes), +edges AS MATERIALIZED ( + SELECT DISTINCT namespace, + CASE WHEN settings.direction='upstream' THEN callee ELSE caller END AS source, + CASE WHEN settings.direction='upstream' THEN caller ELSE callee END AS target + FROM edge_rollup, settings + WHERE bucket >= ? AND bucket < ? AND (?='' OR namespace=?) AND calls>0 +), +root_namespaces AS ( + SELECT namespace FROM edges,settings WHERE source=settings.root OR target=settings.root + UNION + SELECT namespace FROM service_rollup,settings + WHERE service=settings.root AND bucket >= ? AND bucket < ? AND (?='' OR namespace=?) +), +walk(namespace,service,hops) USING KEY(namespace,service) AS ( + SELECT namespace,settings.root,0 FROM root_namespaces,settings + QUALIFY row_number() OVER (ORDER BY namespace) <= settings.nodes + UNION + SELECT namespace,target,hops FROM ( + SELECT e.namespace,e.target,MIN(w.hops)+1 AS hops, + row_number() OVER (ORDER BY MIN(w.hops)+1,e.namespace,e.target) AS admission + FROM walk w JOIN edges e ON e.namespace=w.namespace AND e.source=w.service + LEFT JOIN recurring.walk seen ON seen.namespace=e.namespace AND seen.service=e.target + CROSS JOIN settings + WHERE seen.service IS NULL AND w.hops (SELECT count(*) FROM walk WHERE hops=0) AS truncated, + EXISTS(SELECT 1 FROM omitted WHERE hops >= (SELECT depth FROM settings)) AS depth_limit, + (SELECT count(*) FROM walk) >= (SELECT nodes FROM settings) AND + (EXISTS(SELECT 1 FROM omitted WHERE hops < (SELECT depth FROM settings)) OR (SELECT count(*) FROM root_namespaces) > (SELECT count(*) FROM walk WHERE hops=0)) AS node_limit +) +SELECT namespace,service,hops,truncated,depth_limit,node_limit +FROM walk CROSS JOIN bounds ORDER BY hops,namespace,service` + +func (s *Service) Dependencies(ctx context.Context, scope Scope, options DependencyOptions) (Result[Dependencies], error) { + // Materializing the full scoped edge set also needs a bound, independent of + // the accumulated node budget and the transport's caller deadline. + ctx, cancel := context.WithTimeout(ctx, dependencyDeadline) + defer cancel() + scope, err := s.normalizeScope(scope) + if err != nil { + return Result[Dependencies]{}, err + } + options.Service = strings.TrimSpace(options.Service) + if options.Direction == "" { + options.Direction = "downstream" + } + if options.MaxDepth == 0 { + options.MaxDepth = 8 + } + if options.MaxNodes == 0 { + options.MaxNodes = 100 + } + if options.Service == "" || len(options.Service) > 512 || (options.Direction != "upstream" && options.Direction != "downstream") || options.MaxDepth < 1 || options.MaxDepth > 32 || options.MaxNodes < 1 || options.MaxNodes > 500 { + return Result[Dependencies]{}, fmt.Errorf("%w: dependencies require a service, upstream/downstream direction, depth 1–32 and nodes 1–500", ErrInvalidScope) + } + rows, err := s.db.QueryContext(ctx, dependencyQuery, options.Service, options.Direction, options.MaxDepth, options.MaxNodes, + scope.Start, scope.End, scope.Namespace, scope.Namespace, scope.Start, scope.End, scope.Namespace, scope.Namespace) + if err != nil { + return Result[Dependencies]{}, fmt.Errorf("query dependencies: %w", err) + } + defer rows.Close() + data := Dependencies{Service: options.Service, Direction: options.Direction, MaxDepth: options.MaxDepth, MaxNodes: options.MaxNodes, Nodes: []DependencyNode{}} + for rows.Next() { + var node DependencyNode + if err := rows.Scan(&node.Namespace, &node.Service, &node.Hops, &data.Truncated, &data.DepthLimitReached, &data.NodeLimitReached); err != nil { + return Result[Dependencies]{}, fmt.Errorf("scan dependencies: %w", err) + } + data.Nodes = append(data.Nodes, node) + } + if err := rows.Err(); err != nil { + return Result[Dependencies]{}, err + } + provenance := s.provenanceFor(scope, "edge_rollup") + provenance.Complete = !data.Truncated + return Result[Dependencies]{Schema: DependenciesSchema, Summary: fmt.Sprintf("%d services in %s dependencies of %s", len(data.Nodes), data.Direction, data.Service), Data: data, Provenance: provenance}, nil +} diff --git a/internal/observability/dependencies_test.go b/internal/observability/dependencies_test.go new file mode 100644 index 00000000..f7718a07 --- /dev/null +++ b/internal/observability/dependencies_test.go @@ -0,0 +1,156 @@ +package observability + +import ( + "context" + "database/sql" + "errors" + "reflect" + "testing" + "time" + + "github.com/labstack/fanout/internal/query" + "github.com/labstack/fanout/internal/queryrows" +) + +func TestDependenciesKeyedTraversalIsBoundedAndScoped(t *testing.T) { + db, err := sql.Open("duckdb", "") + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { _ = db.Close() }) + if err := query.CreateTables(db); err != nil { + t.Fatal(err) + } + if err := query.CreateViews(db); err != nil { + t.Fatal(err) + } + start := time.Date(2026, 9, 30, 12, 0, 0, 0, time.UTC) + for _, edge := range []struct{ ns, a, b string }{ + {"prod", "a", "b"}, {"prod", "a", "c"}, {"prod", "b", "d"}, {"prod", "c", "d"}, {"prod", "d", "a"}, {"prod", "d", "e"}, + {"other", "b", "ghost"}, // This must not invent an a -> ghost path. + } { + if _, err := db.Exec("INSERT INTO edge_rollup (namespace,bucket,caller,callee,edge_type,calls,avg_ms,error_rate) VALUES (?,?,?,?,'call',1,1,0)", edge.ns, start, edge.a, edge.b); err != nil { + t.Fatal(err) + } + } + // A high-traffic edge outside the window must never participate. + if _, err := db.Exec("INSERT INTO edge_rollup (namespace,bucket,caller,callee,edge_type,calls,avg_ms,error_rate) VALUES ('prod',?,'a','old','call',1000000,1,0)", start.Add(-time.Hour)); err != nil { + t.Fatal(err) + } + svc := New(SQLDB(db), newTestRepository(t).Parquet, 30) + scope := Scope{Start: start, End: start.Add(time.Minute)} + for _, test := range []struct { + options DependencyOptions + want []DependencyNode + truncated, depth, node bool + }{ + {DependencyOptions{Service: "a"}, []DependencyNode{{"prod", "a", 0}, {"prod", "b", 1}, {"prod", "c", 1}, {"prod", "d", 2}, {"prod", "e", 3}}, false, false, false}, + {DependencyOptions{Service: "a", MaxDepth: 1}, []DependencyNode{{"prod", "a", 0}, {"prod", "b", 1}, {"prod", "c", 1}}, true, true, false}, + {DependencyOptions{Service: "a", MaxNodes: 2}, []DependencyNode{{"prod", "a", 0}, {"prod", "b", 1}}, true, false, true}, + {DependencyOptions{Service: "a", Direction: "upstream"}, []DependencyNode{{"prod", "a", 0}, {"prod", "d", 1}, {"prod", "b", 2}, {"prod", "c", 2}}, false, false, false}, + {DependencyOptions{Service: "absent"}, []DependencyNode{}, false, false, false}, + } { + result, err := svc.Dependencies(context.Background(), scope, test.options) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(result.Data.Nodes, test.want) || result.Data.Truncated != test.truncated || result.Data.DepthLimitReached != test.depth || result.Data.NodeLimitReached != test.node || result.Provenance.Complete == test.truncated { + t.Fatalf("%#v: %#v", test.options, result) + } + } + if _, err := svc.Dependencies(context.Background(), scope, DependencyOptions{Service: "a", MaxNodes: 501}); err == nil { + t.Fatal("unbounded traversal accepted") + } + // The cap includes roots in every namespace, even when a root has no edges. + if _, err := db.Exec("INSERT INTO service_rollup (namespace,bucket,service) VALUES ('aaa',?,'a')", start); err != nil { + t.Fatal(err) + } + rootCap, err := svc.Dependencies(context.Background(), scope, DependencyOptions{Service: "a", MaxNodes: 1}) + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(rootCap.Data.Nodes, []DependencyNode{{"aaa", "a", 0}}) || !rootCap.Data.NodeLimitReached || rootCap.Data.DepthLimitReached || !rootCap.Data.Truncated { + t.Fatalf("root admission cap: %#v", rootCap) + } + scope.Namespace = "aaa" + isolated, err := svc.Dependencies(context.Background(), scope, DependencyOptions{Service: "a", MaxNodes: 1}) + if err != nil { + t.Fatal(err) + } + if len(isolated.Data.Nodes) != 1 || isolated.Data.Truncated || !isolated.Provenance.Complete { + t.Fatalf("isolated root at exact cap: %#v", isolated) + } + scope.Namespace = "prod" + exact, err := svc.Dependencies(context.Background(), scope, DependencyOptions{Service: "a", MaxDepth: 3, MaxNodes: 5}) + if err != nil { + t.Fatal(err) + } + if exact.Data.Truncated || len(exact.Data.Nodes) != 5 { + t.Fatalf("complete graph at exact cap: %#v", exact) + } + depthOnly, err := svc.Dependencies(context.Background(), scope, DependencyOptions{Service: "a", MaxDepth: 1, MaxNodes: 3}) + if err != nil { + t.Fatal(err) + } + if !depthOnly.Data.Truncated || !depthOnly.Data.DepthLimitReached || depthOnly.Data.NodeLimitReached { + t.Fatalf("depth exhaustion at exact node cap: %#v", depthOnly) + } + both, err := svc.Dependencies(context.Background(), scope, DependencyOptions{Service: "a", MaxDepth: 1, MaxNodes: 2}) + if err != nil { + t.Fatal(err) + } + if !both.Data.Truncated || !both.Data.DepthLimitReached || !both.Data.NodeLimitReached { + t.Fatalf("independent depth and node exhaustion: %#v", both) + } + // A later shorter path must yield its minimum hop count, not a path count. + if _, err := db.Exec("INSERT INTO edge_rollup (namespace,bucket,caller,callee,calls) VALUES ('prod',?,'a','e',1)", start); err != nil { + t.Fatal(err) + } + shortest, err := svc.Dependencies(context.Background(), scope, DependencyOptions{Service: "a"}) + if err != nil { + t.Fatal(err) + } + for _, node := range shortest.Data.Nodes { + if node.Service == "e" && node.Hops != 1 { + t.Fatalf("minimum hop count: %#v", node) + } + } +} + +type dependencyQueryProbe func(context.Context) (queryrows.Rows, error) + +func (p dependencyQueryProbe) QueryContext(ctx context.Context, _ string, _ ...any) (queryrows.Rows, error) { + return p(ctx) +} + +func TestDependenciesDeadlineAndCancellation(t *testing.T) { + scope := Scope{Start: time.Now().Add(-time.Minute), End: time.Now()} + var queryCtx context.Context + probeErr := errors.New("probe") + svc := New(dependencyQueryProbe(func(ctx context.Context) (queryrows.Rows, error) { + queryCtx = ctx + deadline, ok := ctx.Deadline() + if !ok || time.Until(deadline) <= 0 || time.Until(deadline) > dependencyDeadline { + t.Fatal("dependency query lacks a bounded service deadline") + } + return nil, probeErr + }), newTestRepository(t).Parquet, 30) + if _, err := svc.Dependencies(context.Background(), scope, DependencyOptions{Service: "a"}); !errors.Is(err, probeErr) { + t.Fatalf("query error lost: %v", err) + } + if queryCtx.Err() != context.Canceled { + t.Fatal("service did not cancel its query context on exit") + } + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) + defer cancel() + svc.db = dependencyQueryProbe(func(queryCtx context.Context) (queryrows.Rows, error) { + if deadline, _ := queryCtx.Deadline(); time.Until(deadline) > 10*time.Millisecond { + t.Fatal("service extended its caller's deadline") + } + <-queryCtx.Done() + return nil, queryCtx.Err() + }) + if _, err := svc.Dependencies(ctx, scope, DependencyOptions{Service: "a"}); !errors.Is(err, context.DeadlineExceeded) { + t.Fatalf("cancellation was not propagated: %v", err) + } +} diff --git a/internal/observability/latency_read_test.go b/internal/observability/latency_read_test.go index 67f65218..938d5aab 100644 --- a/internal/observability/latency_read_test.go +++ b/internal/observability/latency_read_test.go @@ -157,7 +157,7 @@ func TestEndpointDurationBucketsAreConsistent(t *testing.T) { // The query reads these counts positionally, so its SELECT list has to be // this list — a reordering would report one bucket's count against // another's boundary and quietly shift every percentile. - if !strings.Contains(endpointRollupQuery, endpointDurationColumns()) { + if !strings.Contains(completedEndpointsQuery, endpointDurationColumns()) { t.Fatalf("the rollup query does not select %q in order", endpointDurationColumns()) } } diff --git a/internal/observability/logs.go b/internal/observability/logs.go index 9fad8200..4a240dde 100644 --- a/internal/observability/logs.go +++ b/internal/observability/logs.go @@ -5,32 +5,36 @@ import ( "fmt" "strings" "time" + + "github.com/labstack/fanout/internal/queryrows" ) var logFilters = ` -WHERE time >= ? AND time < ? +WHERE time >= ?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND time < ?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND (? = '' OR namespace = ?) AND (? = '' OR service = ?) AND (? = '' OR lower(severity) = lower(?)) AND (? = '' OR contains(lower(` + redactLogBodySQL("body") + `), lower(?)))` // DuckDB answers the two questions the API asks: the newest `limit` entries -// and per-bucket counts. LIMIT bounds the entry stream and GROUP BY bounds the -// histogram stream regardless of the retained Parquet row count. +// and per-bucket counts. LIMIT and GROUP BY bound the response size. Both +// statements use the event-time file snapshot. Histograms without a text +// search merge completed minutes with exact boundary and uncached-file +// contributions; text searches count matching redacted rows. // // Redaction runs outside the LIMIT, and that placement is the whole cost of // this query. A projection in the same SELECT as ORDER BY ... LIMIT is // evaluated below the top-N operator, so four chained regexp_replace ran over // every row in the window to return a hundred: measured at 140ms for a page of // 100 out of 372,000 rows, and 347ms with four DuckDB threads, against 8ms -// once the top-N runs first. It was the one statement here whose cost grew -// with retained rows rather than with the answer. +// once the top-N runs first. This bounds redaction work for entry retrieval; +// search predicates and histogram aggregation still process matching rows. // // The search predicate stays inside, on purpose: a search has to match what // the reader will be shown, so it matches the redacted text. It is skipped // entirely when no search term is given. var logEntriesQuery = ` -SELECT time, severity, service, ` + redactLogBodySQL("body") + `, trace_id, span_id +SELECT time::TIMESTAMP_NS, severity, service, ` + redactLogBodySQL("body") + `, trace_id, span_id FROM ( SELECT time, severity, coalesce(service, '') AS service, body, coalesce(trace_id, '') AS trace_id, coalesce(span_id, '') AS span_id @@ -41,7 +45,7 @@ FROM ( ORDER BY time DESC` var logBucketsQueryTemplate = ` -SELECT time_bucket(INTERVAL '%s', time) AS point_time, +SELECT time_bucket(INTERVAL '%s', time::TIMESTAMP_NS) AS point_time, coalesce(nullif(upper(severity), ''), 'UNSPECIFIED') AS bucket_severity, CAST(count(*) AS BIGINT) FROM logs` + logFilters + ` @@ -63,6 +67,7 @@ func (s *Service) Logs(ctx context.Context, scope Scope, service, severity, sear } service, severity, search = strings.TrimSpace(service), strings.TrimSpace(severity), strings.TrimSpace(search) search = strings.ToLower(search) + ctx = queryrows.WithWindow(ctx, queryrows.Window{Start: scope.Start, End: scope.End, Namespace: scope.Namespace, Service: service}) data := Logs{Entries: []LogEntry{}, Buckets: []LogBucket{}} filters := []any{scope.Start, scope.End, scope.Namespace, scope.Namespace, service, service, severity, severity, search, search} rows, err := s.db.QueryContext(ctx, logEntriesQuery, append(append([]any{}, filters...), limit)...) @@ -87,7 +92,12 @@ func (s *Service) Logs(ctx context.Context, scope Scope, service, severity, sear rows.Close() matched := 0 - bucketRows, err := s.db.QueryContext(ctx, logBucketsSQL(scope.End.Sub(scope.Start)), filters...) + histogramQuery := logBucketsSQL(scope.End.Sub(scope.Start)) + if reader, ok := s.db.(queryrows.BatchReader); ok && reader.CompletedBatchReads() && search == "" { + ctx = queryrows.WithWindow(ctx, queryrows.Window{Start: scope.Start, End: scope.End, Namespace: scope.Namespace, Service: service, Kind: queryrows.LogHistogramRead}) + histogramQuery = logMinuteBucketsSQL(scope.End.Sub(scope.Start)) + } + bucketRows, err := s.db.QueryContext(ctx, histogramQuery, filters...) if err != nil { return Result[Logs]{}, fmt.Errorf("query log histogram: %w", err) } @@ -111,3 +121,16 @@ func (s *Service) Logs(ctx context.Context, scope Scope, service, severity, sear Data: data, Provenance: s.provenanceFor(scope, "parquet"), }, nil } + +func logMinuteBucketsSQL(window time.Duration) string { + return fmt.Sprintf(`WITH counts AS ( + SELECT bucket AS time, severity, namespace, service, count FROM log_minutes + UNION ALL + SELECT date_trunc('minute',time::TIMESTAMP_NS), coalesce(severity,''), namespace, service, sum(count)::BIGINT FROM log_tail + WHERE time>= $1::TIMESTAMP_NS::TIMESTAMPTZ_NS AND time<$2::TIMESTAMP_NS::TIMESTAMPTZ_NS + GROUP BY 1,2,3,4 + ) SELECT time_bucket(INTERVAL '%s',time::TIMESTAMP_NS) AS point_time, + coalesce(nullif(upper(severity),''),'UNSPECIFIED') AS bucket_severity, sum(count)::BIGINT + FROM counts WHERE ($3='' OR namespace=$4) AND ($5='' OR service=$6) AND ($7='' OR lower(severity)=lower($8)) + AND ($9='' AND $10='') GROUP BY point_time,bucket_severity ORDER BY point_time,bucket_severity`, timelineBucketWidth(window)) +} diff --git a/internal/observability/performance.go b/internal/observability/performance.go index cf2fb8fb..cc6e33f3 100644 --- a/internal/observability/performance.go +++ b/internal/observability/performance.go @@ -3,12 +3,11 @@ package observability import ( "context" "fmt" - "log/slog" "math" "strings" "time" - "github.com/labstack/fanout/internal/query" + "github.com/labstack/fanout/internal/queryrows" ) var performancePointsQueryTemplate = ` @@ -35,68 +34,17 @@ SELECT COALESCE(approx_quantile(duration_ms, 0.99), 0) AS p99_ms, COALESCE(AVG(CASE WHEN upper(status) IN ('ERROR', 'STATUS_CODE_ERROR') THEN 1.0 ELSE 0.0 END), 0) AS error_rate FROM spans -WHERE start_time >= ? AND start_time < ? AND (? = '' OR namespace = ?) AND (? = '' OR service = ?) +WHERE start_time >= ?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND start_time < ?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND (? = '' OR namespace = ?) AND (? = '' OR service = ?) GROUP BY method, path ORDER BY calls DESC, p95_ms DESC LIMIT ?` -const endpointRollupStatusQuery = ` -SELECT - COALESCE(MAX(CASE WHEN cache_key = '` + query.EndpointReadyStateKey + `' THEN last_ingested_unix_nano END), 0) != 0 - AND COALESCE(MAX(CASE WHEN cache_key = '` + query.EndpointDisabledStateKey + `' THEN last_ingested_unix_nano END), 0) = 0 AS ready, - COALESCE(MAX(CASE WHEN cache_key = '` + query.EndpointRollupStateKey + `' THEN last_ingested_unix_nano END), 0)::BIGINT AS watermark -FROM rollup_state` - -const endpointRollupMatureQuery = ` -SELECT COUNT(*) >= 5 -FROM (SELECT DISTINCT bucket FROM endpoint_rollup LIMIT 5)` - -// endpointInteriorBounds returns the half-open minute range the rollup cache -// answers for, given the requested window and the cache's watermark. -// -// The interior starts at the first whole minute inside the window — a window -// that begins mid-minute has a partial minute the cache cannot answer — and -// ends at the earlier of the window's last whole minute and the watermark's, -// because the cache knows nothing past what it has rolled up. Raw spans cover -// everything outside that range. -func endpointInteriorBounds(start, end, watermark time.Time) (interiorStart, interiorEnd time.Time) { - interiorStart = start.Truncate(time.Minute) - if !interiorStart.Equal(start) { - interiorStart = interiorStart.Add(time.Minute) - } - interiorEnd = end.Truncate(time.Minute) - if rolled := watermark.Truncate(time.Minute); rolled.Before(interiorEnd) { - interiorEnd = rolled - } - return interiorStart, interiorEnd -} - -// endpointRollupQuery uses the minute cache only through its current watermark. -// Raw spans cover both partial boundary minutes and any newer complete minutes, -// so the cache lag cannot appear as zero traffic. -// -// The interior bounds are computed in Go and bound as parameters rather than -// derived in a CTE. They read the same either way, but a bound derived from a -// joined row is not a constant DuckDB can push into the Parquet scan: the -// boundary exclusion below was applied after reading the window, so a query -// that wants the two partial minutes at its edges read every row between them — -// measured at 799,333 rows scanned out of 800,000 to return 7,333. Bound -// directly, the same filter prunes to 11,333 rows read. -// -// The raw half is bounded by the cache being current, not by this query. When -// the watermark sits behind the window the interior is empty, the boundary -// predicate admits everything, and the scan reads the whole window — which is -// correct, and is the case worth watching after an outage or a first run. -var endpointRollupQuery = ` -WITH rollup_source AS ( - SELECT e.method, e.path, e.calls, e.error_count, e.duration_count, e.duration_buckets - FROM endpoint_rollup e - WHERE e.bucket >= ? - AND e.bucket < ? - AND (? = '' OR e.namespace = ?) - AND (? = '' OR e.service = ?) -), -boundary_source AS ( +// Completed minutes and the uncached/partial-minute tail are disjoint. Their +// histogram counts merge without weighting precomputed percentiles. +var completedEndpointsQuery = `WITH rollup_source AS ( + SELECT method,path,calls,error_count,duration_count,duration_buckets FROM endpoint_minutes + WHERE ($3='' OR namespace=$4) AND ($5='' OR service=$6) +), boundary_source AS ( SELECT COALESCE(NULLIF(s.http_method, ''), 'CALL') AS method, COALESCE(NULLIF(s.http_route, ''), NULLIF(s.operation, ''), 'unknown') AS path, @@ -122,12 +70,9 @@ boundary_source AS ( le_30000 := COUNT(*) FILTER (WHERE s.duration_ms <= 30000), le_300000 := COUNT(*) FILTER (WHERE s.duration_ms <= 300000) ) AS duration_buckets - FROM spans s - WHERE s.start_time >= ? - AND s.start_time < ? - AND (s.start_time < ? OR s.start_time >= ?) - AND (? = '' OR s.namespace = ?) - AND (? = '' OR COALESCE(s.service, '') = ?) + FROM endpoint_tail s + WHERE s.start_time>=$1::TIMESTAMP_NS::TIMESTAMPTZ_NS AND s.start_time<$2::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND ($3='' OR s.namespace=$4) AND ($5='' OR coalesce(s.service,'')=$6) GROUP BY method, path ), sources AS ( @@ -171,7 +116,7 @@ SELECT ` + endpointDurationColumns() + ` FROM endpoint_totals t ORDER BY t.calls DESC, (t.duration_count - le_100) DESC, t.method, t.path -LIMIT ?` +LIMIT $7` var performanceHeatmapQueryTemplate = ` SELECT time_bucket(INTERVAL '%s', bucket) AS point_time, service, ` + windowP95SQL + ` @@ -227,6 +172,7 @@ func (s *Service) Performance(ctx context.Context, scope Scope, opts Performance return Result[Performance]{}, err } service = strings.TrimSpace(service) + ctx = queryrows.WithWindow(ctx, queryrows.Window{Start: scope.Start, End: scope.End, Namespace: scope.Namespace, Service: service}) window := scope.End.Sub(scope.Start) data := Performance{Service: service, Points: []PerformancePoint{}, Endpoints: []Endpoint{}, Heatmap: []HeatmapPoint{}, Comparison: []ComparisonMetric{}} @@ -304,28 +250,17 @@ func (s *Service) Performance(ctx context.Context, scope Scope, opts Performance } func (s *Service) queryEndpoints(ctx context.Context, scope Scope, service string, limit int) ([]Endpoint, string, error) { - ready, watermark, err := s.endpointCacheState(ctx) - if err != nil { - // The endpoint cache is an optimization. A transient local-state probe - // failure must not take down the raw-span query path. - slog.Warn("endpoint rollup state unavailable; using raw spans", "err", err) - ready = false - } - - query := rawEndpointsQuery - args := []any{scope.Start, scope.End, scope.Namespace, scope.Namespace, service, service, limit} + reader, histogram := s.db.(queryrows.BatchReader) + histogram = histogram && reader.CompletedBatchReads() + statement := rawEndpointsQuery source := "spans" - if ready { - query = endpointRollupQuery - interiorStart, interiorEnd := endpointInteriorBounds(scope.Start, scope.End, watermark) - args = []any{ - interiorStart, interiorEnd, scope.Namespace, scope.Namespace, service, service, - scope.Start, scope.End, interiorStart, interiorEnd, scope.Namespace, scope.Namespace, service, service, - limit, - } - source = "endpoint_rollup + raw spans (interpolated histogram percentiles)" + if histogram { + statement = completedEndpointsQuery + source = "completed batch histograms + uncached spans and partial minutes" + ctx = queryrows.WithWindow(ctx, queryrows.Window{Start: scope.Start, End: scope.End, Namespace: scope.Namespace, Service: service, Kind: queryrows.EndpointRead}) } - rows, err := s.db.QueryContext(ctx, query, args...) + args := []any{scope.Start, scope.End, scope.Namespace, scope.Namespace, service, service, limit} + rows, err := s.db.QueryContext(ctx, statement, args...) if err != nil { return nil, "", fmt.Errorf("query endpoints: %w", err) } @@ -334,7 +269,7 @@ func (s *Service) queryEndpoints(ctx context.Context, scope Scope, service strin endpoints := make([]Endpoint, 0) for rows.Next() { var endpoint Endpoint - if ready { + if histogram { var total float64 cumulative := make([]float64, len(endpointDurationBuckets)) targets := []any{&endpoint.Method, &endpoint.Path, &endpoint.Calls, &endpoint.ErrorRate, &total} @@ -368,7 +303,7 @@ func (s *Service) queryEndpoints(ctx context.Context, scope Scope, service strin // it here, would go on compiling and quietly report one bucket's count against // another's boundary. Percentiles would shift and nothing would look broken. // The boundaries themselves must stay in step with the histogram the rollup -// writes (endpointRollupInsertSQL, in internal/query). Nothing here can check +// writes (endpointBatchSelect, in internal/query). Nothing here can check // that at compile time; TestEndpointRollupQueryMergesBucketsAndExactBoundaries // is what catches a drift, because it fills a real rollup row by column name // and reads the percentiles back out. @@ -428,55 +363,6 @@ func histogramQuantile(cumulative []float64, total, quantile float64) float64 { return endpointDurationBuckets[len(endpointDurationBuckets)-1].Bound } -func (s *Service) endpointCacheState(ctx context.Context) (bool, time.Time, error) { - rows, err := s.db.QueryContext(ctx, endpointRollupStatusQuery) - if err != nil { - return false, time.Time{}, err - } - var ready bool - var watermarkNanos int64 - if rows.Next() { - if err := rows.Scan(&ready, &watermarkNanos); err != nil { - rows.Close() - return false, time.Time{}, err - } - } - if err := rows.Err(); err != nil { - rows.Close() - return false, time.Time{}, err - } - rows.Close() - if !ready || watermarkNanos <= 0 { - return false, time.Time{}, nil - } - watermark := time.Unix(0, watermarkNanos).UTC() - if s.endpointMature.Load() { - return true, watermark, nil - } - - // On a brand-new/hot dataset, fewer than five cached minutes cannot offset - // the wider histogram aggregation. Stay on the simpler raw query until the - // cache is large enough to replace meaningful work, then remember that fact. - rows, err = s.db.QueryContext(ctx, endpointRollupMatureQuery) - if err != nil { - return false, time.Time{}, err - } - defer rows.Close() - var mature bool - if rows.Next() { - if err := rows.Scan(&mature); err != nil { - return false, time.Time{}, err - } - } - if err := rows.Err(); err != nil { - return false, time.Time{}, err - } - if mature { - s.endpointMature.Store(true) - } - return mature, watermark, nil -} - type performanceAggregate struct { Spans float64 ServedSpans float64 diff --git a/internal/observability/performance_heatmap_test.go b/internal/observability/performance_heatmap_test.go index c3406bb4..755ad157 100644 --- a/internal/observability/performance_heatmap_test.go +++ b/internal/observability/performance_heatmap_test.go @@ -30,16 +30,12 @@ CREATE TABLE service_rollup ( )`); err != nil { t.Fatal(err) } - // queryEndpoints reads both the rollup and raw spans at the window edges. + // The mutable query-kernel fixture reads endpoint spans directly. if _, err := db.Exec(` -CREATE TABLE endpoint_rollup ( - bucket TIMESTAMP, namespace VARCHAR, service VARCHAR, method VARCHAR, path VARCHAR, - calls BIGINT, error_rate DOUBLE, p50_ms DOUBLE, p95_ms DOUBLE, p99_ms DOUBLE -); CREATE TABLE spans ( namespace VARCHAR, service VARCHAR, operation VARCHAR, kind VARCHAR, status VARCHAR, http_method VARCHAR, http_route VARCHAR, - duration_ms DOUBLE, start_time TIMESTAMP, attributes_json VARCHAR + duration_ms DOUBLE, start_time TIMESTAMPTZ_NS, attributes VARIANT )`); err != nil { t.Fatal(err) } diff --git a/internal/observability/performance_rollup_test.go b/internal/observability/performance_rollup_test.go index 8e5adc93..555c36ed 100644 --- a/internal/observability/performance_rollup_test.go +++ b/internal/observability/performance_rollup_test.go @@ -3,6 +3,7 @@ package observability import ( "context" "database/sql" + "fmt" "math" "testing" "time" @@ -42,8 +43,8 @@ func TestEndpointRollupQueryMergesBucketsAndExactBoundaries(t *testing.T) { {start.Truncate(time.Minute), "(300000.0)", 1}, {end.Truncate(time.Minute), "(300000.0)", 1}, } { - q := `INSERT INTO endpoint_rollup -SELECT 'prod', ?, 'checkout', 'GET', '/pay', COUNT(*), ?, COUNT(ms), struct_pack( + q := `INSERT INTO read_endpoints +SELECT 'cached', 'prod', ?, 'checkout', 'GET', '/pay', COUNT(*), ?, COUNT(ms), struct_pack( le_0_1 := COUNT(*) FILTER (WHERE ms <= 0.1), le_0_5 := COUNT(*) FILTER (WHERE ms <= 0.5), le_1 := COUNT(*) FILTER (WHERE ms <= 1), le_2_5 := COUNT(*) FILTER (WHERE ms <= 2.5), le_5 := COUNT(*) FILTER (WHERE ms <= 5), le_10 := COUNT(*) FILTER (WHERE ms <= 10), @@ -56,7 +57,7 @@ SELECT 'prod', ?, 'checkout', 'GET', '/pay', COUNT(*), ?, COUNT(ms), struct_pack ) FROM (VALUES ` + seed.values + `) t(ms)` if _, err := db.Exec(q, seed.bucket, seed.errors); err != nil { - t.Fatalf("seed endpoint_rollup: %v", err) + t.Fatalf("seed read_endpoints: %v", err) } } // Include raw rows for every minute. The query must use raw rows for the two @@ -80,24 +81,22 @@ FROM (VALUES ` + seed.values + `) t(ms)` ); err != nil { t.Fatalf("seed spans: %v", err) } - // The cache watermark is within the second interior minute. That entire - // minute and everything newer must come from raw spans, not disappear while - // waiting for the next rollup pass. - watermark := start.Truncate(time.Minute).Add(2*time.Minute + 30*time.Second) - if _, err := db.Exec(`INSERT INTO rollup_state VALUES -(?, 1, now()), -(?, ?, now())`, query.EndpointReadyStateKey, query.EndpointRollupStateKey, watermark.UnixNano()); err != nil { - t.Fatalf("seed endpoint rollup state: %v", err) + interiorStart := start.Truncate(time.Minute).Add(time.Minute) + interiorEnd := end.Truncate(time.Minute) + // Views in this kernel test stand in for the production AST-bound relations. + if _, err := db.Exec(fmt.Sprintf(`CREATE VIEW endpoint_minutes AS SELECT * EXCLUDE(batch_id) FROM read_endpoints WHERE bucket>=TIMESTAMP '%s' AND bucket=TIMESTAMPTZ_NS '%s'`, interiorStart.Format("2006-01-02 15:04:05+00"), interiorEnd.Format("2006-01-02 15:04:05+00"))); err != nil { + t.Fatal(err) + } + svc := New(completedReadDB{SQLDB(db)}, newTestRepository(t).Parquet, 30) var cachedCalls, totalCachedCalls int64 var minBucket, maxBucket time.Time - if err := db.QueryRow(`SELECT COALESCE(SUM(calls), 0)::BIGINT, MIN(bucket), MAX(bucket) FROM endpoint_rollup`).Scan(&totalCachedCalls, &minBucket, &maxBucket); err != nil { + if err := db.QueryRow(`SELECT COALESCE(SUM(calls), 0)::BIGINT, MIN(bucket), MAX(bucket) FROM read_endpoints`).Scan(&totalCachedCalls, &minBucket, &maxBucket); err != nil { t.Fatalf("query all cached calls: %v", err) } - if err := db.QueryRow(`SELECT COALESCE(SUM(calls), 0)::BIGINT FROM endpoint_rollup + if err := db.QueryRow(`SELECT COALESCE(SUM(calls), 0)::BIGINT FROM read_endpoints WHERE bucket >= ? AND bucket < ? AND namespace = 'prod' AND service = 'checkout'`, start.Truncate(time.Minute).Add(time.Minute), end.Truncate(time.Minute)).Scan(&cachedCalls); err != nil { t.Fatalf("query cached calls: %v", err) @@ -109,7 +108,7 @@ WHERE bucket >= ? AND bucket < ? AND namespace = 'prod' AND service = 'checkout' if err != nil { t.Fatalf("queryEndpoints: %v", err) } - if source != "endpoint_rollup + raw spans (interpolated histogram percentiles)" || len(got) != 1 { + if source != "completed batch histograms + uncached spans and partial minutes" || len(got) != 1 { t.Fatalf("queryEndpoints = (%#v, %q), want one rollup endpoint", got, source) } endpoint := got[0] @@ -128,14 +127,4 @@ WHERE bucket >= ? AND bucket < ? AND namespace = 'prod' AND service = 'checkout' t.Fatalf("error rate = %v, want %v", endpoint.ErrorRate, 2.0/6.0) } - if _, err := db.Exec(`INSERT INTO rollup_state VALUES (?, 1, now())`, query.EndpointDisabledStateKey); err != nil { - t.Fatalf("disable endpoint rollup: %v", err) - } - ready, _, err := svc.endpointCacheState(context.Background()) - if err != nil { - t.Fatalf("endpointCacheState after disable: %v", err) - } - if ready { - t.Fatal("endpointCacheState returned ready for a disabled cache") - } } diff --git a/internal/observability/performance_test.go b/internal/observability/performance_test.go index ea3e84f0..5ad3f4ef 100644 --- a/internal/observability/performance_test.go +++ b/internal/observability/performance_test.go @@ -3,63 +3,10 @@ package observability import ( "strings" "testing" - "time" ) -// The interior range is what the rollup cache can answer for. A window that -// starts mid-minute has a partial minute the cache does not hold, and the cache -// knows nothing past its own watermark — raw spans cover both edges. -func TestEndpointInteriorBounds(t *testing.T) { - minute := func(s string) time.Time { - at, err := time.Parse(time.RFC3339Nano, s) - if err != nil { - t.Fatal(err) - } - return at - } - for _, tc := range []struct { - name string - start, end, watermark time.Time - wantStart, wantEnd time.Time - }{ - { - name: "a window on minute boundaries with a fresh cache is entirely interior", - start: minute("2026-09-08T10:00:00Z"), end: minute("2026-09-08T11:00:00Z"), watermark: minute("2026-09-08T11:00:00Z"), - wantStart: minute("2026-09-08T10:00:00Z"), wantEnd: minute("2026-09-08T11:00:00Z"), - }, - { - name: "a mid-minute start leaves its partial minute to raw spans", - start: minute("2026-09-08T10:00:30Z"), end: minute("2026-09-08T11:00:00Z"), watermark: minute("2026-09-08T11:00:00Z"), - wantStart: minute("2026-09-08T10:01:00Z"), wantEnd: minute("2026-09-08T11:00:00Z"), - }, - { - name: "a lagging watermark ends the interior early", - start: minute("2026-09-08T10:00:00Z"), end: minute("2026-09-08T11:00:00Z"), watermark: minute("2026-09-08T10:42:30Z"), - wantStart: minute("2026-09-08T10:00:00Z"), wantEnd: minute("2026-09-08T10:42:00Z"), - }, - { - name: "a watermark behind the window leaves no interior at all", - start: minute("2026-09-08T10:00:00Z"), end: minute("2026-09-08T11:00:00Z"), watermark: minute("2026-09-08T09:00:00Z"), - wantStart: minute("2026-09-08T10:00:00Z"), wantEnd: minute("2026-09-08T09:00:00Z"), - }, - } { - t.Run(tc.name, func(t *testing.T) { - gotStart, gotEnd := endpointInteriorBounds(tc.start, tc.end, tc.watermark) - if !gotStart.Equal(tc.wantStart) || !gotEnd.Equal(tc.wantEnd) { - t.Fatalf("bounds = %s..%s, want %s..%s", gotStart, gotEnd, tc.wantStart, tc.wantEnd) - } - }) - } -} - -// The boundary scan must bind its bounds directly: a bound derived from a -// joined row is not a constant DuckDB can push into the Parquet scan, which is -// what made a two-minute question read the whole window. -func TestEndpointRollupQueryBindsBoundsDirectly(t *testing.T) { - if strings.Contains(endpointRollupQuery, "bounds b") || strings.Contains(endpointRollupQuery, "FROM params") { - t.Fatal("the query still derives its bounds from a CTE join; the scan filter cannot be pushed") - } - if !strings.Contains(endpointRollupQuery, "s.start_time < ? OR s.start_time >= ?") { - t.Fatal("the boundary exclusion is no longer expressed against bound parameters") +func TestCompletedEndpointQueryBindsEventWindowDirectly(t *testing.T) { + if !strings.Contains(completedEndpointsQuery, "s.start_time>=$1::TIMESTAMP_NS::TIMESTAMPTZ_NS") { + t.Fatal("missing direct event-time predicate") } } diff --git a/internal/observability/redact.go b/internal/observability/redact.go index f7a5145e..34861713 100644 --- a/internal/observability/redact.go +++ b/internal/observability/redact.go @@ -12,7 +12,7 @@ import ( // Coverage boundary: redaction is applied ONLY to log body fields on the // read path — Logs entries, trace-correlated logs, and the SQL-side search // filter built from these same patterns (see redactLogBodySQL). Span -// status_message, span/log attributes JSON, and all on-disk data are NOT +// status_message, span/log attributes, and all on-disk data are NOT // redacted. // // The patterns are exported string constants (not just compiled regexps) so diff --git a/internal/observability/service.go b/internal/observability/service.go index 7adc7b7a..cd1e9eb2 100644 --- a/internal/observability/service.go +++ b/internal/observability/service.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "strings" - "sync/atomic" "time" appid "github.com/labstack/fanout/internal/id" @@ -32,11 +31,10 @@ type traceReader interface { } type Service struct { - db DB - repository traceReader - maxWindow time.Duration - now func() time.Time - endpointMature atomic.Bool + db DB + repository traceReader + maxWindow time.Duration + now func() time.Time } func New(db DB, repository traceReader, retentionDays int) *Service { diff --git a/internal/observability/service_test.go b/internal/observability/service_test.go index e4d36bb9..1fbd18c3 100644 --- a/internal/observability/service_test.go +++ b/internal/observability/service_test.go @@ -198,7 +198,7 @@ func TestTopologyUsesSharedNodesAndTypedEdges(t *testing.T) { func TestPerformanceReturnsAllVisualizationDatasets(t *testing.T) { svc, mock, _ := newMockService(t) - svc.endpointMature.Store(true) + svc.db = completedReadDB{svc.db} start := time.Date(2026, 7, 20, 11, 0, 0, 0, time.UTC) end := start.Add(time.Hour) midpoint := start.Add(30 * time.Minute) @@ -207,8 +207,6 @@ func TestPerformanceReturnsAllVisualizationDatasets(t *testing.T) { WithArgs(start, end, "prod", "prod", "checkout", "checkout"). WillReturnRows(sqlmock.NewRows([]string{"point_time", "spans", "error_rate", "p50_ms", "p95_ms", "log_count", "metric_count"}). AddRow(start, int64(120), 0.10, 80.0, 220.0, int64(30), int64(8))) - mock.ExpectQuery(regexp.QuoteMeta(endpointRollupStatusQuery)). - WillReturnRows(sqlmock.NewRows([]string{"ready", "watermark"}).AddRow(true, end.UnixNano())) // The rollup path returns cumulative histogram counts and the percentiles // are interpolated from them; 50 calls all at or under 250ms put p95 inside // the 100–250ms bucket. @@ -220,15 +218,8 @@ func TestPerformanceReturnsAllVisualizationDatasets(t *testing.T) { for _, bucket := range endpointDurationBuckets { endpointColumns = append(endpointColumns, bucket.Column) } - // The interior bounds are computed in Go now, so the cache range and the - // boundary exclusion arrive as parameters DuckDB can push into the scan. - interiorStart, interiorEnd := endpointInteriorBounds(start, end, end) - mock.ExpectQuery(regexp.QuoteMeta(endpointRollupQuery)). - WithArgs( - interiorStart, interiorEnd, "prod", "prod", "checkout", "checkout", - start, end, interiorStart, interiorEnd, "prod", "prod", "checkout", "checkout", - 25, - ). + mock.ExpectQuery(regexp.QuoteMeta(completedEndpointsQuery)). + WithArgs(start, end, "prod", "prod", "checkout", "checkout", 25). WillReturnRows(sqlmock.NewRows(endpointColumns).AddRow(endpointCounts...)) mock.ExpectQuery(regexp.QuoteMeta(performanceHeatmapSQL(time.Hour))). WithArgs(start, end, "prod", "prod", start, end, "prod", "prod"). @@ -266,37 +257,11 @@ func TestPerformanceReturnsAllVisualizationDatasets(t *testing.T) { } } -func TestQueryEndpointsFallsBackToRawUntilBackfillReady(t *testing.T) { - svc, mock, _ := newMockService(t) - start := time.Date(2026, 7, 20, 11, 0, 0, 0, time.UTC) - end := start.Add(time.Hour) - - mock.ExpectQuery(regexp.QuoteMeta(endpointRollupStatusQuery)). - WillReturnRows(sqlmock.NewRows([]string{"ready", "watermark"}).AddRow(false, int64(0))) - mock.ExpectQuery(regexp.QuoteMeta(rawEndpointsQuery)). - WithArgs(start, end, "prod", "prod", "checkout", "checkout", 25). - WillReturnRows(sqlmock.NewRows([]string{"method", "path", "calls", "p50_ms", "p95_ms", "p99_ms", "error_rate"}). - AddRow("GET", "/pay", int64(2), 10.0, 20.0, 25.0, 0.0)) - - endpoints, source, err := svc.queryEndpoints(context.Background(), Scope{Namespace: "prod", Start: start, End: end}, "checkout", 25) - if err != nil { - t.Fatalf("queryEndpoints: %v", err) - } - if source != "spans" || len(endpoints) != 1 { - t.Fatalf("queryEndpoints = (%#v, %q), want one raw endpoint", endpoints, source) - } - if err := mock.ExpectationsWereMet(); err != nil { - t.Fatal(err) - } -} - -func TestQueryEndpointsFallsBackToRawWhenRollupProbeFails(t *testing.T) { +func TestQueryEndpointsOnMutableSQLDB(t *testing.T) { svc, mock, _ := newMockService(t) start := time.Date(2026, 7, 20, 11, 0, 0, 0, time.UTC) end := start.Add(time.Hour) - mock.ExpectQuery(regexp.QuoteMeta(endpointRollupStatusQuery)). - WillReturnError(errors.New("rollup state temporarily unavailable")) mock.ExpectQuery(regexp.QuoteMeta(rawEndpointsQuery)). WithArgs(start, end, "prod", "prod", "checkout", "checkout", 25). WillReturnRows(sqlmock.NewRows([]string{"method", "path", "calls", "p50_ms", "p95_ms", "p99_ms", "error_rate"}). @@ -681,3 +646,7 @@ func TestLogsBoundsParquetQueryWithLimitAndAggregatedBuckets(t *testing.T) { t.Fatal(err) } } + +type completedReadDB struct{ DB } + +func (completedReadDB) CompletedBatchReads() bool { return true } diff --git a/internal/observability/trace.go b/internal/observability/trace.go index 745a1467..62d27f38 100644 --- a/internal/observability/trace.go +++ b/internal/observability/trace.go @@ -7,22 +7,23 @@ import ( "strings" "time" + "github.com/labstack/fanout/internal/queryrows" "github.com/labstack/fanout/internal/telemetry" ) const recentTraceQuery = ` SELECT trace_id FROM spans -WHERE start_time >= ? AND start_time < ? AND (? = '' OR namespace = ?) AND trace_id <> '' AND (? = '' OR service = ?) +WHERE start_time >= ?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND start_time < ?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND (? = '' OR namespace = ?) AND trace_id <> '' AND (? = '' OR service = ?) GROUP BY trace_id ORDER BY MAX(CASE WHEN upper(status) IN ('ERROR', 'STATUS_CODE_ERROR') THEN 1 ELSE 0 END) DESC, - MAX(end_time) - MIN(start_time) DESC + MAX(end_unix_nano) - MIN(start_unix_nano) DESC, trace_id ASC LIMIT 1` const traceLogsQuery = ` -SELECT time, severity, coalesce(service, ''), body, coalesce(trace_id, ''), coalesce(span_id, '') +SELECT time::TIMESTAMP_NS, severity, coalesce(service, ''), body, coalesce(trace_id, ''), coalesce(span_id, '') FROM logs -WHERE trace_id = ? AND time >= ? AND time < ? AND (? = '' OR namespace = ?) +WHERE trace_id = ? AND time >= ?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND time < ?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND (? = '' OR namespace = ?) ORDER BY time ASC LIMIT ?` @@ -36,8 +37,15 @@ func (s *Service) Trace(ctx context.Context, scope Scope, traceID, service strin return Result[TraceDetail]{}, err } traceID, service = strings.TrimSpace(traceID), strings.TrimSpace(service) + ctx = queryrows.WithWindow(ctx, queryrows.Window{Start: scope.Start, End: scope.End, Namespace: scope.Namespace, Service: service}) if traceID == "" { - rows, queryErr := s.db.QueryContext(ctx, recentTraceQuery, scope.Start, scope.End, scope.Namespace, scope.Namespace, service, service) + candidateQuery := recentTraceQuery + candidateCtx := ctx + if reader, ok := s.db.(queryrows.BatchReader); ok && reader.CompletedBatchReads() { + candidateQuery = completedTraceQuery + candidateCtx = queryrows.WithWindow(ctx, queryrows.Window{Start: scope.Start, End: scope.End, Namespace: scope.Namespace, Service: service, Kind: queryrows.TraceCandidateRead}) + } + rows, queryErr := s.db.QueryContext(candidateCtx, candidateQuery, scope.Start, scope.End, scope.Namespace, scope.Namespace, service, service) if queryErr != nil { return Result[TraceDetail]{}, fmt.Errorf("query recent trace: %w", queryErr) } @@ -133,3 +141,20 @@ func (s *Service) traceLogsFromParquet(ctx context.Context, scope Scope, traceID rows.Close() return logs, nil } + +const completedTraceQuery = `WITH tail AS ( + SELECT trace_id,min(start_unix_nano) AS min_start,max(end_unix_nano) AS max_end, + max(CASE WHEN upper(status) IN ('ERROR','STATUS_CODE_ERROR') THEN 1 ELSE 0 END) AS has_error + FROM trace_tail + WHERE start_time>=$1::TIMESTAMP_NS::TIMESTAMPTZ_NS AND start_time<$2::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND ($3='' OR namespace=$4) AND ($5='' OR service=$6) AND trace_id<>'' GROUP BY trace_id +), untouched AS ( + SELECT trace_id,min_start,max_end,has_error FROM trace_candidates + WHERE trace_id NOT IN (SELECT trace_id FROM tail) + ORDER BY has_error DESC,max_end-min_start DESC,trace_id LIMIT 1 +), touched AS ( + SELECT t.trace_id, least(t.min_start,c.min_start) AS min_start,greatest(t.max_end,c.max_end) AS max_end, + greatest(t.has_error,c.has_error) AS has_error + FROM tail t LEFT JOIN trace_candidates c ON t.trace_id=c.trace_id +), candidates AS (SELECT * FROM untouched UNION ALL SELECT * FROM touched) +SELECT trace_id FROM candidates ORDER BY has_error DESC,max_end-min_start DESC,trace_id LIMIT 1` diff --git a/internal/query/attr_json_test.go b/internal/query/attr_json_test.go deleted file mode 100644 index cf6f6955..00000000 --- a/internal/query/attr_json_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package query - -import ( - "context" - "testing" -) - -// TestAttrMacroAndQuotedPath verifies that the attr() macro and a double-quoted -// JSON path resolve flat, dotted attribute keys — the shape ingest now writes. -// An unquoted path must NOT resolve (it would silently return NULL), which is the -// regression this guards against. -func TestAttrMacroAndQuotedPath(t *testing.T) { - db := openTestDuck(t) - ctx := context.Background() - if err := CreateTables(db); err != nil { - t.Fatalf("CreateTables: %v", err) - } - if err := CreateViews(db); err != nil { - t.Fatalf("CreateViews: %v", err) - } - - // Flat object with dotted keys and a numeric value, as attrsJSON produces. - const attrs = `{"http.method":"GET","http.status_code":200,"messaging.system":"kafka"}` - if _, err := db.ExecContext(ctx, - `INSERT INTO telemetry.spans (namespace, service, attributes_json) VALUES ('default','svc',?)`, attrs); err != nil { - t.Fatalf("insert span: %v", err) - } - - var method, msgSystem, statusCode, unquoted *string - err := db.QueryRowContext(ctx, ` -SELECT - attr(attributes_json, 'http.method'), - json_extract_string(attributes_json, '$."messaging.system"'), - attr(attributes_json, 'http.status_code'), - json_extract_string(attributes_json, '$.http.method') -FROM spans`).Scan(&method, &msgSystem, &statusCode, &unquoted) - if err != nil { - t.Fatalf("query: %v", err) - } - - if method == nil || *method != "GET" { - t.Errorf("attr(http.method) = %v, want GET", method) - } - if msgSystem == nil || *msgSystem != "kafka" { - t.Errorf("quoted path messaging.system = %v, want kafka", msgSystem) - } - if statusCode == nil || *statusCode != "200" { - t.Errorf("attr(http.status_code) numeric coercion = %v, want \"200\"", statusCode) - } - if unquoted != nil { - t.Errorf("unquoted '$.http.method' resolved to %v; expected NULL (dotted keys need quoting)", *unquoted) - } -} diff --git a/internal/query/attr_variant_test.go b/internal/query/attr_variant_test.go new file mode 100644 index 00000000..c03d2c19 --- /dev/null +++ b/internal/query/attr_variant_test.go @@ -0,0 +1,50 @@ +package query + +import ( + "context" + "testing" +) + +// Dots remain literal attribute-key characters, including after shredding. +func TestAttrMacroUsesLiteralKeys(t *testing.T) { + db := openTestDuck(t) + ctx := context.Background() + if err := CreateTables(db); err != nil { + t.Fatalf("CreateTables: %v", err) + } + if err := CreateViews(db); err != nil { + t.Fatalf("CreateViews: %v", err) + } + + // Bind JSON only to create a typed VARIANT test fixture. + const attrs = `{"http.method":"GET","http.status_code":200,"messaging.system":"kafka"}` + if _, err := db.ExecContext(ctx, + `INSERT INTO telemetry.spans (namespace, service, attributes) VALUES ('default','svc',?::VARCHAR::JSON::VARIANT)`, attrs); err != nil { + t.Fatalf("insert span: %v", err) + } + + var method, msgSystem, statusCode, missing *string + err := db.QueryRowContext(ctx, ` +SELECT + attr(attributes, 'http.method')::VARCHAR, + attr(attributes, 'messaging.system')::VARCHAR, + attr(attributes, 'http.status_code')::VARCHAR, + attr(attributes, 'http')::VARCHAR +FROM spans`).Scan(&method, &msgSystem, &statusCode, &missing) + if err != nil { + t.Fatalf("query: %v", err) + } + + if method == nil || *method != "GET" { + t.Errorf("attr(http.method) = %v, want GET", method) + } + if msgSystem == nil || *msgSystem != "kafka" { + t.Errorf("literal key messaging.system = %v, want kafka", msgSystem) + } + if statusCode == nil || *statusCode != "200" { + t.Errorf("attr(http.status_code) numeric coercion = %v, want \"200\"", statusCode) + } + if missing != nil { + t.Errorf("missing key http resolved to %v; expected NULL", *missing) + } +} diff --git a/internal/query/batch_cache.go b/internal/query/batch_cache.go new file mode 100644 index 00000000..b56802b8 --- /dev/null +++ b/internal/query/batch_cache.go @@ -0,0 +1,650 @@ +package query + +import ( + "context" + "database/sql" + "fmt" + "log/slog" + "sort" + "strings" + "time" + + "github.com/labstack/fanout/internal/metrics" + "github.com/labstack/fanout/internal/query/writegate" + "github.com/labstack/fanout/internal/queryrows" + "github.com/labstack/fanout/internal/telemetry" +) + +// readCacheVersion covers both schema and aggregation semantics. These tables +// are disposable; a mismatch rebuilds them together from immutable Parquet. +const readCacheVersion = 3 + +const ( + readCacheBatchLimit = 64 + readCacheRowBudget = 64000 +) + +func createBatchCaches(db *sql.DB) error { + tx, err := db.Begin() + if err != nil { + return err + } + defer func() { _ = tx.Rollback() }() + if _, err = tx.Exec(`CREATE TABLE IF NOT EXISTS read_cache_version (version INTEGER)`); err != nil { + return err + } + var version int + err = tx.QueryRow(`SELECT coalesce(max(version),0) FROM read_cache_version`).Scan(&version) + if err != nil { + return err + } + if version != readCacheVersion { + rows, err := tx.Query(`SELECT table_name FROM duckdb_tables() WHERE schema_name='main' AND starts_with(table_name,'read_') AND table_name<>'read_cache_version'`) + if err != nil { + return err + } + var tables []string + for rows.Next() { + var name string + if err := rows.Scan(&name); err != nil { + rows.Close() + return err + } + tables = append(tables, name) + } + err = rows.Err() + rows.Close() + if err != nil { + return err + } + for _, name := range tables { + if _, err := tx.Exec(`DROP TABLE "` + strings.ReplaceAll(name, `"`, `""`) + `"`); err != nil { + return err + } + } + if _, err := tx.Exec(`DELETE FROM read_cache_version`); err != nil { + return err + } + if _, err := tx.Exec(`INSERT INTO read_cache_version VALUES (?)`, readCacheVersion); err != nil { + return err + } + } + for _, stmt := range []string{ + `CREATE TABLE IF NOT EXISTS read_batches (batch_id VARCHAR PRIMARY KEY,replacement_id VARCHAR)`, + createReadEndpointTable, + `CREATE TABLE IF NOT EXISTS read_trace_candidates (trace_id VARCHAR PRIMARY KEY,namespace VARCHAR,service VARCHAR,min_start BIGINT,max_start BIGINT,max_end BIGINT,has_error INTEGER)`, + `CREATE TABLE IF NOT EXISTS read_logs (batch_id VARCHAR, bucket TIMESTAMP_NS, namespace VARCHAR, service VARCHAR, severity VARCHAR, count BIGINT)`, + `CREATE TABLE IF NOT EXISTS read_trace_parts (batch_id VARCHAR, namespace VARCHAR, service VARCHAR, trace_id VARCHAR, min_start BIGINT, max_start BIGINT, max_end BIGINT, has_error INTEGER)`, + } { + if _, err := tx.Exec(stmt); err != nil { + return err + } + } + return tx.Commit() +} +func batchMarkers(ctx context.Context, db snapshotSQL) (map[string]bool, error) { + rows, err := db.QueryContext(ctx, `SELECT batch_id FROM read_batches`) + if err != nil { + return nil, err + } + defer rows.Close() + markers := map[string]bool{} + for rows.Next() { + var id string + if err := rows.Scan(&id); err != nil { + return nil, err + } + markers[id] = true + } + return markers, rows.Err() +} +func idsSQL(ids []string) string { + if len(ids) == 0 { + return "NULL" + } + quoted := make([]string, len(ids)) + for i, id := range ids { + quoted[i] = sqlLiteral(id) + } + return strings.Join(quoted, ",") +} + +// RefreshReadCaches acknowledges complete immutable files, not an ingest-time +// watermark. A pass only aggregates its selected batches: it never rebuilds a +// retained-history index. Contributions and acknowledgements commit together. +func (d *Duck) RefreshReadCaches(ctx context.Context) (rows int64, err error) { + started := time.Now() + didWork := false + defer func() { + result := metrics.RollupSuccess + if err != nil { + result = metrics.RollupError + } else if !didWork { + result = metrics.RollupNoop + } + metrics.RecordRollupComponent(metrics.RollupReadCache, result, rows, time.Since(started).Seconds()) + }() + + if d.repository == nil { + return 0, nil + } + unlock, err := d.cacheGate.LockContext(ctx, writegate.WriteReadCache) + if err != nil { + return 0, err + } + defer unlock() + // Cache retries are frequent. A queued publication must not park the cache + // gate for the analytical rollup's much longer admission lease. + admitted := d.parquetMu.TryRLock() + metrics.RecordParquetRead(readerRollup, 0, admitted) + if !admitted { + return 0, nil + } + defer d.parquetMu.RUnlock() + batches := d.repository.Parquet.BatchMetadata() + markers, err := batchMarkers(ctx, d.writer()) + if err != nil { + return 0, err + } + active := map[string]bool{} + for _, b := range batches { + active[b.ID] = true + } + stale := []string{} + for id := range markers { + if !active[id] { + d.cachePublishMu.Lock() + publishing := d.cachePublishing[id] + d.cachePublishMu.Unlock() + if !publishing { + stale = append(stale, id) + } + } + } + sort.SliceStable(batches, func(i, j int) bool { return newestBatchEvent(batches[i]) < newestBatchEvent(batches[j]) }) + pendingCount := 0 + for _, b := range batches { + if !markers[b.ID] { + pendingCount++ + } + } + metrics.ReadCachePendingBatches.Set(float64(pendingCount)) + pending := []telemetry.BatchMetadata{} + pendingRows := 0 + for i := len(batches) - 1; i >= 0; i-- { + if !markers[batches[i].ID] { + rows := batches[i].Spans + batches[i].Logs + // A complete file is indivisible. Admit one oversized file to make + // progress, otherwise bound new work by rows as well as file count. + if len(pending) > 0 && pendingRows+rows > readCacheRowBudget { + break + } + pending = append(pending, batches[i]) + pendingRows += rows + if len(pending) == readCacheBatchLimit { + break + } + } + } + if len(pending) == 0 && len(stale) == 0 { + return 0, nil + } + didWork = true + changed, err := changedRetiredBatches(ctx, d.writer(), markers, active, stale) + if err != nil { + return 0, err + } + return d.cacheBatches(ctx, pending, stale, changed) +} + +func (d *Duck) cacheBatches(ctx context.Context, batches []telemetry.BatchMetadata, stale, changed []string) (int64, error) { + tx, err := d.writer().BeginTx(ctx, nil) + if err != nil { + return 0, err + } + defer func() { _ = tx.Rollback() }() + var written int64 + exec := func(stmt string) error { + result, err := tx.ExecContext(ctx, stmt) + if err == nil && strings.HasPrefix(stmt, "INSERT INTO read_") && !strings.HasPrefix(stmt, "INSERT INTO read_batches") { + n, e := result.RowsAffected() + if e != nil { + return e + } + written += n + } + return err + } + if len(changed) > 0 { + if err := exec(`CREATE OR REPLACE TEMP TABLE cache_retired_traces AS SELECT DISTINCT trace_id FROM read_trace_parts WHERE batch_id IN (` + idsSQL(changed) + `)`); err != nil { + return 0, err + } + } + if len(stale) > 0 { + for _, table := range []string{"read_endpoints", "read_logs", "read_trace_parts", "read_batches"} { + if err := exec("DELETE FROM " + table + " WHERE batch_id IN (" + idsSQL(stale) + ")"); err != nil { + return 0, err + } + } + } + if len(changed) > 0 { + // Retention can change a trace's extrema or error flag. Compaction whose + // complete replacement is cached preserves them and bypasses this repair. + if err := exec(`DELETE FROM read_trace_candidates WHERE trace_id IN (SELECT trace_id FROM cache_retired_traces) AND trace_id NOT IN (SELECT trace_id FROM read_trace_parts)`); err != nil { + return 0, err + } + if err := exec(`INSERT INTO read_trace_candidates ` + traceCandidateSelect + ` FROM read_trace_parts WHERE trace_id IN (SELECT trace_id FROM cache_retired_traces) GROUP BY trace_id ON CONFLICT (trace_id) DO UPDATE SET namespace=excluded.namespace,service=excluded.service,min_start=excluded.min_start,max_start=excluded.max_start,max_end=excluded.max_end,has_error=excluded.has_error`); err != nil { + return 0, err + } + if err := exec(`DROP TABLE cache_retired_traces`); err != nil { + return 0, err + } + } + // Bind each signal once for the whole pass. Materialize minute counts, new + // batch parts and one indexed candidate per trace. The temporary parts table + // feeds both inserts without rereading Parquet or scanning retained parts. + source := func(signal string) string { + var selected []telemetry.BatchMetadata + for _, b := range batches { + _, count := batchTime(b, signal) + if count == 0 { + continue + } + selected = append(selected, b) + } + if len(selected) == 0 { + return "" + } + // One Parquet scan binds the pass's files. The virtual filename column + // identifies each contribution without a separate UNION branch per file. + physical := strings.Replace(d.physicalSource(signal, selected), "SELECT ", "SELECT filename AS __fanout_filename,", 1) + return strings.Replace(cleanSource(signal, physical), "SELECT\n", "SELECT "+d.batchIDColumn(signal, "__fanout_filename")+" AS batch_id,\n", 1) + } + if spans := source("spans"); spans != "" { + kernel := strings.Replace(endpointBatchSelect, "SELECT\n", "SELECT s.batch_id,\n", 1) + "FROM (" + spans + ") s GROUP BY 1,2,3,4,5,6" + if err := exec(`INSERT INTO read_endpoints ` + kernel); err != nil { + return 0, fmt.Errorf("cache endpoints: %w", err) + } + if err := exec(`CREATE OR REPLACE TEMP TABLE cache_new_trace_parts AS SELECT batch_id,coalesce(namespace,'') AS namespace,coalesce(service,'') AS service,trace_id, + min(start_unix_nano) AS min_start,max(start_unix_nano) AS max_start,max(end_unix_nano) AS max_end,max(CASE WHEN upper(status) IN ('ERROR','STATUS_CODE_ERROR') THEN 1 ELSE 0 END) AS has_error + FROM (` + spans + `) WHERE trace_id<>'' GROUP BY 1,2,3,4`); err != nil { + return 0, err + } + if err := exec(`INSERT INTO read_trace_parts SELECT * FROM cache_new_trace_parts`); err != nil { + return 0, err + } + candidates := traceCandidateSelect + ` FROM cache_new_trace_parts GROUP BY trace_id` + if err := exec(`INSERT INTO read_trace_candidates ` + candidates + ` ON CONFLICT (trace_id) DO UPDATE SET + namespace=CASE WHEN read_trace_candidates.namespace=excluded.namespace THEN excluded.namespace END, + service=CASE WHEN read_trace_candidates.service=excluded.service THEN excluded.service END, + min_start=least(read_trace_candidates.min_start,excluded.min_start), + max_start=greatest(read_trace_candidates.max_start,excluded.max_start), + max_end=greatest(read_trace_candidates.max_end,excluded.max_end), + has_error=greatest(read_trace_candidates.has_error,excluded.has_error)`); err != nil { + return 0, err + } + if err := exec(`DROP TABLE cache_new_trace_parts`); err != nil { + return 0, err + } + } + if logs := source("logs"); logs != "" { + if err := exec(`INSERT INTO read_logs SELECT batch_id,date_trunc('minute',time::TIMESTAMP_NS),coalesce(namespace,''),coalesce(service,''),coalesce(severity,''),count(*) FROM (` + logs + `) GROUP BY 1,2,3,4,5`); err != nil { + return 0, err + } + } + if len(batches) > 0 { + var values []string + for _, b := range batches { + values = append(values, "("+sqlLiteral(b.ID)+")") + } + if err := exec(`INSERT INTO read_batches(batch_id) VALUES ` + strings.Join(values, ",")); err != nil { + return 0, err + } + } + if err := tx.Commit(); err != nil { + return 0, err + } + return written, nil +} +func minuteInterior(w queryrows.Window) (time.Time, time.Time) { + start := w.Start.Truncate(time.Minute) + if !start.Equal(w.Start) { + start = start.Add(time.Minute) + } + return start, w.End.Truncate(time.Minute) +} +func timeNanosLiteral(t time.Time) string { + return "make_timestamp_ns(" + fmt.Sprint(t.UnixNano()) + ")" +} +func timeLiteral(t time.Time) string { + return "make_timestamp_ns(" + fmt.Sprint(t.UnixNano()) + ")::TIMESTAMPTZ_NS" +} +func windowPredicate(column string, w queryrows.Window) string { + return column + ">=" + timeLiteral(w.Start) + " AND " + column + "<" + timeLiteral(w.End) +} +func (d *Duck) aggregateSources(ctx context.Context, db snapshotSQL, batches []telemetry.BatchMetadata, w queryrows.Window, sources map[string]string) error { + markers, err := batchMarkers(ctx, db) + if err != nil { + return err + } + var cachedIDs []string + var cached, uncached []telemetry.BatchMetadata + signal := "spans" + if w.Kind == queryrows.LogHistogramRead { + signal = "logs" + } + for _, b := range batches { + if !overlapping(b, signal, w) { + continue + } + if markers[b.ID] { + cachedIDs = append(cachedIDs, b.ID) + cached = append(cached, b) + } else { + uncached = append(uncached, b) + } + } + switch w.Kind { + case queryrows.EndpointRead, queryrows.LogHistogramRead: + start, end := minuteInterior(w) + column := "start_time" + projection := "namespace,service,start_time,http_method,http_route,operation,duration_ms,status" + if signal == "logs" { + column = "time" + projection = "namespace,service,time,coalesce(severity,'') AS severity,1::BIGINT AS count" + } + raw := "SELECT " + projection + " FROM (" + cleanSource(signal, d.snapshotSource(signal, uncached, batches)) + ") WHERE " + windowPredicate(column, w) + // Footer pruning selects only the two clipped boundary minutes. Aligned + // windows need no cached raw files; very short windows read their full range. + var boundary []telemetry.BatchMetadata + var containedIDs, clippedIDs []string + for _, b := range cached { + bounds, _ := batchTime(b, signal) + if bounds.Known && bounds.MinNanos >= w.Start.UnixNano() && bounds.MaxNanos < w.End.UnixNano() { + // Even a clipped minute is exact when all events in the completed file + // are inside the window. This avoids rereading the hot current minute. + containedIDs = append(containedIDs, b.ID) + continue + } + clippedIDs = append(clippedIDs, b.ID) + left := w + left.End = start + right := w + right.Start = end + if left.Start.Before(left.End) && overlapping(b, signal, left) || right.Start.Before(right.End) && overlapping(b, signal, right) { + boundary = append(boundary, b) + } + } + clipped := "SELECT " + projection + " FROM (" + cleanSource(signal, d.snapshotSource(signal, boundary, batches)) + ") WHERE " + windowPredicate(column, w) + " AND (" + column + "<" + timeLiteral(start) + " OR " + column + ">=" + timeLiteral(end) + ")" + if signal == "spans" { + sources["endpoint_tail"] = raw + " UNION ALL " + clipped + sources["endpoint_minutes"] = "SELECT * EXCLUDE(batch_id) FROM read_endpoints WHERE batch_id IN (" + idsSQL(containedIDs) + ") OR (batch_id IN (" + idsSQL(clippedIDs) + ") AND bucket>=" + timeNanosLiteral(start) + " AND bucket<" + timeNanosLiteral(end) + ")" + } else { + sources["log_tail"] = raw + " UNION ALL " + clipped + sources["log_minutes"] = "SELECT * EXCLUDE(batch_id) FROM read_logs WHERE batch_id IN (" + idsSQL(containedIDs) + ") OR (batch_id IN (" + idsSQL(clippedIDs) + ") AND bucket>=" + timeNanosLiteral(start) + " AND bucket<" + timeNanosLiteral(end) + ")" + } + case queryrows.TraceCandidateRead: + // Use the incremental candidate index, repairing changed retired traces + // and ambiguous scopes from active batch parts. Compaction keeps it usable. + scope := "batch_id IN (" + idsSQL(cachedIDs) + ")" + if w.Namespace != "" { + scope += " AND namespace=" + sqlLiteral(w.Namespace) + } + if w.Service != "" { + scope += " AND service=" + sqlLiteral(w.Service) + } + index, err := d.traceCandidateSource(ctx, db, batches, markers, w) + if err != nil { + return err + } + full := fmt.Sprintf("min_start>=%d AND max_start<%d", w.Start.UnixNano(), w.End.UnixNano()) + partial := "SELECT * FROM (" + index + ") WHERE NOT (" + full + ") AND " + fmt.Sprintf("max_start>=%d AND min_start<%d", w.Start.UnixNano(), w.End.UnixNano()) + projection := "namespace,service,trace_id,start_time,start_unix_nano,end_unix_nano,status" + tail := "SELECT " + projection + " FROM (" + cleanSource("spans", d.snapshotSource("spans", uncached, batches)) + ") WHERE " + windowPredicate("start_time", w) + // Only files whose scoped trace parts straddle a boundary require raw rows. + var partialFiles []telemetry.BatchMetadata + for _, b := range cached { + bounds, _ := batchTime(b, "spans") + if !bounds.Known || bounds.MinNanos < w.Start.UnixNano() || bounds.MaxNanos >= w.End.UnixNano() { + partialFiles = append(partialFiles, b) + } + } + interior := fmt.Sprintf("min_start>=%d AND max_start<%d", w.Start.UnixNano(), w.End.UnixNano()) + if len(partialFiles) > 0 { + tail += " UNION ALL SELECT " + projection + " FROM (" + cleanSource("spans", d.snapshotSource("spans", partialFiles, batches)) + ") WHERE " + windowPredicate("start_time", w) + " AND trace_id IN (SELECT trace_id FROM (" + partial + "))" + // A partial trace may also have in-window contributions in other batches. + // Include these parts as candidates; boundary rows merge them in the kernel. + sources["trace_candidates"] = `SELECT trace_id,min(min_start) AS min_start,max(max_end) AS max_end,max(has_error) AS has_error FROM read_trace_parts WHERE ` + scope + ` AND ` + interior + ` GROUP BY trace_id` + } else { + // Every overlapping cached file lies inside the window, so a partial + // trace's other spans are in files outside it. Its in-window parts are + // still a candidate; the kernel needs one row per trace, and partial + // traces are disjoint from the fully contained index rows. + sources["trace_candidates"] = "SELECT trace_id,min_start,max_end,has_error FROM (" + index + ") WHERE " + full + + ` UNION ALL SELECT trace_id,min(min_start),max(max_end),max(has_error) FROM read_trace_parts WHERE ` + scope + ` AND ` + interior + + ` AND trace_id IN (SELECT trace_id FROM (` + partial + `)) GROUP BY trace_id` + } + sources["trace_tail"] = tail + } + return nil +} + +// Endpoint latency is stored as a mergeable fixed-boundary histogram. Unlike +// averaging minute p95 values, summing these bin counts preserves the latency +// distribution across arbitrary query windows. Bounds include Fanout's health +// thresholds (750ms and 2s) and cap the overflow bucket at five minutes. +const endpointBatchSelect = `SELECT + s.namespace, + date_trunc('minute', s.start_time::TIMESTAMP_NS) AS bucket, + COALESCE(s.service, '') AS service, + COALESCE(NULLIF(s.http_method, ''), 'CALL') AS method, + COALESCE(NULLIF(s.http_route, ''), NULLIF(s.operation, ''), 'unknown') AS path, + COUNT(*) AS calls, + COUNT(*) FILTER (WHERE upper(s.status) IN ('ERROR', 'STATUS_CODE_ERROR')) AS error_count, + COUNT(s.duration_ms) AS duration_count, + struct_pack( + le_0_1 := COUNT(*) FILTER (WHERE s.duration_ms <= 0.1), + le_0_5 := COUNT(*) FILTER (WHERE s.duration_ms <= 0.5), + le_1 := COUNT(*) FILTER (WHERE s.duration_ms <= 1), + le_2_5 := COUNT(*) FILTER (WHERE s.duration_ms <= 2.5), + le_5 := COUNT(*) FILTER (WHERE s.duration_ms <= 5), + le_10 := COUNT(*) FILTER (WHERE s.duration_ms <= 10), + le_25 := COUNT(*) FILTER (WHERE s.duration_ms <= 25), + le_50 := COUNT(*) FILTER (WHERE s.duration_ms <= 50), + le_100 := COUNT(*) FILTER (WHERE s.duration_ms <= 100), + le_250 := COUNT(*) FILTER (WHERE s.duration_ms <= 250), + le_500 := COUNT(*) FILTER (WHERE s.duration_ms <= 500), + le_750 := COUNT(*) FILTER (WHERE s.duration_ms <= 750), + le_1000 := COUNT(*) FILTER (WHERE s.duration_ms <= 1000), + le_2000 := COUNT(*) FILTER (WHERE s.duration_ms <= 2000), + le_5000 := COUNT(*) FILTER (WHERE s.duration_ms <= 5000), + le_30000 := COUNT(*) FILTER (WHERE s.duration_ms <= 30000), + le_300000 := COUNT(*) FILTER (WHERE s.duration_ms <= 300000) + ) AS duration_buckets +` + +func newestBatchEvent(b telemetry.BatchMetadata) int64 { + newest := int64(-1 << 63) + for _, signal := range []string{"spans", "logs", "metrics"} { + bounds, count := batchTime(b, signal) + if count > 0 { + if !bounds.Known { + return b.MaxIngestedNanos + } + newest = max(newest, bounds.MaxNanos) + } + } + return newest +} + +// PublishParquetReplacement derives the output cache from complete inputs before +// the namespace swap. The pending publication set protects still-inactive +// output contributions without holding the write gate during reader drain. +// Readers use active IDs, so either namespace sees exactly one set of contributions. After +// a crash, an absent output marker simply causes a rebuild from the output file. +func (d *Duck) PublishParquetReplacement(ctx context.Context, output telemetry.BatchMetadata, inputs []string, publish func(context.Context) error) error { + if len(inputs) == 0 { + return d.PublishParquet(ctx, publish) + } + unlock, err := d.cacheGate.LockContext(ctx, writegate.WriteReadCache) + if err != nil { + return err + } + d.cachePublishMu.Lock() + if d.cachePublishing == nil { + d.cachePublishing = map[string]bool{} + } + d.cachePublishing[output.ID] = true + d.cachePublishMu.Unlock() + defer func() { d.cachePublishMu.Lock(); delete(d.cachePublishing, output.ID); d.cachePublishMu.Unlock() }() + if err := d.transferBatchCache(ctx, output.ID, inputs); err != nil { + slog.Warn("compaction cache transfer failed; output will be cached from Parquet", "err", err) + } + unlock() + return d.PublishParquet(ctx, publish) +} + +func (d *Duck) transferBatchCache(ctx context.Context, output string, inputs []string) error { + tx, err := d.writer().BeginTx(ctx, nil) + if err != nil { + return err + } + defer func() { _ = tx.Rollback() }() + var done bool + if err := tx.QueryRowContext(ctx, `SELECT count(*)>0 FROM read_batches WHERE batch_id=?`, output).Scan(&done); err != nil { + return err + } + if done { + return nil + } + var count int + if err := tx.QueryRowContext(ctx, `SELECT count(*) FROM read_batches WHERE batch_id IN (`+idsSQL(inputs)+`)`).Scan(&count); err != nil { + return err + } + if count != len(inputs) { + return nil + } + where := " WHERE batch_id IN (" + idsSQL(inputs) + ")" + var bins []string + for _, name := range []string{"le_0_1", "le_0_5", "le_1", "le_2_5", "le_5", "le_10", "le_25", "le_50", "le_100", "le_250", "le_500", "le_750", "le_1000", "le_2000", "le_5000", "le_30000", "le_300000"} { + bins = append(bins, name+" := sum(duration_buckets."+name+")::UBIGINT") + } + for _, stmt := range []string{ + `INSERT INTO read_endpoints SELECT ` + sqlLiteral(output) + `,namespace,bucket,service,method,path,sum(calls)::BIGINT,sum(error_count)::BIGINT,sum(duration_count)::BIGINT,struct_pack(` + strings.Join(bins, ",") + `) FROM read_endpoints` + where + ` GROUP BY 2,3,4,5,6`, + `INSERT INTO read_logs SELECT ` + sqlLiteral(output) + `,bucket,namespace,service,severity,sum(count)::BIGINT FROM read_logs` + where + ` GROUP BY 2,3,4,5`, + `INSERT INTO read_trace_parts SELECT ` + sqlLiteral(output) + `,namespace,service,trace_id,min(min_start),max(max_start),max(max_end),max(has_error) FROM read_trace_parts` + where + ` GROUP BY 2,3,4`, + `INSERT INTO read_batches(batch_id) VALUES (` + sqlLiteral(output) + `)`, + `UPDATE read_batches SET replacement_id=` + sqlLiteral(output) + where, + } { + if _, err := tx.ExecContext(ctx, stmt); err != nil { + return err + } + } + return tx.Commit() +} + +// One candidate row per trace is sufficient while the requested namespace and +// service are unambiguous. Mixed scopes are NULL and use exact batch parts. +const traceCandidateSelect = `SELECT trace_id, + CASE WHEN min(namespace)=max(namespace) THEN min(namespace) END AS namespace, + CASE WHEN min(service)=max(service) THEN min(service) END AS service, + min(min_start) AS min_start,max(max_start) AS max_start,max(max_end) AS max_end,max(has_error) AS has_error` + +// Only retention or an uncached replacement changes the active cached trace +// bounds. Follow complete compaction replacements, including multiple levels. +func changedRetiredBatches(ctx context.Context, db snapshotSQL, markers, active map[string]bool, stale []string) ([]string, error) { + if len(stale) == 0 { + return nil, nil + } + rows, err := db.QueryContext(ctx, `SELECT batch_id,replacement_id FROM read_batches WHERE replacement_id IS NOT NULL`) + if err != nil { + return nil, err + } + defer rows.Close() + replacements := map[string]string{} + for rows.Next() { + var id, to string + if err := rows.Scan(&id, &to); err != nil { + return nil, err + } + replacements[id] = to + } + if err := rows.Err(); err != nil { + return nil, err + } + var changed []string + for _, id := range stale { + covered := false + visited := map[string]bool{} + for to := replacements[id]; to != "" && !visited[to]; to = replacements[to] { + visited[to] = true + if active[to] && markers[to] { + covered = true + break + } + } + if !covered { + changed = append(changed, id) + } + } + return changed, nil +} + +func (d *Duck) traceCandidateSource(ctx context.Context, db snapshotSQL, batches []telemetry.BatchMetadata, markers map[string]bool, w queryrows.Window) (string, error) { + active := map[string]bool{} + var cachedIDs, stale []string + for _, b := range batches { + active[b.ID] = true + if markers[b.ID] { + cachedIDs = append(cachedIDs, b.ID) + } + } + for id := range markers { + if !active[id] { + d.cachePublishMu.Lock() + publishing := d.cachePublishing[id] + d.cachePublishMu.Unlock() + if !publishing { + stale = append(stale, id) + } + } + } + changed, err := changedRetiredBatches(ctx, db, markers, active, stale) + if err != nil { + return "", err + } + index := `SELECT * FROM read_trace_candidates` + if len(changed) > 0 { + dirty := `SELECT trace_id FROM read_trace_parts WHERE batch_id IN (` + idsSQL(changed) + `)` + index += ` WHERE trace_id NOT IN (` + dirty + `) UNION ALL ` + traceCandidateSelect + ` FROM read_trace_parts WHERE batch_id IN (` + idsSQL(cachedIDs) + `) AND trace_id IN (` + dirty + `) GROUP BY trace_id` + } + var exact, possible, ambiguous []string + for _, field := range []struct{ name, value string }{{"namespace", w.Namespace}, {"service", w.Service}} { + if field.value == "" { + continue + } + match := field.name + "=" + sqlLiteral(field.value) + exact = append(exact, match) + possible = append(possible, "("+match+" OR "+field.name+" IS NULL)") + ambiguous = append(ambiguous, field.name+" IS NULL") + } + projection := `trace_id,min_start,max_start,max_end,has_error` + if len(exact) == 0 { + return "SELECT " + projection + " FROM (" + index + ")", nil + } + result := "SELECT " + projection + " FROM (" + index + ") WHERE " + strings.Join(exact, " AND ") + mixed := "SELECT trace_id FROM (" + index + ") WHERE " + strings.Join(possible, " AND ") + " AND (" + strings.Join(ambiguous, " OR ") + ")" + // Most traces belong to a single namespace/service. Do not put a retained + // batch-parts aggregation in the ranking/join plan when this snapshot has no + // ambiguous candidates for the requested scope. The probe shares its read + // transaction and the same retired-contribution repair. + var hasMixed bool + if err := db.QueryRowContext(ctx, "SELECT EXISTS (SELECT 1 FROM ("+mixed+") LIMIT 1)").Scan(&hasMixed); err != nil { + return "", err + } + if !hasMixed { + return result, nil + } + scope := "batch_id IN (" + idsSQL(cachedIDs) + ") AND " + strings.Join(exact, " AND ") + return result + ` UNION ALL SELECT trace_id,min(min_start),max(max_start),max(max_end),max(has_error) FROM read_trace_parts WHERE ` + scope + ` AND trace_id IN (` + mixed + `) GROUP BY trace_id`, nil +} diff --git a/internal/query/duck.go b/internal/query/duck.go index aa23c8dd..e9b84b93 100644 --- a/internal/query/duck.go +++ b/internal/query/duck.go @@ -16,6 +16,7 @@ import ( "github.com/duckdb/duckdb-go/v2" "github.com/labstack/fanout/internal/config" + engine "github.com/labstack/fanout/internal/duckdb" "github.com/labstack/fanout/internal/metrics" "github.com/labstack/fanout/internal/query/writegate" "github.com/labstack/fanout/internal/queryrows" @@ -24,6 +25,10 @@ import ( ) type Duck struct { + cachePublishMu sync.Mutex + cachePublishing map[string]bool + snapshotMu sync.Mutex + snapshotQueries map[string]compiledSnapshot // DB is the read pool. Reads scan immutable Parquet concurrently, so it is // sized from the machine. DB *sql.DB @@ -37,13 +42,9 @@ type Duck struct { // only if they are still reading it. releasePoolGauges func() releaseMemoryGauges func() - // writeDB is the single connection every rollup and maintenance write uses. - // - // Those writes are serialized by writeGate anyway, so one connection is all - // they can use — and taking it from the read pool is what let a background - // pass occupy a quarter of a four-core host's read capacity for the length - // of a rollup. A request that then waits for a connection waits invisibly: - // database/sql counts that wait, and nothing charged it to anything. + // writeDB has two connections: analytical rollups share writeGate, while + // completed-batch aggregates use cacheGate and disjoint tables. Both stay + // outside the read pool. Maintenance acquires both gates for checkpointing. writeDB *sql.DB cfg config.Config repository *telemetrystore.Repository @@ -53,6 +54,7 @@ type Duck struct { rollupLagNanos int64 // writeGate serializes writes to the rebuildable DuckDB rollup cache. writeGate writegate.WriteGate + cacheGate writegate.WriteGate // parquetMu pins immutable files for active DuckDB readers. Its reader-first // gate keeps a queued maintenance publish from stalling unrelated new reads. parquetMu parquetReadGate @@ -94,11 +96,6 @@ const ( edgeRollupRawMaxKey = "edge_rollup_v2_rawmax" edgeRollupSubCursorKey = "edge_rollup_v2_substart" edgeRollupSubWindowKey = "edge_rollup_v2_subwindow_end" - EndpointRollupStateKey = "endpoint_rollup_v1" - endpointRollupRawMaxKey = "endpoint_rollup_v1_rawmax" - endpointBackfillStateKey = "endpoint_rollup_v1_backfill_started" - EndpointReadyStateKey = "endpoint_rollup_v1_ready" - EndpointDisabledStateKey = "endpoint_rollup_v1_disabled" defaultDuckDBPoolSize = 1 parquetCompactionCycle = 10 * time.Second parquetCompactionCycleBudget = 8 * time.Second @@ -314,6 +311,10 @@ func NewDuck(ctx context.Context, cfg config.Config, repository *telemetrystore. _ = d.Close() return nil, fmt.Errorf("create views: %w", err) } + if err := engine.ConfigurePolicy(ctx, writeDB, repository.Parquet.Dir(), cfg.QueryDir()); err != nil { + _ = d.Close() + return nil, err + } if cfg.RollupSkipToLatest { // Best-effort: on failure the rollup just catches up normally. if err := d.skipRollupToLatest(ctx); err != nil { @@ -349,11 +350,6 @@ func (d *Duck) skipRollupToLatest(ctx context.Context) error { if err != nil { return err } - // A skipped endpoint cache is never queryable: clear any cache left by a - // previous normal backfill as well as its persisted readiness bit. - if _, err := tx.ExecContext(ctx, `DELETE FROM endpoint_rollup`); err != nil { - return err - } for _, w := range []struct { key string watermark int64 @@ -367,11 +363,6 @@ func (d *Duck) skipRollupToLatest(ctx context.Context) error { // watermark it just advanced. {edgeRollupSubCursorKey, 0}, {edgeRollupSubWindowKey, 0}, - // Endpoint queries remain on their raw-span fallback when the operator - // explicitly skips historical rollups. Mark this cache disabled instead of - // later declaring a new-only, incomplete endpoint cache ready. - {EndpointReadyStateKey, 0}, - {EndpointDisabledStateKey, 1}, } { if err := storeRollupWatermark(ctx, tx, w.key, w.watermark); err != nil { return err @@ -428,8 +419,8 @@ func openDuckDB(ctx context.Context, dsn, tempDir string, maxConns int) (*sql.DB db.SetMaxOpenConns(maxConns) db.SetMaxIdleConns(maxConns) - // One connection is all the writers can use — writeGate already lets one - // through at a time — and keeping it out of the read pool is the point. + // Independent analytical and completed-batch writers need two connections. + // Their tables are disjoint; each domain serializes its own mutations. // // The write handle gets a connector that cannot close the instance. // database/sql closes a connector that implements io.Closer when its DB is @@ -439,8 +430,8 @@ func openDuckDB(ctx context.Context, dsn, tempDir string, maxConns int) (*sql.DB // than returning an error. The read pool owns the instance; the write // handle borrows it. writeDB := sql.OpenDB(borrowedConnector{connector}) - writeDB.SetMaxOpenConns(1) - writeDB.SetMaxIdleConns(1) + writeDB.SetMaxOpenConns(2) + writeDB.SetMaxIdleConns(2) return db, writeDB, nil } @@ -495,8 +486,8 @@ func (d *Duck) writer() *sql.DB { // candidate explanation for a stalled query and has to be measurable. // // The non-FORCE form refuses while another *write* transaction is open. Every -// write here is serialized behind the write gate on one connection, and this -// runs under that gate, so a refusal should not happen — the counter is there +// domain is serialized by its own gate. Maintenance holds both gates before +// calling this function, so a refusal should not happen — the counter is there // to say so rather than to be assumed. Only a checkpoint that ran is timed: a // refusal returns in microseconds and would drag the distribution towards zero, // which is the opposite of what the histogram is for. @@ -535,6 +526,12 @@ func (d *Duck) RunRollups(ctx context.Context) { d.runMaintenanceLoop(ctx) }() defer func() { <-maintenanceDone }() + readCacheDone := make(chan struct{}) + go func() { + defer close(readCacheDone) + d.runReadCacheLoop(ctx) + }() + defer func() { <-readCacheDone }() ticker := time.NewTicker(d.cfg.RollupInterval) defer ticker.Stop() @@ -589,8 +586,8 @@ func (d *Duck) rollupOnce(ctx context.Context) (int, error) { affected += n } - if n, err := d.refreshEndpointRollup(ctx); err != nil { - errs = append(errs, fmt.Errorf("endpoint rollup: %w", err)) + if n, err := d.RefreshReadCaches(ctx); err != nil { + errs = append(errs, fmt.Errorf("completed batch read cache: %w", err)) } else { affected += n } @@ -604,6 +601,28 @@ func (d *Duck) rollupOnce(ctx context.Context) (int, error) { return int(affected), errors.Join(errs...) } +// Completed-file caches do not inherit the minute-based analytical watermark. +// Drain bounded transactions promptly, yielding to other writers between passes. +func (d *Duck) runReadCacheLoop(ctx context.Context) { + delay := time.Second + for { + timer := time.NewTimer(delay) + select { + case <-ctx.Done(): + timer.Stop() + return + case <-timer.C: + } + rows, err := d.RefreshReadCaches(ctx) + delay = time.Second + if err != nil && ctx.Err() == nil { + slog.Warn("completed batch read cache failed", "err", err) + } else if rows > 0 { + delay = 100 * time.Millisecond + } + } +} + func (d *Duck) runMaintenanceLoop(ctx context.Context) { every := d.cfg.MaintenanceInterval if every <= 0 { @@ -689,9 +708,14 @@ func (d *Duck) runRepositoryMaintenance(ctx context.Context) error { return err } defer unlock() + unlockCache, err := d.cacheGate.LockContext(ctx, writegate.WriteMaintenance) + if err != nil { + return err + } + defer unlockCache() var errs []error if d.cfg.RetentionDays > 0 { - for _, table := range []string{"service_rollup", "endpoint_rollup", "edge_rollup"} { + for _, table := range []string{"service_rollup", "edge_rollup"} { if _, err := d.writer().ExecContext(ctx, fmt.Sprintf("DELETE FROM %s WHERE bucket < now() - INTERVAL %d DAY", table, d.cfg.RetentionDays)); err != nil { errs = append(errs, fmt.Errorf("prune %s: %w", table, err)) } @@ -850,129 +874,6 @@ func (d *Duck) refreshServiceRollup(ctx context.Context) (int64, error) { return rows, nil } -func (d *Duck) refreshEndpointRollup(ctx context.Context) (int64, error) { - start := time.Now() - result := metrics.RollupError - var recordedRows int64 - var watermark, sourceMax int64 // see refreshServiceRollup - defer func() { - metrics.RecordRollupComponent(metrics.RollupEndpoint, result, recordedRows, time.Since(start).Seconds()) - if result == metrics.RollupError && sourceMax > 0 { - updateRollupProgress(metrics.RollupEndpoint, true, watermark, sourceMax) - } - }() - unlock := d.writeGate.Lock(writegate.WriteRollupEndpoint) - defer unlock() - if err := d.lockRollupParquetRead(ctx); err != nil { - return 0, err - } - defer d.parquetMu.RUnlock() - - tx, err := d.writer().BeginTx(ctx, nil) - if err != nil { - return 0, err - } - defer func() { _ = tx.Rollback() }() - - disabled, err := rollupWatermark(ctx, tx, EndpointDisabledStateKey) - if err != nil { - return 0, err - } - if disabled != 0 { - err := tx.Commit() - if err == nil { - result = metrics.RollupDisabled - updateRollupProgress(metrics.RollupEndpoint, false, 0, 0) - } - return 0, err - } - lastWatermark, err := rollupWatermark(ctx, tx, EndpointRollupStateKey) - if err != nil { - return 0, err - } - watermark = lastWatermark - lastRawMax, err := rollupWatermark(ctx, tx, endpointRollupRawMaxKey) - if err != nil { - return 0, err - } - backfillStarted, err := rollupWatermark(ctx, tx, endpointBackfillStateKey) - if err != nil { - return 0, err - } - - rawWatermark, err := maxEdgeRollupWatermark(ctx, tx) - if err != nil { - return 0, err - } - sourceMax = rawWatermark - if rawWatermark <= lastWatermark { - err := tx.Commit() - if err == nil { - result = metrics.RollupNoop - updateRollupProgress(metrics.RollupEndpoint, true, lastWatermark, rawWatermark) - } - return 0, err - } - minIngested := int64(0) - if lastWatermark == 0 { - if minIngested, err = minEdgeRollupIngested(ctx, tx); err != nil { - return 0, err - } - if err := storeRollupWatermark(ctx, tx, endpointBackfillStateKey, 1); err != nil { - return 0, err - } - backfillStarted = 1 - } - windowStart, windowEnd, chunked := rollupWindow(lastWatermark, minIngested, rawWatermark) - - newWatermark := windowEnd - if rawWatermark > lastRawMax { - if guarded := rawWatermark - d.rollupSafetyLagNanos(); newWatermark > guarded { - newWatermark = guarded - } - if newWatermark < lastWatermark { - newWatermark = lastWatermark - } - } - rawMaxProcessed := rawWatermark - if chunked { - rawMaxProcessed = windowEnd - } - - if _, err := tx.ExecContext(ctx, endpointRollupDeleteSQL, windowStart, windowEnd); err != nil { - return 0, err - } - res, err := tx.ExecContext(ctx, endpointRollupInsertSQL, windowStart, windowEnd) - if err != nil { - return 0, err - } - if err := storeRollupWatermark(ctx, tx, EndpointRollupStateKey, newWatermark); err != nil { - return 0, err - } - if err := storeRollupWatermark(ctx, tx, endpointRollupRawMaxKey, rawMaxProcessed); err != nil { - return 0, err - } - // The product query remains on raw spans until a normal (non-skip) backfill - // reaches the live tip. This prevents partial endpoint history on upgrade. - if backfillStarted != 0 && !chunked && windowEnd == rawWatermark { - if err := storeRollupWatermark(ctx, tx, EndpointReadyStateKey, 1); err != nil { - return 0, err - } - } - if err := tx.Commit(); err != nil { - return 0, err - } - result = metrics.RollupSuccess - updateRollupProgress(metrics.RollupEndpoint, true, newWatermark, rawWatermark) - rows, err := res.RowsAffected() - if err != nil { - slog.Warn("endpoint rollup rows affected unavailable", "err", err) - return 0, nil - } - recordedRows = rows - return rows, nil -} - func (d *Duck) refreshEdgeRollup(ctx context.Context) (int64, error) { start := time.Now() result := metrics.RollupError @@ -1072,8 +973,8 @@ func (d *Duck) refreshEdgeRollup(ctx context.Context) (int64, error) { var minStartT, maxStartT sql.NullTime err = tx.QueryRowContext(ctx, ` SELECT - MIN(date_trunc('minute', start_time)), - MAX(date_trunc('minute', start_time)) + MIN(date_trunc('minute', start_time::TIMESTAMP_NS)), + MAX(date_trunc('minute', start_time::TIMESTAMP_NS)) FROM spans WHERE ingested_unix_nano > ? AND ingested_unix_nano <= ? @@ -1230,8 +1131,8 @@ FROM ( FROM spans WHERE ingested_unix_nano > ? AND ingested_unix_nano <= ? - AND start_time >= ? - AND start_time < ? + AND start_time >= ?::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND start_time < ?::TIMESTAMP_NS::TIMESTAMPTZ_NS LIMIT ? )`, windowStart, windowEnd, subLo, subHi, rowLimit+1).Scan(&rows); err != nil { return time.Time{}, err @@ -1381,7 +1282,7 @@ FROM spans`).Scan(&watermark) const serviceRollupDeleteSQL = ` WITH affected AS ( - SELECT DISTINCT namespace, date_trunc('minute', start_time) AS bucket, service + SELECT DISTINCT namespace, date_trunc('minute', start_time::TIMESTAMP_NS) AS bucket, service FROM spans WHERE ingested_unix_nano > ? AND ingested_unix_nano <= ? @@ -1389,7 +1290,7 @@ WITH affected AS ( AND service IS NOT NULL AND service != '' UNION - SELECT DISTINCT namespace, date_trunc('minute', time) AS bucket, service + SELECT DISTINCT namespace, date_trunc('minute', time::TIMESTAMP_NS) AS bucket, service FROM logs WHERE ingested_unix_nano > ? AND ingested_unix_nano <= ? @@ -1397,7 +1298,7 @@ WITH affected AS ( AND service IS NOT NULL AND service != '' UNION - SELECT DISTINCT namespace, date_trunc('minute', time) AS bucket, service + SELECT DISTINCT namespace, date_trunc('minute', time::TIMESTAMP_NS) AS bucket, service FROM metrics WHERE ingested_unix_nano > ? AND ingested_unix_nano <= ? @@ -1416,7 +1317,7 @@ WHERE EXISTS ( var serviceRollupInsertSQL = ` WITH affected AS ( - SELECT DISTINCT namespace, date_trunc('minute', start_time) AS bucket, service + SELECT DISTINCT namespace, date_trunc('minute', start_time::TIMESTAMP_NS) AS bucket, service FROM spans WHERE ingested_unix_nano > ? AND ingested_unix_nano <= ? @@ -1424,7 +1325,7 @@ WITH affected AS ( AND service IS NOT NULL AND service != '' UNION - SELECT DISTINCT namespace, date_trunc('minute', time) AS bucket, service + SELECT DISTINCT namespace, date_trunc('minute', time::TIMESTAMP_NS) AS bucket, service FROM logs WHERE ingested_unix_nano > ? AND ingested_unix_nano <= ? @@ -1432,7 +1333,7 @@ WITH affected AS ( AND service IS NOT NULL AND service != '' UNION - SELECT DISTINCT namespace, date_trunc('minute', time) AS bucket, service + SELECT DISTINCT namespace, date_trunc('minute', time::TIMESTAMP_NS) AS bucket, service FROM metrics WHERE ingested_unix_nano > ? AND ingested_unix_nano <= ? @@ -1443,7 +1344,7 @@ WITH affected AS ( span_agg AS ( SELECT s.namespace, - date_trunc('minute', s.start_time) AS bucket, + date_trunc('minute', s.start_time::TIMESTAMP_NS) AS bucket, s.service, COUNT(*) AS spans, COUNT(*) FILTER (WHERE COALESCE(s.kind, '') NOT IN ('SPAN_KIND_CLIENT', 'SPAN_KIND_PRODUCER')) AS served_spans, @@ -1464,7 +1365,7 @@ span_agg AS ( FROM spans s JOIN affected a ON a.namespace = s.namespace - AND a.bucket = date_trunc('minute', s.start_time) + AND a.bucket = date_trunc('minute', s.start_time::TIMESTAMP_NS) AND a.service = s.service -- Bound the scan to the affected bucket range so Telemetry prunes parquet by -- start_time stats instead of scanning all history (the join on a computed @@ -1473,39 +1374,39 @@ span_agg AS ( -- [MIN(bucket), MAX(bucket)+1min) — so it drops no rows. A late span with an -- old start_time widens the range (and this scan) only for the pass that -- ingests it, same trade-off as the edge rollup's parent bound. - WHERE s.start_time >= (SELECT MIN(bucket) FROM affected) - AND s.start_time < (SELECT MAX(bucket) FROM affected) + INTERVAL 1 MINUTE - GROUP BY s.namespace, date_trunc('minute', s.start_time), s.service + WHERE s.start_time >= ((SELECT MIN(bucket) FROM affected))::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND s.start_time < ((SELECT MAX(bucket) FROM affected) + INTERVAL 1 MINUTE)::TIMESTAMP_NS::TIMESTAMPTZ_NS + GROUP BY s.namespace, date_trunc('minute', s.start_time::TIMESTAMP_NS), s.service ), log_agg AS ( SELECT l.namespace, - date_trunc('minute', l.time) AS bucket, + date_trunc('minute', l.time::TIMESTAMP_NS) AS bucket, l.service, COUNT(*) AS log_count FROM logs l JOIN affected a ON a.namespace = l.namespace - AND a.bucket = date_trunc('minute', l.time) + AND a.bucket = date_trunc('minute', l.time::TIMESTAMP_NS) AND a.service = l.service - WHERE l.time >= (SELECT MIN(bucket) FROM affected) - AND l.time < (SELECT MAX(bucket) FROM affected) + INTERVAL 1 MINUTE - GROUP BY l.namespace, date_trunc('minute', l.time), l.service + WHERE l.time >= ((SELECT MIN(bucket) FROM affected))::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND l.time < ((SELECT MAX(bucket) FROM affected) + INTERVAL 1 MINUTE)::TIMESTAMP_NS::TIMESTAMPTZ_NS + GROUP BY l.namespace, date_trunc('minute', l.time::TIMESTAMP_NS), l.service ), metric_agg AS ( SELECT m.namespace, - date_trunc('minute', m.time) AS bucket, + date_trunc('minute', m.time::TIMESTAMP_NS) AS bucket, m.service, COUNT(DISTINCT m.name) AS metric_count FROM metrics m JOIN affected a ON a.namespace = m.namespace - AND a.bucket = date_trunc('minute', m.time) + AND a.bucket = date_trunc('minute', m.time::TIMESTAMP_NS) AND a.service = m.service - WHERE m.time >= (SELECT MIN(bucket) FROM affected) - AND m.time < (SELECT MAX(bucket) FROM affected) + INTERVAL 1 MINUTE - GROUP BY m.namespace, date_trunc('minute', m.time), m.service + WHERE m.time >= ((SELECT MIN(bucket) FROM affected))::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND m.time < ((SELECT MAX(bucket) FROM affected) + INTERVAL 1 MINUTE)::TIMESTAMP_NS::TIMESTAMPTZ_NS + GROUP BY m.namespace, date_trunc('minute', m.time::TIMESTAMP_NS), m.service ) INSERT INTO service_rollup ( namespace, @@ -1535,103 +1436,15 @@ LEFT JOIN span_agg s USING (namespace, bucket, service) LEFT JOIN log_agg l USING (namespace, bucket, service) LEFT JOIN metric_agg m USING (namespace, bucket, service);` -// Endpoint latency is stored as a mergeable fixed-boundary histogram. Unlike -// averaging minute p95 values, summing these bin counts preserves the latency -// distribution across arbitrary query windows. Bounds include Fanout's health -// thresholds (750ms and 2s) and cap the overflow bucket at five minutes. -const endpointRollupDeleteSQL = ` -WITH affected AS ( - SELECT DISTINCT - namespace, - date_trunc('minute', start_time) AS bucket, - COALESCE(service, '') AS service, - COALESCE(NULLIF(http_method, ''), 'CALL') AS method, - COALESCE(NULLIF(http_route, ''), NULLIF(operation, ''), 'unknown') AS path - FROM spans - WHERE ingested_unix_nano > ? - AND ingested_unix_nano <= ? - AND start_time IS NOT NULL -) -DELETE FROM endpoint_rollup -WHERE EXISTS ( - SELECT 1 - FROM affected - WHERE affected.namespace = endpoint_rollup.namespace - AND affected.bucket = endpoint_rollup.bucket - AND affected.service = endpoint_rollup.service - AND affected.method = endpoint_rollup.method - AND affected.path = endpoint_rollup.path -);` - -const endpointRollupInsertSQL = ` -WITH affected AS ( - SELECT DISTINCT - namespace, - date_trunc('minute', start_time) AS bucket, - COALESCE(service, '') AS service, - COALESCE(NULLIF(http_method, ''), 'CALL') AS method, - COALESCE(NULLIF(http_route, ''), NULLIF(operation, ''), 'unknown') AS path - FROM spans - WHERE ingested_unix_nano > ? - AND ingested_unix_nano <= ? - AND start_time IS NOT NULL -) -INSERT INTO endpoint_rollup ( - namespace, bucket, service, method, path, calls, error_count, duration_count, duration_buckets -) -SELECT - s.namespace, - date_trunc('minute', s.start_time) AS bucket, - COALESCE(s.service, '') AS service, - COALESCE(NULLIF(s.http_method, ''), 'CALL') AS method, - COALESCE(NULLIF(s.http_route, ''), NULLIF(s.operation, ''), 'unknown') AS path, - COUNT(*) AS calls, - COUNT(*) FILTER (WHERE upper(s.status) IN ('ERROR', 'STATUS_CODE_ERROR')) AS error_count, - COUNT(s.duration_ms) AS duration_count, - struct_pack( - le_0_1 := COUNT(*) FILTER (WHERE s.duration_ms <= 0.1), - le_0_5 := COUNT(*) FILTER (WHERE s.duration_ms <= 0.5), - le_1 := COUNT(*) FILTER (WHERE s.duration_ms <= 1), - le_2_5 := COUNT(*) FILTER (WHERE s.duration_ms <= 2.5), - le_5 := COUNT(*) FILTER (WHERE s.duration_ms <= 5), - le_10 := COUNT(*) FILTER (WHERE s.duration_ms <= 10), - le_25 := COUNT(*) FILTER (WHERE s.duration_ms <= 25), - le_50 := COUNT(*) FILTER (WHERE s.duration_ms <= 50), - le_100 := COUNT(*) FILTER (WHERE s.duration_ms <= 100), - le_250 := COUNT(*) FILTER (WHERE s.duration_ms <= 250), - le_500 := COUNT(*) FILTER (WHERE s.duration_ms <= 500), - le_750 := COUNT(*) FILTER (WHERE s.duration_ms <= 750), - le_1000 := COUNT(*) FILTER (WHERE s.duration_ms <= 1000), - le_2000 := COUNT(*) FILTER (WHERE s.duration_ms <= 2000), - le_5000 := COUNT(*) FILTER (WHERE s.duration_ms <= 5000), - le_30000 := COUNT(*) FILTER (WHERE s.duration_ms <= 30000), - le_300000 := COUNT(*) FILTER (WHERE s.duration_ms <= 300000) - ) AS duration_buckets -FROM spans s -JOIN affected a - ON a.namespace = s.namespace - AND a.bucket = date_trunc('minute', s.start_time) - AND a.service = COALESCE(s.service, '') - AND a.method = COALESCE(NULLIF(s.http_method, ''), 'CALL') - AND a.path = COALESCE(NULLIF(s.http_route, ''), NULLIF(s.operation, ''), 'unknown') -WHERE s.start_time >= (SELECT MIN(bucket) FROM affected) - AND s.start_time < (SELECT MAX(bucket) FROM affected) + INTERVAL 1 MINUTE -GROUP BY - s.namespace, - date_trunc('minute', s.start_time), - COALESCE(s.service, ''), - COALESCE(NULLIF(s.http_method, ''), 'CALL'), - COALESCE(NULLIF(s.http_route, ''), NULLIF(s.operation, ''), 'unknown');` - const edgeRollupDeleteSQL = ` WITH affected AS ( - SELECT DISTINCT namespace, date_trunc('minute', start_time) AS bucket + SELECT DISTINCT namespace, date_trunc('minute', start_time::TIMESTAMP_NS) AS bucket FROM spans WHERE ingested_unix_nano > ? AND ingested_unix_nano <= ? AND start_time IS NOT NULL - AND start_time >= ? - AND start_time < ? + AND start_time >= ?::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND start_time < ?::TIMESTAMP_NS::TIMESTAMPTZ_NS ) DELETE FROM edge_rollup WHERE EXISTS ( @@ -1643,13 +1456,13 @@ WHERE EXISTS ( const edgeRollupInsertSQL = ` WITH affected AS ( - SELECT DISTINCT namespace, date_trunc('minute', start_time) AS bucket + SELECT DISTINCT namespace, date_trunc('minute', start_time::TIMESTAMP_NS) AS bucket FROM spans WHERE ingested_unix_nano > ? AND ingested_unix_nano <= ? AND start_time IS NOT NULL - AND start_time >= ? - AND start_time < ? + AND start_time >= ?::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND start_time < ?::TIMESTAMP_NS::TIMESTAMPTZ_NS ), -- The affected bucket range, computed once. As four scalar subqueries -- repeated across the predicates below, these read as correlated to the @@ -1676,15 +1489,15 @@ bounds AS ( parent_scope AS ( SELECT parent.namespace, parent.span_id, parent.trace_id, parent.service FROM spans parent, bounds - WHERE parent.start_time >= bounds.lo - INTERVAL 1 HOUR - AND parent.start_time <= bounds.hi + INTERVAL 1 HOUR + WHERE parent.start_time >= (bounds.lo - INTERVAL 1 HOUR)::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND parent.start_time <= (bounds.hi + INTERVAL 1 HOUR)::TIMESTAMP_NS::TIMESTAMPTZ_NS AND parent.service IS NOT NULL AND parent.service != '' ), call_edges AS ( SELECT child.namespace, - date_trunc('minute', child.start_time) AS bucket, + date_trunc('minute', child.start_time::TIMESTAMP_NS) AS bucket, parent.service AS caller, child.service AS callee, COUNT(*) AS calls, @@ -1698,7 +1511,7 @@ call_edges AS ( AND child.namespace = parent.namespace JOIN affected a ON a.namespace = child.namespace - AND a.bucket = date_trunc('minute', child.start_time) + AND a.bucket = date_trunc('minute', child.start_time::TIMESTAMP_NS) -- bounds joins last, and as an explicit CROSS JOIN. Written as -- "FROM spans child, bounds JOIN parent_scope ON child...", the comma binds -- looser than JOIN: that parses as "spans child" comma "(bounds JOIN @@ -1711,9 +1524,9 @@ call_edges AS ( WHERE child.service IS NOT NULL AND child.service != '' AND parent.service != child.service - AND child.start_time >= bounds.lo - AND child.start_time < bounds.hi + INTERVAL 1 MINUTE - GROUP BY child.namespace, date_trunc('minute', child.start_time), parent.service, child.service + AND child.start_time >= (bounds.lo)::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND child.start_time < (bounds.hi + INTERVAL 1 MINUTE)::TIMESTAMP_NS::TIMESTAMPTZ_NS + GROUP BY child.namespace, date_trunc('minute', child.start_time::TIMESTAMP_NS), parent.service, child.service ), -- Producers and consumers are aggregated per (namespace, bucket, service, -- destination, msg_system) BEFORE the join — joining raw span rows multiplies @@ -1724,42 +1537,42 @@ call_edges AS ( producers AS ( SELECT DISTINCT s.namespace, - date_trunc('minute', s.start_time) AS bucket, + date_trunc('minute', s.start_time::TIMESTAMP_NS) AS bucket, s.service, - json_extract_string(s.attributes_json, '$."messaging.destination.name"') AS destination, - json_extract_string(s.attributes_json, '$."messaging.system"') AS msg_system + s.messaging_destination AS destination, + s.messaging_system AS msg_system FROM spans s JOIN affected a ON a.namespace = s.namespace - AND a.bucket = date_trunc('minute', s.start_time) + AND a.bucket = date_trunc('minute', s.start_time::TIMESTAMP_NS) WHERE s.kind = 'SPAN_KIND_PRODUCER' - AND s.start_time >= (SELECT lo FROM bounds) - AND s.start_time < (SELECT hi FROM bounds) + INTERVAL 1 MINUTE + AND s.start_time >= ((SELECT lo FROM bounds))::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND s.start_time < ((SELECT hi FROM bounds) + INTERVAL 1 MINUTE)::TIMESTAMP_NS::TIMESTAMPTZ_NS AND s.service IS NOT NULL AND s.service != '' - AND json_extract_string(s.attributes_json, '$."messaging.destination.name"') IS NOT NULL + AND s.messaging_destination IS NOT NULL ), consumers AS ( SELECT s.namespace, - date_trunc('minute', s.start_time) AS bucket, + date_trunc('minute', s.start_time::TIMESTAMP_NS) AS bucket, s.service, - json_extract_string(s.attributes_json, '$."messaging.destination.name"') AS destination, - json_extract_string(s.attributes_json, '$."messaging.system"') AS msg_system, + s.messaging_destination AS destination, + s.messaging_system AS msg_system, COUNT(*) AS calls FROM spans s JOIN affected a ON a.namespace = s.namespace - AND a.bucket = date_trunc('minute', s.start_time) + AND a.bucket = date_trunc('minute', s.start_time::TIMESTAMP_NS) WHERE s.kind = 'SPAN_KIND_CONSUMER' - AND s.start_time >= (SELECT lo FROM bounds) - AND s.start_time < (SELECT hi FROM bounds) + INTERVAL 1 MINUTE + AND s.start_time >= ((SELECT lo FROM bounds))::TIMESTAMP_NS::TIMESTAMPTZ_NS + AND s.start_time < ((SELECT hi FROM bounds) + INTERVAL 1 MINUTE)::TIMESTAMP_NS::TIMESTAMPTZ_NS AND s.service IS NOT NULL AND s.service != '' - AND json_extract_string(s.attributes_json, '$."messaging.destination.name"') IS NOT NULL - GROUP BY s.namespace, date_trunc('minute', s.start_time), s.service, - json_extract_string(s.attributes_json, '$."messaging.destination.name"'), - json_extract_string(s.attributes_json, '$."messaging.system"') + AND s.messaging_destination IS NOT NULL + GROUP BY s.namespace, date_trunc('minute', s.start_time::TIMESTAMP_NS), s.service, + s.messaging_destination, + s.messaging_system ), messaging_edges AS ( SELECT @@ -1819,15 +1632,38 @@ func (d *Duck) QueryContext(ctx context.Context, query string, args ...any) (que d.parquetMu.RUnlock() return nil, err } + var tx *sql.Tx + var db snapshotSQL = conn + if window, ok := queryrows.ReadWindow(ctx); ok && d.repository != nil { + tx, err = conn.BeginTx(ctx, nil) + if err == nil { + db = tx + query, err = d.bindSnapshot(ctx, tx, query, window) + } + if err != nil { + if tx != nil { + _ = tx.Rollback() + } + _ = conn.Close() + d.parquetMu.RUnlock() + return nil, err + } + } started := time.Now() - rows, err := conn.QueryContext(ctx, query, args...) + rows, err := db.QueryContext(ctx, query, args...) metrics.DuckDBStatement.Observe(time.Since(started).Seconds()) if err != nil { + if tx != nil { + _ = tx.Rollback() + } _ = conn.Close() d.parquetMu.RUnlock() return nil, err } release := func() { + if tx != nil { + _ = tx.Rollback() + } // The connection goes back to the pool only once its rows are done // with it, which is what closing the rows first guarantees. // @@ -1867,6 +1703,21 @@ func (r *lockedRows) release() { r.unlockOnce.Do(r.unlock) } // QueryRowScan executes a single-row query against immutable Parquet files and // DuckDB's local rollup cache. func (d *Duck) QueryRowScan(ctx context.Context, dest []any, query string, args ...any) error { + if _, ok := queryrows.ReadWindow(ctx); ok && d.repository != nil { + rows, err := d.QueryContext(ctx, query, args...) + if err != nil { + return err + } + defer rows.Close() + if rows.Next() { + return rows.Scan(dest...) + } + if err := rows.Err(); err != nil { + return err + } + return sql.ErrNoRows + } + if err := d.lockParquetRead(ctx, readerQuery); err != nil { return err } @@ -2001,12 +1852,12 @@ func (d *Duck) LogsSamples(ctx context.Context, windowMinutes, limit int, patter namespace := d.DefaultNamespace() q := fmt.Sprintf(` SELECT - strftime(time, '%%Y-%%m-%%dT%%H:%%M:%%SZ') AS ts, + strftime(time::TIMESTAMP_NS, '%%Y-%%m-%%dT%%H:%%M:%%SZ') AS ts, body, service AS service_name, severity FROM logs -WHERE time >= now() - INTERVAL %d MINUTE +WHERE time >= (now() - INTERVAL %d MINUTE)::TIMESTAMP_NS::TIMESTAMPTZ_NS AND (? = '' OR namespace = ?) AND body ~ ? ORDER BY time DESC @@ -2102,7 +1953,7 @@ func (d *Duck) ErrorRoutes(ctx context.Context, windowMinutes, limit int) ([]Err q := fmt.Sprintf(` SELECT body AS route, COUNT(*) AS count FROM logs -WHERE time >= now() - INTERVAL %d MINUTE +WHERE time >= (now() - INTERVAL %d MINUTE)::TIMESTAMP_NS::TIMESTAMPTZ_NS AND (? = '' OR namespace = ?) AND severity IN ('ERROR', 'ERR', 'WARN') GROUP BY body @@ -2138,7 +1989,7 @@ func (d *Duck) ErrorRouteDetails(ctx context.Context, windowMinutes, limit int) WITH spans_with_errors AS ( SELECT service AS service_name, operation AS name, status AS status_code FROM spans - WHERE start_time >= now() - INTERVAL %d MINUTE + WHERE start_time >= (now() - INTERVAL %d MINUTE)::TIMESTAMP_NS::TIMESTAMPTZ_NS AND (? = '' OR namespace = ?) ) SELECT service_name, diff --git a/internal/query/duck_test.go b/internal/query/duck_test.go index c4905776..41bdde26 100644 --- a/internal/query/duck_test.go +++ b/internal/query/duck_test.go @@ -477,7 +477,6 @@ func TestRepositoryPublicationDoesNotWaitForDuckDBWrites(t *testing.T) { t.Fatal(err) } mock.ExpectExec("DELETE FROM service_rollup").WillReturnResult(sqlmock.NewResult(0, 0)) - mock.ExpectExec("DELETE FROM endpoint_rollup").WillReturnResult(sqlmock.NewResult(0, 0)) mock.ExpectExec("DELETE FROM edge_rollup").WillReturnResult(sqlmock.NewResult(0, 0)) mock.ExpectExec("CHECKPOINT").WillReturnResult(sqlmock.NewResult(0, 0)) d := &Duck{DB: db, repository: repository, cfg: config.Config{MaintenanceInterval: time.Nanosecond, RetentionDays: 1}} @@ -570,6 +569,10 @@ func (f failingPublishCompactor) PublishParquet(context.Context, func(context.Co return errors.New("injected publication failure") } +func (f failingPublishCompactor) PublishParquetReplacement(context.Context, telemetry.BatchMetadata, []string, func(context.Context) error) error { + return errors.New("injected publication failure") +} + func TestMaintenanceRecoversCompactionBeforeRetention(t *testing.T) { repository, err := telemetrystore.Open(t.TempDir()) if err != nil { @@ -578,7 +581,7 @@ func TestMaintenanceRecoversCompactionBeforeRetention(t *testing.T) { defer repository.Close() db := openTestDuck(t) defer db.Close() - for _, table := range []string{"service_rollup", "endpoint_rollup", "edge_rollup"} { + for _, table := range []string{"service_rollup", "edge_rollup"} { if _, err := db.Exec("CREATE TABLE " + table + " (bucket TIMESTAMP)"); err != nil { t.Fatal(err) } @@ -713,16 +716,6 @@ func TestFailedRollupStillPublishesLag(t *testing.T) { }, refresh: func(d *Duck, ctx context.Context) (int64, error) { return d.refreshServiceRollup(ctx) }, }, - { - component: "endpoint", - stateReads: []stateRead{ - {EndpointDisabledStateKey, 0}, - {EndpointRollupStateKey, watermarkNanos}, - {endpointRollupRawMaxKey, watermarkNanos}, - {endpointBackfillStateKey, 0}, - }, - refresh: func(d *Duck, ctx context.Context) (int64, error) { return d.refreshEndpointRollup(ctx) }, - }, { component: "edge", stateReads: []stateRead{ diff --git a/internal/query/edge_backlog_test.go b/internal/query/edge_backlog_test.go index 065747d4..d6b3751f 100644 --- a/internal/query/edge_backlog_test.go +++ b/internal/query/edge_backlog_test.go @@ -164,23 +164,6 @@ func TestSkipRollupToLatest(t *testing.T) { t.Fatalf("NewDuck: %v", err) } defer d.Close() - if _, err := d.DB.ExecContext(ctx, ` -INSERT INTO endpoint_rollup ( - namespace, bucket, service, method, path, calls, error_count, duration_count, duration_buckets -) VALUES ( - 'default', date_trunc('minute', now()), 'old', 'GET', '/stale', 1, 0, 1, - struct_pack( - le_0_1 := 0, le_0_5 := 0, le_1 := 0, le_2_5 := 0, le_5 := 0, - le_10 := 1, le_25 := 1, le_50 := 1, le_100 := 1, le_250 := 1, - le_500 := 1, le_750 := 1, le_1000 := 1, le_2000 := 1, - le_5000 := 1, le_30000 := 1, le_300000 := 1 - ) -); -INSERT INTO rollup_state (cache_key, last_ingested_unix_nano, updated_at) -VALUES (?, 1, now()) -ON CONFLICT (cache_key) DO UPDATE SET last_ingested_unix_nano = 1, updated_at = now()`, EndpointReadyStateKey); err != nil { - t.Fatalf("seed prior endpoint cache state: %v", err) - } if err := d.skipRollupToLatest(ctx); err != nil { t.Fatalf("skipRollupToLatest: %v", err) @@ -194,8 +177,8 @@ ON CONFLICT (cache_key) DO UPDATE SET last_ingested_unix_nano = 1, updated_at = if err != nil { t.Fatalf("rollupOnce: %v", err) } - if n != 0 { - t.Errorf("rollupOnce processed %d rows after skip-to-latest; want 0 (backlog should be skipped)", n) + if n <= 0 { + t.Errorf("rollupOnce materialized %d read-cache rows after skip-to-latest; want positive (read caches remain complete)", n) } for _, component := range []string{"service", "edge"} { if got := testutil.ToFloat64(metrics.RollupComponentTotal.WithLabelValues(component, "noop")); got != 1 { @@ -208,24 +191,9 @@ ON CONFLICT (cache_key) DO UPDATE SET last_ingested_unix_nano = 1, updated_at = t.Errorf("%s backlog chunks = %f, want 0", component, got) } } - if got := testutil.ToFloat64(metrics.RollupComponentTotal.WithLabelValues("endpoint", "disabled")); got != 1 { - t.Errorf("endpoint disabled outcomes = %f, want 1", got) - } - if got := testutil.ToFloat64(metrics.RollupEnabled.WithLabelValues("endpoint")); got != 0 { - t.Errorf("endpoint enabled = %f, want 0", got) - } - var endpointRows, endpointReady, endpointDisabled int64 - if err := d.DB.QueryRowContext(ctx, `SELECT count(*) FROM endpoint_rollup`).Scan(&endpointRows); err != nil { - t.Fatalf("count endpoint_rollup after skip: %v", err) - } - if err := d.DB.QueryRowContext(ctx, `SELECT last_ingested_unix_nano FROM rollup_state WHERE cache_key = ?`, EndpointReadyStateKey).Scan(&endpointReady); err != nil { - t.Fatalf("query endpoint ready state: %v", err) - } - if err := d.DB.QueryRowContext(ctx, `SELECT last_ingested_unix_nano FROM rollup_state WHERE cache_key = ?`, EndpointDisabledStateKey).Scan(&endpointDisabled); err != nil { - t.Fatalf("query endpoint disabled state: %v", err) - } - if endpointRows != 0 || endpointReady != 0 || endpointDisabled == 0 { - t.Fatalf("endpoint state after skip = rows:%d ready:%d disabled:%d, want 0/0/nonzero", endpointRows, endpointReady, endpointDisabled) + var cached int + if err := d.DB.QueryRowContext(ctx, `SELECT count(*) FROM read_batches`).Scan(&cached); err != nil || cached != 1 { + t.Fatalf("read batches after skip=%d: %v", cached, err) } // Insert one fresh live span (ingested_unix_nano = now) and verify that diff --git a/internal/query/edge_rollup_plan_test.go b/internal/query/edge_rollup_plan_test.go index 9db7f691..14aed023 100644 --- a/internal/query/edge_rollup_plan_test.go +++ b/internal/query/edge_rollup_plan_test.go @@ -37,19 +37,18 @@ func TestEdgeRollupPlanUsesHashJoins(t *testing.T) { spanHi := time.Date(2026, 10, 1, 0, 0, 0, 0, time.UTC) shippedPlan := explain(t, db, edgeRollupInsertSQL, windowLo, windowHi, spanLo, spanHi) - commaPlan := explain(t, db, commaForm, windowLo, windowHi, spanLo, spanHi) - // The defect stated as an assertion. If DuckDB ever folds this away, the - // guard below stops proving anything and this says so rather than passing. - if !strings.Contains(commaPlan, "CROSS_PRODUCT") { - t.Fatalf("the comma form no longer plans a CROSS_PRODUCT, so this guard proves nothing now:\n%s", commaPlan) - } - for _, bad := range []string{"CROSS_PRODUCT", "DELIM_JOIN", "DELIM_GET", "NESTED_LOOP_JOIN"} { + // DuckDB 2 optimizes the historical comma form too. Guard the shipped plan + // directly rather than requiring the optimizer to retain an old defect. + // A nested loop against the single-row bounds CTE is legitimate. The + // costly span-to-span joins must remain hash joins, without correlated + // delim joins or an unfiltered Cartesian product. + for _, bad := range []string{"Cross Product", "Delim Join", "Delim Get"} { if strings.Contains(shippedPlan, bad) { t.Errorf("edge rollup plans a %s; the FROM clause has regressed to the comma form:\n%s", bad, shippedPlan) } } - if !strings.Contains(shippedPlan, "HASH_JOIN") { + if !strings.Contains(shippedPlan, "Hash Join") { t.Errorf("edge rollup plans no HASH_JOIN at all:\n%s", shippedPlan) } @@ -161,10 +160,15 @@ func seedEdgeRollupFixture(t *testing.T, db *sql.DB) { if _, err := db.Exec(createEdgeRollupTable); err != nil { t.Fatal(err) } + if _, err := db.Exec(macroAttr); err != nil { + t.Fatal(err) + } if _, err := db.Exec(`CREATE TABLE spans ( namespace TEXT, trace_id TEXT, span_id TEXT, parent_span_id TEXT, service TEXT, kind TEXT, status TEXT, duration_ms DOUBLE, - start_time TIMESTAMP, ingested_unix_nano BIGINT, attributes_json TEXT + start_time TIMESTAMP, ingested_unix_nano BIGINT, attributes VARIANT, + messaging_system VARCHAR GENERATED ALWAYS AS (TRY_CAST(attributes['messaging.system'] AS VARCHAR)), + messaging_destination VARCHAR GENERATED ALWAYS AS (TRY_CAST(attributes['messaging.destination.name'] AS VARCHAR)) )`); err != nil { t.Fatal(err) } @@ -185,7 +189,7 @@ func seedEdgeRollupFixture(t *testing.T, db *sql.DB) { if attributes == "" { attributes = "{}" } - if _, err := db.Exec(`INSERT INTO spans VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, + if _, err := db.Exec(`INSERT INTO spans VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?::VARCHAR::JSON::VARIANT)`, "default", "trace-1", s.id, s.parent, s.service, s.kind, "STATUS_CODE_OK", 5.0, fresh, int64(100), attributes); err != nil { t.Fatal(err) @@ -197,7 +201,7 @@ func seedEdgeRollupFixture(t *testing.T, db *sql.DB) { SELECT 'default', 'new-' || (i // 2)::VARCHAR, 'new-' || i::VARCHAR, CASE WHEN i % 2 = 1 THEN 'new-' || (i - 1)::VARCHAR ELSE '' END, 'svc-' || (i % 2 + 4)::VARCHAR, 'SPAN_KIND_SERVER', 'STATUS_CODE_OK', 5.0, - TIMESTAMP '2026-09-20 12:00:00', 100, '{}' + TIMESTAMP '2026-09-20 12:00:00', 100, '{}'::JSON::VARIANT FROM range(2000) t(i)`); err != nil { t.Fatal(err) } @@ -206,7 +210,7 @@ func seedEdgeRollupFixture(t *testing.T, db *sql.DB) { SELECT 'default', 'old-' || (i // 2)::VARCHAR, 'old-' || i::VARCHAR, CASE WHEN i % 2 = 1 THEN 'old-' || (i - 1)::VARCHAR ELSE '' END, 'svc-' || (i % 8)::VARCHAR, 'SPAN_KIND_SERVER', 'STATUS_CODE_OK', 5.0, - TIMESTAMP '2026-08-26 00:00:00' + INTERVAL (i % 36000) MINUTE, 1, '{}' + TIMESTAMP '2026-08-26 00:00:00' + INTERVAL (i % 36000) MINUTE, 1, '{}'::JSON::VARIANT FROM range(600000) t(i)`); err != nil { t.Fatal(err) } diff --git a/internal/query/ensure_limit_test.go b/internal/query/ensure_limit_test.go deleted file mode 100644 index 9975e292..00000000 --- a/internal/query/ensure_limit_test.go +++ /dev/null @@ -1,81 +0,0 @@ -package query - -import ( - "context" - "testing" -) - -func TestEnsureLimit_WrapsWithoutClobberingInnerLimits(t *testing.T) { - cases := []struct { - name string - query string - want string - }{ - {"plain", "SELECT 1", "SELECT * FROM (SELECT 1) AS _capped LIMIT 1000"}, - {"trailing semicolon", "SELECT 1;", "SELECT * FROM (SELECT 1) AS _capped LIMIT 1000"}, - {"trailing whitespace+semicolon", "SELECT 1 ;\n", "SELECT * FROM (SELECT 1) AS _capped LIMIT 1000"}, - { - "inner limit preserved", - "WITH t AS (SELECT * FROM spans LIMIT 5000) SELECT * FROM t", - "SELECT * FROM (WITH t AS (SELECT * FROM spans LIMIT 5000) SELECT * FROM t) AS _capped LIMIT 1000", - }, - } - for _, c := range cases { - t.Run(c.name, func(t *testing.T) { - if got := ensureLimit(c.query, 1000); got != c.want { - t.Errorf("ensureLimit(%q)\n got: %q\nwant: %q", c.query, got, c.want) - } - }) - } -} - -// TestEnsureLimit_CapsAndPreservesOrder proves the wrap executes, enforces the row -// cap, and preserves an inner ORDER BY (DuckDB carries subquery ordering up). -func TestEnsureLimit_CapsAndPreservesOrder(t *testing.T) { - db := openTestDuck(t) - q := ensureLimit("SELECT n FROM range(100) AS t(n) ORDER BY n DESC", 3) - rows, err := db.QueryContext(context.Background(), q) - if err != nil { - t.Fatalf("exec wrapped: %v", err) - } - defer rows.Close() - var got []int64 - for rows.Next() { - var n int64 - if err := rows.Scan(&n); err != nil { - t.Fatal(err) - } - got = append(got, n) - } - if len(got) != 3 || got[0] != 99 || got[1] != 98 || got[2] != 97 { - t.Errorf("wrapped query = %v, want [99 98 97] (cap=3, order preserved)", got) - } -} - -// TestExecuteSQL_NonPositiveMaxRows guards the make([]RowMap, 0, MaxRows) path: -// a negative MaxRows must not panic and must fall back to the default. -func TestExecuteSQL_NonPositiveMaxRows(t *testing.T) { - db := openTestDuck(t) - d := &Duck{DB: db} - for _, mr := range []int{-1, 0, -1000} { - resp := d.ExecuteSQL(context.Background(), SQLRequest{Query: "SELECT 1 AS x", MaxRows: mr}) - if resp.Error != "" { - t.Errorf("MaxRows=%d returned error: %s", mr, resp.Error) - } - if resp.RowsReturned != 1 { - t.Errorf("MaxRows=%d returned %d rows, want 1", mr, resp.RowsReturned) - } - } -} - -func TestExecuteSQL_CapsRowsAtMaxRows(t *testing.T) { - db := openTestDuck(t) - d := &Duck{DB: db} - resp := d.ExecuteSQL(context.Background(), SQLRequest{Query: "SELECT n FROM range(50) AS t(n)", MaxRows: 5}) - if resp.Error != "" { - t.Fatalf("unexpected error: %s", resp.Error) - } - if resp.RowsReturned != 5 { - t.Errorf("RowsReturned = %d, want 5 (capped)", resp.RowsReturned) - } -} diff --git a/internal/query/file_snapshot.go b/internal/query/file_snapshot.go new file mode 100644 index 00000000..1f2ed829 --- /dev/null +++ b/internal/query/file_snapshot.go @@ -0,0 +1,348 @@ +package query + +import ( + "context" + "database/sql" + "encoding/json" + "fmt" + "path/filepath" + "sort" + "strings" + "unicode/utf8" + + "github.com/labstack/fanout/internal/queryrows" + "github.com/labstack/fanout/internal/telemetry" +) + +type snapshotSQL interface { + QueryRowContext(context.Context, string, ...any) *sql.Row + QueryContext(context.Context, string, ...any) (*sql.Rows, error) +} + +func (d *Duck) CompletedBatchReads() bool { return d.repository != nil } + +func batchTime(b telemetry.BatchMetadata, signal string) (telemetry.TimeRange, int) { + switch signal { + case "spans": + return b.SpanTime, b.Spans + case "logs": + return b.LogTime, b.Logs + default: + return b.MetricTime, b.Metrics + } +} +func overlapping(b telemetry.BatchMetadata, signal string, w queryrows.Window) bool { + bounds, count := batchTime(b, signal) + return count > 0 && (!bounds.Known || bounds.MaxNanos >= w.Start.UnixNano() && bounds.MinNanos < w.End.UnixNano()) +} +func (d *Duck) physicalSource(signal string, batches []telemetry.BatchMetadata) string { + sort.SliceStable(batches, func(i, j int) bool { + a, _ := batchTime(batches[i], signal) + b, _ := batchTime(batches[j], signal) + if a.MaxNanos != b.MaxNanos { + return a.MaxNanos > b.MaxNanos + } + return batches[i].ID < batches[j].ID + }) + files := make([]string, 0, len(batches)) + for _, b := range batches { + files = append(files, sqlLiteral(filepath.ToSlash(filepath.Join(d.repository.Parquet.Dir(), "batches", b.ID+".batch", signal+".parquet")))) + } + if len(files) == 0 { + files = append(files, sqlLiteral(filepath.ToSlash(filepath.Join(d.repository.Parquet.Dir(), "batches", "_schema.batch", signal+".parquet")))) + } + projection := "*" + if signal == "spans" { + projection += " EXCLUDE (_trace_hash), TRY_CAST(attributes['messaging.system'] AS VARCHAR) AS messaging_system, TRY_CAST(attributes['messaging.destination.name'] AS VARCHAR) AS messaging_destination" + } + return "SELECT " + projection + " FROM read_parquet([" + strings.Join(files, ",") + "], union_by_name=false, hive_partitioning=false)" +} + +// snapshotSource uses a glob when pruning saves little. The filename predicate +// admits exactly the captured IDs, including when ingest publishes a new file +// after metadata capture. Narrow subsets keep explicit lists and footer pruning. +func (d *Duck) snapshotSource(signal string, selected, active []telemetry.BatchMetadata) string { + count := 0 + for _, b := range active { + _, n := batchTime(b, signal) + if n > 0 { + count++ + } + } + if len(selected) < 64 || len(selected)*5 < count*4 { + return d.physicalSource(signal, selected) + } + var ids []string + for _, b := range selected { + ids = append(ids, b.ID) + } + batchID := d.batchIDColumn(signal, "filename") + projection := "*" + if signal == "spans" { + projection += " EXCLUDE (_trace_hash), TRY_CAST(attributes['messaging.system'] AS VARCHAR) AS messaging_system, TRY_CAST(attributes['messaging.destination.name'] AS VARCHAR) AS messaging_destination" + } + return "SELECT " + projection + " FROM read_parquet(" + sqlLiteral(d.repository.Parquet.Pattern(signal)) + ", union_by_name=false, hive_partitioning=false) WHERE " + batchID + " IN (" + idsSQL(ids) + ")" +} + +func (d *Duck) batchIDColumn(signal, filename string) string { + root := filepath.ToSlash(d.repository.Parquet.BatchesDir()) + suffix := ".batch/" + signal + ".parquet" + return fmt.Sprintf("substr(%s,%d,length(%s)-%d)", filename, utf8.RuneCountInString(root)+2, filename, utf8.RuneCountInString(root)+1+len(suffix)) +} + +func cleanSource(signal, physical string) string { + view := map[string]string{"spans": viewSpans, "logs": viewLogs, "metrics": viewMetrics}[signal] + body := strings.SplitN(view, " AS\n", 2)[1] + return strings.TrimSuffix(strings.Replace(body, "FROM telemetry."+signal, "FROM ("+physical+")", 1), ";") +} + +// bindSnapshot rewrites table references through DuckDB's own AST. The caller +// holds the publication lease and a read transaction: batch markers, aggregate +// rows and immutable files all belong to the same snapshot. No session views +// survive a pooled connection, and parameter indices are preserved by the AST. +func (d *Duck) bindSnapshot(ctx context.Context, db snapshotSQL, query string, w queryrows.Window) (string, error) { + if d.repository == nil { + return query, nil + } + compiled, err := d.compileSnapshot(ctx, db, query) + if err != nil { + return "", err + } + batches := d.repository.Parquet.BatchMetadata() + sources := map[string]string{} + for _, signal := range []string{"spans", "logs", "metrics"} { + if _, raw := compiled.names["telemetry."+signal]; !raw { + if _, clean := compiled.names[signal]; !clean { + continue + } + } + selected := []telemetry.BatchMetadata{} + for _, b := range batches { + if overlapping(b, signal, w) { + selected = append(selected, b) + } + } + physical := d.snapshotSource(signal, selected, batches) + sources["telemetry."+signal] = physical + sources[signal] = cleanSource(signal, physical) + } + if w.Kind != queryrows.RawRead { + if err := d.aggregateSources(ctx, db, batches, w, sources); err != nil { + return "", err + } + } + return bindCompiledSnapshot(compiled, sources) +} +func parseSQLTree(ctx context.Context, db snapshotSQL, query string) (map[string]any, error) { + var serialized string + if err := db.QueryRowContext(ctx, "SELECT json_serialize_sql(?::VARCHAR)::VARCHAR", query).Scan(&serialized); err != nil { + return nil, err + } + var root map[string]any + decoder := json.NewDecoder(strings.NewReader(serialized)) + decoder.UseNumber() + if err := decoder.Decode(&root); err != nil { + return nil, err + } + if root["error"] == true { + return nil, fmt.Errorf("parse trusted SQL: %v", root["error_message"]) + } + return root, nil +} +func compileRelations(ctx context.Context, db snapshotSQL, query string, sources map[string]string, used map[string]string) (string, error) { + root, err := parseSQLTree(ctx, db, query) + if err != nil { + return "", err + } + // Conservatively retain unqualified references shadowed anywhere by a CTE. + // Qualified telemetry references always refer to the physical relation. + shadowed := map[string]bool{} + var ctes func(any) + ctes = func(value any) { + switch v := value.(type) { + case map[string]any: + if entries, ok := v["cte_map"].(map[string]any); ok { + if list, ok := entries["map"].([]any); ok { + for _, entry := range list { + if item, ok := entry.(map[string]any); ok { + if name, ok := item["key"].(string); ok { + shadowed[strings.ToLower(name)] = true + } + } + } + } + } + for _, child := range v { + ctes(child) + } + case []any: + for _, child := range v { + ctes(child) + } + } + } + ctes(root) + for name := range shadowed { + if strings.HasPrefix(name, "__fanout_snapshot_") { + return "", fmt.Errorf("reserved snapshot CTE name %s", name) + } + } + templates := map[string]map[string]any{} + var walk func(any) error + walk = func(value any) error { + switch v := value.(type) { + case map[string]any: + if v["class"] == "COLUMN_REF" { + if names, ok := v["column_names"].([]any); ok && len(names) == 3 { + schema, _ := names[0].(string) + table, _ := names[1].(string) + key := strings.ToLower(schema + "." + table) + if schema == "main" { + key = strings.ToLower(table) + } + if _, ok := sources[key]; ok { + v["column_names"] = names[1:] + } + } + } + if v["type"] == "BASE_TABLE" { + catalog, _ := v["catalog_name"].(string) + if catalog != "" { + return nil + } + name, _ := v["table_name"].(string) + schema, _ := v["schema_name"].(string) + key := strings.ToLower(name) + if schema != "" && schema != "main" { + key = strings.ToLower(schema) + "." + key + } else if shadowed[key] { + return nil + } + if body, ok := sources[key]; ok { + used[key] = strings.TrimPrefix(body, "SELECT * FROM ") + template := templates[key] + if template == nil { + parsed, e := parseSQLTree(ctx, db, "SELECT * FROM ("+body+") AS snapshot_relation") + if e != nil { + return e + } + template = parsed["statements"].([]any)[0].(map[string]any)["node"].(map[string]any)["from_table"].(map[string]any) + templates[key] = template + } + encoded, _ := json.Marshal(template) + var replacement map[string]any + decoder := json.NewDecoder(strings.NewReader(string(encoded))) + decoder.UseNumber() + if err := decoder.Decode(&replacement); err != nil { + return err + } + alias, _ := v["alias"].(string) + if alias == "" { + alias = name + } + replacement["alias"] = alias + for _, field := range []string{"sample", "column_name_alias", "query_location"} { + if x, ok := v[field]; ok { + replacement[field] = x + } + } + for k := range v { + delete(v, k) + } + for k, x := range replacement { + v[k] = x + } + return nil + } + } + for _, child := range v { + if e := walk(child); e != nil { + return e + } + } + case []any: + for _, child := range v { + if e := walk(child); e != nil { + return e + } + } + } + return nil + } + if err := walk(root); err != nil { + return "", err + } + encoded, err := json.Marshal(root) + if err != nil { + return "", err + } + var rewritten string + err = db.QueryRowContext(ctx, "SELECT json_deserialize_sql(?::JSON)::VARCHAR", string(encoded)).Scan(&rewritten) + return rewritten, err +} + +type compiledSnapshot struct { + query string + names map[string]string +} + +// compileSnapshot compiles relation aliases once with the native parser. Per-read +// scopes become ordinary CTEs, avoiding repeated JSON SQL parse/deserialize work. +func (d *Duck) compileSnapshot(ctx context.Context, db snapshotSQL, query string) (compiledSnapshot, error) { + d.snapshotMu.Lock() + compiled, ok := d.snapshotQueries[query] + d.snapshotMu.Unlock() + if !ok { + aliases := map[string]string{} + for _, name := range []string{"telemetry.spans", "telemetry.logs", "telemetry.metrics", "spans", "logs", "metrics", "endpoint_minutes", "endpoint_tail", "log_minutes", "log_tail", "trace_candidates", "trace_tail"} { + alias := "__fanout_snapshot_" + strings.ReplaceAll(name, ".", "_") + aliases[name] = "SELECT * FROM " + alias + } + used := map[string]string{} + rewritten, err := compileRelations(ctx, db, query, aliases, used) + if err != nil { + return compiledSnapshot{}, err + } + // The AST records only rewritten table references, never SQL literals. + compiled = compiledSnapshot{query: rewritten, names: used} + d.snapshotMu.Lock() + if d.snapshotQueries == nil || len(d.snapshotQueries) >= 128 { + d.snapshotQueries = map[string]compiledSnapshot{} + } + d.snapshotQueries[query] = compiled + d.snapshotMu.Unlock() + } + return compiled, nil +} + +func bindCompiledSnapshot(compiled compiledSnapshot, sources map[string]string) (string, error) { + definitions := []string{} + for name, alias := range compiled.names { + body, ok := sources[name] + if !ok { + return "", fmt.Errorf("missing snapshot relation %s", name) + } + materialization := " AS (" + if name == "trace_candidates" { + // This relation is used by both the top-one and touched-trace branches. + // Avoid copying every retained candidate into a temporary relation. + // Mixed-scope aggregates retain DuckDB's required barriers. + materialization = " AS NOT MATERIALIZED (" + } + definitions = append(definitions, alias+materialization+body+")") + } + if len(definitions) == 0 { + return compiled.query, nil + } + sort.Strings(definitions) + statement := strings.TrimSpace(compiled.query) + upper := strings.ToUpper(statement) + switch { + case strings.HasPrefix(upper, "WITH RECURSIVE "): + return "WITH RECURSIVE " + strings.Join(definitions, ",") + ", " + statement[len("WITH RECURSIVE "):], nil + case strings.HasPrefix(upper, "WITH "): + return "WITH " + strings.Join(definitions, ",") + ", " + statement[len("WITH "):], nil + default: + return "WITH " + strings.Join(definitions, ",") + " " + statement, nil + } +} diff --git a/internal/query/file_snapshot_bench_test.go b/internal/query/file_snapshot_bench_test.go new file mode 100644 index 00000000..96ce6649 --- /dev/null +++ b/internal/query/file_snapshot_bench_test.go @@ -0,0 +1,151 @@ +//go:build filebench + +package query + +import ( + "encoding/json" + "fmt" + "sort" + "strings" + "testing" + "time" + + "github.com/labstack/fanout/internal/config" + "github.com/labstack/fanout/internal/queryrows" + "github.com/labstack/fanout/internal/telemetry" + telemetrystore "github.com/labstack/fanout/internal/telemetry/store" +) + +// Opt-in file-binder experiment. Run alone with the pinned native wrapper and +// -tags=filebench; preparation and cache backfill are outside measurement. +func TestSnapshotFileBindingBenchmark(t *testing.T) { + cfg := config.Config{DataDir: t.TempDir(), DuckDBMemory: "2GB", DuckDBThreads: 4, DuckDBMaxConns: 4} + repo, err := telemetrystore.Open(cfg.TelemetryDir()) + if err != nil { + t.Fatal(err) + } + defer repo.Close() + at := time.Now().UTC().Truncate(time.Hour) + for i := range 1000 { + n := at.Add(-time.Duration(i) * time.Minute).UnixNano() + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: fmt.Sprintf("binder-%032d", i), Logs: []telemetry.Log{{TimeUnixNanos: n, IngestedAt: n, Severity: "INFO", Body: "event"}}}); err != nil { + t.Fatal(err) + } + } + d, err := NewDuck(t.Context(), cfg, repo) + if err != nil { + t.Fatal(err) + } + defer d.Close() + active := repo.Parquet.BatchMetadata() + for _, duration := range []time.Duration{24 * time.Hour, 10 * time.Minute} { + w := queryrows.Window{Start: at.Add(-duration), End: at.Add(time.Nanosecond)} + var selected []telemetry.BatchMetadata + for _, b := range active { + if overlapping(b, "logs", w) { + selected = append(selected, b) + } + } + for _, mode := range []string{"list", "snapshot_glob", "glob"} { + source := d.physicalSource("logs", selected) + if mode == "snapshot_glob" { + source = d.snapshotSource("logs", selected, active) + } + if mode == "glob" { + source = "SELECT * FROM read_parquet(" + sqlLiteral(repo.Parquet.Pattern("logs")) + ", union_by_name=false, hive_partitioning=false)" + } + stmt := "SELECT count(*) FROM (" + cleanSource("logs", source) + ") WHERE " + windowPredicate("time", w) + var count int + if err := d.DB.QueryRow(stmt).Scan(&count); err != nil || count != len(selected) { + t.Fatalf("%s count=%d expected=%d: %v", mode, count, len(selected), err) + } + timings := make([]float64, 0, 10) + for range 10 { + started := time.Now() + if err := d.DB.QueryRow(stmt).Scan(&count); err != nil { + t.Fatal(err) + } + timings = append(timings, float64(time.Since(started))/float64(time.Millisecond)) + } + sort.Float64s(timings) + data, _ := json.Marshal(map[string]any{"mode": mode, "window_minutes": duration.Minutes(), "selected_files": len(selected), "statement_bytes": len(stmt), "median_ms": (timings[4] + timings[5]) / 2, "p95_ms": timings[9], "uses_glob": strings.Contains(source, "*.batch")}) + t.Log("RESULT", string(data)) + } + } +} + +// Synthetic retained-index experiment: append five disjoint 1,000-span batches +// without timing fixture creation. Existing parts/candidates model one trace per +// two retained spans. There is no stale cleanup or compaction in this interval. +func TestReadCacheAppendScalingBenchmark(t *testing.T) { + for _, retained := range []int{200000, 800000, 2000000, 8000000} { + t.Run(fmt.Sprint(retained), func(t *testing.T) { + cfg := config.Config{DataDir: t.TempDir(), DuckDBMemory: "2GB", DuckDBThreads: 4, DuckDBMaxConns: 4} + repo, err := telemetrystore.Open(cfg.TelemetryDir()) + if err != nil { + t.Fatal(err) + } + defer repo.Close() + for batch := range 5 { + b := telemetrystore.Batch{ID: fmt.Sprint("append", batch)} + for i := range 1000 { + b.Spans = append(b.Spans, telemetry.Span{Namespace: "prod", ServiceName: "api", TraceID: fmt.Sprintf("new%d-%d", batch, i/2), SpanID: fmt.Sprint(i), StartUnixNanos: 1, EndUnixNanos: 2, IngestedAt: 1}) + } + if err := repo.Commit(t.Context(), b); err != nil { + t.Fatal(err) + } + } + d, err := NewDuck(t.Context(), cfg, repo) + if err != nil { + t.Fatal(err) + } + defer d.Close() + parts := fmt.Sprintf(`INSERT INTO read_trace_parts SELECT 'retained','prod','api',md5(i::VARCHAR),1::BIGINT,1::BIGINT,2::BIGINT,0 FROM range(%d) t(i)`, retained/2) + if _, err := d.DB.Exec(parts); err != nil { + t.Fatal(err) + } + if _, err := d.DB.Exec(`INSERT INTO read_trace_candidates SELECT trace_id,namespace,service,min_start,max_start,max_end,has_error FROM read_trace_parts`); err != nil { + t.Fatal(err) + } + var timings []float64 + for _, b := range repo.Parquet.BatchMetadata() { + started := time.Now() + if _, err := d.cacheBatches(t.Context(), []telemetry.BatchMetadata{b}, nil, nil); err != nil { + t.Fatal(err) + } + timings = append(timings, float64(time.Since(started))/float64(time.Millisecond)) + } + sort.Float64s(timings) + data, _ := json.Marshal(map[string]any{"retained_spans": retained, "retained_trace_rows": retained / 2, "added_spans_per_pass": 1000, "passes": 5, "median_ms": timings[2], "p95_ms": timings[4]}) + t.Log("RESULT", string(data)) + for _, hint := range []string{"MATERIALIZED", "NOT MATERIALIZED"} { + stmt := `WITH candidates AS ` + hint + ` (SELECT trace_id,min_start,max_end,has_error FROM read_trace_candidates), + tail AS (SELECT 'new0-0'::VARCHAR AS trace_id,1::BIGINT AS min_start,2::BIGINT AS max_end,0::INTEGER AS has_error), + untouched AS (SELECT * FROM candidates WHERE trace_id NOT IN (SELECT trace_id FROM tail) ORDER BY has_error DESC,max_end-min_start DESC,trace_id LIMIT 1), + touched AS (SELECT t.trace_id,least(t.min_start,c.min_start) AS min_start,greatest(t.max_end,c.max_end) AS max_end,greatest(t.has_error,c.has_error) AS has_error FROM tail t LEFT JOIN candidates c ON t.trace_id=c.trace_id), + choices AS (SELECT * FROM untouched UNION ALL SELECT * FROM touched) + SELECT trace_id FROM choices ORDER BY has_error DESC,max_end-min_start DESC,trace_id LIMIT 1` + var id string + if err := d.DB.QueryRow(stmt).Scan(&id); err != nil { + t.Fatal(err) + } + timings := []float64{} + for range 5 { + started := time.Now() + if err := d.DB.QueryRow(stmt).Scan(&id); err != nil { + t.Fatal(err) + } + timings = append(timings, float64(time.Since(started))/float64(time.Millisecond)) + } + sort.Float64s(timings) + data, _ := json.Marshal(map[string]any{"experiment": "trace_candidate_materialization", "retained_spans": retained, "hint": hint, "median_ms": timings[2], "p95_ms": timings[4]}) + t.Log("RESULT", string(data)) + var key, plan string + if err := d.DB.QueryRow("EXPLAIN (FORMAT JSON) "+stmt).Scan(&key, &plan); err != nil { + t.Fatal(err) + } + t.Logf("PLAN retained_spans=%d hint=%s %s", retained, hint, plan) + } + }) + } +} diff --git a/internal/query/file_snapshot_test.go b/internal/query/file_snapshot_test.go new file mode 100644 index 00000000..28f2f70a --- /dev/null +++ b/internal/query/file_snapshot_test.go @@ -0,0 +1,616 @@ +package query + +import ( + "context" + "fmt" + "os" + "path/filepath" + "strings" + "testing" + "time" + + "github.com/labstack/fanout/internal/config" + "github.com/labstack/fanout/internal/query/writegate" + "github.com/labstack/fanout/internal/queryrows" + "github.com/labstack/fanout/internal/telemetry" + telemetrystore "github.com/labstack/fanout/internal/telemetry/store" +) + +func newBatchCacheTest(t *testing.T) (*Duck, *telemetrystore.Repository) { + t.Helper() + return newBatchCacheTestAt(t, filepath.Join(t.TempDir(), "données-🙂")) +} + +func newBatchCacheTestAt(t *testing.T, dataDir string) (*Duck, *telemetrystore.Repository) { + t.Helper() + cfg := config.Config{DataDir: dataDir, DuckDBMemory: "256MB", DuckDBThreads: 2, DuckDBMaxConns: 2} + repo, err := telemetrystore.Open(cfg.TelemetryDir()) + if err != nil { + t.Fatal(err) + } + duck, err := NewDuck(t.Context(), cfg, repo) + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { _ = duck.Close(); _ = repo.Close() }) + return duck, repo +} +func TestSnapshotUsesActualEventBoundsAndPreservesParameters(t *testing.T) { + d, repo := newBatchCacheTest(t) + at := time.Date(2026, 10, 1, 12, 0, 0, 0, time.UTC) + for i := range 3 { + event := at.Add(time.Duration(i-1) * time.Hour).UnixNano() + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: fmt.Sprint("batch", i), Spans: []telemetry.Span{{TraceID: "trace", SpanID: fmt.Sprint(i), StartUnixNanos: event, EndUnixNanos: event + 1, IngestedAt: at.UnixNano()}}, Logs: []telemetry.Log{{TimeUnixNanos: event, IngestedAt: at.UnixNano()}}, Metrics: []telemetry.Metric{{TimeUnixNanos: event, IngestedAt: at.UnixNano()}}}); err != nil { + t.Fatal(err) + } + } + w := queryrows.Window{Start: at, End: at.Add(time.Minute)} + ctx := queryrows.WithWindow(t.Context(), w) + rows, err := d.QueryContext(ctx, `SELECT (SELECT count(*) FROM spans WHERE start_time>=?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND start_time=?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND time=?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND time''`, + } { + if err := d.QueryRowScan(ctx, []any{&value}, statement); err != nil || value != 1 { + t.Fatalf("snapshot SQL %s: %d %v", statement, value, err) + } + } + +} +func TestCompletedBatchCachesIncludeLatePublicationAndPartialMinutes(t *testing.T) { + d, repo := newBatchCacheTest(t) + at := time.Date(2026, 10, 1, 12, 0, 0, 0, time.UTC) + commit := func(id string, seconds []int) { + t.Helper() + b := telemetrystore.Batch{ID: id} + for i, second := range seconds { + n := at.Add(time.Duration(second) * time.Second).UnixNano() + b.Spans = append(b.Spans, telemetry.Span{Namespace: "prod", ServiceName: "api", TraceID: fmt.Sprint("trace", i), SpanID: fmt.Sprint(id, i), StartUnixNanos: n, EndUnixNanos: n + 1000000, DurationMS: 1, IngestedAt: at.UnixNano(), StatusCode: "ERROR"}) + b.Logs = append(b.Logs, telemetry.Log{Namespace: "prod", ServiceName: "api", TimeUnixNanos: n, Severity: "Error", IngestedAt: at.UnixNano()}) + } + if err := repo.Commit(t.Context(), b); err != nil { + t.Fatal(err) + } + } + commit("cached", []int{5, 30, 60, 90, 125}) + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + commit("late", []int{35, 75, 130}) + w := queryrows.Window{Start: at.Add(20 * time.Second), End: at.Add(140 * time.Second), Namespace: "prod", Service: "api"} + for _, kind := range []queryrows.ReadKind{queryrows.EndpointRead, queryrows.LogHistogramRead} { + w.Kind = kind + ctx := queryrows.WithWindow(t.Context(), w) + q := `SELECT (SELECT coalesce(sum(calls),0) FROM endpoint_minutes)+(SELECT count(*) FROM endpoint_tail)` + if kind == queryrows.LogHistogramRead { + q = `SELECT (SELECT coalesce(sum(count),0) FROM log_minutes)+(SELECT coalesce(sum(count),0) FROM log_tail)` + } + rows, err := d.QueryContext(ctx, q) + if err != nil { + t.Fatal(err) + } + var count int + for rows.Next() { + if err := rows.Scan(&count); err != nil { + t.Fatal(err) + } + } + rows.Close() + if err := rows.Err(); err != nil { + t.Fatal(err) + } + if count != 7 { + t.Fatalf("kind %d count %d", kind, count) + } + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + // A transaction sees complete contribution sets and markers together. + var markers, parts int + if err := d.DB.QueryRow(`SELECT count(*) FROM read_batches`).Scan(&markers); err != nil { + t.Fatal(err) + } + if err := d.DB.QueryRow(`SELECT count(*) FROM read_trace_parts`).Scan(&parts); err != nil { + t.Fatal(err) + } + if markers != 2 || parts != 8 { + t.Fatalf("markers=%d parts=%d", markers, parts) + } +} +func TestUnknownEventStatisticsNeverExcludeFiles(t *testing.T) { + b := telemetry.BatchMetadata{Spans: 1} + w := queryrows.Window{Start: time.Unix(0, 1), End: time.Unix(0, 2)} + if !overlapping(b, "spans", w) { + t.Fatal("unknown bounds excluded") + } + b.SpanTime = telemetry.TimeRange{Known: true, MinNanos: -2, MaxNanos: 0} + if overlapping(b, "spans", w) { + t.Fatal("disjoint negative bounds included") + } +} + +func TestBatchCachesStayExactThroughCompactionAndRetention(t *testing.T) { + d, repo := newBatchCacheTest(t) + at := time.Now().UTC().Truncate(time.Hour) + for i := range 8 { + n := at.Add(time.Duration(i) * time.Second).UnixNano() + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: fmt.Sprint("part", i), Spans: []telemetry.Span{{Namespace: "prod", ServiceName: "api", TraceID: "trace", SpanID: fmt.Sprint(i), StartUnixNanos: n, EndUnixNanos: n + 1, IngestedAt: at.UnixNano()}}, Logs: []telemetry.Log{{Namespace: "prod", TimeUnixNanos: n, IngestedAt: at.UnixNano()}}}); err != nil { + t.Fatal(err) + } + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + if count, err := repo.CompactParquet(t.Context(), d, 8); err != nil || count != 8 { + t.Fatalf("compact %d: %v", count, err) + } + markers, err := batchMarkers(t.Context(), d.DB) + if err != nil || len(markers) != 9 { + t.Fatalf("output was not derived from eight complete inputs: %v %v", markers, err) + } + check := func() { + t.Helper() + w := queryrows.Window{Start: at.Add(-time.Minute), End: at.Add(time.Minute), Kind: queryrows.EndpointRead} + var count int + if err := d.QueryRowScan(queryrows.WithWindow(t.Context(), w), []any{&count}, `SELECT (SELECT coalesce(sum(calls),0) FROM endpoint_minutes)+(SELECT count(*) FROM endpoint_tail)`); err != nil || count != 8 { + t.Fatalf("after replacement count=%d: %v", count, err) + } + w.Kind = queryrows.TraceCandidateRead + w.Namespace = "prod" + w.Service = "api" + if err := d.QueryRowScan(queryrows.WithWindow(t.Context(), w), []any{&count}, `SELECT (SELECT count(*) FROM trace_candidates)+(SELECT count(*) FROM trace_tail)`); err != nil { + t.Fatal(err) + } + // A replacement derived from complete inputs is immediately cached even + // while the retired input markers remain. It has one candidate and no tail. + if count != 1 { + t.Fatalf("candidate coverage=%d", count) + } + } + check() + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + check() + markers, err = batchMarkers(t.Context(), d.DB) + if err != nil { + t.Fatal(err) + } + if len(markers) != 1 { + t.Fatalf("obsolete markers survived: %#v", markers) + } + if count, err := repo.PruneParquet(t.Context(), d, at.Add(time.Second).UnixNano(), 8); err != nil || count != 1 { + t.Fatalf("prune %d: %v", count, err) + } + w := queryrows.Window{Start: at.Add(-time.Minute), End: at.Add(time.Minute), Kind: queryrows.TraceCandidateRead, Namespace: "prod", Service: "api"} + var count int + if err := d.QueryRowScan(queryrows.WithWindow(t.Context(), w), []any{&count}, `SELECT (SELECT count(*) FROM trace_candidates)+(SELECT count(*) FROM trace_tail)`); err != nil || count != 0 { + t.Fatalf("retired trace visible: %d: %v", count, err) + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + if err := d.DB.QueryRow(`SELECT count(*) FROM read_trace_parts`).Scan(&count); err != nil || count != 0 { + t.Fatalf("retired index retained: %d %v", count, err) + } +} +func TestReadCacheCancellationLeavesNoMarkerOrPartialContributions(t *testing.T) { + d, repo := newBatchCacheTest(t) + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "cancelled", Spans: []telemetry.Span{{TraceID: "trace", StartUnixNanos: 1, IngestedAt: 1}}}); err != nil { + t.Fatal(err) + } + ctx, cancel := context.WithCancel(t.Context()) + cancel() + if _, err := d.RefreshReadCaches(ctx); err == nil { + t.Fatal("cancelled backfill succeeded") + } + for _, table := range []string{"read_batches", "read_endpoints", "read_trace_parts", "read_trace_candidates"} { + var count int + if err := d.DB.QueryRow("SELECT count(*) FROM " + table).Scan(&count); err != nil || count != 0 { + t.Fatalf("%s partial rows=%d: %v", table, count, err) + } + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } +} + +func TestFailedBatchCacheTransactionPublishesNoContributions(t *testing.T) { + d, repo := newBatchCacheTest(t) + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "atomic", Spans: []telemetry.Span{{TraceID: "trace", StartUnixNanos: 1, IngestedAt: 1}}, Logs: []telemetry.Log{{TimeUnixNanos: 1, IngestedAt: 1}}}); err != nil { + t.Fatal(err) + } + // Fail after the span writes, before acknowledgement. + if _, err := d.DB.Exec(`DROP TABLE read_logs`); err != nil { + t.Fatal(err) + } + if _, err := d.RefreshReadCaches(t.Context()); err == nil { + t.Fatal("broken cache schema accepted") + } + for _, table := range []string{"read_batches", "read_endpoints", "read_trace_parts", "read_trace_candidates"} { + var count int + if err := d.DB.QueryRow("SELECT count(*) FROM " + table).Scan(&count); err != nil || count != 0 { + t.Fatalf("%s partial rows=%d: %v", table, count, err) + } + } + if err := createBatchCaches(d.DB); err != nil { + t.Fatal(err) + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + var count int + if err := d.DB.QueryRow(`SELECT count(*) FROM read_batches`).Scan(&count); err != nil || count != 1 { + t.Fatalf("retry markers=%d: %v", count, err) + } +} + +func TestReadCacheWorkerAcknowledgesNewFilesWithoutRollupTick(t *testing.T) { + d, repo := newBatchCacheTest(t) + ctx, cancel := context.WithCancel(t.Context()) + done := make(chan struct{}) + go func() { defer close(done); d.runReadCacheLoop(ctx) }() + t.Cleanup(func() { cancel(); <-done }) + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "new", Logs: []telemetry.Log{{TimeUnixNanos: 1, IngestedAt: 1}}}); err != nil { + t.Fatal(err) + } + deadline := time.NewTimer(10 * time.Second) + defer deadline.Stop() + tick := time.NewTicker(10 * time.Millisecond) + defer tick.Stop() + for { + select { + case <-deadline.C: + t.Fatal("new publication was not cached") + case <-tick.C: + var count int + if err := d.DB.QueryRow(`SELECT count(*) FROM read_batches`).Scan(&count); err != nil { + t.Fatal(err) + } + if count == 1 { + return + } + } + } +} + +func TestReadCacheSemanticVersionRebuildsAllContributions(t *testing.T) { + d, repo := newBatchCacheTest(t) + at := time.Now().UTC().Truncate(time.Minute) + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "semantic", Logs: []telemetry.Log{{TimeUnixNanos: at.UnixNano(), Severity: "INFO", IngestedAt: at.UnixNano()}}}); err != nil { + t.Fatal(err) + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + for _, stmt := range []string{`UPDATE read_logs SET severity='info'`, `UPDATE read_cache_version SET version=1`, `CREATE TABLE read_obsolete (value INTEGER)`, `CREATE TABLE endpoint_rollup (value INTEGER)`, `INSERT INTO rollup_state VALUES ('endpoint_rollup:prod',1,now())`} { + if _, err := d.DB.Exec(stmt); err != nil { + t.Fatal(err) + } + } + if err := CreateCacheTables(d.DB); err != nil { + t.Fatal(err) + } + for _, table := range []string{"read_batches", "read_logs", "read_trace_parts", "read_endpoints", "read_trace_candidates"} { + var count int + if err := d.DB.QueryRow("SELECT count(*) FROM " + table).Scan(&count); err != nil || count != 0 { + t.Fatalf("%s survived semantic change: %d %v", table, count, err) + } + } + var obsolete int + if err := d.DB.QueryRow(`SELECT count(*) FROM duckdb_tables() WHERE table_name IN ('read_obsolete','endpoint_rollup')`).Scan(&obsolete); err != nil || obsolete != 0 { + t.Fatalf("obsolete tables=%d: %v", obsolete, err) + } + if err := d.DB.QueryRow(`SELECT count(*) FROM rollup_state WHERE starts_with(cache_key,'endpoint_rollup')`).Scan(&obsolete); err != nil || obsolete != 0 { + t.Fatalf("obsolete watermark=%d: %v", obsolete, err) + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + var severity string + if err := d.DB.QueryRow(`SELECT severity FROM read_logs`).Scan(&severity); err != nil || severity != "INFO" { + t.Fatalf("rebuilt label=%q: %v", severity, err) + } + // A matching version preserves valid acknowledgements on the next startup. + if err := CreateCacheTables(d.DB); err != nil { + t.Fatal(err) + } + if err := d.DB.QueryRow(`SELECT count(*) FROM read_batches`).Scan(&obsolete); err != nil || obsolete != 1 { + t.Fatalf("current cache discarded: %d %v", obsolete, err) + } +} + +func TestBroadGlobRetainsCapturedFileSet(t *testing.T) { + d, repo := newBatchCacheTest(t) + at := time.Now().UTC() + for i := range 64 { + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: fmt.Sprintf("glob-%d", i), Spans: []telemetry.Span{{TraceID: "trace", SpanID: fmt.Sprint(i), StartUnixNanos: at.UnixNano(), IngestedAt: at.UnixNano()}}}); err != nil { + t.Fatal(err) + } + } + captured := repo.Parquet.BatchMetadata() + source := d.snapshotSource("spans", captured, captured) + if !strings.Contains(source, "*.batch") { + t.Fatal("broad selection did not use glob") + } + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "new-after-capture", Spans: []telemetry.Span{{TraceID: "new", StartUnixNanos: at.UnixNano(), IngestedAt: at.UnixNano()}}}); err != nil { + t.Fatal(err) + } + var count int + if err := d.DB.QueryRow("SELECT count(*) FROM (" + source + ")").Scan(&count); err != nil || count != 64 { + t.Fatalf("captured rows=%d: %v", count, err) + } + narrow := d.snapshotSource("spans", captured[:1], captured) + if strings.Contains(narrow, "*.batch") { + t.Fatal("narrow selection used glob") + } + if err := d.DB.QueryRow("SELECT count(*) FROM (" + narrow + ")").Scan(&count); err != nil || count != 1 { + t.Fatalf("narrow rows=%d: %v", count, err) + } +} + +func TestBatchFilenameIdentityWithRelativeDataDir(t *testing.T) { + cwd, err := os.Getwd() + if err != nil { + t.Fatal(err) + } + relative, err := filepath.Rel(cwd, filepath.Join(t.TempDir(), "données-🙂")) + if err != nil { + t.Fatal(err) + } + d, repo := newBatchCacheTestAt(t, relative) + for i := range readCacheBatchLimit { + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: fmt.Sprint("relative", i), Logs: []telemetry.Log{{TimeUnixNanos: 1, IngestedAt: 1}}}); err != nil { + t.Fatal(err) + } + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + var count int + if err := d.DB.QueryRow(`SELECT sum(count) FROM read_logs WHERE batch_id IN (SELECT batch_id FROM read_batches)`).Scan(&count); err != nil || count != readCacheBatchLimit { + t.Fatalf("relative cache batch identity=%d: %v", count, err) + } + active := repo.Parquet.BatchMetadata() + if err := d.DB.QueryRow(`SELECT count(*) FROM (` + d.snapshotSource("logs", active, active) + `)`).Scan(&count); err != nil || count != readCacheBatchLimit { + t.Fatalf("relative glob identity=%d: %v", count, err) + } +} + +func TestPreparedReplacementDoesNotHoldCacheWriteGate(t *testing.T) { + d, repo := newBatchCacheTest(t) + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "input", Logs: []telemetry.Log{{TimeUnixNanos: 1, IngestedAt: 1}}}); err != nil { + t.Fatal(err) + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + // Pin a reader so publication has to drain. The worker must still be able to + // acknowledge new ingest and must not collect the prepared output marker. + if err := d.parquetMu.RLockContext(t.Context()); err != nil { + t.Fatal(err) + } + defer d.parquetMu.RUnlock() + ctx, cancel := context.WithCancel(t.Context()) + defer cancel() + done := make(chan error, 1) + go func() { + done <- d.PublishParquetReplacement(ctx, telemetry.BatchMetadata{ID: "output"}, []string{"input"}, func(context.Context) error { return nil }) + }() + deadline := time.Now().Add(5 * time.Second) + for { + markers, err := batchMarkers(t.Context(), d.DB) + if err != nil { + t.Fatal(err) + } + if markers["output"] { + break + } + if time.Now().After(deadline) { + t.Fatal("replacement was not prepared") + } + time.Sleep(time.Millisecond) + } + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "new-input", Logs: []telemetry.Log{{TimeUnixNanos: 2, IngestedAt: 2}}}); err != nil { + t.Fatal(err) + } + passCtx, stop := context.WithTimeout(t.Context(), time.Second) + defer stop() + if _, err := d.RefreshReadCaches(passCtx); err != nil { + t.Fatalf("worker blocked behind publication: %v", err) + } + markers, err := batchMarkers(t.Context(), d.DB) + if err != nil || !markers["output"] || !markers["new-input"] { + t.Fatalf("prepared output/new ingest lost: %v %v", markers, err) + } + cancel() + if err := <-done; err == nil { + t.Fatal("cancelled publication succeeded") + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + markers, err = batchMarkers(t.Context(), d.DB) + if err != nil || markers["output"] { + t.Fatalf("failed output was not collected: %v %v", markers, err) + } +} + +func TestRetiredTraceRepairsOnlyItsActiveScopeAndBounds(t *testing.T) { + d, repo := newBatchCacheTest(t) + at := time.Now().UTC().Truncate(time.Hour) + old := at.Add(-2 * time.Hour).UnixNano() + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "retire-scope", Spans: []telemetry.Span{{Namespace: "gone", ServiceName: "retired", TraceID: "shared", StartUnixNanos: old, EndUnixNanos: old + 1, StatusCode: "ERROR", IngestedAt: old}}}); err != nil { + t.Fatal(err) + } + now := at.UnixNano() + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "keep-scope", Spans: []telemetry.Span{ + {Namespace: "prod", ServiceName: "api", TraceID: "shared", StartUnixNanos: now, EndUnixNanos: now + 1, IngestedAt: now}, + {Namespace: "prod", ServiceName: "api", TraceID: "winner", StartUnixNanos: now, EndUnixNanos: now + 1000, IngestedAt: now}, + }}); err != nil { + t.Fatal(err) + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + if count, err := repo.PruneParquet(t.Context(), d, at.Add(-time.Hour).UnixNano(), 8); err != nil || count != 1 { + t.Fatalf("prune=%d: %v", count, err) + } + check := func() { + t.Helper() + for _, ns := range []string{"", "prod"} { + w := queryrows.Window{Start: at.Add(-3 * time.Hour), End: at.Add(time.Minute), Kind: queryrows.TraceCandidateRead, Namespace: ns} + var id string + if err := d.QueryRowScan(queryrows.WithWindow(t.Context(), w), []any{&id}, `SELECT trace_id FROM trace_candidates ORDER BY has_error DESC,max_end-min_start DESC,trace_id LIMIT 1`); err != nil || id != "winner" { + t.Fatalf("namespace %q winner=%q: %v", ns, id, err) + } + } + } + check() + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + check() + var namespace, service string + var hasError int + if err := d.DB.QueryRow(`SELECT namespace,service,has_error FROM read_trace_candidates WHERE trace_id='shared'`).Scan(&namespace, &service, &hasError); err != nil || namespace != "prod" || service != "api" || hasError != 0 { + t.Fatalf("remaining scope=%q/%q error=%d: %v", namespace, service, hasError, err) + } +} + +func TestTraceCacheFollowsMultipleCompactionLevels(t *testing.T) { + d, repo := newBatchCacheTest(t) + at := time.Now().UTC().Truncate(time.Hour) + for i := range 64 { + n := at.Add(time.Duration(i) * time.Second).UnixNano() + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: fmt.Sprint("level", i), Spans: []telemetry.Span{{TraceID: "shared", StartUnixNanos: n, EndUnixNanos: n + 1, IngestedAt: n}}}); err != nil { + t.Fatal(err) + } + } + for range 4 { + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + } + for range 9 { + if count, err := repo.CompactParquet(t.Context(), d, 8); err != nil || count != 8 { + t.Fatalf("compact=%d: %v", count, err) + } + } + if batches := repo.Parquet.BatchMetadata(); len(batches) != 1 || batches[0].Generation != 2 { + t.Fatalf("replacement=%v", batches) + } + w := queryrows.Window{Start: at.Add(-time.Minute), End: at.Add(2 * time.Minute), Kind: queryrows.TraceCandidateRead} + var count int + if err := d.QueryRowScan(queryrows.WithWindow(t.Context(), w), []any{&count}, `SELECT count(*) FROM trace_candidates`); err != nil || count != 1 { + t.Fatalf("candidate=%d: %v", count, err) + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + if err := d.DB.QueryRow(`SELECT count(*) FROM read_batches`).Scan(&count); err != nil || count != 1 { + t.Fatalf("retired markers=%d: %v", count, err) + } + if err := d.DB.QueryRow(`SELECT count(*) FROM read_trace_candidates`).Scan(&count); err != nil || count != 1 { + t.Fatalf("trace index=%d: %v", count, err) + } +} + +func TestCompletedBatchWriterProgressesDuringAnalyticalTransaction(t *testing.T) { + d, repo := newBatchCacheTest(t) + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "independent", Spans: []telemetry.Span{{TraceID: "trace", StartUnixNanos: 1, EndUnixNanos: 2, IngestedAt: 1}}}); err != nil { + t.Fatal(err) + } + unlock := d.writeGate.Lock(writegate.WriteRollupService) + defer unlock() + tx, err := d.writer().BeginTx(t.Context(), nil) + if err != nil { + t.Fatal(err) + } + defer func() { _ = tx.Rollback() }() + if _, err := tx.Exec(`INSERT INTO rollup_state VALUES ('blocked-analytical-pass',1,now())`); err != nil { + t.Fatal(err) + } + ctx, cancel := context.WithTimeout(t.Context(), 2*time.Second) + defer cancel() + if _, err := d.RefreshReadCaches(ctx); err != nil { + t.Fatalf("cache stalled behind disjoint analytical write: %v", err) + } + markers, err := batchMarkers(ctx, d.DB) + if err != nil || !markers["independent"] { + t.Fatalf("independent batch not published: %v %v", markers, err) + } + if err := tx.Commit(); err != nil { + t.Fatal(err) + } +} + +func TestReadCacheRowBudgetAndOversizedFileProgress(t *testing.T) { + d, repo := newBatchCacheTest(t) + old := make([]telemetry.Log, readCacheRowBudget+1) + for i := range old { + old[i] = telemetry.Log{TimeUnixNanos: 1, IngestedAt: 1, Severity: "INFO"} + } + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "oversized", Logs: old}); err != nil { + t.Fatal(err) + } + if err := repo.Commit(t.Context(), telemetrystore.Batch{ID: "newest", Logs: []telemetry.Log{{TimeUnixNanos: 2, IngestedAt: 2}}}); err != nil { + t.Fatal(err) + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + markers, err := batchMarkers(t.Context(), d.DB) + if err != nil || !markers["newest"] || markers["oversized"] { + t.Fatalf("row budget not respected: %v %v", markers, err) + } + if _, err := d.RefreshReadCaches(t.Context()); err != nil { + t.Fatal(err) + } + markers, err = batchMarkers(t.Context(), d.DB) + if err != nil || !markers["oversized"] { + t.Fatalf("oversized file made no progress: %v %v", markers, err) + } + var count int + if err := d.DB.QueryRow(`SELECT sum(count) FROM read_logs WHERE batch_id='oversized'`).Scan(&count); err != nil || count != len(old) { + t.Fatalf("oversized count=%d: %v", count, err) + } +} diff --git a/internal/query/json_result.go b/internal/query/json_result.go new file mode 100644 index 00000000..9b773032 --- /dev/null +++ b/internal/query/json_result.go @@ -0,0 +1,65 @@ +package query + +import ( + "math" + "strings" +) + +// JSON cannot encode nonfinite doubles. Keep them as the ProtoJSON strings +// NaN, Infinity and -Infinity at the product boundary; storage remains typed. +func jsonFloat(value float64) any { + switch { + case math.IsNaN(value): + return "NaN" + case math.IsInf(value, 1): + return "Infinity" + case math.IsInf(value, -1): + return "-Infinity" + default: + return value + } +} + +func normalizeJSONNumbers(text string) string { + var output strings.Builder + quoted, escaped := false, false + start := 0 + for i := 0; i < len(text); i++ { + c := text[i] + if quoted { + if escaped { + escaped = false + } else if c == '\\' { + escaped = true + } else if c == '"' { + quoted = false + } + continue + } + if c == '"' { + quoted = true + continue + } + if c != 'N' && c != 'I' && c != '-' { + continue + } + end := i + for end < len(text) && !strings.ContainsRune(" ,]}:\t\r\n", rune(text[end])) { + end++ + } + token := text[i:end] + if token == "NaN" || token == "Infinity" || token == "-Infinity" { + output.WriteString(text[start:i]) + output.WriteByte('"') + output.WriteString(token) + output.WriteByte('"') + start = end + } + i = end - 1 + } + if start == 0 { + return text + } + output.WriteString(text[start:]) + return output.String() +} diff --git a/internal/query/log_helpers_test.go b/internal/query/log_helpers_test.go new file mode 100644 index 00000000..1f134815 --- /dev/null +++ b/internal/query/log_helpers_test.go @@ -0,0 +1,44 @@ +package query + +import ( + "testing" + "time" + + "github.com/labstack/fanout/internal/config" + "github.com/labstack/fanout/internal/telemetry" + telemetrystore "github.com/labstack/fanout/internal/telemetry/store" +) + +func TestLogHelpersReadNativeParquetTimestamps(t *testing.T) { + ctx := t.Context() + cfg := config.Config{DataDir: t.TempDir(), DuckDBMemory: "256MB", DuckDBThreads: 2, DuckDBMaxConns: 1} + repository, err := telemetrystore.Open(cfg.TelemetryDir()) + if err != nil { + t.Fatal(err) + } + defer repository.Close() + d, err := NewDuck(ctx, cfg, repository) + if err != nil { + t.Fatal(err) + } + defer d.Close() + recent := time.Now().UTC().Add(-time.Minute) + batch := telemetrystore.Batch{ID: "log-helpers"} + for _, at := range []time.Time{recent, recent.Add(time.Second), recent.Add(-time.Hour)} { + batch.Logs = append(batch.Logs, telemetry.Log{Namespace: "prod", ServiceName: "checkout", Severity: "ERROR", Body: "checkout failed", TimeUnixNanos: at.UnixNano(), IngestedAt: at.UnixNano()}) + } + if err := repository.Commit(ctx, batch); err != nil { + t.Fatal(err) + } + samples, err := d.LogsSamples(ctx, 5, 10, ".*failed.*") + if err != nil || len(samples) != 2 { + t.Fatalf("samples %#v: %v", samples, err) + } + if samples[0].TS != recent.Add(time.Second).Format("2006-01-02T15:04:05Z") || samples[0].Svc != "checkout" { + t.Fatalf("sample: %#v", samples[0]) + } + routes, err := d.ErrorRoutes(ctx, 5, 10) + if err != nil || len(routes) != 1 || routes[0].Count != 2 { + t.Fatalf("error routes %#v: %v", routes, err) + } +} diff --git a/internal/query/rollup_test.go b/internal/query/rollup_test.go index 7bb69c88..fea294c2 100644 --- a/internal/query/rollup_test.go +++ b/internal/query/rollup_test.go @@ -40,13 +40,6 @@ func TestRollupOnceRebuildsAffectedServiceBuckets(t *testing.T) { if _, err := d.rollupOnce(ctx); err != nil { t.Fatalf("first rollupOnce failed: %v", err) } - var ready int64 - if err := db.QueryRow(`SELECT last_ingested_unix_nano FROM rollup_state WHERE cache_key = ?`, EndpointReadyStateKey).Scan(&ready); err != nil { - t.Fatalf("query endpoint readiness: %v", err) - } - if ready != 1 { - t.Fatalf("endpoint readiness = %d, want 1 after initial backfill", ready) - } insertRollupTestSpan(t, db, rollupTestSpan{ namespace: "ns-a", @@ -135,55 +128,6 @@ func TestServiceRollupLatencyExcludesDependencyWaits(t *testing.T) { } } -func TestRollupOnceRebuildsAffectedEndpointBuckets(t *testing.T) { - db := openTestDuck(t) - if err := CreateTables(db); err != nil { - t.Fatalf("CreateTables failed: %v", err) - } - if err := CreateViews(db); err != nil { - t.Fatalf("CreateViews failed: %v", err) - } - d := &Duck{DB: db, cfg: config.Config{RetentionDays: 30}} - ctx := context.Background() - bucket := time.Now().UTC().Truncate(time.Minute).Add(-2 * time.Minute) - - insertRollupTestSpan(t, db, rollupTestSpan{ - namespace: "ns-a", traceID: "t-1", spanID: "s-1", service: "checkout", - operation: "POST checkout", httpMethod: "POST", httpRoute: "/checkout", - start: bucket.Add(5 * time.Second), duration: 10 * time.Millisecond, ingested: 100, - }) - insertRollupTestSpan(t, db, rollupTestSpan{ - namespace: "ns-a", traceID: "t-2", spanID: "s-2", service: "checkout", - operation: "POST checkout", httpMethod: "POST", httpRoute: "/checkout", status: "STATUS_CODE_ERROR", - start: bucket.Add(10 * time.Second), duration: 100 * time.Millisecond, ingested: 100, - }) - if _, err := d.rollupOnce(ctx); err != nil { - t.Fatalf("first rollupOnce failed: %v", err) - } - // A late row in the same minute must rebuild, not append to, the cached - // bucket; otherwise calls and histogram bins double count prior rows. - insertRollupTestSpan(t, db, rollupTestSpan{ - namespace: "ns-a", traceID: "t-3", spanID: "s-3", service: "checkout", - operation: "POST checkout", httpMethod: "POST", httpRoute: "/checkout", - start: bucket.Add(15 * time.Second), duration: 500 * time.Millisecond, ingested: 200, - }) - if _, err := d.rollupOnce(ctx); err != nil { - t.Fatalf("second rollupOnce failed: %v", err) - } - - var calls, errors, histogramCount int64 - if err := db.QueryRow(` -SELECT calls, error_count, duration_buckets.le_300000::BIGINT -FROM endpoint_rollup -WHERE namespace = 'ns-a' AND bucket = ? AND service = 'checkout' - AND method = 'POST' AND path = '/checkout'`, bucket).Scan(&calls, &errors, &histogramCount); err != nil { - t.Fatalf("query endpoint_rollup failed: %v", err) - } - if calls != 3 || errors != 1 || histogramCount != 3 { - t.Fatalf("endpoint_rollup = calls:%d errors:%d histogram:%d, want 3/1/3", calls, errors, histogramCount) - } -} - func TestRollupOnceRebuildsAffectedEdgeBuckets(t *testing.T) { db := openTestDuck(t) if err := CreateTables(db); err != nil { @@ -614,13 +558,7 @@ WHERE namespace = ? if _, err := d.rollupOnce(ctx); err != nil { t.Fatalf("first rollupOnce failed: %v", err) } - var endpointReady int64 - if err := db.QueryRow(`SELECT COALESCE(MAX(last_ingested_unix_nano), 0)::BIGINT FROM rollup_state WHERE cache_key = ?`, EndpointReadyStateKey).Scan(&endpointReady); err != nil { - t.Fatalf("query endpoint readiness after first chunk: %v", err) - } - if endpointReady != 0 { - t.Fatalf("endpoint readiness after first chunk = %d, want 0", endpointReady) - } + requireServiceRollupSpans(t, db, "ns-old", bucket, "checkout", 1) if got := edgeCount("ns-old"); got != 1 { t.Fatalf("ns-old call edges after first pass = %d, want 1", got) @@ -639,12 +577,6 @@ WHERE namespace = 'ns-new'`, nil, 0) if _, err := d.rollupOnce(ctx); err != nil { t.Fatalf("third rollupOnce failed: %v", err) } - if err := db.QueryRow(`SELECT COALESCE(MAX(last_ingested_unix_nano), 0)::BIGINT FROM rollup_state WHERE cache_key = ?`, EndpointReadyStateKey).Scan(&endpointReady); err != nil { - t.Fatalf("query endpoint readiness after catch-up: %v", err) - } - if endpointReady != 1 { - t.Fatalf("endpoint readiness after catch-up = %d, want 1", endpointReady) - } requireServiceRollupSpans(t, db, "ns-new", bucket, "checkout", 1) if got := edgeCount("ns-new"); got != 1 { t.Fatalf("ns-new call edges after catch-up = %d, want 1", got) @@ -692,7 +624,7 @@ INSERT INTO telemetry.spans ( http_method, http_route, kind, - attributes_json, + attributes, start_time, end_time, start_unix_nano, @@ -702,7 +634,7 @@ INSERT INTO telemetry.spans ( ingested_at, ingested_unix_nano ) -VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, +VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?::VARCHAR::JSON::VARIANT, ?, ?, ?, ?, ?, ?, ?, ?)`, span.namespace, span.traceID, span.spanID, diff --git a/internal/query/schema.go b/internal/query/schema.go index 570de177..470a8209 100644 --- a/internal/query/schema.go +++ b/internal/query/schema.go @@ -20,7 +20,6 @@ Primary query surfaces: - metrics view: clean metric columns for most queries - service_rollup table: partition-aware cached service health buckets - edge_rollup table: partition-aware cached service dependency edges -- endpoint_rollup table: minute endpoint counts, errors, and mergeable latency histograms ### 1. Spans Parquet relation: telemetry.spans @@ -30,13 +29,16 @@ Important columns: - namespace (VARCHAR): partitioning/filtering dimension - trace_id, span_id, parent_span_id (VARCHAR) - service, operation, kind (VARCHAR) -- start_time, end_time, ingested_at (TIMESTAMP) +- start_time, end_time, ingested_at (TIMESTAMPTZ_NS, UTC) - start_unix_nano, end_unix_nano, ingested_unix_nano (BIGINT) - start_time falls back to ingest time when the producer omits it; the raw *_unix_nano columns are unchanged and preserve producer-supplied truth - duration_ms (DOUBLE) - status, status_message (VARCHAR) -- attributes_json, resource_json, events_json, links_json (VARCHAR JSON text) +- attributes, resource (VARIANT: typed OTel objects) +- messaging_system, messaging_destination (VARCHAR): scalar read projections of + literal messaging attributes; use these for shredded Parquet column projection +- events_json, links_json (VARCHAR JSON text) - trace_state, scope_name, scope_version (VARCHAR) - http_method, http_status_code, http_route (VARCHAR) - db_system, rpc_method, rpc_service, peer_service (VARCHAR) @@ -44,7 +46,7 @@ Important columns: - exception_type, exception_message (VARCHAR) Common queries: -- Recent spans: SELECT * FROM spans WHERE start_time > now() - INTERVAL 15 MINUTE +- Recent spans: SELECT * FROM spans WHERE start_time > (now() - INTERVAL 15 MINUTE)::TIMESTAMPTZ_NS - Error spans: ... WHERE status IN ('STATUS_CODE_ERROR', 'ERROR') - By trace: ... WHERE trace_id = '...' - Root spans only: ... WHERE parent_span_id IS NULL OR parent_span_id = '' @@ -55,14 +57,14 @@ Preferred query surface: logs Important columns: - namespace (VARCHAR) -- time, observed_time, ingested_at (TIMESTAMP) +- time, observed_time, ingested_at (TIMESTAMPTZ_NS, UTC) - time_unix_nano, observed_time_unix_nano, ingested_unix_nano (BIGINT) - time and observed_time use producer time, then the other log timestamp, then ingest time; the raw *_unix_nano columns remain unchanged - severity, severity_number (VARCHAR/BIGINT) - body, body_template (VARCHAR) - service, trace_id, span_id (VARCHAR) -- attributes_json, resource_json (VARCHAR JSON text) +- attributes, resource (VARIANT: typed OTel objects) - scope_name, scope_version (VARCHAR) Common queries: @@ -76,7 +78,7 @@ Preferred query surface: metrics Important columns: - namespace (VARCHAR) -- time, ingested_at (TIMESTAMP) +- time, ingested_at (TIMESTAMPTZ_NS, UTC) - time_unix_nano, ingested_unix_nano (BIGINT) - time falls back to ingest time when omitted; time_unix_nano remains unchanged - name, type, unit, description (VARCHAR) @@ -84,7 +86,7 @@ Important columns: - value, hist_sum (DOUBLE) - hist_count (BIGINT) - hist_bounds_json, hist_counts_json, exemplars_json (VARCHAR JSON text) -- attributes_json, resource_json (VARCHAR JSON text) +- attributes, resource (VARIANT: typed OTel objects) - scope_name, scope_version (VARCHAR) Common queries: @@ -114,26 +116,26 @@ edge_rollup columns: - calls (BIGINT) - avg_ms, error_rate (DOUBLE) -endpoint_rollup columns: -- namespace, service, method, path (VARCHAR) -- bucket (TIMESTAMP) -- calls, error_count, duration_count (BIGINT) -- duration_buckets (STRUCT): cumulative fixed-boundary latency counters +Dashboard reads use private completed-batch endpoint/log aggregates and exact +trace candidates. These implementation tables are not public SQL relations. ## Query Guidelines 1. Prefer spans, logs, and metrics over raw telemetry.* tables. 2. Always add a recent time filter for large queries. 3. Filter by namespace when relevant. -4. JSON columns are flat objects keyed by the literal attribute name. Attribute keys - contain dots (e.g. "http.method"), so the key MUST be double-quoted in the path: - json_extract_string(attributes_json, '$."http.method"') — or use the attr() macro: - attr(attributes_json, 'http.method'). An unquoted '$.http.method' returns NULL. -5. Use service_rollup, edge_rollup, and endpoint_rollup as rebuildable cache tables for dashboards before scanning raw telemetry. +4. Attributes and resources preserve integers, doubles, booleans, bytes, arrays, + objects and explicit nulls. Dotted names are literal keys, not JSON paths. + attr(attributes, 'http.method') returns a VARIANT; cast for comparisons and + aggregation: TRY_CAST(attr(attributes, 'http.status_code') AS BIGINT). + TRY_CAST handles heterogeneous producer types. Missing keys return SQL NULL. +5. Use service_rollup and edge_rollup as rebuildable cache tables for dashboards before scanning raw telemetry. 6. Always include a LIMIT unless aggregation makes it unnecessary. ## Useful DuckDB Functions -- json_extract_string(json_text, '$."dotted.key"') -- quote keys that contain dots -- time_bucket(INTERVAL '5 minutes', time) +- attr(attributes, 'dotted.key') -- literal-key VARIANT extraction +- TRY_CAST(attr(attributes, 'count') AS BIGINT) +- to_json(attributes) -- explicit JSON conversion when needed +- time_bucket(INTERVAL '5 minutes', time::TIMESTAMP_NS) - strftime(timestamp, format) - approx_quantile(value, 0.95) ` diff --git a/internal/query/schema_test.go b/internal/query/schema_test.go index affe3ab4..6a59fe4e 100644 --- a/internal/query/schema_test.go +++ b/internal/query/schema_test.go @@ -27,7 +27,6 @@ func TestGetSchema(t *testing.T) { "Logs", "Metrics", "service_rollup", - "endpoint_rollup", "trace_id", "service", "telemetry.spans", diff --git a/internal/query/sql.go b/internal/query/sql.go index 62b2028a..c91b09d0 100644 --- a/internal/query/sql.go +++ b/internal/query/sql.go @@ -2,6 +2,7 @@ package query import ( "context" + "encoding/json" "fmt" "regexp" "strings" @@ -76,22 +77,12 @@ func (d *Duck) ExecuteSQL(ctx context.Context, req SQLRequest) (resp SQLResponse } } - // Build the query to execute - var execQuery string - if req.Explain { - // EXPLAIN does not need LIMIT - execQuery = "EXPLAIN " + req.Query - } else { - // Add LIMIT if not present - execQuery = ensureLimit(req.Query, req.MaxRows) - } - // Add timeout to context queryCtx, cancel := context.WithTimeout(ctx, time.Duration(timeoutMs)*time.Millisecond) defer cancel() // Execute the query against immutable Parquet files and the local cache. - rows, err := d.QueryContext(queryCtx, execQuery) + rows, serialized, err := d.querySQL(queryCtx, req.Query, req.MaxRows, req.Explain) if err != nil { return SQLResponse{ Error: fmt.Sprintf("Query execution failed: %v", err), @@ -148,6 +139,17 @@ func (d *Duck) ExecuteSQL(ctx context.Context, req SQLRequest) (resp SQLResponse row := make(RowMap) for i, col := range columns { val := values[i] + if serialized[i] && val != nil { + text, ok := val.(string) + if !ok { + return SQLResponse{Error: "Invalid JSON result representation"} + } + decoder := json.NewDecoder(strings.NewReader(normalizeJSONNumbers(text))) + decoder.UseNumber() + if err := decoder.Decode(&val); err != nil { + return SQLResponse{Error: fmt.Sprintf("Decode JSON result: %v", err)} + } + } switch v := val.(type) { case []byte: // Convert []uint8 to string for better JSON representation @@ -158,7 +160,9 @@ func (d *Duck) ExecuteSQL(ctx context.Context, req SQLRequest) (resp SQLResponse // column they meet is one -- and a failed assertion yields // 0.0 from a value that was never zero, silently. Widening // here costs nothing and disarms the whole class. - row[col] = float64(v) + row[col] = jsonFloat(float64(v)) + case float64: + row[col] = jsonFloat(v) default: row[col] = val } @@ -305,7 +309,7 @@ func tokenOutsideStrings(query, token string) bool { // Pre-compiled patterns for CheckQueryCost to avoid re-compilation on every call. var ( highCardPatterns = func() map[string]*regexp.Regexp { - cols := []string{"TRACE_ID", "SPAN_ID", "ATTRIBUTES_JSON", "RESOURCE_JSON", "BODY", "EVENTS_JSON"} + cols := []string{"TRACE_ID", "SPAN_ID", "ATTRIBUTES", "RESOURCE", "BODY", "EVENTS_JSON"} m := make(map[string]*regexp.Regexp, len(cols)) for _, col := range cols { m[col] = regexp.MustCompile(`\b` + col + `\b`) @@ -373,16 +377,3 @@ func CheckQueryCost(sql string) []string { return warnings } - -// ensureLimit caps the result set at maxRows by wrapping the query in an outer -// SELECT … LIMIT. Wrapping (rather than rewriting a LIMIT in place) avoids -// clobbering LIMIT clauses inside subqueries or CTEs — a regex replace would -// rewrite an inner `LIMIT 5000` and silently change query semantics. Any -// user-supplied outer LIMIT smaller than maxRows still wins, since the outer cap -// only ever shrinks the result. -func ensureLimit(query string, maxRows int) string { - trimmed := strings.TrimSpace(query) - trimmed = strings.TrimSuffix(trimmed, ";") - trimmed = strings.TrimSpace(trimmed) - return fmt.Sprintf("SELECT * FROM (%s) AS _capped LIMIT %d", trimmed, maxRows) -} diff --git a/internal/query/sql_boundary.go b/internal/query/sql_boundary.go new file mode 100644 index 00000000..8e780e77 --- /dev/null +++ b/internal/query/sql_boundary.go @@ -0,0 +1,245 @@ +package query + +import ( + "context" + "database/sql" + "encoding/json" + "fmt" + "strings" + "time" + + "github.com/labstack/fanout/internal/metrics" + "github.com/labstack/fanout/internal/queryrows" +) + +// querySQL validates, describes and executes one statement on one connection +// while holding the same immutable Parquet snapshot throughout. +func (d *Duck) querySQL(ctx context.Context, query string, maxRows int, explain bool) (queryrows.Rows, []bool, error) { + if err := d.lockParquetRead(ctx, readerQuery); err != nil { + return nil, nil, err + } + conn, err := d.acquireRead(ctx) + if err != nil { + d.parquetMu.RUnlock() + return nil, nil, err + } + release := func() { _ = conn.Close(); d.parquetMu.RUnlock() } + failed := true + defer func() { + if failed { + release() + } + }() + if err := validateSQLAST(ctx, conn, query); err != nil { + return nil, nil, err + } + query = strings.TrimSpace(strings.TrimSuffix(strings.TrimSpace(query), ";")) + var serialized []bool + execQuery := "EXPLAIN " + query + if !explain { + execQuery, serialized, err = projectSQLResults(ctx, conn, query, maxRows) + if err != nil { + return nil, nil, err + } + } + started := time.Now() + rows, err := conn.QueryContext(ctx, execQuery) + metrics.DuckDBStatement.Observe(time.Since(started).Seconds()) + if err != nil { + return nil, nil, err + } + failed = false + return &lockedRows{Rows: rows, unlock: release}, serialized, nil +} + +func validateSQLAST(ctx context.Context, conn *sql.Conn, query string) error { + // The query is a bound value. Serialization parses without preparing or + // executing the submitted statement, including statements before a SELECT. + var text string + if err := conn.QueryRowContext(ctx, "SELECT json_serialize_sql(?::VARCHAR)::VARCHAR", query).Scan(&text); err != nil { + return err + } + var parsed struct { + Error bool `json:"error"` + Message string `json:"error_message"` + Statements []struct { + Node map[string]any `json:"node"` + } `json:"statements"` + } + if err := json.Unmarshal([]byte(text), &parsed); err != nil { + return err + } + if parsed.Error { + return fmt.Errorf("SQL parsing failed: %s", parsed.Message) + } + if len(parsed.Statements) != 1 { + return fmt.Errorf("exactly one SELECT statement is required") + } + return validateSQLNode(parsed.Statements[0].Node, nil) +} + +func projectSQLResults(ctx context.Context, conn *sql.Conn, query string, maxRows int) (string, []bool, error) { + rows, err := conn.QueryContext(ctx, "DESCRIBE "+query) + if err != nil { + return "", nil, err + } + defer rows.Close() + var projection, aliases []string + var serialized []bool + names := map[string]bool{} + for rows.Next() { + var name, logicalType string + var nullable, key, defaultValue, extra sql.NullString + if err := rows.Scan(&name, &logicalType, &nullable, &key, &defaultValue, &extra); err != nil { + return "", nil, err + } + if names[strings.ToLower(name)] { + return "", nil, fmt.Errorf("duplicate result column %q; use distinct aliases", name) + } + names[strings.ToLower(name)] = true + alias := fmt.Sprintf("_c%d", len(aliases)) + aliases = append(aliases, alias) + expression := alias + // DESCRIBE reports nested logical types too. Serialize the entire affected + // value; no unsupported variant vector reaches the Go driver. + encode := containsLogicalType(logicalType, "VARIANT") || containsLogicalType(logicalType, "JSON") || + containsLogicalType(logicalType, "STRUCT") || containsLogicalType(logicalType, "MAP") || containsLogicalType(logicalType, "UNION") || strings.Contains(logicalType, "[") + if encode { + expression = "to_json(" + expression + ")::VARCHAR" + } + if logicalType == "TIMESTAMPTZ_NS" { + expression = expression + "::TIMESTAMP_NS" + } + projection = append(projection, expression+" AS "+sqlIdentifier(name)) + serialized = append(serialized, encode) + } + if err := rows.Err(); err != nil { + return "", nil, err + } + return fmt.Sprintf("SELECT %s FROM (%s) AS _result(%s) LIMIT %d", strings.Join(projection, ","), query, strings.Join(aliases, ","), maxRows), serialized, nil +} + +func sqlIdentifier(name string) string { return `"` + strings.ReplaceAll(name, `"`, `""`) + `"` } + +// DESCRIBE types can contain quoted field names. A field named "VARIANT" +// is an identifier, not a variant type. Skip quoted identifiers before testing +// logical type tokens, including types inside lists, structs and maps. +func containsLogicalType(expression, name string) bool { + var token strings.Builder + quoted := false + for i := 0; i < len(expression); i++ { + c := expression[i] + if c == '"' { + if quoted && i+1 < len(expression) && expression[i+1] == '"' { + i++ + continue + } + quoted = !quoted + } + if !quoted && (c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' || c == '_') { + token.WriteByte(c) + } else { + if strings.EqualFold(token.String(), name) { + return true + } + token.Reset() + } + } + return strings.EqualFold(token.String(), name) +} + +func validateSQLNode(value any, ctes map[string]bool) error { + switch node := value.(type) { + case map[string]any: + // Definitions see prior and outer CTEs. A nonrecursive definition cannot + // see itself: DuckDB would resolve that reference to a physical table. + if cteMap, ok := node["cte_map"].(map[string]any); ok { + scope := make(map[string]bool, len(ctes)) + for name := range ctes { + scope[name] = true + } + entries, _ := cteMap["map"].([]any) + for _, entry := range entries { + entry, ok := entry.(map[string]any) + if !ok { + return fmt.Errorf("invalid CTE definition") + } + name, ok := entry["key"].(string) + definition, defined := entry["value"].(map[string]any) + if !ok || !defined || definition["query_node"] == nil { + return fmt.Errorf("invalid CTE definition") + } + if err := validateSQLNode(definition, scope); err != nil { + return err + } + scope[strings.ToLower(name)] = true + } + ctes = scope + } + kind, _ := node["type"].(string) + _, hasSample := node["sample"] + _, hasAlias := node["alias"] + // TableRef's common serialized fields distinguish it from QueryNode + // (which also has sample) and Expression (which also has alias). + if hasSample && hasAlias { + switch kind { + case "BASE_TABLE", "SUBQUERY", "JOIN", "TABLE_FUNCTION", "EMPTY", "EXPRESSION_LIST", "PIVOT": + default: + return fmt.Errorf("table reference %q is not available to telemetry SQL", kind) + } + } + switch kind { + case "INSERT_QUERY_NODE", "UPDATE_QUERY_NODE", "DELETE_QUERY_NODE", "COPY_QUERY_NODE", "MERGE_QUERY_NODE", "STATEMENT_NODE": + return fmt.Errorf("mutating SQL is not allowed") + case "BASE_TABLE": + name, _ := node["table_name"].(string) + schema, _ := node["schema_name"].(string) + catalog, _ := node["catalog_name"].(string) + allowed := map[string]bool{"spans": true, "logs": true, "metrics": true, "service_rollup": true, "edge_rollup": true} + cte := catalog == "" && ((schema == "" && ctes[strings.ToLower(name)]) || + (schema == "recurring" && ctes["recurring:"+strings.ToLower(name)])) + if !cte && (catalog != "" || (schema != "" && schema != "main" && schema != "telemetry") || !allowed[strings.ToLower(name)]) { + return fmt.Errorf("table %q is not available to telemetry SQL", name) + } + case "TABLE_FUNCTION": + function, _ := node["function"].(map[string]any) + name, _ := function["function_name"].(string) + switch strings.ToLower(name) { + case "range", "generate_series", "unnest": + default: + return fmt.Errorf("table function %q is not available to telemetry SQL", name) + } + } + if name, ok := node["function_name"].(string); ok { + switch strings.ToLower(name) { + case "nextval", "setval", "setseed", "query", "query_table", "json_execute_serialized_sql", "current_setting", "getvariable", "getenv", "read_csv", "read_csv_auto", "read_json", "read_json_auto", "read_text", "read_blob", "read_parquet", "glob", "http_get", "write_file": + return fmt.Errorf("function %q is not available to telemetry SQL", name) + } + } + for key, child := range node { + if key == "cte_map" { + continue + } // Definitions were validated in binding order. + scope := ctes + if kind == "RECURSIVE_CTE_NODE" && key == "right" { + scope = make(map[string]bool, len(ctes)+2) + for name := range ctes { + scope[name] = true + } + name, _ := node["cte_name"].(string) + scope[strings.ToLower(name)] = true + scope["recurring:"+strings.ToLower(name)] = true + } + if err := validateSQLNode(child, scope); err != nil { + return err + } + } + case []any: + for _, child := range node { + if err := validateSQLNode(child, ctes); err != nil { + return err + } + } + } + return nil +} diff --git a/internal/query/sql_boundary_test.go b/internal/query/sql_boundary_test.go new file mode 100644 index 00000000..6992593a --- /dev/null +++ b/internal/query/sql_boundary_test.go @@ -0,0 +1,124 @@ +package query + +import ( + "context" + "encoding/json" + "os" + "path/filepath" + "testing" +) + +func TestSQLBoundaryRejectsHiddenReadsAndMutations(t *testing.T) { + db := openTestDuck(t) + ctx := context.Background() + conn, err := db.Conn(ctx) + if err != nil { + t.Fatal(err) + } + defer conn.Close() + output := filepath.Join(t.TempDir(), "copy.csv") + for _, query := range []string{ + "SELECT 1; SELECT 2", + "WITH rollup_state AS (SELECT 1) SELECT * FROM main.rollup_state", + "WITH rollup_state AS (SELECT * FROM rollup_state) SELECT * FROM rollup_state", + "SELECT * FROM (WITH rollup_state AS (SELECT 1) SELECT * FROM rollup_state) x, rollup_state", + "SELECT * FROM query('SELECT * FROM rollup_state')", + "SELECT * FROM read_parquet('/etc/passwd')", + "SELECT * FROM (SHOW ALL TABLES)", + "SELECT * FROM read_batches", + "SELECT * FROM read_span_events", + "SELECT * FROM read_log_times", + "SELECT * FROM read_traces", + "SELECT * FROM read_trace_candidates", + "SELECT * FROM read_cache_version", + "SELECT * FROM endpoint_rollup", + "SELECT current_setting('allowed_directories')", + "SELECT getvariable('operator_secret')", + "WITH x AS MATERIALIZED (COPY (SELECT 1) TO '" + output + "') SELECT * FROM x", + } { + if err := validateSQLAST(ctx, conn, query); err == nil { + t.Errorf("accepted %s", query) + } + } + if _, err := os.Stat(output); !os.IsNotExist(err) { + t.Fatalf("COPY created output: %v", err) + } + for _, query := range []string{ + "WITH x AS (SELECT 1 AS n) SELECT * FROM x", + "WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL SELECT n+1 FROM x WHERE n<3) SELECT * FROM x", + } { + if err := validateSQLAST(ctx, conn, query); err != nil { + t.Errorf("rejected %s: %v", query, err) + } + } +} + +func TestSQLBoundarySerializesNestedVariants(t *testing.T) { + db := openTestDuck(t) + db.SetMaxOpenConns(1) + d := &Duck{DB: db} + queries := []string{ + `SELECT '{"dotted.key":9223372036854775807,"zero":0,"false":false,"null":null,"nested":[1,{"a":true}]}'::JSON::VARIANT AS data`, + `SELECT [1::VARIANT, '"text"'::JSON::VARIANT] AS data`, + `SELECT {'value': 9223372036854775807::BIGINT::VARIANT} AS data`, + `SELECT map(['key'], [1::VARIANT]) AS data`, + `SELECT {'value': 'NaN'::DOUBLE, 'text': 'NaN'} AS data`, + `SELECT 'Infinity'::DOUBLE AS data`, + } + for _, query := range queries { + resp := d.ExecuteSQL(context.Background(), SQLRequest{Query: query}) + if resp.Error != "" { + t.Fatalf("%s: %s", query, resp.Error) + } + if len(resp.Results) != 1 { + t.Fatalf("%s: %#v", query, resp) + } + if _, err := json.Marshal(resp.Results); err != nil { + t.Fatal(err) + } + } + resp := d.ExecuteSQL(context.Background(), SQLRequest{Query: queries[0]}) + value := resp.Results[0]["data"].(map[string]any) + if value["dotted.key"] != json.Number("9223372036854775807") || value["zero"] != json.Number("0") || value["false"] != false || value["null"] != nil { + t.Fatalf("typed values changed: %#v", value) + } + if resp := d.ExecuteSQL(context.Background(), SQLRequest{Query: "SELECT 1 AS x, 2 AS x"}); resp.Error == "" { + t.Fatal("duplicate aliases accepted") + } +} + +func TestLogicalTypeDetectionSkipsFieldNames(t *testing.T) { + for _, test := range []struct { + expression string + want bool + }{ + {`STRUCT("VARIANT" INTEGER)`, false}, + {`STRUCT("a" VARIANT)[]`, true}, + {`MAP(VARCHAR, VARIANT)`, true}, + {`STRUCT("VARIANT" STRUCT("VARIANT" VARCHAR))`, false}, + } { + if got := containsLogicalType(test.expression, "VARIANT"); got != test.want { + t.Errorf("%s: %v", test.expression, got) + } + } +} + +func TestExecuteSQLRejectsEngineMetadataReads(t *testing.T) { + d := &Duck{DB: openTestDuck(t)} + for _, statement := range []string{ + "SELECT * FROM (SHOW ALL TABLES)", + "SELECT * FROM read_batches", + "SELECT * FROM read_span_events", + "SELECT * FROM read_log_times", + "SELECT * FROM read_traces", + "SELECT * FROM read_trace_candidates", + "SELECT * FROM read_cache_version", + "SELECT * FROM endpoint_rollup", + "SELECT current_setting('allowed_directories')", + "SELECT getvariable('operator_secret')", + } { + if response := d.ExecuteSQL(t.Context(), SQLRequest{Query: statement}); response.Error == "" { + t.Errorf("executed forbidden query %s", statement) + } + } +} diff --git a/internal/query/sql_limit_test.go b/internal/query/sql_limit_test.go new file mode 100644 index 00000000..343518bd --- /dev/null +++ b/internal/query/sql_limit_test.go @@ -0,0 +1,52 @@ +package query + +import ( + "context" + "testing" +) + +// TestExecuteSQL_NonPositiveMaxRows guards the make([]RowMap, 0, MaxRows) path: +// a negative MaxRows must not panic and must fall back to the default. +func TestExecuteSQL_NonPositiveMaxRows(t *testing.T) { + db := openTestDuck(t) + d := &Duck{DB: db} + for _, mr := range []int{-1, 0, -1000} { + resp := d.ExecuteSQL(context.Background(), SQLRequest{Query: "SELECT 1 AS x", MaxRows: mr}) + if resp.Error != "" { + t.Errorf("MaxRows=%d returned error: %s", mr, resp.Error) + } + if resp.RowsReturned != 1 { + t.Errorf("MaxRows=%d returned %d rows, want 1", mr, resp.RowsReturned) + } + } +} + +func TestExecuteSQL_CapsRowsAtMaxRows(t *testing.T) { + db := openTestDuck(t) + d := &Duck{DB: db} + resp := d.ExecuteSQL(context.Background(), SQLRequest{Query: "SELECT n FROM range(50) AS t(n)", MaxRows: 5}) + if resp.Error != "" { + t.Fatalf("unexpected error: %s", resp.Error) + } + if resp.RowsReturned != 5 { + t.Errorf("RowsReturned = %d, want 5 (capped)", resp.RowsReturned) + } +} + +func TestExecuteSQLCapsWithoutChangingInnerLimitOrOrder(t *testing.T) { + db := openTestDuck(t) + d := &Duck{DB: db} + for _, q := range []string{ + "SELECT n FROM range(100) AS t(n) ORDER BY n DESC;", + "WITH t AS (SELECT n FROM range(100) AS r(n) ORDER BY n DESC LIMIT 7) SELECT n FROM t ORDER BY n DESC", + } { + resp := d.ExecuteSQL(context.Background(), SQLRequest{Query: q, MaxRows: 3}) + if resp.Error != "" || resp.RowsReturned != 3 || resp.Results[0]["n"] != int64(99) || resp.Results[2]["n"] != int64(97) { + t.Fatalf("%s: %#v", q, resp) + } + } + resp := d.ExecuteSQL(context.Background(), SQLRequest{Query: "SELECT n FROM range(100) AS t(n) ORDER BY n DESC LIMIT 2", MaxRows: 3}) + if resp.Error != "" || resp.RowsReturned != 2 { + t.Fatalf("inner cap: %#v", resp) + } +} diff --git a/internal/query/sql_test.go b/internal/query/sql_test.go index 4bcdd787..e1678989 100644 --- a/internal/query/sql_test.go +++ b/internal/query/sql_test.go @@ -165,10 +165,10 @@ func TestCheckQueryCost(t *testing.T) { // High-cardinality GROUP BY {"group by trace_id", "SELECT trace_id, COUNT(*) FROM spans WHERE start_time > now() - INTERVAL 1 HOUR GROUP BY trace_id", 1}, {"group by span_id", "SELECT span_id, COUNT(*) FROM spans WHERE start_time > now() - INTERVAL 1 HOUR GROUP BY span_id", 1}, - {"group by attributes_json", "SELECT attributes_json, COUNT(*) FROM spans WHERE start_time > now() - INTERVAL 1 HOUR GROUP BY attributes_json", 1}, + {"group by attributes", "SELECT attributes, COUNT(*) FROM spans WHERE start_time > now() - INTERVAL 1 HOUR GROUP BY attributes", 1}, {"group by body", "SELECT body, COUNT(*) FROM logs WHERE time > now() - INTERVAL 1 HOUR GROUP BY body", 1}, {"group by events_json", "SELECT events_json, COUNT(*) FROM spans WHERE start_time > now() - INTERVAL 1 HOUR GROUP BY events_json", 1}, - {"group by resource_json", "SELECT resource_json, COUNT(*) FROM spans WHERE start_time > now() - INTERVAL 1 HOUR GROUP BY resource_json", 1}, + {"group by resource", "SELECT resource, COUNT(*) FROM spans WHERE start_time > now() - INTERVAL 1 HOUR GROUP BY resource", 1}, // Unbounded time range (also triggers SELECT * without LIMIT) {"spans no time filter", "SELECT * FROM spans WHERE service = 'foo'", 2}, diff --git a/internal/query/stall_instrumentation_test.go b/internal/query/stall_instrumentation_test.go index c4eb7668..d54d56f0 100644 --- a/internal/query/stall_instrumentation_test.go +++ b/internal/query/stall_instrumentation_test.go @@ -36,8 +36,8 @@ func TestWritesDoNotDrawFromTheReadPool(t *testing.T) { if got := d.DB.Stats().MaxOpenConnections; got != 4 { t.Fatalf("read pool MaxOpenConnections = %d, want 4", got) } - if got := d.writeDB.Stats().MaxOpenConnections; got != 1 { - t.Fatalf("write handle MaxOpenConnections = %d, want 1 — writes are serialized by the gate anyway", got) + if got := d.writeDB.Stats().MaxOpenConnections; got != 2 { + t.Fatalf("write handle MaxOpenConnections = %d, want 2 for disjoint analytical and completed-batch writers", got) } if d.writer() != d.writeDB { t.Fatal("writes are not going through the write handle") diff --git a/internal/query/testdata/edge_rollup_pre_fix.sql b/internal/query/testdata/edge_rollup_pre_fix.sql index 60497482..67d5055a 100644 --- a/internal/query/testdata/edge_rollup_pre_fix.sql +++ b/internal/query/testdata/edge_rollup_pre_fix.sql @@ -55,8 +55,8 @@ producers AS ( s.namespace, date_trunc('minute', s.start_time) AS bucket, s.service, - json_extract_string(s.attributes_json, '$."messaging.destination.name"') AS destination, - json_extract_string(s.attributes_json, '$."messaging.system"') AS msg_system + TRY_CAST(attr(s.attributes, 'messaging.destination.name') AS VARCHAR) AS destination, + TRY_CAST(attr(s.attributes, 'messaging.system') AS VARCHAR) AS msg_system FROM spans s JOIN affected a ON a.namespace = s.namespace @@ -66,15 +66,15 @@ producers AS ( AND s.start_time < (SELECT MAX(bucket) FROM affected) + INTERVAL 1 MINUTE AND s.service IS NOT NULL AND s.service != '' - AND json_extract_string(s.attributes_json, '$."messaging.destination.name"') IS NOT NULL + AND TRY_CAST(attr(s.attributes, 'messaging.destination.name') AS VARCHAR) IS NOT NULL ), consumers AS ( SELECT s.namespace, date_trunc('minute', s.start_time) AS bucket, s.service, - json_extract_string(s.attributes_json, '$."messaging.destination.name"') AS destination, - json_extract_string(s.attributes_json, '$."messaging.system"') AS msg_system, + TRY_CAST(attr(s.attributes, 'messaging.destination.name') AS VARCHAR) AS destination, + TRY_CAST(attr(s.attributes, 'messaging.system') AS VARCHAR) AS msg_system, COUNT(*) AS calls FROM spans s JOIN affected a @@ -85,10 +85,10 @@ consumers AS ( AND s.start_time < (SELECT MAX(bucket) FROM affected) + INTERVAL 1 MINUTE AND s.service IS NOT NULL AND s.service != '' - AND json_extract_string(s.attributes_json, '$."messaging.destination.name"') IS NOT NULL + AND TRY_CAST(attr(s.attributes, 'messaging.destination.name') AS VARCHAR) IS NOT NULL GROUP BY s.namespace, date_trunc('minute', s.start_time), s.service, - json_extract_string(s.attributes_json, '$."messaging.destination.name"'), - json_extract_string(s.attributes_json, '$."messaging.system"') + TRY_CAST(attr(s.attributes, 'messaging.destination.name') AS VARCHAR), + TRY_CAST(attr(s.attributes, 'messaging.system') AS VARCHAR) ), messaging_edges AS ( SELECT diff --git a/internal/query/timestamp_plan_test.go b/internal/query/timestamp_plan_test.go new file mode 100644 index 00000000..86c32866 --- /dev/null +++ b/internal/query/timestamp_plan_test.go @@ -0,0 +1,109 @@ +package query + +import ( + "context" + "encoding/json" + "fmt" + "strings" + "testing" + "time" + + "github.com/labstack/fanout/internal/telemetry" +) + +func TestNativeTimestampPredicatesPruneParquetAndPreserveNanoseconds(t *testing.T) { + // Use real format-3 files with three disjoint row groups, and a non-UTC + // process timezone. Nanosecond window parameters must not lose precision. + t.Setenv("TZ", "America/Los_Angeles") + store, err := telemetry.OpenParquetStore(t.TempDir()) + if err != nil { + t.Fatal(err) + } + defer store.Close() + base := time.Date(2026, 11, 1, 9, 0, 0, 123456789, time.UTC) // repeated DST hour + spans := make([]telemetry.Span, 150000) + for i := range spans { + n := base.Add(time.Duration(i/50000)*time.Minute + time.Duration(i%50000)).UnixNano() + spans[i] = telemetry.Span{TraceID: "trace", SpanID: fmt.Sprintf("%06d", i), StartUnixNanos: n, EndUnixNanos: n + 1, ServiceName: "api", DurationMS: 1} + } + if err := store.CommitBatch(context.Background(), telemetry.BatchMetadata{ID: "time"}, spans, nil, nil); err != nil { + t.Fatal(err) + } + db := openTestDuck(t) + if err := CreateParquetViews(db, store.Dir()); err != nil { + t.Fatal(err) + } + if err := CreateViews(db); err != nil { + t.Fatal(err) + } + for _, statement := range []string{"SET enable_profiling='json'", "SET profiling_output=" + sqlLiteral(t.TempDir()+"/profile.json")} { + if _, err := db.Exec(statement); err != nil { + t.Fatal(err) + } + } + // Values carry a different timezone representation of the same UTC instant. + lo := base.Add(time.Minute + 10).In(time.FixedZone("PST", -8*3600)) + hi := lo.Add(time.Nanosecond) + const query = `SELECT COUNT(*), MIN(start_time)::TIMESTAMP_NS, approx_quantile(duration_ms, 0.95) + FROM spans WHERE start_time >= ?::TIMESTAMP_NS::TIMESTAMPTZ_NS AND start_time < ?::TIMESTAMP_NS::TIMESTAMPTZ_NS GROUP BY service` + var count int64 + var got time.Time + var quantile float64 + if err := db.QueryRow(query, lo, hi).Scan(&count, &got, &quantile); err != nil { + t.Fatal(err) + } + if count != 1 || got.UnixNano() != lo.UnixNano() || quantile != 1 { + t.Fatalf("native result count=%d time=%s quantile=%g", count, got, quantile) + } + var key, plan string + if err := db.QueryRow("EXPLAIN ANALYZE "+query, lo, hi).Scan(&key, &plan); err != nil { + t.Fatal(err) + } + var profile any + if err := json.Unmarshal([]byte(plan), &profile); err != nil { + t.Fatal(err) + } + var scan map[string]any + var visit func(any) + visit = func(value any) { + switch x := value.(type) { + case map[string]any: + if x["type"] == "TABLE_SCAN" { + scan = x + } + for _, v := range x { + visit(v) + } + case []any: + for _, v := range x { + visit(v) + } + } + } + visit(profile) + if scan == nil { + t.Fatalf("no Parquet scan: %s", plan) + } + if scan["row_groups_scanned"] != float64(1) || scan["total_row_groups_to_scan"] != float64(3) { + t.Fatalf("row groups not pruned: %#v", scan) + } + filters := scan["extra_info"].(map[string]any)["Filters"].(string) + if strings.Contains(filters, "CAST(start_time") || !strings.Contains(filters, "TIMESTAMPTZ_NS") { + t.Fatalf("timestamp filter casts the column: %s", filters) + } + // The old view cast is a negative control: it must not pass the guard. + old := strings.ReplaceAll(query, "WHERE start_time", "WHERE start_time::TIMESTAMP_NS") + old = strings.ReplaceAll(old, "AND start_time <", "AND start_time::TIMESTAMP_NS <") + old = strings.ReplaceAll(old, "?::TIMESTAMP_NS::TIMESTAMPTZ_NS", "?::TIMESTAMP_NS") + if err := db.QueryRow("EXPLAIN ANALYZE "+old, lo, hi).Scan(&key, &plan); err != nil { + t.Fatal(err) + } + if err := json.Unmarshal([]byte(plan), &profile); err != nil { + t.Fatal(err) + } + scan = nil + visit(profile) + if scan == nil || scan["row_groups_scanned"] != float64(3) { + t.Fatalf("negative control unexpectedly pruned: %#v", scan) + } +} diff --git a/internal/query/variant_boundary_test.go b/internal/query/variant_boundary_test.go new file mode 100644 index 00000000..488534e5 --- /dev/null +++ b/internal/query/variant_boundary_test.go @@ -0,0 +1,102 @@ +package query + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/labstack/fanout/internal/config" + "github.com/labstack/fanout/internal/telemetry" + telemetrystore "github.com/labstack/fanout/internal/telemetry/store" +) + +func TestSQLBoundaryPreservesResidualTypesUnderShreddedKeys(t *testing.T) { + testResidualSerialization(t, false) +} +func TestSQLBoundaryResidualTypesWithoutShreddedStrings(t *testing.T) { + testResidualSerialization(t, true) +} +func testResidualSerialization(t *testing.T, noStrings bool) { + ctx := t.Context() + cfg := config.Config{DataDir: t.TempDir(), DuckDBMemory: "256MB", DuckDBThreads: 2, DuckDBMaxConns: 1} + repo, err := telemetrystore.Open(cfg.TelemetryDir()) + if err != nil { + t.Fatal(err) + } + defer repo.Close() + values := []any{"5", int64(5), false, true, 1.25, map[string]any{"n": int64(9007199254740993), "b": false}, []any{int64(9), true, "s"}, nil, int64(9007199254740993)} + if noStrings { + values = values[1:] + } + attrs := make([]map[string]any, 4098) + resources := make([]map[string]any, 4098) + spans := make([]telemetry.Span, 4098) + for i := range spans { + attrs[i] = map[string]any{"messaging.system": values[i%len(values)], "messaging.destination.name": values[(i+1)%len(values)], "ordinary": values[i%len(values)]} + resources[i] = map[string]any{"service.name": values[i%len(values)], "service.namespace": values[(i+1)%len(values)], "service.version": values[(i+2)%len(values)], "deployment.environment.name": values[(i+3)%len(values)]} + spans[i] = telemetry.Span{TraceID: "trace", SpanID: fmt.Sprintf("%05d", i), Attributes: attrs[i], Resource: resources[i]} + } + if err := repo.Commit(ctx, telemetrystore.Batch{ID: "mismatch", Spans: spans}); err != nil { + t.Fatal(err) + } + norm := func(v any) any { + b, e := json.Marshal(v) + if e != nil { + t.Fatal(e) + } + var result any + d := json.NewDecoder(strings.NewReader(string(b))) + d.UseNumber() + if e = d.Decode(&result); e != nil { + t.Fatal(e) + } + return result + } + for _, surface := range []string{"spans", "telemetry.spans"} { + for _, filter := range []string{"", " WHERE span_id='00001'"} { + for _, shape := range []string{"*", "span_id,attributes,resource", "span_id,{'a':attributes,'r':resource} AS nested", "span_id,[attributes,resource] AS nested", "span_id,map(['a','r'],[attributes,resource]) AS nested"} { + t.Run(surface+filter+shape, func(t *testing.T) { + d, e := NewDuck(ctx, cfg, repo) + if e != nil { + t.Fatal(e) + } + defer d.Close() + resp := d.ExecuteSQL(ctx, SQLRequest{Query: "SELECT " + shape + " FROM " + surface + filter + " ORDER BY span_id", MaxRows: 5000}) + if resp.Error != "" { + t.Fatal(resp.Error) + } + count := len(spans) + if filter != "" { + count = 1 + } + if len(resp.Results) != count { + t.Fatalf("rows %d want %d", len(resp.Results), count) + } + for _, row := range resp.Results { + var i int + if _, e := fmt.Sscanf(row["span_id"].(string), "%d", &i); e != nil { + t.Fatal(e) + } + if strings.Contains(shape, " AS nested") { + var want any = map[string]any{"a": attrs[i], "r": resources[i]} + if strings.Contains(shape, "[attributes,resource] AS") { + want = []any{attrs[i], resources[i]} + } + if !reflect.DeepEqual(row["nested"], norm(want)) { + t.Fatalf("row %d nested got %#v want %#v", i, row["nested"], norm(want)) + } + } else { + for k, want := range map[string]any{"attributes": attrs[i], "resource": resources[i]} { + if !reflect.DeepEqual(row[k], norm(want)) { + t.Fatalf("row %d %s got %#v want %#v", i, k, row[k], norm(want)) + } + } + } + } + }) + } + } + } +} diff --git a/internal/query/variant_integration_test.go b/internal/query/variant_integration_test.go new file mode 100644 index 00000000..dd5233e6 --- /dev/null +++ b/internal/query/variant_integration_test.go @@ -0,0 +1,92 @@ +package query + +import ( + "context" + "encoding/json" + "math" + "os" + "path/filepath" + "testing" + "time" + + "github.com/labstack/fanout/internal/config" + engine "github.com/labstack/fanout/internal/duckdb" + "github.com/labstack/fanout/internal/telemetry" + telemetrystore "github.com/labstack/fanout/internal/telemetry/store" +) + +func TestPinnedEngineReadsShreddedTelemetry(t *testing.T) { + ctx := context.Background() + cfg := config.Config{DataDir: t.TempDir(), DuckDBMemory: "256MB", DuckDBThreads: 2, DuckDBMaxConns: 1} + repository, err := telemetrystore.Open(cfg.TelemetryDir()) + if err != nil { + t.Fatal(err) + } + defer repository.Close() + d, err := NewDuck(ctx, cfg, repository) + if err != nil { + t.Fatal(err) + } + defer d.Close() + var version string + if err := d.DB.QueryRowContext(ctx, "SELECT version()").Scan(&version); err != nil { + t.Fatal(err) + } + if version != engine.Version { + t.Fatalf("engine %s, expected %s", version, engine.Version) + } + nanos := time.Date(2026, 9, 30, 12, 0, 0, 123456789, time.UTC).UnixNano() + attrs := map[string]any{"dotted.key": int64(math.MaxInt64), "zero": int64(0), "false": false, "null": nil, + "bytes": []byte{0, 255}, "nested": []any{int64(9), map[string]any{"ok": true}}, "messaging.system": "kafka", "nan": math.NaN()} + resource := map[string]any{"service.name": "checkout", "service.namespace": "prod", "custom": int64(42)} + if err := repository.Commit(ctx, telemetrystore.Batch{ID: "typed", Spans: []telemetry.Span{{Namespace: "prod", TraceID: "trace", SpanID: "span", StartUnixNanos: nanos, IngestedAt: nanos, Attributes: attrs, Resource: resource}}, + Logs: []telemetry.Log{{Namespace: "prod", TimeUnixNanos: nanos, Attributes: attrs, Resource: resource}}, + Metrics: []telemetry.Metric{{Namespace: "prod", TimeUnixNanos: nanos, Attributes: attrs, Resource: resource}}}); err != nil { + t.Fatal(err) + } + for _, relation := range []string{"spans", "logs", "metrics"} { + resp := d.ExecuteSQL(ctx, SQLRequest{Query: "SELECT * FROM " + relation}) + if resp.Error != "" || len(resp.Results) != 1 { + t.Fatalf("%s: %#v", relation, resp) + } + got := resp.Results[0]["attributes"].(map[string]any) + if got["dotted.key"] != json.Number("9223372036854775807") || got["zero"] != json.Number("0") || got["false"] != false || got["null"] != nil { + t.Fatalf("%s types: %#v", relation, got) + } + if _, err := json.Marshal(resp.Results); err != nil { + t.Fatal(err) + } + } + var extracted int64 + if err := d.DB.QueryRowContext(ctx, "SELECT attr(attributes,'dotted.key')::BIGINT FROM spans").Scan(&extracted); err != nil || extracted != math.MaxInt64 { + t.Fatalf("integer extraction %d: %v", extracted, err) + } + var eventTime time.Time + if err := d.DB.QueryRowContext(ctx, "SELECT start_time::TIMESTAMP_NS FROM spans").Scan(&eventTime); err != nil || eventTime.UnixNano() != nanos { + t.Fatalf("nanosecond time %s: %v", eventTime, err) + } + indexed, _, err := d.Trace(ctx, telemetry.TraceQuery{TraceID: "trace", Namespace: "prod", StartNanos: nanos - 1, EndNanos: nanos + 1, Limit: 10}) + if err != nil || len(indexed) != 1 || indexed[0].StartUnixNanos != nanos { + t.Fatalf("trace parity %#v: %v", indexed, err) + } + // Engine-level restrictions remain effective even outside public SQL AST + // validation. Only telemetry and the rebuildable query directory are allowed. + secret := filepath.Join(t.TempDir(), "secret.txt") + if err := os.WriteFile(secret, []byte("private"), 0600); err != nil { + t.Fatal(err) + } + if _, err := d.DB.ExecContext(ctx, "SELECT * FROM read_text("+sqlLiteral(secret)+")"); err == nil { + t.Fatal("engine read outside allowed directories") + } + if _, err := d.DB.ExecContext(ctx, "SET enable_external_access=true"); err == nil { + t.Fatal("engine policy was mutable") + } + if _, err := d.DB.ExecContext(ctx, "SET threads=1"); err != nil { + t.Fatal("operator thread limit locked:", err) + } + // Nested nanosecond timezone types must never reach an unsupported Go vector. + resp := d.ExecuteSQL(ctx, SQLRequest{Query: "SELECT [start_time::TIMESTAMPTZ_NS] AS times FROM spans"}) + if resp.Error != "" { + t.Fatal(resp.Error) + } +} diff --git a/internal/query/views.go b/internal/query/views.go index c79ea40b..76bf9277 100644 --- a/internal/query/views.go +++ b/internal/query/views.go @@ -16,22 +16,22 @@ CREATE TABLE IF NOT EXISTS telemetry.spans ( service VARCHAR, operation VARCHAR, kind VARCHAR, - start_time TIMESTAMP, - end_time TIMESTAMP, + start_time TIMESTAMP_NS, + end_time TIMESTAMP_NS, start_unix_nano BIGINT, end_unix_nano BIGINT, duration_ms DOUBLE, status VARCHAR, status_message VARCHAR, - resource_json VARCHAR, - attributes_json VARCHAR, + resource VARIANT, + attributes VARIANT, events_json VARCHAR, links_json VARCHAR, trace_state VARCHAR, flags BIGINT, scope_name VARCHAR, scope_version VARCHAR, - ingested_at TIMESTAMP, + ingested_at TIMESTAMP_NS, ingested_unix_nano BIGINT, http_method VARCHAR, http_status_code VARCHAR, @@ -43,14 +43,16 @@ CREATE TABLE IF NOT EXISTS telemetry.spans ( service_version VARCHAR, deployment_env VARCHAR, exception_type VARCHAR, - exception_message VARCHAR + exception_message VARCHAR, + messaging_system VARCHAR GENERATED ALWAYS AS (TRY_CAST(attributes['messaging.system'] AS VARCHAR)), + messaging_destination VARCHAR GENERATED ALWAYS AS (TRY_CAST(attributes['messaging.destination.name'] AS VARCHAR)) );` const createLogsTable = ` CREATE TABLE IF NOT EXISTS telemetry.logs ( namespace VARCHAR, - log_time TIMESTAMP, - observed_time TIMESTAMP, + log_time TIMESTAMP_NS, + observed_time TIMESTAMP_NS, time_unix_nano BIGINT, observed_time_unix_nano BIGINT, severity VARCHAR, @@ -60,11 +62,11 @@ CREATE TABLE IF NOT EXISTS telemetry.logs ( trace_id VARCHAR, span_id VARCHAR, flags BIGINT, - resource_json VARCHAR, - attributes_json VARCHAR, + resource VARIANT, + attributes VARIANT, scope_name VARCHAR, scope_version VARCHAR, - ingested_at TIMESTAMP, + ingested_at TIMESTAMP_NS, ingested_unix_nano BIGINT, body_template VARCHAR );` @@ -72,7 +74,7 @@ CREATE TABLE IF NOT EXISTS telemetry.logs ( const createMetricsTable = ` CREATE TABLE IF NOT EXISTS telemetry.metrics ( namespace VARCHAR, - metric_time TIMESTAMP, + metric_time TIMESTAMP_NS, time_unix_nano BIGINT, name VARCHAR, description VARCHAR, @@ -85,11 +87,11 @@ CREATE TABLE IF NOT EXISTS telemetry.metrics ( hist_count BIGINT, hist_sum DOUBLE, exemplars_json VARCHAR, - attributes_json VARCHAR, - resource_json VARCHAR, + attributes VARIANT, + resource VARIANT, scope_name VARCHAR, scope_version VARCHAR, - ingested_at TIMESTAMP, + ingested_at TIMESTAMP_NS, ingested_unix_nano BIGINT );` @@ -124,8 +126,9 @@ CREATE TABLE edge_rollup ( PRIMARY KEY (namespace, bucket, caller, callee, edge_type) );` -const createEndpointRollupTable = ` -CREATE TABLE endpoint_rollup ( +const createReadEndpointTable = ` +CREATE TABLE IF NOT EXISTS read_endpoints ( + batch_id VARCHAR, namespace TEXT, bucket TIMESTAMP, service TEXT, @@ -153,7 +156,7 @@ CREATE TABLE endpoint_rollup ( le_30000 UBIGINT, le_300000 UBIGINT ), - PRIMARY KEY (namespace, bucket, service, method, path) + PRIMARY KEY (batch_id, namespace, bucket, service, method, path) );` const createRollupStateTable = ` @@ -173,22 +176,22 @@ SELECT service, operation, kind, - start_time, - end_time, + start_time::TIMESTAMPTZ_NS AS start_time, + end_time::TIMESTAMPTZ_NS AS end_time, start_unix_nano, end_unix_nano, duration_ms, status, status_message, - resource_json, - attributes_json, + resource, + attributes, events_json, links_json, trace_state, flags, scope_name, scope_version, - ingested_at, + ingested_at::TIMESTAMPTZ_NS AS ingested_at, ingested_unix_nano, http_method, http_status_code, @@ -200,15 +203,17 @@ SELECT service_version, deployment_env, exception_type, - exception_message + exception_message, + messaging_system, + messaging_destination FROM telemetry.spans;` const viewLogs = ` CREATE OR REPLACE VIEW logs AS SELECT namespace, - log_time AS time, - observed_time, + log_time::TIMESTAMPTZ_NS AS time, + observed_time::TIMESTAMPTZ_NS AS observed_time, time_unix_nano, observed_time_unix_nano, severity, @@ -218,11 +223,11 @@ SELECT trace_id, span_id, flags, - resource_json, - attributes_json, + resource, + attributes, scope_name, scope_version, - ingested_at, + ingested_at::TIMESTAMPTZ_NS AS ingested_at, ingested_unix_nano, body_template FROM telemetry.logs;` @@ -231,7 +236,7 @@ const viewMetrics = ` CREATE OR REPLACE VIEW metrics AS SELECT namespace, - metric_time AS time, + metric_time::TIMESTAMPTZ_NS AS time, time_unix_nano, name, description, @@ -244,17 +249,17 @@ SELECT hist_count, hist_sum, exemplars_json, - attributes_json, - resource_json, + attributes, + resource, scope_name, scope_version, - ingested_at, + ingested_at::TIMESTAMPTZ_NS AS ingested_at, ingested_unix_nano FROM telemetry.metrics;` const macroAttr = ` -CREATE OR REPLACE MACRO attr(json_col, key) AS - json_extract_string(json_col, '$."' || key || '"');` +CREATE OR REPLACE MACRO attr(attributes, key) AS + variant_extract(attributes, key);` // CreateTables creates mutable telemetry tables for query-kernel tests and // benchmarks. Production startup never calls this function: telemetry is @@ -282,52 +287,34 @@ func CreateCacheTables(db *sql.DB) error { "namespace", "bucket", "caller", "callee", "calls", "avg_ms", "error_rate", "edge_type"); err != nil { return err } - if err := ensureCacheTable(db, "endpoint_rollup", createEndpointRollupTable, - "namespace", "bucket", "service", "method", "path", "calls", "error_count", "duration_count", "duration_buckets"); err != nil { - return err - } if err := ensureCacheTable(db, "rollup_state", createRollupStateTable, "cache_key", "last_ingested_unix_nano", "updated_at"); err != nil { return err } - return nil + if _, err := db.Exec(`DROP TABLE IF EXISTS endpoint_rollup`); err != nil { + return err + } + if err := forgetRollupProgress(db, "endpoint_rollup"); err != nil { + return err + } + return createBatchCaches(db) } -// CreateParquetViews exposes the repository's open Parquet files under the -// canonical telemetry schema used by Fanout's SQL kernel. -// -// The schema is pinned explicitly rather than unioned from the files. Both -// approaches tolerate an older batch that predates an added column -- it reads -// as NULL either way, which is the property the views cannot do without, since -// CreateViews names every column and binds eagerly, so a glob that rejects one -// old file stops the process from starting. -// -// They differ entirely in cost. union_by_name derives the column set by opening -// every file in the glob at bind and holding a reader and footer per file for -// the statement's life, on the raw allocator where memory_limit cannot see it: -// measured at 510 MiB per query against 3,281 live batches and 857 MiB against -// 5,709, scaling at roughly 150 KB per file and paid again by every concurrent -// binder. Pinning the schema opens nothing at bind, so the same query costs -// tens of MiB and stops tracking how many batches happen to exist. +// CreateParquetViews exposes the fixed format-3 schema. Binding one file +// rather than unioning every footer bounds binder memory. Supplying a schema +// MAP suppresses DuckDB 2's VARIANT extraction pushdown, so read the physical +// schema directly; startup rejects mismatched batch schemas before this point. func CreateParquetViews(db *sql.DB, parquetDir string) error { if _, err := db.Exec(`CREATE SCHEMA IF NOT EXISTS telemetry`); err != nil { return err } for _, signal := range []string{"spans", "logs", "metrics"} { pattern := filepath.ToSlash(filepath.Join(parquetDir, "batches", "*.batch", signal+".parquet")) - // _schema.batch is rewritten from the current binary's row structs on - // every open (ParquetStore.ensureSchemaBatch), so it is the definition - // of "every column this build knows about". Reading its schema keeps - // the view in lockstep with the writer instead of duplicating the - // column list here for someone to forget. That rewrite is load-bearing: - // while the file was written once and kept, these views were pinned to - // whichever build created the data directory. - schemaFile := filepath.ToSlash(filepath.Join(parquetDir, "batches", "_schema.batch", signal+".parquet")) - columns, err := parquetSchemaMap(db, schemaFile, signal == "spans") - if err != nil { - return err + projection := "*" + if signal == "spans" { + projection += " EXCLUDE (_trace_hash), TRY_CAST(attributes['messaging.system'] AS VARCHAR) AS messaging_system, TRY_CAST(attributes['messaging.destination.name'] AS VARCHAR) AS messaging_destination" } - stmt := fmt.Sprintf(`CREATE OR REPLACE VIEW telemetry.%s AS SELECT * FROM read_parquet(%s, schema=%s)`, signal, sqlLiteral(pattern), columns) + stmt := fmt.Sprintf(`CREATE OR REPLACE VIEW telemetry.%s AS SELECT %s FROM read_parquet(%s, union_by_name=false, hive_partitioning=false)`, signal, projection, sqlLiteral(pattern)) if _, err := db.Exec(stmt); err != nil { return fmt.Errorf("create parquet view telemetry.%s: %w", signal, err) } @@ -335,37 +322,6 @@ func CreateParquetViews(db *sql.DB, parquetDir string) error { return nil } -// parquetSchemaMap renders the schema argument for read_parquet from one file's -// own schema. A column absent from a given file takes its default, which is how -// an older batch survives a build that added a column. -func parquetSchemaMap(db *sql.DB, file string, dropTraceHash bool) (string, error) { - rows, err := db.Query(fmt.Sprintf(`SELECT column_name, column_type FROM (DESCRIBE SELECT * FROM read_parquet(%s))`, sqlLiteral(file))) - if err != nil { - return "", fmt.Errorf("describe %s: %w", file, err) - } - defer rows.Close() - var entries []string - for rows.Next() { - var name, columnType string - if err := rows.Scan(&name, &columnType); err != nil { - return "", err - } - // _trace_hash is a physical sort key, not part of the telemetry schema. - if dropTraceHash && name == "_trace_hash" { - continue - } - entries = append(entries, fmt.Sprintf("%s: {'name': %s, 'type': %s, 'default_value': NULL}", - sqlLiteral(name), sqlLiteral(name), sqlLiteral(columnType))) - } - if err := rows.Err(); err != nil { - return "", err - } - if len(entries) == 0 { - return "", fmt.Errorf("no columns described for %s", file) - } - return "MAP{" + strings.Join(entries, ", ") + "}", nil -} - // CreateViews creates stable clean-name views plus the attr() macro. func CreateViews(db *sql.DB) error { for _, stmt := range []string{macroAttr, viewSpans, viewLogs, viewMetrics} { diff --git a/internal/query/views_schema_test.go b/internal/query/views_schema_test.go index e1dc874e..3ac0fa29 100644 --- a/internal/query/views_schema_test.go +++ b/internal/query/views_schema_test.go @@ -1,78 +1,84 @@ package query import ( - "database/sql" - "fmt" - "os" - "path/filepath" + "context" + "encoding/json" + "strings" "testing" + + "github.com/labstack/fanout/internal/telemetry" ) -// The telemetry views must survive a build that adds a column: older batches -// on disk lack it and must read as NULL rather than failing the glob. -// -// This is not a theoretical concern. CreateViews names every column explicitly -// and DuckDB binds a view eagerly, so a glob that rejects one old file fails at -// NewDuck and the process does not start at all -- it stays down until every -// pre-deploy batch has aged out. An earlier attempt to cut the views' bind cost -// by dropping union_by_name did exactly that, which is why this test exists -// rather than a comment saying to be careful. -func TestParquetViewsToleratePreDeploySchemas(t *testing.T) { - dir := t.TempDir() - batches := filepath.Join(dir, "batches") - for _, name := range []string{"_schema.batch", "old.batch", "new.batch"} { - if err := os.MkdirAll(filepath.Join(batches, name), 0o755); err != nil { - t.Fatal(err) - } - } - db, err := sql.Open("duckdb", "") +func TestParquetMessagingViewProjectsShreddedKeysIntoScan(t *testing.T) { + store, err := telemetry.OpenParquetStore(t.TempDir()) if err != nil { t.Fatal(err) } - defer db.Close() - - write := func(batch, signal, sel string) { - t.Helper() - path := filepath.ToSlash(filepath.Join(batches, batch, signal+".parquet")) - if _, err := db.Exec(fmt.Sprintf(`COPY (%s) TO '%s' (FORMAT PARQUET)`, sel, path)); err != nil { - t.Fatalf("write %s/%s: %v", batch, signal, err) - } + defer store.Close() + if err := store.CommitBatch(context.Background(), telemetry.BatchMetadata{ID: "attrs"}, []telemetry.Span{ + {TraceID: "one", SpanID: "a", Resource: map[string]any{"service.name": "api"}, Attributes: map[string]any{"messaging.system": "kafka", "messaging.destination.name": "jobs"}}, + {TraceID: "two", SpanID: "b", Resource: map[string]any{"service.name": "worker"}, Attributes: map[string]any{"messaging.system": "nats", "messaging.destination.name": "events"}}, + }, nil, nil); err != nil { + t.Fatal(err) } - // The current build knows about added_later; the old batch predates it. - for _, signal := range []string{"spans", "logs", "metrics"} { - write("_schema.batch", signal, "SELECT 1 AS id, 'x' AS added_later WHERE false") - write("old.batch", signal, "SELECT 1 AS id") - write("new.batch", signal, "SELECT 2 AS id, 'present' AS added_later") + db := openTestDuck(t) + if err := CreateParquetViews(db, store.Dir()); err != nil { + t.Fatal(err) } - - if err := CreateParquetViews(db, dir); err != nil { - t.Fatalf("CreateParquetViews must not fail on a pre-deploy batch: %v", err) + if err := CreateViews(db); err != nil { + t.Fatal(err) } - - for _, signal := range []string{"spans", "logs", "metrics"} { - rows, err := db.Query(fmt.Sprintf(`SELECT id, added_later FROM telemetry.%s ORDER BY id`, signal)) - if err != nil { - t.Fatalf("query telemetry.%s: %v", signal, err) + for _, statement := range []string{"SET enable_profiling='json'", "SET profiling_output=" + sqlLiteral(t.TempDir()+"/profile.json")} { + if _, err := db.Exec(statement); err != nil { + t.Fatal(err) } - seen := map[int]bool{} - for rows.Next() { - var id int - var added sql.NullString - if err := rows.Scan(&id, &added); err != nil { - rows.Close() - t.Fatal(err) - } - seen[id] = true - if id == 1 && added.Valid { - t.Errorf("%s: the pre-deploy batch reported %q for a column it does not have", signal, added.String) - } - if id == 2 && added.String != "present" { - t.Errorf("%s: current batch read added_later=%q, want \"present\"", signal, added.String) + } + for _, column := range []struct{ name, key, value string }{{"messaging_system", "messaging.system", "kafka"}, {"messaging_destination", "messaging.destination.name", "jobs"}} { + q := "SELECT " + column.name + " FROM spans WHERE " + column.name + " = ?" + var got string + if err := db.QueryRow(q, column.value).Scan(&got); err != nil || got != column.value { + t.Fatalf("projected key = %q, %v", got, err) + } + plan := explain(t, db, "ANALYZE "+q, column.value) + var profile any + if err := json.Unmarshal([]byte(plan), &profile); err != nil { + t.Fatal(err) + } + var scan map[string]any + var visit func(any) + visit = func(value any) { + switch x := value.(type) { + case map[string]any: + if x["type"] == "TABLE_SCAN" { + scan = x + } + for _, v := range x { + visit(v) + } + case []any: + for _, v := range x { + visit(v) + } } } - rows.Close() - if !seen[1] || !seen[2] { - t.Errorf("%s: read %v, want rows from both the old and the new batch", signal, seen) + visit(profile) + if scan == nil { + t.Fatal("no scan") + } + projection, _ := scan["extra_info"].(map[string]any)["Projections"].(string) + if projection != "attributes."+column.key { + t.Fatalf("shredded key did not reach scan: %s", plan) } } + // General attr() access still preserves literal keys and types through views; + // this preview's optimizer does not push such extracts across their projection. + var service string + if err := db.QueryRow("SELECT attr(resource,'service.name')::VARCHAR FROM spans WHERE trace_id='one'").Scan(&service); err != nil || service != "api" { + t.Fatalf("literal resource key=%q %v", service, err) + } + // Ensure the hot path did not request the whole attributes object. + plan := explain(t, db, "SELECT messaging_system FROM spans") + if strings.Contains(plan, "Projections: attributes ") { + t.Fatal(plan) + } } diff --git a/internal/query/views_test.go b/internal/query/views_test.go index 454ad55e..4f0ea93c 100644 --- a/internal/query/views_test.go +++ b/internal/query/views_test.go @@ -14,6 +14,10 @@ func openTestDuck(t *testing.T) *sql.DB { if err != nil { t.Fatalf("open duckdb: %v", err) } + db.SetMaxOpenConns(1) + if _, err := db.Exec("SET TimeZone='UTC'"); err != nil { + t.Fatal(err) + } t.Cleanup(func() { _ = db.Close() }) return db } @@ -52,7 +56,7 @@ func TestCreateTables_CacheTablesIncludePartitionColumns(t *testing.T) { rows, err := db.Query(` SELECT table_name, column_name FROM duckdb_columns() -WHERE table_name IN ('service_rollup', 'edge_rollup', 'endpoint_rollup', 'rollup_state') +WHERE table_name IN ('service_rollup', 'edge_rollup', 'read_endpoints', 'rollup_state') ORDER BY table_name, column_name`) if err != nil { t.Fatalf("query duckdb_columns failed: %v", err) @@ -75,10 +79,10 @@ ORDER BY table_name, column_name`) } required := map[string][]string{ - "service_rollup": {"namespace", "bucket", "service"}, - "edge_rollup": {"namespace", "bucket", "caller", "callee", "edge_type"}, - "endpoint_rollup": {"namespace", "bucket", "service", "method", "path", "calls", "error_count", "duration_count", "duration_buckets"}, - "rollup_state": {"cache_key", "last_ingested_unix_nano", "updated_at"}, + "service_rollup": {"namespace", "bucket", "service"}, + "edge_rollup": {"namespace", "bucket", "caller", "callee", "edge_type"}, + "read_endpoints": {"batch_id", "namespace", "bucket", "service", "method", "path", "calls", "error_count", "duration_count", "duration_buckets"}, + "rollup_state": {"cache_key", "last_ingested_unix_nano", "updated_at"}, } for table, columns := range required { for _, column := range columns { @@ -101,7 +105,7 @@ func TestCreateViews_AttrMacroWorks(t *testing.T) { var result string if err := db.QueryRowContext(context.Background(), - `SELECT attr('{"key":"hello"}', 'key')`).Scan(&result); err != nil { + `SELECT attr('{"key":"hello"}'::JSON::VARIANT, 'key')::VARCHAR`).Scan(&result); err != nil { t.Fatalf("attr() macro failed: %v", err) } if result != "hello" { diff --git a/internal/query/writegate/write_gate.go b/internal/query/writegate/write_gate.go index dbeebfa9..7d9faefa 100644 --- a/internal/query/writegate/write_gate.go +++ b/internal/query/writegate/write_gate.go @@ -16,11 +16,11 @@ import ( type WriteOperation string const ( - WriteRollupSkip WriteOperation = "rollup_skip_to_latest" - WriteRollupService WriteOperation = "rollup_service" - WriteRollupEndpoint WriteOperation = "rollup_endpoint" - WriteRollupEdge WriteOperation = "rollup_edge" - WriteMaintenance WriteOperation = "maintenance" + WriteRollupSkip WriteOperation = "rollup_skip_to_latest" + WriteRollupService WriteOperation = "rollup_service" + WriteReadCache WriteOperation = "read_cache" + WriteRollupEdge WriteOperation = "rollup_edge" + WriteMaintenance WriteOperation = "maintenance" ) // WriteGate serializes DuckDB writes while measuring how long each operation diff --git a/internal/queryrows/window.go b/internal/queryrows/window.go new file mode 100644 index 00000000..6070566b --- /dev/null +++ b/internal/queryrows/window.go @@ -0,0 +1,38 @@ +package queryrows + +import ( + "context" + "time" +) + +// Window is an explicit internal read scope. Only callers that apply these +// event-time predicates may use it to exclude immutable Parquet files. +type Window struct { + Start, End time.Time + Namespace, Service string + Kind ReadKind +} + +type windowKey struct{} + +func WithWindow(ctx context.Context, window Window) context.Context { + return context.WithValue(ctx, windowKey{}, window) +} + +func ReadWindow(ctx context.Context) (Window, bool) { + window, ok := ctx.Value(windowKey{}).(Window) + return window, ok && window.Start.Before(window.End) +} + +// ReadKind identifies private aggregate relations used by trusted dashboard SQL. +type ReadKind uint8 + +const ( + RawRead ReadKind = iota + EndpointRead + LogHistogramRead + TraceCandidateRead +) + +// BatchReader exposes the completed-batch accelerators to internal callers. +type BatchReader interface{ CompletedBatchReads() bool } diff --git a/internal/telemetry/attributes.go b/internal/telemetry/attributes.go new file mode 100644 index 00000000..aa1066fc --- /dev/null +++ b/internal/telemetry/attributes.go @@ -0,0 +1,28 @@ +package telemetry + +// ValueBytes accounts for owned attribute payloads and container overhead +// without allocating another serialized copy while ingest is backpressured. +func ValueBytes(value any) int { + switch value := value.(type) { + case nil: + return 0 + case string: + return len(value) + 16 + case []byte: + return len(value) + 24 + case map[string]any: + total := 48 + for key, child := range value { + total += 64 + len(key) + ValueBytes(child) + } + return total + case []any: + total := 24 + 16*len(value) + for _, child := range value { + total += ValueBytes(child) + } + return total + default: + return 16 + } +} diff --git a/internal/telemetry/commit_memory_test.go b/internal/telemetry/commit_memory_test.go index 28505120..43210d46 100644 --- a/internal/telemetry/commit_memory_test.go +++ b/internal/telemetry/commit_memory_test.go @@ -62,9 +62,8 @@ func syntheticSpan(i int, base time.Time) Span { EndUnixNanos: start.Add(3 * time.Millisecond).UnixNano(), DurationMS: 3, StatusCode: "OK", - ResourceJSON: `{"service.name":"checkout","deployment.environment":"prod","host.name":"cube-10"}`, - AttributesJSON: fmt.Sprintf( - `{"http.method":"POST","http.route":"/api/orders","http.status_code":200,"order.id":"%d","user.id":"u-%d","session":"%032x"}`, i, i*7, i), + Resource: map[string]any{"service.name": "checkout", "deployment.environment": "prod", "host.name": "cube-10"}, + Attributes: map[string]any{"http.method": "POST", "http.route": "/api/orders", "http.status_code": int64(200), "order.id": fmt.Sprint(i), "user.id": fmt.Sprintf("u-%d", i*7), "session": fmt.Sprintf("%032x", i)}, EventsJSON: fmt.Sprintf( `[{"name":"validated","time":%d},{"name":"charged","time":%d,"amount":%d}]`, start.UnixNano(), start.UnixNano()+1000, i%9999), LinksJSON: fmt.Sprintf(`[{"trace_id":"%032x","span_id":"%016x"}]`, i+1, i+1), @@ -74,7 +73,7 @@ func syntheticSpan(i int, base time.Time) Span { func payloadBytes(spans []Span) int64 { var total int64 for i := range spans { - total += int64(len(spans[i].ResourceJSON) + len(spans[i].AttributesJSON) + + total += int64(ValueBytes(spans[i].Resource) + ValueBytes(spans[i].Attributes) + len(spans[i].EventsJSON) + len(spans[i].LinksJSON) + len(spans[i].TraceID) + len(spans[i].SpanID) + len(spans[i].ServiceName) + len(spans[i].Name)) } diff --git a/internal/telemetry/conversion_alloc_test.go b/internal/telemetry/conversion_alloc_test.go index 221ea7d0..1610315f 100644 --- a/internal/telemetry/conversion_alloc_test.go +++ b/internal/telemetry/conversion_alloc_test.go @@ -27,7 +27,7 @@ func TestSpanConversionDoesNotCopyJSONPayloads(t *testing.T) { } var jsonBytes int64 for i := range spans { - jsonBytes += int64(len(spans[i].ResourceJSON) + len(spans[i].AttributesJSON) + + jsonBytes += int64(ValueBytes(spans[i].Resource) + ValueBytes(spans[i].Attributes) + len(spans[i].EventsJSON) + len(spans[i].LinksJSON)) } diff --git a/internal/telemetry/event_bounds_test.go b/internal/telemetry/event_bounds_test.go new file mode 100644 index 00000000..95c277ad --- /dev/null +++ b/internal/telemetry/event_bounds_test.go @@ -0,0 +1,81 @@ +package telemetry + +import ( + "encoding/json" + "os" + "path/filepath" + "testing" + + "github.com/parquet-go/parquet-go" +) + +func TestEventBoundsUsePhysicalNanosecondsAfterReopen(t *testing.T) { + dir := t.TempDir() + store, err := OpenParquetStore(dir) + if err != nil { + t.Fatal(err) + } + spans := []Span{{TraceID: "trace", SpanID: "negative", StartUnixNanos: -7, EndUnixNanos: -3, IngestedAt: 999}, {TraceID: "trace", SpanID: "positive", StartUnixNanos: 23, EndUnixNanos: 24, IngestedAt: 999}} + logs := []Log{{EventUnixNanos: 5, TimeUnixNanos: 1, IngestedAt: 999}, {ObservedTimeNanos: 17, IngestedAt: 999}} + metrics := []Metric{{EventUnixNanos: 11, TimeUnixNanos: 1, IngestedAt: 999}, {IngestedAt: 999}} + if err := store.CommitBatch(t.Context(), BatchMetadata{ID: "bounds"}, spans, logs, metrics); err != nil { + t.Fatal(err) + } + store, err = OpenParquetStore(dir) + if err != nil { + t.Fatal(err) + } + b := store.BatchMetadata()[0] + if b.SpanTime != (TimeRange{-7, 23, true}) || b.LogTime != (TimeRange{5, 17, true}) || b.MetricTime != (TimeRange{11, 999, true}) { + t.Fatalf("physical bounds: %#v", b) + } + rows, totals, err := store.Trace(t.Context(), TraceQuery{TraceID: "trace", StartNanos: -10, EndNanos: 0, Limit: 10}) + if err != nil || len(rows) != 1 || totals.Spans != 1 { + t.Fatalf("negative trace: %#v %#v %v", rows, totals, err) + } + metadata, err := os.ReadFile(filepath.Join(store.BatchPath("bounds"), "metadata.json")) + if err != nil { + t.Fatal(err) + } + var fields map[string]any + if err := json.Unmarshal(metadata, &fields); err != nil { + t.Fatal(err) + } + if fields["version"] != float64(3) || fields["SpanTime"] != nil { + t.Fatalf("format changed: %s", metadata) + } +} +func TestEventBoundsRequireCompleteRowGroupStatistics(t *testing.T) { + rows := make([]logParquetRow, parquetRowGroupRows+1) + for i := range rows { + rows[i].LogTime = int64(i) - 25000 + } + for _, missing := range []bool{false, true} { + path := filepath.Join(t.TempDir(), "logs.parquet") + options := []parquet.WriterOption{} + if missing { + options = append(options, parquet.SkipPageBounds("log_time")) + } + if err := writeTypedParquet(path, rows, parquetPageSize, options...); err != nil { + t.Fatal(err) + } + f, err := os.Open(path) + if err != nil { + t.Fatal(err) + } + info, _ := f.Stat() + file, err := parquet.OpenFile(f, info.Size()) + if err != nil { + t.Fatal(err) + } + bounds := parquetTimeRange(file, "log_time") + f.Close() + if missing { + if bounds.Known { + t.Fatalf("missing stats considered known: %#v", bounds) + } + } else if bounds != (TimeRange{-25000, 25000, true}) { + t.Fatalf("row groups: %#v", bounds) + } + } +} diff --git a/internal/telemetry/format.go b/internal/telemetry/format.go new file mode 100644 index 00000000..9ba2a4d3 --- /dev/null +++ b/internal/telemetry/format.go @@ -0,0 +1,36 @@ +package telemetry + +import ( + "errors" + "os" + "path/filepath" + "strings" +) + +func validateBatchFormats(dir string) error { + entries, err := os.ReadDir(dir) + if errors.Is(err, os.ErrNotExist) { + // Only an absent root denotes a new store. A missing file inside an existing + // dataset is an error and must not trigger initialization. + if _, rootErr := os.Stat(dir); errors.Is(rootErr, os.ErrNotExist) { + return nil + } + } + if err != nil { + return err + } + for _, entry := range entries { + name := entry.Name() + // Quarantine is outside the authoritative set. Retired inputs may still + // be needed for compaction recovery and must be checked before cleanup. + active := strings.HasSuffix(name, BatchSuffix) + retired := strings.HasSuffix(name, ".retired") || strings.Contains(name, ".retired-") + if !entry.IsDir() || name == SchemaBatch || (!active && (!retired || strings.Contains(name, ".quarantined-"))) { + continue + } + if _, err := readBatchMetadata(filepath.Join(dir, name, "metadata.json")); err != nil { + return err + } + } + return nil +} diff --git a/internal/telemetry/parquet.go b/internal/telemetry/parquet.go index 050c5d25..3d2c4144 100644 --- a/internal/telemetry/parquet.go +++ b/internal/telemetry/parquet.go @@ -3,6 +3,7 @@ package telemetry import ( "container/heap" "context" + "encoding/binary" "encoding/json" "errors" "fmt" @@ -24,7 +25,7 @@ import ( const ( BatchSuffix = ".batch" SchemaBatch = "_schema" + BatchSuffix - batchMetadataVersion = 2 + batchMetadataVersion = 3 parquetPageSize = 64 << 10 parquetRowGroupRows = 50_000 maxTraceQueryResults = 500 @@ -53,6 +54,16 @@ type BatchMetadata struct { // measured when a batch is loaded, from stats the load already performs. // Zero means not measured. Bytes int64 `json:"-"` + // Event times come from fixed-schema Parquet footer statistics, not ingest + // timestamps. They are derived on publication/load and never change format 3. + SpanTime TimeRange `json:"-"` + LogTime TimeRange `json:"-"` + MetricTime TimeRange `json:"-"` +} + +type TimeRange struct { + MinNanos, MaxNanos int64 + Known bool } type TraceQuery struct { @@ -89,6 +100,10 @@ func OpenParquetStore(dir string) (*ParquetStore, error) { publishGate: make(chan struct{}, 1), batches: make(map[string]*storedBatch), } p.publishGate <- struct{}{} + // Reject incompatible published data before touching staging or schema files. + if err := validateBatchFormats(p.batchesDir); err != nil { + return nil, err + } for _, path := range []string{p.dir, p.batchesDir} { if err := os.MkdirAll(path, 0o755); err != nil { return nil, err @@ -482,8 +497,8 @@ func (p *ParquetStore) Trace(ctx context.Context, query TraceQuery) ([]IndexedSp if err := ctx.Err(); err != nil { return nil, totals, err } - if batch.metadata.MaxSpanStartNanos > 0 && - (batch.metadata.MaxSpanStartNanos < query.StartNanos || batch.metadata.MinSpanStartNanos >= query.EndNanos) { + if bounds := batch.metadata.SpanTime; bounds.Known && + (bounds.MaxNanos < query.StartNanos || bounds.MinNanos >= query.EndNanos) { continue } match, found, err := batch.traces.Lookup(hash) @@ -1022,32 +1037,6 @@ func loadRegisteredBatch(dir string) (*storedBatch, error) { return batch, nil } -// ValidatePublishedBatch performs an offline deep validation: startup's -// structural checks plus full Parquet decoding and an exact span/index walk. -// Repair uses it to prove a batch is unreadable before it can be set aside. -func ValidatePublishedBatch(dir string) error { - batch, err := loadRegisteredBatch(dir) - if err != nil { - return err - } - if batch.metadata.Spans > 0 { - if err := verifySpanParquet(filepath.Join(dir, "spans.parquet"), batch.metadata.Spans, batch.traces); err != nil { - return fmt.Errorf("verify spans Parquet: %w", err) - } - } - if batch.metadata.Logs > 0 { - if err := verifyTypedParquet[logParquetRow](filepath.Join(dir, "logs.parquet"), batch.metadata.Logs, nil); err != nil { - return fmt.Errorf("verify logs Parquet: %w", err) - } - } - if batch.metadata.Metrics > 0 { - if err := verifyTypedParquet[metricParquetRow](filepath.Join(dir, "metrics.parquet"), batch.metadata.Metrics, nil); err != nil { - return fmt.Errorf("verify metrics Parquet: %w", err) - } - } - return nil -} - func verifySpanParquet(path string, expected int, index traceIndex) (err error) { indexFile, err := os.Open(index.path) if err != nil { @@ -1072,7 +1061,12 @@ func verifySpanParquet(path string, expected int, index traceIndex) (err error) have = false return nil } - err = verifyTypedParquet[spanParquetRow](path, expected, func(row spanParquetRow, position uint64) error { + var previous verificationSpanRow + err = verifyTypedParquet[verificationSpanRow](path, expected, func(row verificationSpanRow, position uint64) error { + if position > 0 && (row.TraceHash < previous.TraceHash || row.TraceHash == previous.TraceHash && (row.StartUnixNano < previous.StartUnixNano || row.StartUnixNano == previous.StartUnixNano && row.SpanID < previous.SpanID)) { + return fmt.Errorf("span row %d is not sorted by trace hash, start time, span ID", position) + } + previous = row if row.TraceHash != xxh3.HashString(row.TraceID) { return fmt.Errorf("span row %d trace hash does not match trace ID", position) } @@ -1165,10 +1159,16 @@ func loadStoredBatch(dir string) (*storedBatch, error) { {name: "metrics", count: metadata.Metrics}, } for _, signal := range signals { + path := filepath.Join(dir, signal.name+".parquet") if signal.count == 0 { + if _, err := os.Lstat(path); !errors.Is(err, os.ErrNotExist) { + if err != nil { + return nil, err + } + return nil, fmt.Errorf("%s parquet exists but metadata declares zero rows", signal.name) + } continue } - path := filepath.Join(dir, signal.name+".parquet") info, err := os.Stat(path) if err != nil { return nil, err @@ -1189,9 +1189,29 @@ func loadStoredBatch(dir string) (*storedBatch, error) { if err := errors.Join(openErr, closeErr); err != nil { return nil, fmt.Errorf("open %s Parquet: %w", signal.name, err) } + var expectedSchema *parquet.Schema + switch signal.name { + case "spans": + expectedSchema = telemetrySchema[spanParquetRow]() + case "logs": + expectedSchema = telemetrySchema[logParquetRow]() + case "metrics": + expectedSchema = telemetrySchema[metricParquetRow]() + } + if !parquet.EqualNodes(parquetFile.Schema(), expectedSchema) { + return nil, fmt.Errorf("%w: %s parquet schema does not match telemetry format %d", ErrUnsupportedBatchFormat, signal.name, batchMetadataVersion) + } if rows := parquetFile.NumRows(); rows != int64(signal.count) { return nil, fmt.Errorf("%s Parquet has %d rows; metadata declares %d", signal.name, rows, signal.count) } + switch signal.name { + case "spans": + metadata.SpanTime = parquetTimeRange(parquetFile, "start_time") + case "logs": + metadata.LogTime = parquetTimeRange(parquetFile, "log_time") + case "metrics": + metadata.MetricTime = parquetTimeRange(parquetFile, "metric_time") + } } var traces traceIndex if metadata.Spans > 0 { @@ -1203,6 +1223,40 @@ func loadStoredBatch(dir string) (*storedBatch, error) { return &storedBatch{metadata: metadata, dir: dir, traces: traces}, nil } +// Statistics are optional in Parquet. Without complete bounds, the file stays +// in every candidate snapshot. Ingest bounds never substitute for event time. +func parquetTimeRange(file *parquet.File, column string) TimeRange { + var result TimeRange + for _, group := range file.Metadata().RowGroups { + found := false + for _, chunk := range group.Columns { + if len(chunk.MetaData.PathInSchema) != 1 || chunk.MetaData.PathInSchema[0] != column { + continue + } + stats := chunk.MetaData.Statistics + if len(stats.MinValue) != 8 || len(stats.MaxValue) != 8 { + return TimeRange{} + } + low := int64(binary.LittleEndian.Uint64(stats.MinValue)) + high := int64(binary.LittleEndian.Uint64(stats.MaxValue)) + if low > high { + return TimeRange{} + } + if !result.Known || low < result.MinNanos { + result.MinNanos = low + } + if !result.Known || high > result.MaxNanos { + result.MaxNanos = high + } + result.Known, found = true, true + } + if !found { + return TimeRange{} + } + } + return result +} + func (p *ParquetStore) hasBatch(id string) bool { p.mu.RLock() _, ok := p.batches[id] @@ -1293,6 +1347,7 @@ func mergeTypedParquet[T any](ctx context.Context, inputs []string, output strin _ = os.Remove(output) } }() + options = append(options, telemetrySchema[T]()) writer := parquet.NewGenericWriter[T](out, parquetWriterOptions(parquetPageSize, options...)...) _, copyErr := parquet.CopyRows(writer, contextParquetRows{Context: ctx, Rows: rows}) if closeErr := writer.Close(); copyErr != nil || closeErr != nil { @@ -1317,8 +1372,9 @@ func writeTypedParquet[T any](path string, rows []T, pageSize int, options ...pa _ = os.Remove(path) } }() + options = append(options, telemetrySchema[T]()) writer := parquet.NewGenericWriter[T](f, parquetWriterOptions(pageSize, options...)...) - if _, err := writer.Write(rows); err != nil { + if err := writeTelemetryColumns(writer, rows); err != nil { _ = writer.Close() return err } @@ -1345,7 +1401,7 @@ func readBatchMetadata(path string) (BatchMetadata, error) { return BatchMetadata{}, err } if metadata.Version != batchMetadataVersion { - return BatchMetadata{}, fmt.Errorf("unsupported batch metadata version %d", metadata.Version) + return BatchMetadata{}, fmt.Errorf("%w: version %d", ErrUnsupportedBatchFormat, metadata.Version) } if err := ValidateBatchID(metadata.ID); err != nil { return BatchMetadata{}, err diff --git a/internal/telemetry/parquet_rows.go b/internal/telemetry/parquet_rows.go index b9e9b97f..32bee44d 100644 --- a/internal/telemetry/parquet_rows.go +++ b/internal/telemetry/parquet_rows.go @@ -5,9 +5,10 @@ package telemetry // parquetRowGroupRows. That pays for itself on a column whose values repeat — // service names, HTTP methods, scope identifiers, the resource block shared by // every span in a ResourceSpans — and costs a full second copy of the payload -// on a column whose values do not. The JSON columns carrying per-row -// attributes, events, links and exemplars are near-unique by construction, so -// they are written plain: dictionary-encoding them made one 50k-span commit +// on a column whose values do not. Per-row events, links and exemplars are +// near-unique by construction and are written plain. Attributes and resources +// use shredded VARIANT columns with a bounded shared metadata dictionary. +// Dictionary-encoding whole attribute payloads made one 50k-span commit // hold several times the batch it was handed, which is what // TestCommitBatchPeakHeapStaysNearPayloadSize pins. @@ -27,8 +28,8 @@ type spanParquetRow struct { DurationMS float64 `parquet:"duration_ms"` Status string `parquet:"status"` StatusMessage string `parquet:"status_message"` - ResourceJSON string `parquet:"resource_json,dict"` - AttributesJSON string `parquet:"attributes_json"` + Resource any `parquet:"resource,variant"` + Attributes any `parquet:"attributes,variant"` EventsJSON string `parquet:"events_json"` LinksJSON string `parquet:"links_json"` TraceState string `parquet:"trace_state,dict"` @@ -56,7 +57,7 @@ func makeSpanParquetRow(r Span) spanParquetRow { Service: r.ServiceName, Operation: r.Name, Kind: r.Kind, StartTime: r.StartUnixNanos, EndTime: r.EndUnixNanos, StartUnixNano: r.StartUnixNanos, EndUnixNano: r.EndUnixNanos, DurationMS: r.DurationMS, Status: r.StatusCode, StatusMessage: r.StatusMsg, - ResourceJSON: r.ResourceJSON, AttributesJSON: r.AttributesJSON, EventsJSON: r.EventsJSON, LinksJSON: r.LinksJSON, + Resource: r.Resource, Attributes: r.Attributes, EventsJSON: r.EventsJSON, LinksJSON: r.LinksJSON, TraceState: r.TraceState, Flags: int64(r.Flags), ScopeName: r.ScopeName, ScopeVersion: r.ScopeVersion, IngestedAt: r.IngestedAt, IngestedUnixNano: r.IngestedAt, HTTPMethod: r.HTTPMethod, HTTPStatusCode: r.HTTPStatusCode, HTTPRoute: r.HTTPRoute, DBSystem: r.DBSystem, RPCMethod: r.RPCMethod, @@ -100,8 +101,8 @@ type logParquetRow struct { TraceID string `parquet:"trace_id"` SpanID string `parquet:"span_id"` Flags int64 `parquet:"flags"` - ResourceJSON string `parquet:"resource_json,dict"` - AttributesJSON string `parquet:"attributes_json"` + Resource any `parquet:"resource,variant"` + Attributes any `parquet:"attributes,variant"` ScopeName string `parquet:"scope_name,dict"` ScopeVersion string `parquet:"scope_version,dict"` IngestedAt int64 `parquet:"ingested_at,timestamp(nanosecond)"` @@ -115,7 +116,7 @@ func makeLogParquetRow(r Log) logParquetRow { ObservedTime: FirstPositiveNanos(r.ObservedTimeNanos, r.EventUnixNanos, r.TimeUnixNanos, r.IngestedAt), TimeUnixNano: r.TimeUnixNanos, ObservedTimeUnixNano: r.ObservedTimeNanos, Severity: r.Severity, SeverityNumber: int64(r.SeverityNumber), Body: r.Body, Service: r.ServiceName, TraceID: r.TraceID, SpanID: r.SpanID, Flags: int64(r.Flags), - ResourceJSON: r.ResourceJSON, AttributesJSON: r.AttributesJSON, ScopeName: r.ScopeName, + Resource: r.Resource, Attributes: r.Attributes, ScopeName: r.ScopeName, ScopeVersion: r.ScopeVersion, IngestedAt: r.IngestedAt, IngestedUnixNano: r.IngestedAt, BodyTemplate: r.BodyTemplate, } } @@ -135,8 +136,8 @@ type metricParquetRow struct { HistCount int64 `parquet:"hist_count"` HistSum float64 `parquet:"hist_sum"` ExemplarsJSON string `parquet:"exemplars_json"` - AttributesJSON string `parquet:"attributes_json"` - ResourceJSON string `parquet:"resource_json,dict"` + Attributes any `parquet:"attributes,variant"` + Resource any `parquet:"resource,variant"` ScopeName string `parquet:"scope_name,dict"` ScopeVersion string `parquet:"scope_version,dict"` IngestedAt int64 `parquet:"ingested_at,timestamp(nanosecond)"` @@ -149,7 +150,7 @@ func makeMetricParquetRow(r Metric) metricParquetRow { Name: r.Name, Description: r.Description, Unit: r.Unit, MetricType: r.Type, Service: r.ServiceName, Value: r.Value, HistBoundsJSON: r.HistBoundsJSON, HistCountsJSON: r.HistCountsJSON, HistCount: r.HistCount, HistSum: r.HistSum, ExemplarsJSON: r.ExemplarsJSON, - AttributesJSON: r.AttributesJSON, ResourceJSON: r.ResourceJSON, ScopeName: r.ScopeName, + Attributes: r.Attributes, Resource: r.Resource, ScopeName: r.ScopeName, ScopeVersion: r.ScopeVersion, IngestedAt: r.IngestedAt, IngestedUnixNano: r.IngestedAt, } } diff --git a/internal/telemetry/parquet_schema.go b/internal/telemetry/parquet_schema.go new file mode 100644 index 00000000..ae3f1a40 --- /dev/null +++ b/internal/telemetry/parquet_schema.go @@ -0,0 +1,37 @@ +package telemetry + +import "github.com/parquet-go/parquet-go" + +// Every writer and full-row reader uses this physical schema, including empty +// schema batches and compaction. Dotted OTel names remain literal object keys. +func telemetrySchema[T any]() *parquet.Schema { + base := parquet.SchemaOf(new(T)) + fields := parquet.Group{} + for _, field := range base.Fields() { + switch field.Name() { + case "attributes": + fields[field.Name()] = shreddedObject(parquet.Group{ + "messaging.system": parquet.Optional(parquet.String()), + "messaging.destination.name": parquet.Optional(parquet.String()), + }) + case "resource": + fields[field.Name()] = shreddedObject(parquet.Group{ + "service.name": parquet.Optional(parquet.String()), + "service.namespace": parquet.Optional(parquet.String()), + "service.version": parquet.Optional(parquet.String()), + "deployment.environment.name": parquet.Optional(parquet.String()), + }) + default: + fields[field.Name()] = field + } + } + return parquet.NewSchema(base.Name(), fields) +} + +func shreddedObject(fields parquet.Group) parquet.Node { + node, err := parquet.ShreddedVariant(fields) + if err != nil { + panic(err) + } // The fixed schema is a programmer-owned constant. + return parquet.Optional(node) +} diff --git a/internal/telemetry/parquet_test.go b/internal/telemetry/parquet_test.go index bdd07fc2..ae13771a 100644 --- a/internal/telemetry/parquet_test.go +++ b/internal/telemetry/parquet_test.go @@ -182,16 +182,16 @@ func TestParquetStorePreservesCompleteLogAndMetricRows(t *testing.T) { logRow := Log{ Namespace: "tenant", EventUnixNanos: 11, TimeUnixNanos: 12, ObservedTimeNanos: 13, Severity: "ERROR", SeverityNumber: 17, Body: "declined", ServiceName: "checkout", - TraceID: "trace", SpanID: "span", Flags: 1, ResourceJSON: `{"host":"one"}`, - AttributesJSON: `{"attempt":2}`, ScopeName: "scope", ScopeVersion: "1.2.3", + TraceID: "trace", SpanID: "span", Flags: 1, Resource: map[string]any{"host": "one"}, + Attributes: map[string]any{"attempt": int64(2)}, ScopeName: "scope", ScopeVersion: "1.2.3", IngestedAt: 14, BodyTemplate: "declined: {reason}", } metricRow := Metric{ Namespace: "tenant", EventUnixNanos: 21, TimeUnixNanos: 22, Name: "request.duration", Description: "request latency", Unit: "ms", Type: "histogram", ServiceName: "checkout", Value: 23.5, HistBoundsJSON: `[1,5,10]`, HistCountsJSON: `[2,3,4,5]`, HistCount: 14, HistSum: 47, - ExemplarsJSON: `[{"trace_id":"trace"}]`, AttributesJSON: `{"route":"/pay"}`, - ResourceJSON: `{"host":"one"}`, ScopeName: "scope", ScopeVersion: "1.2.3", IngestedAt: 24, + ExemplarsJSON: `[{"trace_id":"trace"}]`, Attributes: map[string]any{"route": "/pay"}, + Resource: map[string]any{"host": "one"}, ScopeName: "scope", ScopeVersion: "1.2.3", IngestedAt: 24, } if err := store.CommitBatch(context.Background(), BatchMetadata{ID: "complete-signals"}, nil, []Log{logRow}, []Metric{metricRow}); err != nil { t.Fatal(err) @@ -492,7 +492,7 @@ func completeTestSpan() Span { Namespace: "tenant", TraceID: "0123456789abcdef0123456789abcdef", SpanID: "0123456789abcdef", ParentSpanID: "fedcba9876543210", ServiceName: "checkout", Name: "POST /orders", Kind: "SERVER", StartUnixNanos: 10, EndUnixNanos: 20, DurationMS: 0.00001, StatusCode: "ERROR", StatusMsg: "declined", - ResourceJSON: `{"host":"one"}`, AttributesJSON: `{"http.request.method":"POST"}`, + Resource: map[string]any{"host": "one"}, Attributes: map[string]any{"http.request.method": "POST"}, EventsJSON: `[{"name":"exception"}]`, LinksJSON: `[{"trace_id":"linked"}]`, TraceState: "vendor=value", Flags: 1, ScopeName: "scope", ScopeVersion: "1.2.3", IngestedAt: 30, HTTPMethod: "POST", HTTPStatusCode: "500", HTTPRoute: "/orders", DBSystem: "postgresql", diff --git a/internal/telemetry/parquet_writer.go b/internal/telemetry/parquet_writer.go new file mode 100644 index 00000000..880e1b8c --- /dev/null +++ b/internal/telemetry/parquet_writer.go @@ -0,0 +1,334 @@ +package telemetry + +import ( + "fmt" + "reflect" + "strings" + + "github.com/parquet-go/parquet-go" + "github.com/parquet-go/parquet-go/variant" +) + +// writeTelemetryColumns streams variant events straight into shredded columns. +// The generic map encoder builds a second object tree for every row; keeping +// the canonical OTel maps as the event source bounds the ingest working set. +func writeTelemetryColumns[T any](writer *parquet.GenericWriter[T], rows []T) error { + type scalarColumn struct { + field, column int + kind reflect.Kind + values []parquet.Value + bytes []byte + } + type variantColumn struct { + field int + writer *parquet.VariantColumnWriter + } + typ := reflect.TypeFor[T]() + fields := make(map[string]int, typ.NumField()) + for i := 0; i < typ.NumField(); i++ { + fields[strings.Split(typ.Field(i).Tag.Get("parquet"), ",")[0]] = i + } + var scalars []scalarColumn + var variants []variantColumn + for column, path := range writer.Schema().Columns() { + if len(path) != 1 { + if path[0] != "attributes" && path[0] != "resource" { + return fmt.Errorf("unsupported nested Parquet column %q", path) + } + continue + } + field, ok := fields[path[0]] + if !ok { + return fmt.Errorf("parquet column %q has no row field", path[0]) + } + kind := typ.Field(field).Type.Kind() + switch kind { + case reflect.String, reflect.Int64, reflect.Uint64, reflect.Float64: + default: + return fmt.Errorf("unsupported scalar Parquet field %q", path[0]) + } + scalars = append(scalars, scalarColumn{field: field, column: column, kind: kind, values: make([]parquet.Value, 256)}) + } + for _, name := range []string{"attributes"} { + field, ok := fields[name] + if !ok { + continue + } + column, err := parquet.NewVariantColumnWriter(writer, name) + if err != nil { + return err + } + variants = append(variants, variantColumn{field: field, writer: column}) + } + resources, err := newResourceColumns(writer.Schema(), fields) + if err != nil { + return err + } + if resources != nil { + resources.stream, err = parquet.NewVariantColumnWriter(writer, "resource") + if err != nil { + return err + } + if err := selectSharedResources(resources, rows); err != nil { + return err + } + } + + columns := writer.ColumnWriters() + for start := 0; start < len(rows); { + end := min(start+256, len(rows), (start/parquetRowGroupRows+1)*parquetRowGroupRows) + // Dispatch once per column and chunk, rather than once per cell. Keep + // reflection at the schema boundary while the scalar encoding loops are + // homogeneous and reuse their byte/value buffers. + var reflected [256]reflect.Value + for i := start; i < end; i++ { + reflected[i-start] = reflect.ValueOf(&rows[i]).Elem() + } + for c := range scalars { + column := &scalars[c] + switch column.kind { + case reflect.String: + for i := start; i < end; i++ { + offset := len(column.bytes) + column.bytes = append(column.bytes, reflected[i-start].Field(column.field).String()...) + column.values[i-start] = parquet.ByteArrayValue(column.bytes[offset:]).Level(0, 0, column.column) + } + case reflect.Int64: + for i := start; i < end; i++ { + column.values[i-start] = parquet.Int64Value(reflected[i-start].Field(column.field).Int()).Level(0, 0, column.column) + } + case reflect.Uint64: + for i := start; i < end; i++ { + column.values[i-start] = parquet.Int64Value(int64(reflected[i-start].Field(column.field).Uint())).Level(0, 0, column.column) + } + case reflect.Float64: + for i := start; i < end; i++ { + column.values[i-start] = parquet.DoubleValue(reflected[i-start].Field(column.field).Float()).Level(0, 0, column.column) + } + } + } + for i := start; i < end; i++ { + row := reflected[i-start] + if resources != nil { + if err := resources.append(row.Field(resources.field).Interface(), columns); err != nil { + return err + } + } + for _, column := range variants { + value := row.Field(column.field).Interface() + if value == nil || (reflect.ValueOf(value).Kind() == reflect.Map && reflect.ValueOf(value).IsNil()) { + if err := column.writer.WriteNullRow(); err != nil { + return err + } + continue + } + if err := column.writer.BeginRow(); err != nil { + return err + } + if err := writeVariantValue(column.writer, value); err != nil { + return err + } + if err := column.writer.EndRow(); err != nil { + return err + } + } + } + for c := range scalars { + column := &scalars[c] + if _, err := columns[column.column].WriteRowValues(column.values[:end-start]); err != nil { + return err + } + clear(column.values[:end-start]) + column.bytes = column.bytes[:0] + } + if resources != nil { + if err := resources.flush(columns); err != nil { + return err + } + } + start = end + if start%parquetRowGroupRows == 0 { + if err := writer.Flush(); err != nil { + return err + } + } + } + return nil +} + +func writeVariantValue(writer variant.ValueBuilder, value any) error { + switch value := value.(type) { + case nil: + writer.Null() + case bool: + writer.Bool(value) + case int64: + writer.Int64(value) + case int: + writer.Int64(int64(value)) + case float64: + writer.Double(value) + case string: + writer.String(value) + case []byte: + writer.Binary(value) + case map[string]any: + writer.BeginObject() + for key, child := range value { + writer.Field(key) + if err := writeVariantValue(writer, child); err != nil { + return err + } + } + writer.EndObject() + case []any: + writer.BeginArray() + for _, child := range value { + if err := writeVariantValue(writer, child); err != nil { + return err + } + } + writer.EndArray() + default: + return fmt.Errorf("unsupported telemetry attribute type %T", value) + } + return writer.Err() +} + +// Resources are shared by all records in an OTLP resource block. Encode each +// canonical object once per file, then append its physical cells in chunks. +// Reflect values compare object identities and retain their Go objects. The +// cache owns cloned physical cells and is bounded to 64 canonical objects. +type resourceColumns struct { + field int + schema *parquet.Schema + columns []int + values [][]parquet.Value + cache map[reflect.Value]parquet.Row + shared map[reflect.Value]bool + stream *parquet.VariantColumnWriter + pending int +} +type resourceParquetRow struct { + Resource any `parquet:"resource,variant"` +} + +func newResourceColumns(schema *parquet.Schema, fields map[string]int) (*resourceColumns, error) { + field, ok := fields["resource"] + if !ok { + return nil, nil + } + var node parquet.Node + for _, f := range schema.Fields() { + if f.Name() == "resource" { + node = f + break + } + } + if node == nil { + return nil, fmt.Errorf("resource missing from physical schema") + } + r := &resourceColumns{field: field, schema: parquet.NewSchema("resource", parquet.Group{"resource": node}), cache: make(map[reflect.Value]parquet.Row)} + for _, path := range r.schema.Columns() { + column := -1 + for i, full := range schema.Columns() { + if reflect.DeepEqual(path, full) { + column = i + break + } + } + if column < 0 { + return nil, fmt.Errorf("resource column missing: %v", path) + } + r.columns = append(r.columns, column) + r.values = append(r.values, make([]parquet.Value, 0, 256)) + } + return r, nil +} +func resourceKey(value any) (reflect.Value, any, error) { + var key reflect.Value + if value != nil { + object, ok := value.(map[string]any) + if !ok { + return key, nil, fmt.Errorf("resource must be a canonical object, got %T", value) + } + if object != nil { + key = reflect.ValueOf(object) + } else { + value = nil + } + } + return key, value, nil +} +func selectSharedResources[T any](r *resourceColumns, rows []T) error { + candidates := map[reflect.Value]int{} + for i := range rows { + key, _, err := resourceKey(reflect.ValueOf(&rows[i]).Elem().Field(r.field).Interface()) + if err != nil { + return err + } + if count, ok := candidates[key]; ok { + candidates[key] = count + 1 + } else if len(candidates) < 64 { + candidates[key] = 1 + } + } + r.shared = map[reflect.Value]bool{} + for key, count := range candidates { + if count > 1 { + r.shared[key] = true + } + } + return nil +} +func (r *resourceColumns) append(value any, columns []*parquet.ColumnWriter) error { + key, value, err := resourceKey(value) + if err != nil { + return err + } + if !r.shared[key] { + // Preserve row order when an uncached resource follows buffered cells. + if err := r.flush(columns); err != nil { + return err + } + if value == nil { + return r.stream.WriteNullRow() + } + if err := r.stream.BeginRow(); err != nil { + return err + } + if err := writeVariantValue(r.stream, value); err != nil { + return err + } + return r.stream.EndRow() + } + encoded, ok := r.cache[key] + if !ok { + encoded = r.schema.Deconstruct(nil, resourceParquetRow{Resource: value}).Clone() + r.cache[key] = encoded + } + if len(encoded) != len(r.columns) { + return fmt.Errorf("resource physical row has %d cells, expected %d", len(encoded), len(r.columns)) + } + for _, value := range encoded { + column := value.Column() + r.values[column] = append(r.values[column], value.Level(value.RepetitionLevel(), value.DefinitionLevel(), r.columns[column])) + } + r.pending++ + return nil +} + +func (r *resourceColumns) flush(columns []*parquet.ColumnWriter) error { + if r.pending == 0 { + return nil + } + for i, values := range r.values { + if _, err := columns[r.columns[i]].WriteRowValues(values); err != nil { + return err + } + clear(values) + r.values[i] = values[:0] + } + r.pending = 0 + return nil +} diff --git a/internal/telemetry/rows.go b/internal/telemetry/rows.go index ff7ca301..17c7706c 100644 --- a/internal/telemetry/rows.go +++ b/internal/telemetry/rows.go @@ -15,8 +15,8 @@ type Span struct { DurationMS float64 StatusCode string StatusMsg string - ResourceJSON string - AttributesJSON string + Resource map[string]any + Attributes map[string]any EventsJSON string LinksJSON string TraceState string @@ -39,7 +39,7 @@ type Span struct { // IndexedSpan is the narrow projection needed by trace-detail queries. The // complete authoritative span remains in Parquet and is available through SQL; -// keeping this narrow projection small avoids decoding large JSON columns. +// keeping this narrow projection small avoids decoding large attribute columns. type IndexedSpan struct { Namespace string TraceID string @@ -66,8 +66,8 @@ type Log struct { TraceID string SpanID string Flags uint32 - ResourceJSON string - AttributesJSON string + Resource map[string]any + Attributes map[string]any ScopeName string ScopeVersion string IngestedAt int64 @@ -89,8 +89,8 @@ type Metric struct { HistCount int64 HistSum float64 ExemplarsJSON string - AttributesJSON string - ResourceJSON string + Attributes map[string]any + Resource map[string]any ScopeName string ScopeVersion string IngestedAt int64 diff --git a/internal/telemetry/store/admission_test.go b/internal/telemetry/store/admission_test.go index 3e9a1a93..9309423d 100644 --- a/internal/telemetry/store/admission_test.go +++ b/internal/telemetry/store/admission_test.go @@ -23,12 +23,12 @@ func TestSubmitRefusesWorkBeyondTheInFlightBudget(t *testing.T) { w := NewWriter(nil, 1000) w.inFlightBudget = 4096 - big := Batch{Spans: []telemetry.Span{{AttributesJSON: strings.Repeat("x", 8192)}}} + big := Batch{Spans: []telemetry.Span{{Attributes: map[string]any{"payload": strings.Repeat("x", 8192)}}}} if got := w.reserve(big); got != nil { t.Fatalf("a lone request must be admitted however large, got %v", got) } // Now over budget on a single oversized reservation. - small := Batch{Spans: []telemetry.Span{{AttributesJSON: strings.Repeat("x", 16)}}} + small := Batch{Spans: []telemetry.Span{{Attributes: map[string]any{"payload": strings.Repeat("x", 16)}}}} if err := w.reserve(small); !errors.Is(err, ErrIngestOverBudget) { t.Errorf("reserve while over budget = %v, want ErrIngestOverBudget", err) } @@ -48,7 +48,7 @@ func TestSubmitRefusesWorkBeyondTheInFlightBudget(t *testing.T) { func TestSubmitBudgetOfZeroAdmitsEverything(t *testing.T) { w := NewWriter(nil, 1000) w.inFlightBudget = 0 - huge := Batch{Spans: []telemetry.Span{{AttributesJSON: strings.Repeat("x", 1<<20)}}} + huge := Batch{Spans: []telemetry.Span{{Attributes: map[string]any{"payload": strings.Repeat("x", 1<<20)}}}} for range 64 { if err := w.reserve(huge); err != nil { t.Fatalf("unbounded budget refused a request: %v", err) @@ -62,7 +62,7 @@ func TestSubmitBudgetOfZeroAdmitsEverything(t *testing.T) { func TestSubmitOverBudgetIsReportedToTheCaller(t *testing.T) { w := NewWriter(nil, 1000) w.inFlightBudget = 1 - batch := Batch{Spans: []telemetry.Span{{AttributesJSON: strings.Repeat("x", 4096)}}} + batch := Batch{Spans: []telemetry.Span{{Attributes: map[string]any{"payload": strings.Repeat("x", 4096)}}}} if err := w.reserve(batch); err != nil { t.Fatalf("first reservation must be admitted: %v", err) } diff --git a/internal/telemetry/store/batch_bytes_test.go b/internal/telemetry/store/batch_bytes_test.go index 3cd437a3..087e0e7b 100644 --- a/internal/telemetry/store/batch_bytes_test.go +++ b/internal/telemetry/store/batch_bytes_test.go @@ -1,12 +1,69 @@ package store import ( + "fmt" + "maps" "strings" "testing" "github.com/labstack/fanout/internal/telemetry" ) +func TestBatchBytesChargesResourceIdentityOnceAcrossSignals(t *testing.T) { + resource := map[string]any{"service.name": "checkout", "nested": []any{true, int64(7)}} + batch := Batch{Spans: []telemetry.Span{{Resource: resource}, {Resource: resource}}, Logs: []telemetry.Log{{Resource: resource}}, Metrics: []telemetry.Metric{{Resource: resource}}} + if got, want := batchBytes(batch), telemetry.ValueBytes(resource)+4*telemetry.ValueBytes(map[string]any(nil)); got != want { + t.Fatalf("shared resource: got %d, want %d", got, want) + } + batch.Spans[1].Resource = maps.Clone(resource) + if got, want := batchBytes(batch), 2*telemetry.ValueBytes(resource)+4*telemetry.ValueBytes(map[string]any(nil)); got != want { + t.Fatalf("distinct equal resource maps: got %d, want %d", got, want) + } + batch.Spans[0].Attributes = map[string]any{"same": "value"} + batch.Spans[1].Attributes = maps.Clone(batch.Spans[0].Attributes) + if got, want := batchBytes(batch), 2*telemetry.ValueBytes(resource)+2*telemetry.ValueBytes(batch.Spans[0].Attributes)+2*telemetry.ValueBytes(map[string]any(nil)); got != want { + t.Fatalf("row-owned attributes: got %d, want %d", got, want) + } +} + +func TestRichSharedResourcesReachRowTargetAndUseActualAdmissionBytes(t *testing.T) { + newExport := func() Batch { + resource := make(map[string]any, 24) + for i := range 24 { + resource[fmt.Sprintf("kubernetes.resource.%02d", i)] = strings.Repeat("r", 32) + } + batch := Batch{Spans: make([]telemetry.Span, maxGroupBatchRows/2)} + for i := range batch.Spans { + attrs := make(map[string]any, 5) + for k := range 5 { + attrs[fmt.Sprintf("span.attribute.%d", k)] = strings.Repeat("a", 64) + } + batch.Spans[i] = telemetry.Span{Resource: resource, Attributes: attrs, Name: strings.Repeat("n", 128)} + } + return batch + } + first, second := newExport(), newExport() + if !groupBatchFits(batchBytes(first), second, 1) { + t.Fatal("24-key shared resources prematurely cut a 50k-row group") + } + w := NewWriter(nil, maxGroupBatchRows) + w.SetInFlightBudget(maxGroupBatchBytes) + for _, batch := range []Batch{first, second} { + if err := w.reserve(batch); err != nil { + t.Fatalf("actual retained exports fit the budget: %v", err) + } + } + if err := w.reserve(newExport()); err == nil { + t.Fatal("distinct requests must each charge their own resource and row payloads") + } + w.release(first) + w.release(second) + if got := w.inFlightBytes.Load(); got != 0 { + t.Fatalf("reservation leak: %d", got) + } + t.Logf("50k rows: %d charged bytes; full per-row resources would charge %d", batchBytes(first)+batchBytes(second), batchBytes(first)+batchBytes(second)+(maxGroupBatchRows-2)*telemetry.ValueBytes(first.Spans[0].Resource)) +} + // Rows are a poor proxy for what a batch costs. maxGroupBatchRows caps a group // at 50,000 rows, but a row is whatever the sender put in it: 50,000 bare log // lines and 50,000 spans carrying kilobytes of attributes each are the same @@ -16,7 +73,7 @@ func TestBatchBytesMeasuresThePayloadNotTheRowCount(t *testing.T) { thin := Batch{Spans: make([]telemetry.Span, 100)} fat := Batch{Spans: make([]telemetry.Span, 100)} for i := range fat.Spans { - fat.Spans[i].AttributesJSON = strings.Repeat("x", 4096) + fat.Spans[i].Attributes = map[string]any{"payload": strings.Repeat("x", 4096)} } if batchRows(thin) != batchRows(fat) { @@ -36,7 +93,7 @@ func TestBatchBytesMeasuresThePayloadNotTheRowCount(t *testing.T) { // and refusing it would drop data rather than batch it more carefully. func TestGroupBatchBytesAdmitsALoneOversizedRequest(t *testing.T) { huge := Batch{Spans: make([]telemetry.Span, 1)} - huge.Spans[0].AttributesJSON = strings.Repeat("x", maxGroupBatchBytes*2) + huge.Spans[0].Attributes = map[string]any{"payload": strings.Repeat("x", maxGroupBatchBytes*2)} if got := batchBytes(huge); got <= maxGroupBatchBytes { t.Fatalf("fixture is wrong: batchBytes = %d, want more than the %d ceiling", got, maxGroupBatchBytes) diff --git a/internal/telemetry/store/compaction.go b/internal/telemetry/store/compaction.go index a2d0153b..bc048e8a 100644 --- a/internal/telemetry/store/compaction.go +++ b/internal/telemetry/store/compaction.go @@ -124,6 +124,7 @@ type compactionKey struct { // namespace swap; storage owns native merges and crash-safe replacement state. type ParquetPublisher interface { PublishParquet(context.Context, func(context.Context) error) error + PublishParquetReplacement(context.Context, telemetry.BatchMetadata, []string, func(context.Context) error) error } // CompactParquet combines one same-day, same-generation group. The output is @@ -138,7 +139,7 @@ func (r *Repository) CompactParquet(ctx context.Context, publisher ParquetPublis if exists, err := pathExists(markerPath); err != nil { return 0, err } else if exists { - if err := r.recoverCompaction(ctx, publisher.PublishParquet); err != nil { + if err := r.recoverCompaction(ctx, publisher.PublishParquetReplacement); err != nil { return 0, fmt.Errorf("recover pending Parquet compaction: %w", err) } } @@ -241,7 +242,7 @@ func (r *Repository) CompactParquet(ctx context.Context, publisher ParquetPublis return 0, err } prepared = true - if err := r.completeCompaction(ctx, marker, publisher.PublishParquet); err != nil { + if err := r.completeCompaction(ctx, marker, publisher.PublishParquetReplacement); err != nil { return 0, err } if err := clearCompactionAttempt(r.root); err != nil { @@ -442,14 +443,14 @@ func (r *Repository) CompactParquetPass(ctx context.Context, publisher ParquetPu } } -type parquetPublishFunc func(context.Context, func(context.Context) error) error +type parquetPublishFunc func(context.Context, telemetry.BatchMetadata, []string, func(context.Context) error) error // RecoverParquet resolves a pending compaction marker before any cleanup, // retention, or new compaction can mutate its rollback set. func (r *Repository) RecoverParquet(ctx context.Context, publisher ParquetPublisher) error { r.compactionMu.Lock() defer r.compactionMu.Unlock() - return r.recoverCompaction(ctx, publisher.PublishParquet) + return r.recoverCompaction(ctx, publisher.PublishParquetReplacement) } func (r *Repository) recoverCompaction(ctx context.Context, publish parquetPublishFunc) error { @@ -477,7 +478,7 @@ func (r *Repository) recoverCompaction(ctx context.Context, publish parquetPubli } if !stageExists && !finalExists { if err := r.Parquet.RestoreRetiredInputs(marker.Inputs, marker.Output.ID, func(swap func(context.Context) error) error { - return publish(ctx, swap) + return publish(ctx, telemetry.BatchMetadata{}, nil, swap) }); err != nil { return fmt.Errorf("restore compaction %s inputs: %w", marker.Output.ID, err) } @@ -491,7 +492,7 @@ func (r *Repository) recoverCompaction(ctx context.Context, publish parquetPubli func (r *Repository) completeCompaction(ctx context.Context, marker compactionMarker, publish parquetPublishFunc) error { if err := r.Parquet.PublishReplacement(r.compactionStage(marker.Output.ID), marker.Output, marker.Inputs, func(swap func(context.Context) error) error { - return publish(ctx, swap) + return publish(ctx, marker.Output, marker.Inputs, swap) }); err != nil { return err } diff --git a/internal/telemetry/store/repair.go b/internal/telemetry/store/repair.go index 0ec6897a..5e6c4b8b 100644 --- a/internal/telemetry/store/repair.go +++ b/internal/telemetry/store/repair.go @@ -1,6 +1,7 @@ package store import ( + "context" "encoding/json" "errors" "fmt" @@ -27,13 +28,21 @@ func VerifyBatches(root string) ([]BatchIssue, error) { if err != nil { return nil, fmt.Errorf("read telemetry batches: %w", err) } + verifier, err := telemetry.NewBatchVerifier(context.Background(), batchesDir) + if err != nil { + return nil, err + } + defer verifier.Close() var issues []BatchIssue for _, entry := range entries { if !entry.IsDir() || entry.Name() == telemetry.SchemaBatch || !strings.HasSuffix(entry.Name(), telemetry.BatchSuffix) { continue } path := filepath.Join(batchesDir, entry.Name()) - if err := telemetry.ValidatePublishedBatch(path); err != nil { + if err := verifier.Validate(context.Background(), path); err != nil { + if !telemetry.IsBatchCorrupt(err) { + return issues, fmt.Errorf("verify batch %s: %w", entry.Name(), err) + } issues = append(issues, BatchIssue{ ID: strings.TrimSuffix(entry.Name(), telemetry.BatchSuffix), Path: path, Err: err, }) @@ -47,6 +56,10 @@ func VerifyBatches(root string) ([]BatchIssue, error) { // are refused. The returned directory remains beside the authoritative set so // an operator can recover it from a backup or rename it back after repair. func QuarantineBatch(root, id string) (string, error) { + return quarantineBatch(root, id, telemetry.ValidatePublishedBatch) +} + +func quarantineBatch(root, id string, validate func(string) error) (string, error) { if err := telemetry.ValidateBatchID(id); err != nil { return "", err } @@ -65,8 +78,10 @@ func QuarantineBatch(root, id string) (string, error) { if !info.IsDir() { return "", fmt.Errorf("telemetry batch %s is not a directory", id) } - if err := telemetry.ValidatePublishedBatch(source); err == nil { + if err := validate(source); err == nil { return "", fmt.Errorf("telemetry batch %s is valid; refusing to quarantine authoritative data", id) + } else if !telemetry.IsBatchCorrupt(err) { + return "", fmt.Errorf("cannot establish batch corruption; refusing quarantine: %w", err) } destination := filepath.Join(batchesDir, fmt.Sprintf("%s.quarantined-%d", id, time.Now().UTC().UnixNano())) if err := os.Rename(source, destination); err != nil { diff --git a/internal/telemetry/store/repair_test.go b/internal/telemetry/store/repair_test.go index 855f647f..9a0210fc 100644 --- a/internal/telemetry/store/repair_test.go +++ b/internal/telemetry/store/repair_test.go @@ -3,12 +3,15 @@ package store import ( "context" "encoding/json" + "errors" + "fmt" "os" "path/filepath" "strings" "testing" "github.com/labstack/fanout/internal/telemetry" + "github.com/parquet-go/parquet-go" ) func TestVerifyBatchesReportsOnlyUnreadableBatches(t *testing.T) { @@ -58,6 +61,13 @@ func TestQuarantineBatchRefusesValidData(t *testing.T) { } func TestQuarantineBatchSetsAsideUnreadableDataAndRestoresStartup(t *testing.T) { + for _, file := range []string{"trace.fidx", "metadata.json"} { + t.Run(file, func(t *testing.T) { testQuarantineRestoresStartup(t, file) }) + } +} + +func testQuarantineRestoresStartup(t *testing.T, file string) { + t.Helper() root := t.TempDir() repository, err := Open(root) if err != nil { @@ -73,7 +83,7 @@ func TestQuarantineBatchSetsAsideUnreadableDataAndRestoresStartup(t *testing.T) if err := repository.Close(); err != nil { t.Fatal(err) } - corruptBatchFile(t, root, "broken", "trace.fidx") + corruptBatchFile(t, root, "broken", file) destination, err := QuarantineBatch(root, "broken") if err != nil { @@ -99,6 +109,38 @@ func TestQuarantineBatchSetsAsideUnreadableDataAndRestoresStartup(t *testing.T) } } +func TestSchemaMismatchCannotAuthorizeQuarantine(t *testing.T) { + root := t.TempDir() + repository, err := Open(root) + if err != nil { + t.Fatal(err) + } + if err := repository.Commit(t.Context(), Batch{ID: "schema", Spans: []telemetry.Span{{TraceID: "trace", SpanID: "span"}}}); err != nil { + t.Fatal(err) + } + repository.Close() + path := filepath.Join(root, "parquet", "batches", "schema.batch", "spans.parquet") + if err := parquet.WriteFile(path, []struct { + TraceID string `parquet:"trace_id"` + }{{"trace"}}); err != nil { + t.Fatal(err) + } + before, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + if _, err := VerifyBatches(root); !errors.Is(err, telemetry.ErrUnsupportedBatchFormat) { + t.Fatalf("verify: %v", err) + } + if _, err := QuarantineBatch(root, "schema"); !errors.Is(err, telemetry.ErrUnsupportedBatchFormat) { + t.Fatalf("quarantine: %v", err) + } + after, err := os.ReadFile(path) + if err != nil || string(before) != string(after) { + t.Fatalf("unsupported data changed: %v", err) + } +} + func TestQuarantineBatchRefusesLiveCompactionMembers(t *testing.T) { root := t.TempDir() repository, err := Open(root) @@ -140,3 +182,23 @@ func corruptBatchFile(t *testing.T, root, id, name string) { t.Fatal(err) } } + +func TestQuarantineRefusesVerifierFailureAndUnsupportedFormat(t *testing.T) { + root := t.TempDir() + repository, err := Open(root) + if err != nil { + t.Fatal(err) + } + if err := repository.Commit(context.Background(), Batch{ID: "valid", Spans: []telemetry.Span{{TraceID: "trace", SpanID: "span"}}}); err != nil { + t.Fatal(err) + } + repository.Close() + for _, err := range []error{context.Canceled, fmt.Errorf("native engine exhausted memory"), telemetry.ErrUnsupportedBatchFormat} { + if _, got := quarantineBatch(root, "valid", func(string) error { return err }); got == nil { + t.Fatalf("quarantined after %v", err) + } + if _, err := os.Stat(filepath.Join(root, "parquet", "batches", "valid.batch")); err != nil { + t.Fatal(err) + } + } +} diff --git a/internal/telemetry/store/repository.go b/internal/telemetry/store/repository.go index c78c1410..1e32eb29 100644 --- a/internal/telemetry/store/repository.go +++ b/internal/telemetry/store/repository.go @@ -40,7 +40,9 @@ func Open(root string) (*Repository, error) { return nil, err } r := &Repository{root: root, Parquet: parquetStore} - if err := r.recoverCompaction(context.Background(), func(ctx context.Context, publish func(context.Context) error) error { return publish(ctx) }); err != nil { + if err := r.recoverCompaction(context.Background(), func(ctx context.Context, _ telemetry.BatchMetadata, _ []string, publish func(context.Context) error) error { + return publish(ctx) + }); err != nil { r.logUnresolvedCompaction(err) _ = r.Close() return nil, fmt.Errorf("recover Parquet compaction (unresolved marker at %s): %w", diff --git a/internal/telemetry/store/repository_test.go b/internal/telemetry/store/repository_test.go index e63dae70..4e9d09df 100644 --- a/internal/telemetry/store/repository_test.go +++ b/internal/telemetry/store/repository_test.go @@ -40,8 +40,6 @@ func (c *testParquetCompactor) PublishParquet(ctx context.Context, publish func( return nil } -func sqlQuote(value string) string { return "'" + strings.ReplaceAll(value, "'", "''") + "'" } - func testBatch() Batch { return Batch{ ID: "batch-test", @@ -615,8 +613,6 @@ func TestRepositoryRecoversInterruptedCompactionSwap(t *testing.T) { t.Fatal(err) } } - db := openTestDuckDB(t) - defer db.Close() output := telemetry.BatchMetadata{ ID: "compact-recovery", MinIngestedNanos: 100, MaxIngestedNanos: 300, Generation: 1, Spans: minCompactionInputs, Logs: minCompactionInputs, Metrics: minCompactionInputs, @@ -626,12 +622,11 @@ func TestRepositoryRecoversInterruptedCompactionSwap(t *testing.T) { t.Fatal(err) } for _, signal := range parquetSignals { - query := fmt.Sprintf("SELECT * FROM read_parquet(%s)", sqlQuote(repository.Parquet.Pattern(signal))) - if signal == "spans" { - query += " ORDER BY _trace_hash, start_unix_nano, span_id" + paths := make([]string, minCompactionInputs) + for i := range paths { + paths[i] = filepath.Join(repository.Parquet.BatchPath(fmt.Sprintf("recover-%d", i)), signal+".parquet") } - stmt := fmt.Sprintf("COPY (%s) TO %s (FORMAT PARQUET, COMPRESSION ZSTD)", query, sqlQuote(filepath.Join(stage, signal+".parquet"))) - if _, err := db.Exec(stmt); err != nil { + if err := repository.Parquet.MergeParquet(context.Background(), signal, paths, filepath.Join(stage, signal+".parquet")); err != nil { t.Fatal(err) } } @@ -905,3 +900,10 @@ func TestUnresolvedCompactionRunbookExists(t *testing.T) { } t.Fatalf("runbook anchor %q is not a section in %s; sections are %v", anchor, guide, headings) } + +func (f testParquetPublisherFunc) PublishParquetReplacement(ctx context.Context, _ telemetry.BatchMetadata, _ []string, publish func(context.Context) error) error { + return f.PublishParquet(ctx, publish) +} +func (c *testParquetCompactor) PublishParquetReplacement(ctx context.Context, _ telemetry.BatchMetadata, _ []string, publish func(context.Context) error) error { + return c.PublishParquet(ctx, publish) +} diff --git a/internal/telemetry/store/writer.go b/internal/telemetry/store/writer.go index f3da1c98..c1decb15 100644 --- a/internal/telemetry/store/writer.go +++ b/internal/telemetry/store/writer.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "log/slog" + "reflect" "runtime" "sync" "sync/atomic" @@ -12,12 +13,16 @@ import ( "github.com/google/uuid" "github.com/labstack/fanout/internal/metrics" + "github.com/labstack/fanout/internal/telemetry" ) const ( - commitQueueDepth = maxCommitWorkers - commitRetryLimit = 5 - groupAdmissionWindow = 20 * time.Millisecond + commitQueueDepth = maxCommitWorkers + commitRetryLimit = 5 + // Bound group admission independently of encode time. Ten milliseconds + // coalesces concurrent exports without imposing a 20ms floor on every + // durable acknowledgement when the row target is not reached. + groupAdmissionWindow = 10 * time.Millisecond maxAdmissionRequests = 512 maxGroupBatchRows = 50_000 maxCommitWorkers = 4 @@ -356,23 +361,35 @@ func (w *Writer) commitJob(ctx context.Context, job commitJob) error { // which is precisely the stream that gets the process killed. const maxGroupBatchBytes = 64 << 20 -// batchBytes approximates what a batch will cost to hold. It counts the JSON -// columns and the free-form strings, which carry effectively all of the -// variable size; the fixed-width fields are already bounded by the row count. +// batchBytes estimates retained variable-size payloads. A resource object is +// shared within an export, so charge each distinct map only once per request. +// Fixed-width fields and resource references are bounded by the row count. func batchBytes(batch Batch) int { total := 0 + resources := make(map[reflect.Value]struct{}) + resourceBytes := func(resource map[string]any) int { + if resource == nil { + return 0 + } + key := reflect.ValueOf(resource) + if _, seen := resources[key]; seen { + return 0 + } + resources[key] = struct{}{} + return telemetry.ValueBytes(resource) + } for i := range batch.Spans { span := &batch.Spans[i] - total += len(span.ResourceJSON) + len(span.AttributesJSON) + len(span.EventsJSON) + len(span.LinksJSON) + + total += resourceBytes(span.Resource) + telemetry.ValueBytes(span.Attributes) + len(span.EventsJSON) + len(span.LinksJSON) + len(span.Name) + len(span.StatusMsg) + len(span.TraceID) + len(span.SpanID) } for i := range batch.Logs { log := &batch.Logs[i] - total += len(log.ResourceJSON) + len(log.AttributesJSON) + len(log.Body) + len(log.BodyTemplate) + total += resourceBytes(log.Resource) + telemetry.ValueBytes(log.Attributes) + len(log.Body) + len(log.BodyTemplate) } for i := range batch.Metrics { metric := &batch.Metrics[i] - total += len(metric.ResourceJSON) + len(metric.AttributesJSON) + len(metric.ExemplarsJSON) + + total += resourceBytes(metric.Resource) + telemetry.ValueBytes(metric.Attributes) + len(metric.ExemplarsJSON) + len(metric.HistBoundsJSON) + len(metric.HistCountsJSON) + len(metric.Name) + len(metric.Description) } return total diff --git a/internal/telemetry/variant_test.go b/internal/telemetry/variant_test.go new file mode 100644 index 00000000..5e3c0c53 --- /dev/null +++ b/internal/telemetry/variant_test.go @@ -0,0 +1,167 @@ +package telemetry + +import ( + "context" + "errors" + "fmt" + "io" + "math" + "os" + "path/filepath" + "reflect" + "strings" + "testing" + + "github.com/parquet-go/parquet-go" +) + +func TestVariantRoundTripAcrossRowGroupsAndCompaction(t *testing.T) { + rows := make([]logParquetRow, parquetRowGroupRows+257) + for i := range rows { + // Churn past the bounded shared metadata dictionary, with conflicting + // types in shredded fields and row boundaries in the middle of a chunk. + key := fmt.Sprintf("key.%03d.%s", i%128, strings.Repeat("x", 40)) + var system any = "kafka" + if i%3 == 0 { + system = int64(i) + } + rows[i] = logParquetRow{LogTime: int64(i), Attributes: map[string]any{ + "messaging.system": system, key: int64(math.MaxInt64), "zero": int64(0), "false": false, + "null": nil, "bytes": []byte{0, 255}, "nested": []any{int64(i), map[string]any{"ok": true}}, + }, Resource: map[string]any{"service.name": "test", "service.namespace": int64(i), key: int64(math.MaxInt64), "bytes": []byte{0, 255}, "nested": []any{false, map[string]any{"zero": int64(0)}}, "null": nil}} + } + dir := t.TempDir() + first := filepath.Join(dir, "first.parquet") + if err := writeTypedParquet(first, rows, parquetPageSize); err != nil { + t.Fatal(err) + } + checkVariantRows(t, first, rows) + second := filepath.Join(dir, "second.parquet") + if err := writeTypedParquet(second, rows[:3], parquetPageSize); err != nil { + t.Fatal(err) + } + merged := filepath.Join(dir, "merged.parquet") + if err := mergeTypedParquet[logParquetRow](context.Background(), []string{first, second}, merged, false); err != nil { + t.Fatal(err) + } + checkVariantRows(t, merged, append(rows, rows[:3]...)) +} + +func TestSharedResourceCellsPreserveInterleavedRows(t *testing.T) { + shared := map[string]any{"service.name": "shared", "integer": int64(math.MaxInt64), "bytes": []byte{0, 255}, "nested": []any{false, map[string]any{"null": nil}}} + objects := make([]map[string]any, 80) + for i := range objects { + objects[i] = map[string]any{"service.name": fmt.Sprint(i), "integer": int64(i)} + } + rows := make([]logParquetRow, parquetRowGroupRows+257) + for i := range rows { + var resource any + switch i % 5 { + case 0: + resource = shared + case 1: + resource = map[string]any{"unique": int64(i), "bytes": []byte{byte(i)}} + case 2: + resource = objects[(i/5)%len(objects)] + case 3: + resource = nil + case 4: + resource = map[string]any(nil) + } + rows[i] = logParquetRow{LogTime: int64(i), Resource: resource} + } + path := filepath.Join(t.TempDir(), "interleaved.parquet") + if err := writeTypedParquet(path, rows, parquetPageSize); err != nil { + t.Fatal(err) + } + // Both forms of an absent canonical resource are SQL NULL, not VARIANT null. + for i := range rows { + if m, ok := rows[i].Resource.(map[string]any); ok && m == nil { + rows[i].Resource = nil + } + } + checkVariantRows(t, path, rows) +} + +func checkVariantRows(t *testing.T, path string, want []logParquetRow) { + t.Helper() + file, err := os.Open(path) + if err != nil { + t.Fatal(err) + } + defer file.Close() + reader := parquet.NewGenericReader[logParquetRow](file, telemetrySchema[logParquetRow]()) + defer reader.Close() + buffer := make([]logParquetRow, 256) + for offset := 0; offset < len(want); { + n, err := reader.Read(buffer[:min(len(buffer), len(want)-offset)]) + if err != nil && !errors.Is(err, io.EOF) { + t.Fatal(err) + } + if n == 0 { + t.Fatal("reader made no progress") + } + for i, got := range buffer[:n] { + if !reflect.DeepEqual(got, want[offset+i]) { + t.Fatalf("row %d changed: %#v", offset+i, got) + } + } + offset += n + } +} + +func TestUnsupportedFormatLeavesStoreUntouched(t *testing.T) { + for _, suffix := range []string{BatchSuffix, ".retired", ".retired-replacement"} { + t.Run(suffix, func(t *testing.T) { testUnsupportedFormatLeavesStoreUntouched(t, suffix) }) + } +} + +func testUnsupportedFormatLeavesStoreUntouched(t *testing.T, suffix string) { + t.Helper() + dir := t.TempDir() + store, err := OpenParquetStore(dir) + if err != nil { + t.Fatal(err) + } + if err := store.CommitBatch(context.Background(), BatchMetadata{ID: "old"}, []Span{{TraceID: "trace"}}, nil, nil); err != nil { + t.Fatal(err) + } + metadata := filepath.Join(store.BatchPath("old"), "metadata.json") + if err := os.WriteFile(metadata, []byte(`{"version":2,"id":"old","spans":1}`), 0644); err != nil { + t.Fatal(err) + } + if suffix != BatchSuffix { + if err := os.Rename(store.BatchPath("old"), filepath.Join(store.batchesDir, "old"+suffix)); err != nil { + t.Fatal(err) + } + } + sentinel := filepath.Join(store.stagingDir, "preserve") + if err := os.WriteFile(sentinel, []byte("unpublished bytes"), 0644); err != nil { + t.Fatal(err) + } + before := map[string][]byte{} + if err := filepath.WalkDir(dir, func(path string, entry os.DirEntry, err error) error { + if err != nil { + return err + } + if !entry.IsDir() { + data, err := os.ReadFile(path) + if err != nil { + return err + } + before[path] = data + } + return nil + }); err != nil { + t.Fatal(err) + } + if _, err := OpenParquetStore(dir); err == nil { + t.Fatal("opened obsolete format") + } + for path, want := range before { + got, err := os.ReadFile(path) + if err != nil || !reflect.DeepEqual(got, want) { + t.Fatalf("startup changed %s: %v", path, err) + } + } +} diff --git a/internal/telemetry/verify.go b/internal/telemetry/verify.go new file mode 100644 index 00000000..5f271c6e --- /dev/null +++ b/internal/telemetry/verify.go @@ -0,0 +1,168 @@ +package telemetry + +import ( + "context" + "database/sql" + "errors" + "fmt" + "os" + "path/filepath" + "strings" + + driver "github.com/duckdb/duckdb-go/v2" + engine "github.com/labstack/fanout/internal/duckdb" +) + +var ErrUnsupportedBatchFormat = errors.New("unsupported telemetry batch format") + +// CorruptBatchError denotes evidence of malformed authoritative data. A failed +// verifier (permissions, engine limits or cancellation) is not such evidence. +type CorruptBatchError struct{ Err error } + +func (e *CorruptBatchError) Error() string { return e.Err.Error() } +func (e *CorruptBatchError) Unwrap() error { return e.Err } +func IsBatchCorrupt(err error) bool { var e *CorruptBatchError; return errors.As(err, &e) } + +func batchDataError(err error) error { + if err == nil || errors.Is(err, ErrUnsupportedBatchFormat) { + return err + } + var pathErr *os.PathError + if errors.As(err, &pathErr) && !errors.Is(err, os.ErrNotExist) { + return err + } + return &CorruptBatchError{err} +} + +// BatchVerifier reuses one bounded native engine for an offline batch walk. +// It creates no catalog, spill files, or downloaded extensions. +type BatchVerifier struct{ db *sql.DB } + +func NewBatchVerifier(ctx context.Context, directory string) (*BatchVerifier, error) { + db, err := sql.Open("duckdb", "?threads=2&memory_limit=256MB") + if err != nil { + return nil, err + } + db.SetMaxOpenConns(1) + for _, statement := range []string{"SET TimeZone='UTC'", "SET temp_directory=''"} { + if _, err = db.ExecContext(ctx, statement); err != nil { + break + } + } + if err == nil { + err = engine.ConfigurePolicy(ctx, db, directory) + } + if err != nil { + _ = db.Close() + return nil, fmt.Errorf("initialize batch verifier: %w", err) + } + return &BatchVerifier{db: db}, nil +} +func (v *BatchVerifier) Close() error { return v.db.Close() } + +// ValidatePublishedBatch deeply decodes a single batch and checks its schema, +// row counts, complete trace ordering and exact trace-index ranges. +func ValidatePublishedBatch(dir string) (err error) { + v, err := NewBatchVerifier(context.Background(), dir) + if err != nil { + return err + } + defer func() { err = errors.Join(err, v.Close()) }() + return v.Validate(context.Background(), dir) +} + +func (v *BatchVerifier) Validate(ctx context.Context, dir string) error { + if err := ctx.Err(); err != nil { + return err + } + batch, err := loadRegisteredBatch(dir) + if err != nil { + return batchDataError(err) + } + signals := []struct { + name string + count int + }{ + {"spans", batch.metadata.Spans}, + {"logs", batch.metadata.Logs}, + {"metrics", batch.metadata.Metrics}, + } + for _, signal := range signals { + if signal.count == 0 { + continue + } + path := filepath.Join(dir, signal.name+".parquet") + if err := v.decode(ctx, path, signal.count); err != nil { + return fmt.Errorf("verify %s Parquet: %w", signal.name, err) + } + } + if batch.metadata.Spans > 0 { + if err := verifySpanParquet(filepath.Join(dir, "spans.parquet"), batch.metadata.Spans, batch.traces); err != nil { + return batchDataError(err) + } + } + return nil +} + +func (v *BatchVerifier) decode(ctx context.Context, path string, expected int) error { + // COUNT alone can use footer metadata. Hash every column to force vector + // decoding of all pages, including shredded and residual VARIANT values. + // The XOR is discarded: this is readability validation, not a checksum. + query := "SELECT COUNT(*), bit_xor(hash(COLUMNS(*))) FROM read_parquet('" + strings.ReplaceAll(filepath.ToSlash(path), "'", "''") + "', hive_partitioning=false)" + rows, err := v.db.QueryContext(ctx, query) + if err != nil { + return nativeVerificationError(err) + } + defer rows.Close() + columns, err := rows.Columns() + if err != nil { + return err + } + values := make([]any, len(columns)) + dest := make([]any, len(columns)) + var count int64 + dest[0] = &count + for i := 1; i < len(dest); i++ { + dest[i] = &values[i] + } + if !rows.Next() { + if err := rows.Err(); err != nil { + return nativeVerificationError(err) + } + return errors.New("batch verifier returned no row") + } + if err := rows.Scan(dest...); err != nil { + return nativeVerificationError(err) + } + if rows.Next() { + return errors.New("batch verifier returned multiple rows") + } + if err := rows.Err(); err != nil { + return nativeVerificationError(err) + } + if count != int64(expected) { + return batchDataError(fmt.Errorf("decoded %d rows; metadata declares %d", count, expected)) + } + return nil +} + +func nativeVerificationError(err error) error { + var e *driver.Error + if errors.As(err, &e) { + if e.Type == driver.ErrorTypeInvalid && strings.Contains(e.Error(), "TProtocolException:") { + return &CorruptBatchError{err} + } + switch e.Type { + case driver.ErrorTypeInvalidInput, driver.ErrorTypeConversion, driver.ErrorTypeSerialization, driver.ErrorTypeOutOfRange: + return &CorruptBatchError{err} + } + } + return err +} + +type verificationSpanRow struct { + TraceHash uint64 `parquet:"_trace_hash"` + TraceID string `parquet:"trace_id"` + StartUnixNano int64 `parquet:"start_unix_nano"` + SpanID string `parquet:"span_id"` +} diff --git a/internal/telemetry/verify_test.go b/internal/telemetry/verify_test.go new file mode 100644 index 00000000..89a187d8 --- /dev/null +++ b/internal/telemetry/verify_test.go @@ -0,0 +1,196 @@ +package telemetry + +import ( + "context" + "errors" + "io" + "os" + "path/filepath" + "strings" + "testing" + + driver "github.com/duckdb/duckdb-go/v2" + "github.com/parquet-go/parquet-go" +) + +func verificationFixture(t *testing.T) (string, []spanParquetRow) { + t.Helper() + store, err := OpenParquetStore(t.TempDir()) + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { _ = store.Close() }) + spans := []Span{ + {TraceID: "trace", SpanID: "a", StartUnixNanos: 10, Resource: map[string]any{"service.name": "api", "extra": []any{int64(1), true}}, Attributes: map[string]any{"messaging.system": "kafka", "other": []byte{0, 255}}}, + {TraceID: "trace", SpanID: "b", StartUnixNanos: 20}, + {TraceID: "trace", SpanID: "c", StartUnixNanos: 30}, + {TraceID: "trace", SpanID: "d", StartUnixNanos: 40, Attributes: map[string]any{"other": []byte{0, 255}}, Resource: map[string]any{"service.name": "last", "extra": []any{int64(2), false}}}, + } + if err := store.CommitBatch(context.Background(), BatchMetadata{ID: "verify"}, spans, nil, nil); err != nil { + t.Fatal(err) + } + dir := store.BatchPath("verify") + f, err := os.Open(filepath.Join(dir, "spans.parquet")) + if err != nil { + t.Fatal(err) + } + r := parquet.NewGenericReader[spanParquetRow](f, telemetrySchema[spanParquetRow]()) + rows := make([]spanParquetRow, len(spans)) + if n, err := r.Read(rows); n != len(rows) || (err != nil && !errors.Is(err, io.EOF)) { + t.Fatal(err) + } + r.Close() + f.Close() + // Multiple tiny row groups make a late-page failure observable cheaply. + path := filepath.Join(dir, "spans.parquet") + if err := os.Remove(path); err != nil { + t.Fatal(err) + } + f, err = os.Create(path) + if err != nil { + t.Fatal(err) + } + writer := parquet.NewGenericWriter[spanParquetRow](f, parquetWriterOptions(1024, telemetrySchema[spanParquetRow]())...) + for i := 0; i < len(rows); i += 2 { + if err := writeTelemetryColumns(writer, rows[i:i+2]); err != nil { + t.Fatal(err) + } + if err := writer.Flush(); err != nil { + t.Fatal(err) + } + } + if err := writer.Close(); err != nil { + t.Fatal(err) + } + if err := f.Close(); err != nil { + t.Fatal(err) + } + if err := ValidatePublishedBatch(dir); err != nil { + t.Fatal(err) + } + if err := ValidatePublishedBatch(dir); err != nil { + t.Fatal(err) + } + return dir, rows +} + +func TestNativeVerifierDecodesEveryVariantColumnAndRowGroup(t *testing.T) { + for _, column := range []string{"resource.metadata", "resource.value", "resource.typed_value.service.name.typed_value", "attributes.value"} { + t.Run(column, func(t *testing.T) { + dir, _ := verificationFixture(t) + path := filepath.Join(dir, "spans.parquet") + f, err := os.OpenFile(path, os.O_RDWR, 0) + if err != nil { + t.Fatal(err) + } + defer f.Close() + info, _ := f.Stat() + data, err := parquet.OpenFile(f, info.Size()) + if err != nil { + t.Fatal(err) + } + var offset int64 + if len(data.Metadata().RowGroups) != 2 { + t.Fatalf("row groups = %d", len(data.Metadata().RowGroups)) + } + for _, c := range data.Metadata().RowGroups[1].Columns { + if strings.Join(c.MetaData.PathInSchema, ".") == column { + offset = c.MetaData.DataPageOffset + break + } + } + if offset == 0 { + t.Fatalf("missing column %s: %#v", column, data.Schema().Columns()) + } + // Destroy a late page header; the footer, index and unrelated columns + // remain readable. A count-only scan would incorrectly pass this file. + if _, err := f.WriteAt(make([]byte, 16), offset); err != nil { + t.Fatal(err) + } + if err := ValidatePublishedBatch(dir); !IsBatchCorrupt(err) { + t.Fatalf("late %s page error = %v", column, err) + } + }) + } +} + +func TestNativeVerifierRejectsWrongSchemaAndTraceOrdering(t *testing.T) { + for _, kind := range []string{"schema", "time_order", "id_order", "row_count"} { + t.Run(kind, func(t *testing.T) { + dir, rows := verificationFixture(t) + path := filepath.Join(dir, "spans.parquet") + switch kind { + case "schema": + if err := parquet.WriteFile(path, []struct { + TraceID string `parquet:"trace_id"` + }{{"trace"}, {"trace"}, {"trace"}, {"trace"}}); err != nil { + t.Fatal(err) + } + case "time_order": + rows[2].StartUnixNano = 5 + case "id_order": + rows[1].StartUnixNano = rows[0].StartUnixNano + rows[1].SpanID = "0" + case "row_count": + rows = rows[:3] + } + if kind != "schema" { + if err := os.Remove(path); err != nil { + t.Fatal(err) + } + if err := writeTypedParquet(path, rows, 1024); err != nil { + t.Fatal(err) + } + } + err := ValidatePublishedBatch(dir) + if kind == "schema" { + if !errors.Is(err, ErrUnsupportedBatchFormat) || IsBatchCorrupt(err) { + t.Fatalf("unsupported schema classified as corruption: %v", err) + } + } else if !IsBatchCorrupt(err) { + t.Fatalf("%s error = %v", kind, err) + } + }) + } +} + +func TestVerifierResourceFailuresAreNotCorruption(t *testing.T) { + dir, _ := verificationFixture(t) + v, err := NewBatchVerifier(context.Background(), dir) + if err != nil { + t.Fatal(err) + } + defer v.Close() + var zone, temp string + if err := v.db.QueryRow("SELECT current_setting('TimeZone'), current_setting('temp_directory')").Scan(&zone, &temp); err != nil || zone != "UTC" || temp != "" { + t.Fatalf("verifier settings timezone=%q spill=%q error=%v", zone, temp, err) + } + ctx, cancel := context.WithCancel(context.Background()) + cancel() + if err := v.Validate(ctx, dir); !errors.Is(err, context.Canceled) || IsBatchCorrupt(err) { + t.Fatalf("cancellation = %v", err) + } + if _, err := v.db.Exec("SET memory_limit='1KB'"); err != nil { + t.Fatal(err) + } + if err := v.Validate(context.Background(), dir); err == nil || IsBatchCorrupt(err) { + t.Fatalf("resource failure = %v", err) + } + for _, kind := range []driver.ErrorType{driver.ErrorTypeOutOfMemory, driver.ErrorTypeInterrupt, driver.ErrorTypePermission, driver.ErrorTypeSettings, driver.ErrorTypeInternal, driver.ErrorTypeIO} { + if IsBatchCorrupt(nativeVerificationError(&driver.Error{Type: kind})) { + t.Fatalf("operational error %v classified as corruption", kind) + } + } +} + +func TestNativeVerifierRejectsUnexpectedZeroCountSignal(t *testing.T) { + dir, _ := verificationFixture(t) + if err := parquet.WriteFile(filepath.Join(dir, "logs.parquet"), []struct { + Body string `parquet:"body"` + }{{"unaccounted"}}); err != nil { + t.Fatal(err) + } + if err := ValidatePublishedBatch(dir); !IsBatchCorrupt(err) || !strings.Contains(err.Error(), "metadata declares zero") { + t.Fatalf("zero-count file = %v", err) + } +} diff --git a/internal/ui/dist/assets/Tooltip-BJiO7C_G.js b/internal/ui/dist/assets/Tooltip-DTTsbr27.js similarity index 85% rename from internal/ui/dist/assets/Tooltip-BJiO7C_G.js rename to internal/ui/dist/assets/Tooltip-DTTsbr27.js index a0564b9a..f9840f10 100644 --- a/internal/ui/dist/assets/Tooltip-BJiO7C_G.js +++ b/internal/ui/dist/assets/Tooltip-DTTsbr27.js @@ -1 +1 @@ -import{$ as e,C as t,K as n,N as r,Q as i,St as a,X as o,Y as s,at as c,dt as l,et as u,gt as d,ht as f,j as p,k as m,mt as h,nt as g,v as _,x as v,z as y}from"./brand-MzZ03bSa.js";var b=a(f(),1),x=h(),S=a(d(),1);function C(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==S.Fragment}function w(e){let t=(0,S.createContext)(null);return[t,()=>{let n=(0,S.use)(t);if(n===null)throw Error(e);return n}]}var T={app:100,modal:200,popover:300,overlay:400,max:9999};function E(e){return T[e]}function D(e){let t=(0,S.useRef)(e);return(0,S.useEffect)(()=>{t.current=e}),(0,S.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function O(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=D(e),s=(0,S.useRef)(0),c=(0,S.useRef)(0),l=(0,S.useRef)(null),u=(0,S.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(s.current!==0){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,S.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}function k(e){return e?.props?.ref}function A(e){let t=S.Children.toArray(e);return t.length!==1||!C(t[0])?null:t[0]}function j(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...j(n,t)}),{}):typeof e==`function`?e(t):e??{}}var M=(0,S.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function N(){return(0,S.use)(M)}var[P,F]=w(`ScrollArea.Root component was not found in tree`);function I(e,t){let n=(0,S.useEffectEvent)(t);g(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function ee(e){let{style:t,...n}=e,r=F(),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),c=!!(i&&o);return I(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),I(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,x.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function te(e){let t=F(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,x.jsx)(ee,{...e}):null}var ne={scrollHideDelay:1e3,type:`hover`};function re(t){let{type:n,scrollHideDelay:r,scrollbars:i,getStyles:a,ref:o,...s}=p(`ScrollAreaRoot`,ne,t),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,m]=(0,S.useState)(null),[h,g]=(0,S.useState)(null),[_,y]=(0,S.useState)(null),[b,C]=(0,S.useState)(0),[w,T]=(0,S.useState)(0),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(!1),A=e(o,l);return(0,x.jsx)(P,{value:{type:n,scrollHideDelay:r,scrollArea:c,viewport:u,onViewportChange:d,content:f,onContentChange:m,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:E,onScrollbarXEnabledChange:D,scrollbarY:_,onScrollbarYChange:y,scrollbarYEnabled:O,onScrollbarYEnabledChange:k,onCornerWidthChange:C,onCornerHeightChange:T,getStyles:a},children:(0,x.jsx)(v,{...s,ref:A,__vars:{"--sa-corner-width":i===`xy`?`${b}px`:`0px`,"--sa-corner-height":i===`xy`?`${w}px`:`0px`}})})}re.displayName=`@mantine/core/ScrollAreaRoot`;function ie(e,t){let n=e/t;return Number.isNaN(n)?0:n}function ae(e){let t=ie(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function oe(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function L(e,[t,n]){return Math.min(n,Math.max(t,e))}function se(e,t,n=`ltr`){let r=ae(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=L(e,n===`ltr`?[0,o]:[o*-1,0]);return oe([0,o],[0,s])(c)}function ce(e,t,n,r=`ltr`){let i=ae(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return oe([c,l],d)(e)}function le(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[de,fe]=w(`ScrollAreaScrollbar was not found in tree`);function pe(t){let{sizes:n,hasThumb:r,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:s,onDragScroll:c,onWheelScroll:l,onResize:u,ref:d,...f}=t,p=F(),[m,h]=(0,S.useState)(null),g=e(d,h),_=(0,S.useRef)(null),v=(0,S.useRef)(``),{viewport:y}=p,b=n.content-n.viewport,C=(0,S.useEffectEvent)(l),w=D(s),T=O(u,10),E=e=>{if(_.current){let t=e.clientX-_.current.left,n=e.clientY-_.current.top;c({x:t,y:n})}};return(0,S.useEffect)(()=>{let e=e=>{let t=e.target;m?.contains(t)&&C(e,b)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,m,b]),(0,S.useEffect)(w,[n,w]),I(m,T),I(p.content,T),(0,x.jsx)(de,{value:{scrollbar:m,hasThumb:r,onThumbChange:D(i),onThumbPointerUp:D(a),onThumbPositionChange:w,onThumbPointerDown:D(o)},children:(0,x.jsx)(`div`,{...f,ref:g,"data-mantine-scrollbar":!0,style:{position:`absolute`,...f.style},onPointerDown:R(t.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,E(e))}),onPointerMove:R(t.onPointerMove,E),onPointerUp:R(t.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=v.current,_.current=null}})})}var me=t=>{let{sizes:n,onSizesChange:r,style:i,ref:a,...o}=t,s=F(),[c,l]=(0,S.useState)(),u=(0,S.useRef)(null),d=e(a,u,s.onScrollbarXChange);return(0,S.useEffect)(()=>{u.current&&l(getComputedStyle(u.current))},[u]),(0,x.jsx)(pe,{"data-orientation":`horizontal`,...o,ref:d,sizes:n,style:{...i,"--sa-thumb-width":`${ae(n)}px`},onThumbPointerDown:e=>t.onThumbPointerDown(e.x),onDragScroll:e=>t.onDragScroll(e.x),onWheelScroll:(e,n)=>{if(s.viewport){let r=s.viewport.scrollLeft+e.deltaX;t.onWheelScroll(r),le(r,n)&&e.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:ue(c.paddingLeft),paddingEnd:ue(c.paddingRight)}})}})};me.displayName=`@mantine/core/ScrollAreaScrollbarX`;function he(t){let{sizes:n,onSizesChange:r,style:i,ref:a,...o}=t,s=F(),[c,l]=(0,S.useState)(),u=(0,S.useRef)(null),d=e(a,u,s.onScrollbarYChange);return(0,S.useEffect)(()=>{u.current&&l(window.getComputedStyle(u.current))},[]),(0,x.jsx)(pe,{...o,"data-orientation":`vertical`,ref:d,sizes:n,style:{"--sa-thumb-height":`${ae(n)}px`,...i},onThumbPointerDown:e=>t.onThumbPointerDown(e.y),onDragScroll:e=>t.onDragScroll(e.y),onWheelScroll:(e,n)=>{if(s.viewport){let r=s.viewport.scrollTop+e.deltaY;t.onWheelScroll(r),le(r,n)&&e.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:ue(c.paddingTop),paddingEnd:ue(c.paddingBottom)}})}})}he.displayName=`@mantine/core/ScrollAreaScrollbarY`;function z(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=N(),i=F(),a=(0,S.useRef)(null),o=(0,S.useRef)(0),[s,c]=(0,S.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=ie(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>ce(e,o.current,s,t);return t===`horizontal`?(0,x.jsx)(me,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=se(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,x.jsx)(he,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=se(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}z.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function ge(e){let t=F(),{forceMount:n,...r}=e,[i,a]=(0,S.useState)(!1),o=e.orientation===`horizontal`,s=O(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,x.jsx)(ge,{"data-state":i?`visible`:`hidden`,...n}):null}_e.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function ve(e){let{forceMount:t,...n}=e,r=F(),i=e.orientation===`horizontal`,[a,o]=(0,S.useState)(`hidden`),s=O(()=>o(`idle`),100);return(0,S.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,S.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,x.jsx)(z,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:R(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:R(e.onPointerLeave,()=>o(`idle`))}):null}function ye(e){let{forceMount:t,...n}=e,r=F(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,S.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,x.jsx)(_e,{...n,forceMount:t}):r.type===`scroll`?(0,x.jsx)(ve,{...n,forceMount:t}):r.type===`auto`?(0,x.jsx)(ge,{...n,forceMount:t}):r.type===`always`?(0,x.jsx)(z,{...n}):null}ye.displayName=`@mantine/core/ScrollAreaScrollbar`;function B(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function be(t){let{style:n,ref:r,...i}=t,a=F(),o=fe(),{onThumbPositionChange:s}=o,c=e(r,o.onThumbChange),l=(0,S.useRef)(void 0),u=O(()=>{l.current&&=(l.current(),void 0)},100);return(0,S.useEffect)(()=>{let{viewport:e}=a;if(e){let t=()=>{if(u(),!l.current){let t=B(e,s);l.current=t,s()}};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,x.jsx)(`div`,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...n},onPointerDownCapture:R(t.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:R(t.onPointerUp,o.onThumbPointerUp)})}be.displayName=`@mantine/core/ScrollAreaThumb`;function xe(e){let{forceMount:t,...n}=e,r=fe();return t||r.hasThumb?(0,x.jsx)(be,{...n}):null}xe.displayName=`@mantine/core/ScrollAreaThumb`;function Se({children:t,style:n,ref:r,onWheel:i,...a}){let o=F(),s=e(r,o.onViewportChange),c=e=>{if(i?.(e),o.scrollbarXEnabled&&o.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:a}=o.viewport,s=t<1,c=t>=n-r-1;i>a&&(s||c)&&e.stopPropagation()}};return(0,x.jsx)(v,{...a,ref:s,onWheel:c,"data-scrollarea-viewport":!0,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...n},children:(0,x.jsx)(`div`,{...o.getStyles(`content`),ref:o.onContentChange,children:t})})}Se.displayName=`@mantine/core/ScrollAreaViewport`;var Ce={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function we(){return typeof window<`u`}function Te(e){return Ee(e)?(e.nodeName||``).toLowerCase():`#document`}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function H(e){return((Ee(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ee(e){return we()?e instanceof Node||e instanceof V(e).Node:!1}function U(e){return we()?e instanceof Element||e instanceof V(e).Element:!1}function W(e){return we()?e instanceof HTMLElement||e instanceof V(e).HTMLElement:!1}function De(e){return!we()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}function Oe(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ke(e){return/^(table|td|th)$/.test(Te(e))}function Ae(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var je=/transform|translate|scale|rotate|perspective|filter/,Me=/paint|layout|strict|content/,Ne=e=>!!e&&e!==`none`,Pe;function Fe(e){let t=U(e)?G(e):e;return Ne(t.transform)||Ne(t.translate)||Ne(t.scale)||Ne(t.rotate)||Ne(t.perspective)||!Le()&&(Ne(t.backdropFilter)||Ne(t.filter))||je.test(t.willChange||``)||Me.test(t.contain||``)}function Ie(e){let t=Be(e);for(;W(t)&&!Re(t);){if(Fe(t))return t;if(Ae(t))return null;t=Be(t)}return null}function Le(){return Pe??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Pe}function Re(e){return/^(html|body|#document)$/.test(Te(e))}function G(e){return V(e).getComputedStyle(e)}function ze(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Be(e){if(Te(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||De(e)&&e.host||H(e);return De(t)?t.host:t}function Ve(e){let t=Be(e);return Re(t)?(e.ownerDocument||e).body:W(t)&&Oe(t)?t:Ve(t)}function He(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ve(e),i=r===e.ownerDocument?.body,a=V(r);if(i){let e=Ue(a);return t.concat(a,a.visualViewport||[],Oe(r)?r:[],e&&n?He(e):[])}return t.concat(r,He(r,[],n))}function Ue(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var We=[`top`,`right`,`bottom`,`left`],K=Math.min,q=Math.max,Ge=Math.round,Ke=Math.floor,qe=e=>({x:e,y:e}),Je={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ye(e,t,n){return q(e,K(t,n))}function J(e,t){return typeof e==`function`?e(t):e}function Y(e){return e.split(`-`)[0]}function Xe(e){return e.split(`-`)[1]}function Ze(e){return e===`x`?`y`:`x`}function Qe(e){return e===`y`?`height`:`width`}function X(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $e(e){return Ze(X(e))}function et(e,t,n){n===void 0&&(n=!1);let r=Xe(e),i=$e(e),a=Qe(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=lt(o)),[o,lt(o)]}function tt(e){let t=lt(e);return[nt(e),t,nt(t)]}function nt(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var rt=[`left`,`right`],it=[`right`,`left`],at=[`top`,`bottom`],ot=[`bottom`,`top`];function st(e,t,n){switch(e){case`top`:case`bottom`:return n?t?it:rt:t?rt:it;case`left`:case`right`:return t?at:ot;default:return[]}}function ct(e,t,n,r){let i=Xe(e),a=st(Y(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(nt)))),a}function lt(e){let t=Y(e);return Je[t]+e.slice(t.length)}function ut(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function dt(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ut(e)}function ft(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function pt(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function mt(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function ht(){return/apple/i.test(navigator.vendor)}function gt(){return pt().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function _t(){return mt().includes(`jsdom/`)}var vt=`data-floating-ui-focusable`,yt=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function bt(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function xt(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&De(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function St(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ct(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function wt(e){return e.matches(`html,body`)}function Tt(e){return e?.ownerDocument||document}function Et(e){return W(e)&&e.matches(yt)}function Dt(e){if(!e||_t())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ot(e){return e?e.hasAttribute(vt)?e:e.querySelector(`[`+vt+`]`)||e:null}function kt(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...kt(e,t.id,n)])}function At(e){return`nativeEvent`in e}function jt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var Z=typeof document<`u`?S.useLayoutEffect:function(){},Mt={...S};function Nt(e){let t=S.useRef(e);return Z(()=>{t.current=e}),t}var Pt=Mt.useInsertionEffect||(e=>e());function Q(e){let t=S.useRef(()=>{});return Pt(()=>{t.current=e}),S.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Ft(e,t,n){let{reference:r,floating:i}=e,a=X(t),o=$e(t),s=Qe(o),c=Y(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Xe(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function It(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=J(t,e),p=dt(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ft(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ft(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Lt=50,Rt=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:It},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ft(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=J(e,t)||{};if(l==null)return{};let d=dt(u),f={x:n,y:r},p=$e(i),m=Qe(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=K(d[_],T),D=K(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Ye(E,k,O),j=!c.arrow&&Xe(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===X(t)||T.every(e=>X(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=X(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Vt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ht(e){return We.some(t=>e[t]>=0)}var Ut=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=J(e,t);switch(i){case`referenceHidden`:{let e=Vt(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ht(e)}}}case`escaped`:{let e=Vt(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ht(e)}}}default:return{}}}}};function Wt(e){let t=K(...e.map(e=>e.left)),n=K(...e.map(e=>e.top)),r=q(...e.map(e=>e.right)),i=q(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function Gt(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>ft(Wt(e)))}var Kt=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=J(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=Gt(u),f=ft(Wt(u)),p=dt(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&ce.top-p.top&&l=2){if(X(n)===`y`){let e=d[0],t=d[d.length-1],r=Y(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return ft({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=Y(n)===`left`,t=q(...d.map(e=>e.right)),r=K(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return ft({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},qt=new Set([`left`,`top`]);async function Jt(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Y(n),s=Xe(n),c=X(n)===`y`,l=qt.has(o)?-1:1,u=a&&c?-1:1,d=J(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Yt=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Jt(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Xt=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=J(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=X(i),p=Ze(f),m=u[p],h=u[f],g=(e,t)=>Ye(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Zt=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=J(e,t),u={x:n,y:r},d=X(i),f=Ze(d),p=u[f],m=u[d],h=J(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=qt.has(Y(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},Qt=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=J(e,t),c=await i.detectOverflow(t,s),l=Y(n),u=Xe(n),d=X(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=K(p-c[m],g),y=K(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*q(c.left,c.right):S=p-2*q(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function $t(e){let t=G(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=W(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ge(n)!==a||Ge(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function en(e){return U(e)?e:e.contextElement}function tn(e){let t=en(e);if(!W(t))return qe(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$t(t),o=(a?Ge(n.width):n.width)/r,s=(a?Ge(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var nn=qe(0);function rn(e){let t=V(e);return!Le()||!t.visualViewport?nn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function an(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===V(e)}function on(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=en(e),o=qe(1);t&&(r?U(r)&&(o=tn(r)):o=tn(e));let s=an(a,n,r)?rn(a):qe(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=V(a),t=U(r)?V(r):r,n=e,i=Ue(n);for(;i&&t!==n;){let e=tn(i),t=i.getBoundingClientRect(),r=G(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=V(i),i=Ue(n)}}return ft({width:u,height:d,x:c,y:l})}function sn(e,t){let n=ze(e).scrollLeft;return t?t.left+n:on(H(e)).left+n}function cn(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-sn(e,n),y:n.top+t.scrollTop}}function ln(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=H(r),s=t?Ae(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=qe(1),u=qe(0),d=W(r);if((d||!a)&&((Te(r)!==`body`||Oe(o))&&(c=ze(r)),d)){let e=on(r);l=tn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?cn(o,c):qe(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function un(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function dn(e){let t=ze(e),n=e.ownerDocument.body,r=q(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=q(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+sn(e),o=-t.scrollTop;return G(n).direction===`rtl`&&(a+=q(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var fn=25;function pn(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=V(e),a=H(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Le()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(sn(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=fn&&(s-=o)}return{width:s,height:c,x:l,y:u}}function mn(e,t){let n=on(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=tn(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function hn(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=pn(e,n,t);else if(t===`document`)r=dn(H(e));else if(U(t))r=mn(t,n);else{let n=rn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ft(r)}function gn(e,t){let n=t.get(e);if(n)return n;let r=He(e,[],!1).filter(e=>U(e)&&Te(e)!==`body`),i=null,a=G(e).position===`fixed`,o=a?Be(e):e;for(;U(o)&&!Re(o);){let e=G(o),t=Fe(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Be(o)}return t.set(e,r),r}function _n(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ae(t)?[]:gn(t,this._c):[].concat(n),r],o=hn(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=V(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function On(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=en(e),u=i||a?[...l?He(l):[],...t?He(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Dn(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?on(e):null;c&&g();function g(){let t=on(e);h&&!En(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var kn=Yt,An=Xt,jn=Bt,Mn=Qt,Nn=Ut,Pn=zt,Fn=Kt,In=Zt,Ln=(e,t,n)=>{let r=new Map,i=n??{},a={...Tn,...i.platform,_c:r};return Rt(e,t,{...i,platform:a})},Rn=typeof document<`u`?S.useLayoutEffect:function(){};function zn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zn(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!zn(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Bn(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vn(e,t){let n=Bn(e);return Math.round(t*n)/n}function Hn(e){let t=S.useRef(e);return Rn(()=>{t.current=e}),t}function Un(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=S.useState(r);zn(f,r)||p(r);let[m,h]=S.useState(null),[g,_]=S.useState(null),v=S.useCallback(e=>{e!==w.current&&(w.current=e,h(e))},[]),y=S.useCallback(e=>{e!==T.current&&(T.current=e,_(e))},[]),x=a||m,C=o||g,w=S.useRef(null),T=S.useRef(null),E=S.useRef(u),D=c!=null,O=Hn(c),k=Hn(i),A=Hn(l),j=S.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Ln(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!zn(E.current,t)&&(E.current=t,b.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);Rn(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=S.useRef(!1);Rn(()=>(M.current=!0,()=>{M.current=!1}),[]),Rn(()=>{if(x&&(w.current=x),C&&(T.current=C),x&&C){if(O.current)return O.current(x,C,j);j()}},[x,C,j,O,D]);let N=S.useMemo(()=>({reference:w,floating:T,setReference:v,setFloating:y}),[v,y]),P=S.useMemo(()=>({reference:x,floating:C}),[x,C]),F=S.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Vn(P.floating,u.x),r=Vn(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Bn(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var Wn=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Pn({element:r.current,padding:i}).fn(n):r?Pn({element:r,padding:i}).fn(n):{}}}},Gn=(e,t)=>{let n=kn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kn=(e,t)=>{let n=An(e);return{name:n.name,fn:n.fn,options:[e,t]}},qn=(e,t)=>({fn:In(e).fn,options:[e,t]}),Jn=(e,t)=>{let n=jn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yn=(e,t)=>{let n=Mn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xn=(e,t)=>{let n=Nn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zn=(e,t)=>{let n=Fn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qn=(e,t)=>{let n=Wn(e);return{name:n.name,fn:n.fn,options:[e,t]}};function $n(e){let t=S.useRef(void 0),n=S.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return S.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var er=`data-floating-ui-focusable`,tr=`active`,nr=`selected`,rr=`ArrowLeft`,ir=`ArrowRight`,ar=`ArrowUp`,or=`ArrowDown`,sr=[rr,ir],cr=[ar,or];[...sr,...cr];var lr={...S},ur=!1,dr=0,fr=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+dr++;function pr(){let[e,t]=S.useState(()=>ur?fr():void 0);return Z(()=>{e??t(fr())},[]),S.useEffect(()=>{ur=!0},[]),e}var mr=lr.useId||pr;function hr(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var gr=S.createContext(null),_r=S.createContext(null),vr=()=>S.useContext(gr)?.id||null,yr=()=>S.useContext(_r);function br(e){return`data-floating-ui-`+e}function $(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var xr=br(`safe-polygon`);function Sr(e,t,n){if(n&&!jt(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function Cr(e){return typeof e==`function`?e():e}function wr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=yr(),m=vr(),h=Nt(l),g=Nt(c),_=Nt(n),v=Nt(d),y=S.useRef(),b=S.useRef(-1),x=S.useRef(),C=S.useRef(-1),w=S.useRef(!0),T=S.useRef(!1),E=S.useRef(()=>{}),D=S.useRef(!1),O=Q(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});S.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||($(b),$(C),w.current=!0,D.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),S.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){O()&&r(!1,e,`hover`)}let t=Tt(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,O]);let k=S.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=Sr(g.current,`close`,y.current);i&&!x.current?($(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&($(b),r(!1,e,n))},[g,r]),A=Q(()=>{E.current(),x.current=void 0}),j=Q(()=>{if(T.current){let e=Tt(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(xr),T.current=!1}}),M=Q(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);S.useEffect(()=>{if(!s)return;function e(e){if($(b),w.current=!1,u&&!jt(y.current)||Cr(v.current)>0&&!Sr(g.current,`open`))return;let t=Sr(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(M()){j();return}E.current();let t=Tt(o.floating);if($(C),D.current=!1,h.current&&i.current.floatingContext){n||$(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),E.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!xt(o.floating,e.relatedTarget))&&k(e)}function a(e){M()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e)}})(e))}function c(){$(b)}function l(e){M()||k(e,!1)}if(U(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,k,A,j,r,n,_,p,g,h,i,M,v]),Z(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&O()){T.current=!0;let e=o.floating;if(U(o.domReference)&&e){var t;let n=Tt(o.floating).body;n.setAttribute(xr,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,O]),Z(()=>{n||(y.current=void 0,D.current=!1,A(),j())},[n,A,j]),S.useEffect(()=>()=>{A(),$(b),$(C),j()},[s,o.domReference,A,j]);let N=S.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!w.current&&!_.current&&r(!0,t,`hover`)}(!u||jt(y.current))&&(n||Cr(v.current)===0||D.current&&e.movementX**2+e.movementY**2<2||($(C),y.current===`touch`?i():(D.current=!0,C.current=window.setTimeout(i,Cr(v.current)))))}}},[u,r,n,_,v]);return S.useMemo(()=>s?{reference:N}:{},[s,N])}var Tr=()=>{},Er=S.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Tr,setState:Tr,isInstantPhase:!1}),Dr=()=>S.useContext(Er);function Or(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=S.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=S.useRef(null),s=S.useCallback(e=>{a({currentId:e})},[]);return Z(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,x.jsx)(Er.Provider,{value:S.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function kr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=Dr(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return Z(()=>{o&&l&&(f({delay:{open:1,close:Sr(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),Z(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),Z(()=>{o&&u!==Tr&&n&&u(s)},[o,n,u,s]),c}function Ar(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&De(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function jr(e){return`composedPath`in e?e.composedPath()[0]:e.target}var Mr={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Nr={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Pr=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Fr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=yr(),g=Q(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=S.useRef(!1),{escapeKey:y,outsidePress:b}=Pr(p),{escapeKey:x,outsidePress:C}=Pr(m),w=S.useRef(!1),T=Q(e=>{if(!n||!o||!s||e.key!==`Escape`||w.current)return;let t=a.current.floatingContext?.nodeId,i=h?kt(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,At(e)?e.nativeEvent:e,`escape-key`)}),E=Q(e=>{var t;let n=()=>{var t;T(e),(t=St(e))==null||t.removeEventListener(`keydown`,n)};(t=St(e))==null||t.addEventListener(`keydown`,n)}),D=Q(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=St(e),s=`[`+br(`inert`)+`]`,c=Tt(i.floating).querySelectorAll(s),u=U(o)?o:null;for(;u&&!Re(u);){let e=Be(u);if(Re(e)||!U(e))break;u=e}if(c.length&&U(o)&&!wt(o)&&!xt(o,i.floating)&&Array.from(c).every(e=>!xt(u,e)))return;if(W(o)&&A){let t=Re(o),n=G(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&kt(h.nodesRef.current,d).some(t=>Ct(e,t.context?.elements.floating));if(Ct(e,i.floating)||Ct(e,i.domReference)||f)return;let p=h?kt(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),O=Q(e=>{var t;let n=()=>{var t;D(e),(t=St(e))==null||t.removeEventListener(l,n)};(t=St(e))==null||t.addEventListener(l,n)});S.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),w.current=!0}function u(){e=window.setTimeout(()=>{w.current=!1},Le()?5:0)}let d=Tt(i.floating);s&&(d.addEventListener(`keydown`,x?E:T,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,C?O:D,C);let p=[];return f&&(U(i.domReference)&&(p=He(i.domReference)),U(i.floating)&&(p=p.concat(He(i.floating))),!U(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(He(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?E:T,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,C?O:D,C),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,T,x,E,D,C,O]),S.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let k=S.useMemo(()=>({onKeyDown:T,...u&&{[Mr[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[T,r,u,d]),A=S.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[Nr[l]]:()=>{a.current.insideReactTree=!0}}},[T,l,a]);return S.useMemo(()=>o?{reference:k,floating:A}:{},[o,k,A])}function Ir(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=mr(),a=S.useRef({}),[o]=S.useState(()=>hr()),s=vr()!=null,[c,l]=S.useState(r.reference),u=Q((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=S.useMemo(()=>({setPositionReference:l}),[]),f=S.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return S.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Lr(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=Ir({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=S.useState(null),[l,u]=S.useState(null),d=o?.domReference||s,f=S.useRef(null),p=yr();Z(()=>{d&&(f.current=d)},[d]);let m=Un({...n,elements:{...o,...l&&{reference:l}}}),h=S.useCallback(e=>{let t=U(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=S.useCallback(e=>{(U(e)||e===null)&&(f.current=e,c(e)),(U(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!U(e))&&m.refs.setReference(e)},[m.refs]),_=S.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=S.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=S.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return Z(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),S.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function Rr(){return gt()&&ht()}function zr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=S.useRef(!1),u=S.useRef(-1),d=S.useRef(!0);S.useEffect(()=>{if(!s)return;let e=V(o.domReference);function t(){!n&&W(o.domReference)&&o.domReference===bt(Tt(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),Rr()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),Rr()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),S.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),S.useEffect(()=>()=>{$(u)},[]);let f=S.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=St(e.nativeEvent);if(c&&U(t)){if(Rr()&&!e.relatedTarget){if(!d.current&&!Et(t))return}else if(!Dt(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=U(t)&&t.hasAttribute(br(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=bt(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(xt(a.current.floatingContext?.refs.floating.current,e)||xt(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return S.useMemo(()=>s?{reference:f}:{},[s,f])}function Br(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[tr]:t,[nr]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[er]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[tr,nr].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function Vr(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=S.useCallback(t=>Br(t,e,`reference`),t),a=S.useCallback(t=>Br(t,e,`floating`),n),o=S.useCallback(t=>Br(t,e,`item`),r);return S.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Hr=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Ur(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=mr(),c=r.domReference?.id||s,l=S.useMemo(()=>Ot(r.floating)?.id||i,[r.floating,i]),u=Hr.get(o)??o,d=vr()!=null,f=S.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=S.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=S.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return S.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function Wr(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Wr(e,t.id,n)])}function Gr(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function Kr(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function qr(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){$(i),u()}if($(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=jr(e),v=e.type===`mouseleave`,y=Ar(c.floating,_),b=Ar(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=Kr(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&U(e.relatedTarget)&&Ar(c.floating,e.relatedTarget)||f&&Wr(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]]}function P(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!Gr([m,h],N)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}Gr([m,h],P([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var Jr={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},Yr=o((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":l(t),"--scrollarea-over-scroll-behavior":i}}}),Xr=t(e=>{let t=p(`ScrollArea`,Jr,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:h,children:_,offsetScrollbars:v,scrollbars:y,onBottomReached:b,onTopReached:C,onLeftReached:w,onRightReached:T,overscrollBehavior:E,startScrollPosition:D,verticalScrollbarPosition:O,attributes:k,...A}=t,[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)(!1),[F,ee]=(0,S.useState)(!1),ne=(0,S.useRef)(!0),ie=(0,S.useRef)(!1),ae=(0,S.useRef)(!0),oe=(0,S.useRef)(!1),L=m({name:`ScrollArea`,props:t,classes:Ce,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:c,varsResolver:Yr}),se=(0,S.useRef)(null),[ce,le]=(0,S.useState)(null),ue=$n([f,se,(0,S.useCallback)(e=>{le(t=>t===e?t:e)},[])]);return I(v===`present`?ce:null,()=>{let e=se.current;e&&(P(e.scrollHeight>e.clientHeight),ee(e.scrollWidth>e.clientWidth))}),g(()=>{D&&se.current&&se.current.scrollTo({left:D.x??0,top:D.y??0})},[]),(0,x.jsxs)(re,{getStyles:L,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:y,...L(`root`),...A,children:[(0,x.jsx)(Se,{...d,...L(`viewport`,{style:d?.style}),ref:ue,"data-offset-scrollbars":v===!0?`xy`:v||void 0,"data-scrollbars":y||void 0,"data-vertical-scrollbar-position":O||void 0,"data-horizontal-hidden":v===`present`&&!F?`true`:void 0,"data-vertical-hidden":v===`present`&&!N?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),h?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!ie.current&&b?.(),c&&!ne.current&&C?.(),ie.current=s,ne.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!oe.current&&T?.(),u&&!ae.current&&w?.(),oe.current=l,ae.current=u},children:_}),(y===`xy`||y===`x`)&&(0,x.jsx)(ye,{...L(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":O||void 0,"data-hidden":l===`never`||v===`present`&&!F||void 0,forceMount:!0,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:(0,x.jsx)(xe,{...L(`thumb`)})}),(y===`xy`||y===`y`)&&(0,x.jsx)(ye,{...L(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":O||void 0,"data-hidden":l===`never`||v===`present`&&!N||void 0,forceMount:!0,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:(0,x.jsx)(xe,{...L(`thumb`)})}),(0,x.jsx)(te,{...L(`corner`),"data-vertical-scrollbar-position":O||void 0,"data-hovered":j||void 0,"data-hidden":l===`never`||void 0})]})});Xr.displayName=`@mantine/core/ScrollArea`;var Zr=t(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:m,viewportProps:h,scrollbars:g,style:_,vars:y,onBottomReached:b,onTopReached:C,startScrollPosition:w,verticalScrollbarPosition:T,onOverflowChange:E,...D}=p(`ScrollAreaAutosize`,Jr,e),O=(0,S.useRef)(null),[k,A]=(0,S.useState)(null),j=$n([u,O,(0,S.useCallback)(e=>{A(t=>t===e?t:e)},[])]),M=(0,S.useRef)(!1),N=(0,S.useRef)(!1),P=(0,S.useEffectEvent)(()=>{let e=O.current;if(!e||!E)return;let t=e.scrollHeight>e.clientHeight;t!==M.current&&(N.current?E(t):(N.current=!0,t&&E(!0)),M.current=t)});return I(E?k:null,P),(0,x.jsx)(v,{...D,variant:m,style:[{display:`flex`,overflow:`hidden`},_],children:(0,x.jsx)(v,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...g===`y`&&{minWidth:0},...g===`x`&&{minHeight:0},...g===`xy`&&{minWidth:0,minHeight:0},...g===!1&&{minWidth:0,minHeight:0}},children:(0,x.jsx)(Xr,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:j,onScrollPositionChange:d,unstyled:f,variant:m,viewportProps:h,vars:y,scrollbars:g,onBottomReached:b,onTopReached:C,startScrollPosition:w,verticalScrollbarPosition:T,"data-autosize":`true`,children:t})})})});Xr.classes=Ce,Xr.varsResolver=Yr,Zr.displayName=`@mantine/core/ScrollAreaAutosize`,Zr.classes=Ce,Xr.Autosize=Zr;function Qr(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function $r(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var ei={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function ti({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function ni({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=ti({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[ei[c]]:r},d=-t/2;return c===`left`?{...u,...Qr(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...Qr(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...$r(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...$r(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function ri({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function ii({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=N();return a?(0,x.jsx)(`div`,{role:`presentation`,...l,style:{...c,...ni({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}ii.displayName=`@mantine/core/FloatingArrow`;function ai(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function oi(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function si({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||oi(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=oi(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return oi(n)}var ci={reuseTargetNode:!0},li=t(e=>{let{children:t,target:n,reuseTargetNode:r,ref:a,...o}=p(`Portal`,ci,e),[s,c]=(0,S.useState)(!1),l=(0,S.useRef)(null);return g(()=>(c(!0),l.current=si({target:n,reuseTargetNode:r,...o}),i(a,l.current),!n&&!r&&l.current&&document.body.appendChild(l.current),()=>{!n&&!r&&l.current&&document.body.removeChild(l.current)}),[n]),!s||!l.current?null:(0,b.createPortal)((0,x.jsx)(x.Fragment,{children:t}),l.current)});li.displayName=`@mantine/core/Portal`;var ui=t(({withinPortal:e=!0,children:t,...n})=>y()===`test`||!e?(0,x.jsx)(x.Fragment,{children:t}):(0,x.jsx)(li,{...n,children:t}));ui.displayName=`@mantine/core/OptionalPortal`;var di={duration:100,transition:`fade`};function fi(e,t){return{...di,...t,...e}}function pi({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,S.useState)(n),a=(0,S.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=Lr({placement:t,middleware:[Kn({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,S.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,S.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=He(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var mi={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},hi={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:E(`popover`)},gi=o((e,{radius:t,color:r})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:c(t),"--tooltip-bg":r?n(r,e):void 0,"--tooltip-color":r?`var(--mantine-color-white)`:void 0}})),_i=t(t=>{let n=p(`TooltipFloating`,hi,t),{children:i,refProp:a,withinPortal:o,style:s,className:c,classNames:l,styles:u,unstyled:d,radius:f,color:h,label:g,offset:_,position:y,multiline:b,zIndex:C,disabled:w,defaultOpened:T,variant:E,vars:D,portalProps:O,attributes:M,ref:N,...P}=n,F=r(),I=m({name:`TooltipFloating`,props:n,classes:mi,className:c,style:s,classNames:l,styles:u,unstyled:d,attributes:M,rootSelector:`tooltip`,vars:D,varsResolver:gi}),{handleMouseMove:ee,x:te,y:ne,opened:re,boundaryRef:ie,floating:ae,setOpened:oe}=pi({offset:_,position:y,defaultOpened:T}),L=A(i);if(!L)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let se=e(ie,k(L),N),ce=L.props,le=e=>{ce.onMouseEnter?.(e),ee(e),oe(!0)},ue=e=>{ce.onMouseLeave?.(e),oe(!1)};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(ui,{...O,withinPortal:o,children:(0,x.jsx)(v,{...P,...I(`tooltip`,{style:{...j(s,F),zIndex:C,display:!w&&re?`block`:`none`,top:Number.isFinite(ne)?Math.round(ne):``,left:Number.isFinite(te)?Math.round(te):``}}),variant:E,ref:ae,mod:{multiline:b},children:g})}),(0,S.cloneElement)(L,{...ce,[a]:se,onMouseEnter:le,onMouseLeave:ue})]})});_i.classes=mi,_i.varsResolver=gi,_i.displayName=`@mantine/core/TooltipFloating`;var vi=(0,S.createContext)({withinGroup:!1}),yi={openDelay:0,closeDelay:0};function bi(e){let{openDelay:t,closeDelay:n,children:r}=p(`TooltipGroup`,yi,e);return(0,x.jsx)(vi,{value:{withinGroup:!0},children:(0,x.jsx)(Or,{delay:{open:t,close:n},children:r})})}bi.displayName=`@mantine/core/TooltipGroup`,bi.extend=e=>e;function xi(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Si(e){let t=xi(e.middlewares),n=[Gn(e.offset)];return t.shift&&n.push(Kn(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?Jn():Jn(t.flip)),n.push(Qn({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?Zn():Zn(t.inline)):e.inline&&n.push(Zn()),n}function Ci(e){let[t,n]=(0,S.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,S.use)(vi).withinGroup,a=u(),o=(0,S.useCallback)(e=>{n(e),e&&v(a)},[a]),{x:s,y:c,context:l,refs:d,placement:f,middlewareData:{arrow:{x:p,y:m}={}}}=Lr({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:Si(e),whileElementsMounted:On}),{delay:h,currentId:_,setCurrentId:v}=kr(l,{id:a}),{getReferenceProps:y,getFloatingProps:b}=Vr([wr(l,{enabled:e.events?.hover,delay:i?h:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?qr():null}),zr(l,{enabled:e.events?.focus,visibleOnly:!0}),Ur(l,{role:`tooltip`}),Fr(l,{enabled:e.opened===void 0})]),x=(0,S.useRef)(f);g(()=>{x.current!==f&&(x.current=f,e.onPositionChange?.(f))},[f]);let C=r&&_&&_!==a;return{x:s,y:c,arrowX:p,arrowY:m,reference:d.setReference,floating:d.setFloating,getFloatingProps:b,getReferenceProps:y,isGroupPhase:C,opened:r,placement:f}}var wi={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:E(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},Ti=o((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:c(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),Ei=t(t=>{let n=p(`Tooltip`,wi,t),{children:r,position:i,refProp:a,label:o,openDelay:c,closeDelay:l,onPositionChange:u,opened:d,defaultOpened:f,withinPortal:h,radius:g,color:y,classNames:b,styles:C,unstyled:w,style:T,className:E,withArrow:D,arrowSize:O,arrowOffset:j,arrowRadius:M,arrowPosition:P,offset:F,transitionProps:I,multiline:ee,events:te,interactive:ne,zIndex:re,disabled:ie,onClick:ae,onMouseEnter:oe,onMouseLeave:L,inline:se,variant:ce,keepMounted:le,vars:ue,portalProps:R,mod:de,floatingStrategy:fe,middlewares:pe,autoContrast:me,attributes:he,target:z,ref:ge,..._e}=n,{dir:ve}=N(),ye=(0,S.useRef)(null),B=Ci({position:ai(ve,i),closeDelay:l,openDelay:c,onPositionChange:u,opened:d,defaultOpened:f,events:te,interactive:ne,arrowRef:ye,arrowOffset:j,offset:typeof F==`number`?F+(D?O/2:0):F,inline:se,strategy:fe,middlewares:pe});(0,S.useEffect)(()=>{let e=z instanceof HTMLElement?z:typeof z==`string`?document.querySelector(z):z?.current||null;e&&B.reference(e)},[z,B]);let be=m({name:`Tooltip`,props:n,classes:mi,className:E,style:T,classNames:b,styles:C,unstyled:w,attributes:he,rootSelector:`tooltip`,vars:ue,varsResolver:Ti}),xe=A(r);if(!z&&!xe)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let Se=be(`tooltip`),Ce=ne&&!ie&&!!B.opened,we=P===`merge`&&D?ri({position:B.placement,dir:ve}):void 0;if(z){let e=fi(I,{duration:100,transition:`fade`});return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(ui,{...R,withinPortal:h,children:(0,x.jsx)(_,{...e,keepMounted:le,mounted:!ie&&!!B.opened,duration:B.isGroupPhase?10:e.duration,children:e=>(0,x.jsxs)(v,{..._e,"data-fixed":fe===`fixed`||void 0,variant:ce,mod:[{multiline:ee,interactive:Ce},de],...Se,...B.getFloatingProps({ref:B.floating,className:Se.className,style:{...Se.style,...e,...we,zIndex:re,top:B.y??0,left:B.x??0}}),children:[o,(0,x.jsx)(ii,{ref:ye,arrowX:B.arrowX,arrowY:B.arrowY,visible:D,position:B.placement,arrowSize:O,arrowOffset:j,arrowRadius:M,arrowPosition:P,...be(`arrow`)})]})})})})}let Te=xe.props,V=e(B.reference,k(xe),ge),H=fi(I,{duration:100,transition:`fade`});return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(ui,{...R,withinPortal:h,children:(0,x.jsx)(_,{...H,keepMounted:le,mounted:!ie&&!!B.opened,duration:B.isGroupPhase?10:H.duration,children:e=>(0,x.jsxs)(v,{..._e,"data-fixed":fe===`fixed`||void 0,variant:ce,mod:[{multiline:ee,interactive:Ce},de],...B.getFloatingProps({ref:B.floating,className:be(`tooltip`).className,style:{...be(`tooltip`).style,...e,...we,zIndex:re,top:B.y??0,left:B.x??0}}),children:[o,(0,x.jsx)(ii,{ref:ye,arrowX:B.arrowX,arrowY:B.arrowY,visible:D,position:B.placement,arrowSize:O,arrowOffset:j,arrowRadius:M,arrowPosition:P,...be(`arrow`)})]})})}),(0,S.cloneElement)(xe,B.getReferenceProps({onClick:ae,onMouseEnter:oe,onMouseLeave:L,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...Te,className:s(E,Te.className),[a]:V}))]})});Ei.classes=mi,Ei.varsResolver=Ti,Ei.displayName=`@mantine/core/Tooltip`,Ei.Floating=_i,Ei.Group=bi;export{E as C,k as S,C as T,Kn as _,ri as a,N as b,Lr as c,Qn as d,Jn as f,Gn as g,qn as h,ii as i,wr as l,Zn as m,ui as n,Xr as o,Xn as p,ai as r,qr as s,Ei as t,Vr as u,Yn as v,w,A as x,On as y}; \ No newline at end of file +import{$ as e,C as t,K as n,N as r,Q as i,X as a,Y as o,at as s,dt as c,et as l,gt as u,ht as d,j as f,k as p,mt as m,nt as h,v as g,x as _,yt as v,z as y}from"./brand-CnsMBQCm.js";var b=v(d(),1),x=m(),S=v(u(),1);function C(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==S.Fragment}function w(e){let t=(0,S.createContext)(null);return[t,()=>{let n=(0,S.use)(t);if(n===null)throw Error(e);return n}]}var T={app:100,modal:200,popover:300,overlay:400,max:9999};function E(e){return T[e]}function D(e){let t=(0,S.useRef)(e);return(0,S.useEffect)(()=>{t.current=e}),(0,S.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function O(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=D(e),s=(0,S.useRef)(0),c=(0,S.useRef)(0),l=(0,S.useRef)(null),u=(0,S.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(s.current!==0){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,S.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}function k(e){return e?.props?.ref}function A(e){let t=S.Children.toArray(e);return t.length!==1||!C(t[0])?null:t[0]}function j(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...j(n,t)}),{}):typeof e==`function`?e(t):e??{}}var M=(0,S.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function N(){return(0,S.use)(M)}var[P,F]=w(`ScrollArea.Root component was not found in tree`);function I(e,t){let n=(0,S.useEffectEvent)(t);h(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function ee(e){let{style:t,...n}=e,r=F(),[i,a]=(0,S.useState)(0),[o,s]=(0,S.useState)(0),c=!!(i&&o);return I(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),I(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,x.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function te(e){let t=F(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,x.jsx)(ee,{...e}):null}var ne={scrollHideDelay:1e3,type:`hover`};function re(t){let{type:n,scrollHideDelay:r,scrollbars:i,getStyles:a,ref:o,...s}=f(`ScrollAreaRoot`,ne,t),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[p,m]=(0,S.useState)(null),[h,g]=(0,S.useState)(null),[v,y]=(0,S.useState)(null),[b,C]=(0,S.useState)(0),[w,T]=(0,S.useState)(0),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(!1),A=e(o,l);return(0,x.jsx)(P,{value:{type:n,scrollHideDelay:r,scrollArea:c,viewport:u,onViewportChange:d,content:p,onContentChange:m,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:E,onScrollbarXEnabledChange:D,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:O,onScrollbarYEnabledChange:k,onCornerWidthChange:C,onCornerHeightChange:T,getStyles:a},children:(0,x.jsx)(_,{...s,ref:A,__vars:{"--sa-corner-width":i===`xy`?`${b}px`:`0px`,"--sa-corner-height":i===`xy`?`${w}px`:`0px`}})})}re.displayName=`@mantine/core/ScrollAreaRoot`;function ie(e,t){let n=e/t;return Number.isNaN(n)?0:n}function ae(e){let t=ie(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function oe(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function L(e,[t,n]){return Math.min(n,Math.max(t,e))}function se(e,t,n=`ltr`){let r=ae(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=L(e,n===`ltr`?[0,o]:[o*-1,0]);return oe([0,o],[0,s])(c)}function ce(e,t,n,r=`ltr`){let i=ae(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return oe([c,l],d)(e)}function le(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[de,fe]=w(`ScrollAreaScrollbar was not found in tree`);function pe(t){let{sizes:n,hasThumb:r,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:s,onDragScroll:c,onWheelScroll:l,onResize:u,ref:d,...f}=t,p=F(),[m,h]=(0,S.useState)(null),g=e(d,h),_=(0,S.useRef)(null),v=(0,S.useRef)(``),{viewport:y}=p,b=n.content-n.viewport,C=(0,S.useEffectEvent)(l),w=D(s),T=O(u,10),E=e=>{if(_.current){let t=e.clientX-_.current.left,n=e.clientY-_.current.top;c({x:t,y:n})}};return(0,S.useEffect)(()=>{let e=e=>{let t=e.target;m?.contains(t)&&C(e,b)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,m,b]),(0,S.useEffect)(w,[n,w]),I(m,T),I(p.content,T),(0,x.jsx)(de,{value:{scrollbar:m,hasThumb:r,onThumbChange:D(i),onThumbPointerUp:D(a),onThumbPositionChange:w,onThumbPointerDown:D(o)},children:(0,x.jsx)(`div`,{...f,ref:g,"data-mantine-scrollbar":!0,style:{position:`absolute`,...f.style},onPointerDown:R(t.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,E(e))}),onPointerMove:R(t.onPointerMove,E),onPointerUp:R(t.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=v.current,_.current=null}})})}var me=t=>{let{sizes:n,onSizesChange:r,style:i,ref:a,...o}=t,s=F(),[c,l]=(0,S.useState)(),u=(0,S.useRef)(null),d=e(a,u,s.onScrollbarXChange);return(0,S.useEffect)(()=>{u.current&&l(getComputedStyle(u.current))},[u]),(0,x.jsx)(pe,{"data-orientation":`horizontal`,...o,ref:d,sizes:n,style:{...i,"--sa-thumb-width":`${ae(n)}px`},onThumbPointerDown:e=>t.onThumbPointerDown(e.x),onDragScroll:e=>t.onDragScroll(e.x),onWheelScroll:(e,n)=>{if(s.viewport){let r=s.viewport.scrollLeft+e.deltaX;t.onWheelScroll(r),le(r,n)&&e.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:ue(c.paddingLeft),paddingEnd:ue(c.paddingRight)}})}})};me.displayName=`@mantine/core/ScrollAreaScrollbarX`;function he(t){let{sizes:n,onSizesChange:r,style:i,ref:a,...o}=t,s=F(),[c,l]=(0,S.useState)(),u=(0,S.useRef)(null),d=e(a,u,s.onScrollbarYChange);return(0,S.useEffect)(()=>{u.current&&l(window.getComputedStyle(u.current))},[]),(0,x.jsx)(pe,{...o,"data-orientation":`vertical`,ref:d,sizes:n,style:{"--sa-thumb-height":`${ae(n)}px`,...i},onThumbPointerDown:e=>t.onThumbPointerDown(e.y),onDragScroll:e=>t.onDragScroll(e.y),onWheelScroll:(e,n)=>{if(s.viewport){let r=s.viewport.scrollTop+e.deltaY;t.onWheelScroll(r),le(r,n)&&e.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:ue(c.paddingTop),paddingEnd:ue(c.paddingBottom)}})}})}he.displayName=`@mantine/core/ScrollAreaScrollbarY`;function z(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=N(),i=F(),a=(0,S.useRef)(null),o=(0,S.useRef)(0),[s,c]=(0,S.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=ie(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>ce(e,o.current,s,t);return t===`horizontal`?(0,x.jsx)(me,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=se(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,x.jsx)(he,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=se(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}z.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function ge(e){let t=F(),{forceMount:n,...r}=e,[i,a]=(0,S.useState)(!1),o=e.orientation===`horizontal`,s=O(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,x.jsx)(ge,{"data-state":i?`visible`:`hidden`,...n}):null}_e.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function ve(e){let{forceMount:t,...n}=e,r=F(),i=e.orientation===`horizontal`,[a,o]=(0,S.useState)(`hidden`),s=O(()=>o(`idle`),100);return(0,S.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,S.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,x.jsx)(z,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:R(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:R(e.onPointerLeave,()=>o(`idle`))}):null}function ye(e){let{forceMount:t,...n}=e,r=F(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,S.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,x.jsx)(_e,{...n,forceMount:t}):r.type===`scroll`?(0,x.jsx)(ve,{...n,forceMount:t}):r.type===`auto`?(0,x.jsx)(ge,{...n,forceMount:t}):r.type===`always`?(0,x.jsx)(z,{...n}):null}ye.displayName=`@mantine/core/ScrollAreaScrollbar`;function B(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function be(t){let{style:n,ref:r,...i}=t,a=F(),o=fe(),{onThumbPositionChange:s}=o,c=e(r,o.onThumbChange),l=(0,S.useRef)(void 0),u=O(()=>{l.current&&=(l.current(),void 0)},100);return(0,S.useEffect)(()=>{let{viewport:e}=a;if(e){let t=()=>{if(u(),!l.current){let t=B(e,s);l.current=t,s()}};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,x.jsx)(`div`,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...n},onPointerDownCapture:R(t.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:R(t.onPointerUp,o.onThumbPointerUp)})}be.displayName=`@mantine/core/ScrollAreaThumb`;function xe(e){let{forceMount:t,...n}=e,r=fe();return t||r.hasThumb?(0,x.jsx)(be,{...n}):null}xe.displayName=`@mantine/core/ScrollAreaThumb`;function Se({children:t,style:n,ref:r,onWheel:i,...a}){let o=F(),s=e(r,o.onViewportChange),c=e=>{if(i?.(e),o.scrollbarXEnabled&&o.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:a}=o.viewport,s=t<1,c=t>=n-r-1;i>a&&(s||c)&&e.stopPropagation()}};return(0,x.jsx)(_,{...a,ref:s,onWheel:c,"data-scrollarea-viewport":!0,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...n},children:(0,x.jsx)(`div`,{...o.getStyles(`content`),ref:o.onContentChange,children:t})})}Se.displayName=`@mantine/core/ScrollAreaViewport`;var Ce={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function we(){return typeof window<`u`}function Te(e){return Ee(e)?(e.nodeName||``).toLowerCase():`#document`}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function H(e){return((Ee(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ee(e){return we()?e instanceof Node||e instanceof V(e).Node:!1}function U(e){return we()?e instanceof Element||e instanceof V(e).Element:!1}function W(e){return we()?e instanceof HTMLElement||e instanceof V(e).HTMLElement:!1}function De(e){return!we()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}function Oe(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ke(e){return/^(table|td|th)$/.test(Te(e))}function Ae(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var je=/transform|translate|scale|rotate|perspective|filter/,Me=/paint|layout|strict|content/,Ne=e=>!!e&&e!==`none`,Pe;function Fe(e){let t=U(e)?G(e):e;return Ne(t.transform)||Ne(t.translate)||Ne(t.scale)||Ne(t.rotate)||Ne(t.perspective)||!Le()&&(Ne(t.backdropFilter)||Ne(t.filter))||je.test(t.willChange||``)||Me.test(t.contain||``)}function Ie(e){let t=Be(e);for(;W(t)&&!Re(t);){if(Fe(t))return t;if(Ae(t))return null;t=Be(t)}return null}function Le(){return Pe??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Pe}function Re(e){return/^(html|body|#document)$/.test(Te(e))}function G(e){return V(e).getComputedStyle(e)}function ze(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Be(e){if(Te(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||De(e)&&e.host||H(e);return De(t)?t.host:t}function Ve(e){let t=Be(e);return Re(t)?(e.ownerDocument||e).body:W(t)&&Oe(t)?t:Ve(t)}function He(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ve(e),i=r===e.ownerDocument?.body,a=V(r);if(i){let e=Ue(a);return t.concat(a,a.visualViewport||[],Oe(r)?r:[],e&&n?He(e):[])}return t.concat(r,He(r,[],n))}function Ue(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var We=[`top`,`right`,`bottom`,`left`],K=Math.min,q=Math.max,Ge=Math.round,Ke=Math.floor,qe=e=>({x:e,y:e}),Je={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ye(e,t,n){return q(e,K(t,n))}function J(e,t){return typeof e==`function`?e(t):e}function Y(e){return e.split(`-`)[0]}function Xe(e){return e.split(`-`)[1]}function Ze(e){return e===`x`?`y`:`x`}function Qe(e){return e===`y`?`height`:`width`}function X(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $e(e){return Ze(X(e))}function et(e,t,n){n===void 0&&(n=!1);let r=Xe(e),i=$e(e),a=Qe(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=lt(o)),[o,lt(o)]}function tt(e){let t=lt(e);return[nt(e),t,nt(t)]}function nt(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var rt=[`left`,`right`],it=[`right`,`left`],at=[`top`,`bottom`],ot=[`bottom`,`top`];function st(e,t,n){switch(e){case`top`:case`bottom`:return n?t?it:rt:t?rt:it;case`left`:case`right`:return t?at:ot;default:return[]}}function ct(e,t,n,r){let i=Xe(e),a=st(Y(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(nt)))),a}function lt(e){let t=Y(e);return Je[t]+e.slice(t.length)}function ut(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function dt(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ut(e)}function ft(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function pt(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function mt(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function ht(){return/apple/i.test(navigator.vendor)}function gt(){return pt().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function _t(){return mt().includes(`jsdom/`)}var vt=`data-floating-ui-focusable`,yt=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function bt(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function xt(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&De(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function St(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ct(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function wt(e){return e.matches(`html,body`)}function Tt(e){return e?.ownerDocument||document}function Et(e){return W(e)&&e.matches(yt)}function Dt(e){if(!e||_t())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ot(e){return e?e.hasAttribute(vt)?e:e.querySelector(`[`+vt+`]`)||e:null}function kt(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...kt(e,t.id,n)])}function At(e){return`nativeEvent`in e}function jt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var Z=typeof document<`u`?S.useLayoutEffect:function(){},Mt={...S};function Nt(e){let t=S.useRef(e);return Z(()=>{t.current=e}),t}var Pt=Mt.useInsertionEffect||(e=>e());function Q(e){let t=S.useRef(()=>{});return Pt(()=>{t.current=e}),S.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Ft(e,t,n){let{reference:r,floating:i}=e,a=X(t),o=$e(t),s=Qe(o),c=Y(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Xe(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function It(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=J(t,e),p=dt(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ft(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ft(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Lt=50,Rt=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:It},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ft(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=J(e,t)||{};if(l==null)return{};let d=dt(u),f={x:n,y:r},p=$e(i),m=Qe(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=K(d[_],T),D=K(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Ye(E,k,O),j=!c.arrow&&Xe(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===X(t)||T.every(e=>X(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=X(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Vt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ht(e){return We.some(t=>e[t]>=0)}var Ut=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=J(e,t);switch(i){case`referenceHidden`:{let e=Vt(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ht(e)}}}case`escaped`:{let e=Vt(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ht(e)}}}default:return{}}}}};function Wt(e){let t=K(...e.map(e=>e.left)),n=K(...e.map(e=>e.top)),r=q(...e.map(e=>e.right)),i=q(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function Gt(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>ft(Wt(e)))}var Kt=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=J(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=Gt(u),f=ft(Wt(u)),p=dt(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&ce.top-p.top&&l=2){if(X(n)===`y`){let e=d[0],t=d[d.length-1],r=Y(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return ft({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=Y(n)===`left`,t=q(...d.map(e=>e.right)),r=K(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return ft({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},qt=new Set([`left`,`top`]);async function Jt(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Y(n),s=Xe(n),c=X(n)===`y`,l=qt.has(o)?-1:1,u=a&&c?-1:1,d=J(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Yt=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Jt(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Xt=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=J(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=X(i),p=Ze(f),m=u[p],h=u[f],g=(e,t)=>Ye(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Zt=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=J(e,t),u={x:n,y:r},d=X(i),f=Ze(d),p=u[f],m=u[d],h=J(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=qt.has(Y(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},Qt=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=J(e,t),c=await i.detectOverflow(t,s),l=Y(n),u=Xe(n),d=X(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=K(p-c[m],g),y=K(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*q(c.left,c.right):S=p-2*q(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function $t(e){let t=G(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=W(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ge(n)!==a||Ge(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function en(e){return U(e)?e:e.contextElement}function tn(e){let t=en(e);if(!W(t))return qe(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$t(t),o=(a?Ge(n.width):n.width)/r,s=(a?Ge(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var nn=qe(0);function rn(e){let t=V(e);return!Le()||!t.visualViewport?nn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function an(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===V(e)}function on(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=en(e),o=qe(1);t&&(r?U(r)&&(o=tn(r)):o=tn(e));let s=an(a,n,r)?rn(a):qe(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=V(a),t=U(r)?V(r):r,n=e,i=Ue(n);for(;i&&t!==n;){let e=tn(i),t=i.getBoundingClientRect(),r=G(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=V(i),i=Ue(n)}}return ft({width:u,height:d,x:c,y:l})}function sn(e,t){let n=ze(e).scrollLeft;return t?t.left+n:on(H(e)).left+n}function cn(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-sn(e,n),y:n.top+t.scrollTop}}function ln(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=H(r),s=t?Ae(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=qe(1),u=qe(0),d=W(r);if((d||!a)&&((Te(r)!==`body`||Oe(o))&&(c=ze(r)),d)){let e=on(r);l=tn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?cn(o,c):qe(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function un(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function dn(e){let t=ze(e),n=e.ownerDocument.body,r=q(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=q(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+sn(e),o=-t.scrollTop;return G(n).direction===`rtl`&&(a+=q(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var fn=25;function pn(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=V(e),a=H(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Le()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(sn(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=fn&&(s-=o)}return{width:s,height:c,x:l,y:u}}function mn(e,t){let n=on(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=tn(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function hn(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=pn(e,n,t);else if(t===`document`)r=dn(H(e));else if(U(t))r=mn(t,n);else{let n=rn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ft(r)}function gn(e,t){let n=t.get(e);if(n)return n;let r=He(e,[],!1).filter(e=>U(e)&&Te(e)!==`body`),i=null,a=G(e).position===`fixed`,o=a?Be(e):e;for(;U(o)&&!Re(o);){let e=G(o),t=Fe(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Be(o)}return t.set(e,r),r}function _n(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ae(t)?[]:gn(t,this._c):[].concat(n),r],o=hn(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=V(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function On(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=en(e),u=i||a?[...l?He(l):[],...t?He(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Dn(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?on(e):null;c&&g();function g(){let t=on(e);h&&!En(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var kn=Yt,An=Xt,jn=Bt,Mn=Qt,Nn=Ut,Pn=zt,Fn=Kt,In=Zt,Ln=(e,t,n)=>{let r=new Map,i=n??{},a={...Tn,...i.platform,_c:r};return Rt(e,t,{...i,platform:a})},Rn=typeof document<`u`?S.useLayoutEffect:function(){};function zn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zn(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!zn(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Bn(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vn(e,t){let n=Bn(e);return Math.round(t*n)/n}function Hn(e){let t=S.useRef(e);return Rn(()=>{t.current=e}),t}function Un(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=S.useState(r);zn(f,r)||p(r);let[m,h]=S.useState(null),[g,_]=S.useState(null),v=S.useCallback(e=>{e!==w.current&&(w.current=e,h(e))},[]),y=S.useCallback(e=>{e!==T.current&&(T.current=e,_(e))},[]),x=a||m,C=o||g,w=S.useRef(null),T=S.useRef(null),E=S.useRef(u),D=c!=null,O=Hn(c),k=Hn(i),A=Hn(l),j=S.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Ln(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!zn(E.current,t)&&(E.current=t,b.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);Rn(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=S.useRef(!1);Rn(()=>(M.current=!0,()=>{M.current=!1}),[]),Rn(()=>{if(x&&(w.current=x),C&&(T.current=C),x&&C){if(O.current)return O.current(x,C,j);j()}},[x,C,j,O,D]);let N=S.useMemo(()=>({reference:w,floating:T,setReference:v,setFloating:y}),[v,y]),P=S.useMemo(()=>({reference:x,floating:C}),[x,C]),F=S.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Vn(P.floating,u.x),r=Vn(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Bn(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var Wn=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Pn({element:r.current,padding:i}).fn(n):r?Pn({element:r,padding:i}).fn(n):{}}}},Gn=(e,t)=>{let n=kn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kn=(e,t)=>{let n=An(e);return{name:n.name,fn:n.fn,options:[e,t]}},qn=(e,t)=>({fn:In(e).fn,options:[e,t]}),Jn=(e,t)=>{let n=jn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yn=(e,t)=>{let n=Mn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xn=(e,t)=>{let n=Nn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zn=(e,t)=>{let n=Fn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qn=(e,t)=>{let n=Wn(e);return{name:n.name,fn:n.fn,options:[e,t]}};function $n(e){let t=S.useRef(void 0),n=S.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return S.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var er=`data-floating-ui-focusable`,tr=`active`,nr=`selected`,rr=`ArrowLeft`,ir=`ArrowRight`,ar=`ArrowUp`,or=`ArrowDown`,sr=[rr,ir],cr=[ar,or];[...sr,...cr];var lr={...S},ur=!1,dr=0,fr=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+dr++;function pr(){let[e,t]=S.useState(()=>ur?fr():void 0);return Z(()=>{e??t(fr())},[]),S.useEffect(()=>{ur=!0},[]),e}var mr=lr.useId||pr;function hr(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var gr=S.createContext(null),_r=S.createContext(null),vr=()=>S.useContext(gr)?.id||null,yr=()=>S.useContext(_r);function br(e){return`data-floating-ui-`+e}function $(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var xr=br(`safe-polygon`);function Sr(e,t,n){if(n&&!jt(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function Cr(e){return typeof e==`function`?e():e}function wr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=yr(),m=vr(),h=Nt(l),g=Nt(c),_=Nt(n),v=Nt(d),y=S.useRef(),b=S.useRef(-1),x=S.useRef(),C=S.useRef(-1),w=S.useRef(!0),T=S.useRef(!1),E=S.useRef(()=>{}),D=S.useRef(!1),O=Q(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});S.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||($(b),$(C),w.current=!0,D.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),S.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){O()&&r(!1,e,`hover`)}let t=Tt(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,O]);let k=S.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=Sr(g.current,`close`,y.current);i&&!x.current?($(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&($(b),r(!1,e,n))},[g,r]),A=Q(()=>{E.current(),x.current=void 0}),j=Q(()=>{if(T.current){let e=Tt(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(xr),T.current=!1}}),M=Q(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);S.useEffect(()=>{if(!s)return;function e(e){if($(b),w.current=!1,u&&!jt(y.current)||Cr(v.current)>0&&!Sr(g.current,`open`))return;let t=Sr(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(M()){j();return}E.current();let t=Tt(o.floating);if($(C),D.current=!1,h.current&&i.current.floatingContext){n||$(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),E.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!xt(o.floating,e.relatedTarget))&&k(e)}function a(e){M()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e)}})(e))}function c(){$(b)}function l(e){M()||k(e,!1)}if(U(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,k,A,j,r,n,_,p,g,h,i,M,v]),Z(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&O()){T.current=!0;let e=o.floating;if(U(o.domReference)&&e){var t;let n=Tt(o.floating).body;n.setAttribute(xr,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,O]),Z(()=>{n||(y.current=void 0,D.current=!1,A(),j())},[n,A,j]),S.useEffect(()=>()=>{A(),$(b),$(C),j()},[s,o.domReference,A,j]);let N=S.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!w.current&&!_.current&&r(!0,t,`hover`)}(!u||jt(y.current))&&(n||Cr(v.current)===0||D.current&&e.movementX**2+e.movementY**2<2||($(C),y.current===`touch`?i():(D.current=!0,C.current=window.setTimeout(i,Cr(v.current)))))}}},[u,r,n,_,v]);return S.useMemo(()=>s?{reference:N}:{},[s,N])}var Tr=()=>{},Er=S.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Tr,setState:Tr,isInstantPhase:!1}),Dr=()=>S.useContext(Er);function Or(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=S.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=S.useRef(null),s=S.useCallback(e=>{a({currentId:e})},[]);return Z(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,x.jsx)(Er.Provider,{value:S.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function kr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=Dr(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return Z(()=>{o&&l&&(f({delay:{open:1,close:Sr(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),Z(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),Z(()=>{o&&u!==Tr&&n&&u(s)},[o,n,u,s]),c}function Ar(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&De(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function jr(e){return`composedPath`in e?e.composedPath()[0]:e.target}var Mr={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Nr={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Pr=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Fr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=yr(),g=Q(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=S.useRef(!1),{escapeKey:y,outsidePress:b}=Pr(p),{escapeKey:x,outsidePress:C}=Pr(m),w=S.useRef(!1),T=Q(e=>{if(!n||!o||!s||e.key!==`Escape`||w.current)return;let t=a.current.floatingContext?.nodeId,i=h?kt(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,At(e)?e.nativeEvent:e,`escape-key`)}),E=Q(e=>{var t;let n=()=>{var t;T(e),(t=St(e))==null||t.removeEventListener(`keydown`,n)};(t=St(e))==null||t.addEventListener(`keydown`,n)}),D=Q(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=St(e),s=`[`+br(`inert`)+`]`,c=Tt(i.floating).querySelectorAll(s),u=U(o)?o:null;for(;u&&!Re(u);){let e=Be(u);if(Re(e)||!U(e))break;u=e}if(c.length&&U(o)&&!wt(o)&&!xt(o,i.floating)&&Array.from(c).every(e=>!xt(u,e)))return;if(W(o)&&A){let t=Re(o),n=G(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&kt(h.nodesRef.current,d).some(t=>Ct(e,t.context?.elements.floating));if(Ct(e,i.floating)||Ct(e,i.domReference)||f)return;let p=h?kt(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),O=Q(e=>{var t;let n=()=>{var t;D(e),(t=St(e))==null||t.removeEventListener(l,n)};(t=St(e))==null||t.addEventListener(l,n)});S.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),w.current=!0}function u(){e=window.setTimeout(()=>{w.current=!1},Le()?5:0)}let d=Tt(i.floating);s&&(d.addEventListener(`keydown`,x?E:T,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,C?O:D,C);let p=[];return f&&(U(i.domReference)&&(p=He(i.domReference)),U(i.floating)&&(p=p.concat(He(i.floating))),!U(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(He(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?E:T,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,C?O:D,C),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,T,x,E,D,C,O]),S.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let k=S.useMemo(()=>({onKeyDown:T,...u&&{[Mr[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[T,r,u,d]),A=S.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[Nr[l]]:()=>{a.current.insideReactTree=!0}}},[T,l,a]);return S.useMemo(()=>o?{reference:k,floating:A}:{},[o,k,A])}function Ir(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=mr(),a=S.useRef({}),[o]=S.useState(()=>hr()),s=vr()!=null,[c,l]=S.useState(r.reference),u=Q((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=S.useMemo(()=>({setPositionReference:l}),[]),f=S.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return S.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Lr(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=Ir({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=S.useState(null),[l,u]=S.useState(null),d=o?.domReference||s,f=S.useRef(null),p=yr();Z(()=>{d&&(f.current=d)},[d]);let m=Un({...n,elements:{...o,...l&&{reference:l}}}),h=S.useCallback(e=>{let t=U(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=S.useCallback(e=>{(U(e)||e===null)&&(f.current=e,c(e)),(U(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!U(e))&&m.refs.setReference(e)},[m.refs]),_=S.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=S.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=S.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return Z(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),S.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function Rr(){return gt()&&ht()}function zr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=S.useRef(!1),u=S.useRef(-1),d=S.useRef(!0);S.useEffect(()=>{if(!s)return;let e=V(o.domReference);function t(){!n&&W(o.domReference)&&o.domReference===bt(Tt(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),Rr()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),Rr()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),S.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),S.useEffect(()=>()=>{$(u)},[]);let f=S.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=St(e.nativeEvent);if(c&&U(t)){if(Rr()&&!e.relatedTarget){if(!d.current&&!Et(t))return}else if(!Dt(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=U(t)&&t.hasAttribute(br(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=bt(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(xt(a.current.floatingContext?.refs.floating.current,e)||xt(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return S.useMemo(()=>s?{reference:f}:{},[s,f])}function Br(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[tr]:t,[nr]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[er]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[tr,nr].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function Vr(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=S.useCallback(t=>Br(t,e,`reference`),t),a=S.useCallback(t=>Br(t,e,`floating`),n),o=S.useCallback(t=>Br(t,e,`item`),r);return S.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Hr=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Ur(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=mr(),c=r.domReference?.id||s,l=S.useMemo(()=>Ot(r.floating)?.id||i,[r.floating,i]),u=Hr.get(o)??o,d=vr()!=null,f=S.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=S.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=S.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return S.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function Wr(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Wr(e,t.id,n)])}function Gr(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function Kr(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function qr(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){$(i),u()}if($(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=jr(e),v=e.type===`mouseleave`,y=Ar(c.floating,_),b=Ar(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=Kr(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&U(e.relatedTarget)&&Ar(c.floating,e.relatedTarget)||f&&Wr(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]]}function P(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!Gr([m,h],N)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}Gr([m,h],P([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var Jr={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},Yr=a((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":c(t),"--scrollarea-over-scroll-behavior":i}}}),Xr=t(e=>{let t=f(`ScrollArea`,Jr,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:m,onScrollPositionChange:g,children:_,offsetScrollbars:v,scrollbars:y,onBottomReached:b,onTopReached:C,onLeftReached:w,onRightReached:T,overscrollBehavior:E,startScrollPosition:D,verticalScrollbarPosition:O,attributes:k,...A}=t,[j,M]=(0,S.useState)(!1),[N,P]=(0,S.useState)(!1),[F,ee]=(0,S.useState)(!1),ne=(0,S.useRef)(!0),ie=(0,S.useRef)(!1),ae=(0,S.useRef)(!0),oe=(0,S.useRef)(!1),L=p({name:`ScrollArea`,props:t,classes:Ce,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:c,varsResolver:Yr}),se=(0,S.useRef)(null),[ce,le]=(0,S.useState)(null),ue=$n([m,se,(0,S.useCallback)(e=>{le(t=>t===e?t:e)},[])]);return I(v===`present`?ce:null,()=>{let e=se.current;e&&(P(e.scrollHeight>e.clientHeight),ee(e.scrollWidth>e.clientWidth))}),h(()=>{D&&se.current&&se.current.scrollTo({left:D.x??0,top:D.y??0})},[]),(0,x.jsxs)(re,{getStyles:L,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:y,...L(`root`),...A,children:[(0,x.jsx)(Se,{...d,...L(`viewport`,{style:d?.style}),ref:ue,"data-offset-scrollbars":v===!0?`xy`:v||void 0,"data-scrollbars":y||void 0,"data-vertical-scrollbar-position":O||void 0,"data-horizontal-hidden":v===`present`&&!F?`true`:void 0,"data-vertical-hidden":v===`present`&&!N?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),g?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!ie.current&&b?.(),c&&!ne.current&&C?.(),ie.current=s,ne.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!oe.current&&T?.(),u&&!ae.current&&w?.(),oe.current=l,ae.current=u},children:_}),(y===`xy`||y===`x`)&&(0,x.jsx)(ye,{...L(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":O||void 0,"data-hidden":l===`never`||v===`present`&&!F||void 0,forceMount:!0,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:(0,x.jsx)(xe,{...L(`thumb`)})}),(y===`xy`||y===`y`)&&(0,x.jsx)(ye,{...L(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":O||void 0,"data-hidden":l===`never`||v===`present`&&!N||void 0,forceMount:!0,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:(0,x.jsx)(xe,{...L(`thumb`)})}),(0,x.jsx)(te,{...L(`corner`),"data-vertical-scrollbar-position":O||void 0,"data-hovered":j||void 0,"data-hidden":l===`never`||void 0})]})});Xr.displayName=`@mantine/core/ScrollArea`;var Zr=t(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:p,variant:m,viewportProps:h,scrollbars:g,style:v,vars:y,onBottomReached:b,onTopReached:C,startScrollPosition:w,verticalScrollbarPosition:T,onOverflowChange:E,...D}=f(`ScrollAreaAutosize`,Jr,e),O=(0,S.useRef)(null),[k,A]=(0,S.useState)(null),j=$n([u,O,(0,S.useCallback)(e=>{A(t=>t===e?t:e)},[])]),M=(0,S.useRef)(!1),N=(0,S.useRef)(!1),P=(0,S.useEffectEvent)(()=>{let e=O.current;if(!e||!E)return;let t=e.scrollHeight>e.clientHeight;t!==M.current&&(N.current?E(t):(N.current=!0,t&&E(!0)),M.current=t)});return I(E?k:null,P),(0,x.jsx)(_,{...D,variant:m,style:[{display:`flex`,overflow:`hidden`},v],children:(0,x.jsx)(_,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...g===`y`&&{minWidth:0},...g===`x`&&{minHeight:0},...g===`xy`&&{minWidth:0,minHeight:0},...g===!1&&{minWidth:0,minHeight:0}},children:(0,x.jsx)(Xr,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:j,onScrollPositionChange:d,unstyled:p,variant:m,viewportProps:h,vars:y,scrollbars:g,onBottomReached:b,onTopReached:C,startScrollPosition:w,verticalScrollbarPosition:T,"data-autosize":`true`,children:t})})})});Xr.classes=Ce,Xr.varsResolver=Yr,Zr.displayName=`@mantine/core/ScrollAreaAutosize`,Zr.classes=Ce,Xr.Autosize=Zr;function Qr(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function $r(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var ei={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function ti({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function ni({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=ti({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[ei[c]]:r},d=-t/2;return c===`left`?{...u,...Qr(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...Qr(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...$r(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...$r(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function ri({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function ii({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=N();return a?(0,x.jsx)(`div`,{role:`presentation`,...l,style:{...c,...ni({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}ii.displayName=`@mantine/core/FloatingArrow`;function ai(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function oi(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}var si=null;function ci({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||oi(n):e;if(t){if(si){if(document.body.contains(si))return si;si=null}let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return si=e,e;let t=oi(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),si=t,t}return oi(n)}var li={reuseTargetNode:!0},ui=t(e=>{let{children:t,target:n,reuseTargetNode:r,ref:a,...o}=f(`Portal`,li,e),[s,c]=(0,S.useState)(!1),l=(0,S.useRef)(null);return h(()=>(c(!0),l.current=ci({target:n,reuseTargetNode:r,...o}),i(a,l.current),!n&&!r&&l.current&&document.body.appendChild(l.current),()=>{!n&&!r&&l.current&&document.body.removeChild(l.current)}),[n]),!s||!l.current?null:(0,b.createPortal)((0,x.jsx)(x.Fragment,{children:t}),l.current)});ui.displayName=`@mantine/core/Portal`;var di=t(({withinPortal:e=!0,children:t,...n})=>y()===`test`||!e?(0,x.jsx)(x.Fragment,{children:t}):(0,x.jsx)(ui,{...n,children:t}));di.displayName=`@mantine/core/OptionalPortal`;var fi={duration:100,transition:`fade`};function pi(e,t){return{...fi,...t,...e}}function mi({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,S.useState)(n),a=(0,S.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=Lr({placement:t,middleware:[Kn({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,S.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,S.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=He(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var hi={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},gi={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:E(`popover`)},_i=a((e,{radius:t,color:r})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:s(t),"--tooltip-bg":r?n(r,e):void 0,"--tooltip-color":r?`var(--mantine-color-white)`:void 0}})),vi=t(t=>{let n=f(`TooltipFloating`,gi,t),{children:i,refProp:a,withinPortal:o,style:s,className:c,classNames:l,styles:u,unstyled:d,radius:m,color:h,label:g,offset:v,position:y,multiline:b,zIndex:C,disabled:w,defaultOpened:T,variant:E,vars:D,portalProps:O,attributes:M,ref:N,...P}=n,F=r(),I=p({name:`TooltipFloating`,props:n,classes:hi,className:c,style:s,classNames:l,styles:u,unstyled:d,attributes:M,rootSelector:`tooltip`,vars:D,varsResolver:_i}),{handleMouseMove:ee,x:te,y:ne,opened:re,boundaryRef:ie,floating:ae,setOpened:oe}=mi({offset:v,position:y,defaultOpened:T}),L=A(i);if(!L)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let se=e(ie,k(L),N),ce=L.props,le=e=>{ce.onMouseEnter?.(e),ee(e),oe(!0)},ue=e=>{ce.onMouseLeave?.(e),oe(!1)};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(di,{...O,withinPortal:o,children:(0,x.jsx)(_,{...P,...I(`tooltip`,{style:{...j(s,F),zIndex:C,display:!w&&re?`block`:`none`,top:Number.isFinite(ne)?Math.round(ne):``,left:Number.isFinite(te)?Math.round(te):``}}),variant:E,ref:ae,mod:{multiline:b},children:g})}),(0,S.cloneElement)(L,{...ce,[a]:se,onMouseEnter:le,onMouseLeave:ue})]})});vi.classes=hi,vi.varsResolver=_i,vi.displayName=`@mantine/core/TooltipFloating`;var yi=(0,S.createContext)({withinGroup:!1}),bi={openDelay:0,closeDelay:0};function xi(e){let{openDelay:t,closeDelay:n,children:r}=f(`TooltipGroup`,bi,e);return(0,x.jsx)(yi,{value:{withinGroup:!0},children:(0,x.jsx)(Or,{delay:{open:t,close:n},children:r})})}xi.displayName=`@mantine/core/TooltipGroup`,xi.extend=e=>e;function Si(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Ci(e){let t=Si(e.middlewares),n=[Gn(e.offset)];return t.shift&&n.push(Kn(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?Jn():Jn(t.flip)),n.push(Qn({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?Zn():Zn(t.inline)):e.inline&&n.push(Zn()),n}function wi(e){let[t,n]=(0,S.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,S.use)(yi).withinGroup,a=l(),o=(0,S.useCallback)(e=>{n(e),e&&v(a)},[a]),{x:s,y:c,context:u,refs:d,placement:f,middlewareData:{arrow:{x:p,y:m}={}}}=Lr({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:Ci(e),whileElementsMounted:On}),{delay:g,currentId:_,setCurrentId:v}=kr(u,{id:a}),{getReferenceProps:y,getFloatingProps:b}=Vr([wr(u,{enabled:e.events?.hover,delay:i?g:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?qr():null}),zr(u,{enabled:e.events?.focus,visibleOnly:!0}),Ur(u,{role:`tooltip`}),Fr(u,{enabled:e.opened===void 0})]),x=(0,S.useRef)(f);h(()=>{x.current!==f&&(x.current=f,e.onPositionChange?.(f))},[f]);let C=r&&_&&_!==a;return{x:s,y:c,arrowX:p,arrowY:m,reference:d.setReference,floating:d.setFloating,getFloatingProps:b,getReferenceProps:y,isGroupPhase:C,opened:r,placement:f}}var Ti={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:E(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},Ei=a((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:s(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),Di=t(t=>{let n=f(`Tooltip`,Ti,t),{children:r,position:i,refProp:a,label:s,openDelay:c,closeDelay:l,onPositionChange:u,opened:d,defaultOpened:m,withinPortal:h,radius:v,color:y,classNames:b,styles:C,unstyled:w,style:T,className:E,withArrow:D,arrowSize:O,arrowOffset:j,arrowRadius:M,arrowPosition:P,offset:F,transitionProps:I,multiline:ee,events:te,interactive:ne,zIndex:re,disabled:ie,onClick:ae,onMouseEnter:oe,onMouseLeave:L,inline:se,variant:ce,keepMounted:le,vars:ue,portalProps:R,mod:de,floatingStrategy:fe,middlewares:pe,autoContrast:me,attributes:he,target:z,ref:ge,..._e}=n,{dir:ve}=N(),ye=(0,S.useRef)(null),B=wi({position:ai(ve,i),closeDelay:l,openDelay:c,onPositionChange:u,opened:d,defaultOpened:m,events:te,interactive:ne,arrowRef:ye,arrowOffset:j,offset:typeof F==`number`?F+(D?O/2:0):F,inline:se,strategy:fe,middlewares:pe});(0,S.useEffect)(()=>{let e=z instanceof HTMLElement?z:typeof z==`string`?document.querySelector(z):z?.current||null;e&&B.reference(e)},[z,B]);let be=p({name:`Tooltip`,props:n,classes:hi,className:E,style:T,classNames:b,styles:C,unstyled:w,attributes:he,rootSelector:`tooltip`,vars:ue,varsResolver:Ei}),xe=A(r);if(!z&&!xe)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let Se=be(`tooltip`),Ce=ne&&!ie&&!!B.opened,we=P===`merge`&&D?ri({position:B.placement,dir:ve}):void 0;if(z){let e=pi(I,{duration:100,transition:`fade`});return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(di,{...R,withinPortal:h,children:(0,x.jsx)(g,{...e,keepMounted:le,mounted:!ie&&!!B.opened,duration:B.isGroupPhase?10:e.duration,children:e=>(0,x.jsxs)(_,{..._e,"data-fixed":fe===`fixed`||void 0,variant:ce,mod:[{multiline:ee,interactive:Ce},de],...Se,...B.getFloatingProps({ref:B.floating,className:Se.className,style:{...Se.style,...e,...we,zIndex:re,top:B.y??0,left:B.x??0}}),children:[s,(0,x.jsx)(ii,{ref:ye,arrowX:B.arrowX,arrowY:B.arrowY,visible:D,position:B.placement,arrowSize:O,arrowOffset:j,arrowRadius:M,arrowPosition:P,...be(`arrow`)})]})})})})}let Te=xe.props,V=e(B.reference,k(xe),ge),H=pi(I,{duration:100,transition:`fade`});return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(di,{...R,withinPortal:h,children:(0,x.jsx)(g,{...H,keepMounted:le,mounted:!ie&&!!B.opened,duration:B.isGroupPhase?10:H.duration,children:e=>(0,x.jsxs)(_,{..._e,"data-fixed":fe===`fixed`||void 0,variant:ce,mod:[{multiline:ee,interactive:Ce},de],...B.getFloatingProps({ref:B.floating,className:be(`tooltip`).className,style:{...be(`tooltip`).style,...e,...we,zIndex:re,top:B.y??0,left:B.x??0}}),children:[s,(0,x.jsx)(ii,{ref:ye,arrowX:B.arrowX,arrowY:B.arrowY,visible:D,position:B.placement,arrowSize:O,arrowOffset:j,arrowRadius:M,arrowPosition:P,...be(`arrow`)})]})})}),(0,S.cloneElement)(xe,B.getReferenceProps({onClick:ae,onMouseEnter:oe,onMouseLeave:L,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...Te,className:o(E,Te.className),[a]:V}))]})});Di.classes=hi,Di.varsResolver=Ei,Di.displayName=`@mantine/core/Tooltip`,Di.Floating=vi,Di.Group=xi;export{E as C,k as S,C as T,Kn as _,ri as a,N as b,Lr as c,Qn as d,Jn as f,Gn as g,qn as h,ii as i,wr as l,Zn as m,di as n,Xr as o,Xn as p,ai as r,qr as s,Di as t,Vr as u,Yn as v,w,A as x,On as y}; \ No newline at end of file diff --git a/internal/ui/dist/assets/WarningCircle.es-hJZtxy-A.js b/internal/ui/dist/assets/WarningCircle.es-BNrNGQli.js similarity index 92% rename from internal/ui/dist/assets/WarningCircle.es-hJZtxy-A.js rename to internal/ui/dist/assets/WarningCircle.es-BNrNGQli.js index 4b4f7a8a..318b3fcd 100644 --- a/internal/ui/dist/assets/WarningCircle.es-hJZtxy-A.js +++ b/internal/ui/dist/assets/WarningCircle.es-BNrNGQli.js @@ -1 +1 @@ -import{St as e,a as t,gt as n}from"./brand-MzZ03bSa.js";import{O as r,T as i,_ as a,h as o,p as s,s as c,w as l,x as u}from"./api-D6Wt-jwp.js";var d=class extends o{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),l(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&a(t.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??c();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){s.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},f=e(n(),1);function p(e,t){let n=r(t),[a]=f.useState(()=>new d(n,e));f.useEffect(()=>{a.setOptions(e)},[a,e]);let o=f.useSyncExternalStore(f.useCallback(e=>a.subscribe(s.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=f.useCallback((...e)=>{a.mutate(e[0],e[1]).catch(u)},[a]);if(o.error&&i(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}var m=new Map([[`bold`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z`}))],[`duotone`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),f.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`fill`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z`}))],[`light`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z`}))],[`regular`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`thin`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z`}))]]),h=f.forwardRef((e,n)=>f.createElement(t,{ref:n,...e,weights:m}));h.displayName=`WarningCircleIcon`;var g=h;export{p as n,g as t}; \ No newline at end of file +import{a as e,gt as t,yt as n}from"./brand-CnsMBQCm.js";import{O as r,T as i,_ as a,h as o,p as s,s as c,w as l,x as u}from"./api-R4Y_TvpM.js";var d=class extends o{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),l(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&a(t.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??c();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){s.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},f=n(t(),1);function p(e,t){let n=r(t),[a]=f.useState(()=>new d(n,e));f.useEffect(()=>{a.setOptions(e)},[a,e]);let o=f.useSyncExternalStore(f.useCallback(e=>a.subscribe(s.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=f.useCallback((...e)=>{a.mutate(e[0],e[1]).catch(u)},[a]);if(o.error&&i(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}var m=new Map([[`bold`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z`}))],[`duotone`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),f.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`fill`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z`}))],[`light`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z`}))],[`regular`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`thin`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z`}))]]),h=f.forwardRef((t,n)=>f.createElement(e,{ref:n,...t,weights:m}));h.displayName=`WarningCircleIcon`;var g=h;export{p as n,g as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/api-D6Wt-jwp.js b/internal/ui/dist/assets/api-D6Wt-jwp.js deleted file mode 100644 index da72cb15..00000000 --- a/internal/ui/dist/assets/api-D6Wt-jwp.js +++ /dev/null @@ -1,41 +0,0 @@ -import{$ as e,C as t,S as n,St as r,U as i,X as a,Y as o,Z as s,at as c,ct as l,dt as u,et as d,g as f,gt as p,j as m,k as h,mt as g,ot as _,st as v,tt as y,v as b,x,y as S}from"./brand-MzZ03bSa.js";import{i as C}from"./auth-Co_9Gxq0.js";import{C as w,n as ee,o as te,w as ne,x as T}from"./Tooltip-BJiO7C_G.js";var E=r(p(),1);function re({opened:e,shouldReturnFocus:t=!0}){let n=(0,E.useRef)(null),r=()=>{n.current&&`focus`in n.current&&typeof n.current.focus==`function`&&n.current?.focus({preventScroll:!0})};return y(()=>{let i=-1,a=e=>{e.key===`Tab`&&window.clearTimeout(i)};if(document.addEventListener(`keydown`,a),e)n.current=document.activeElement;else if(t){let e=document.activeElement;i=window.setTimeout(()=>{let t=document.activeElement;(t===null||t===document.body||t===e)&&r()},10)}return()=>{window.clearTimeout(i),document.removeEventListener(`keydown`,a)}},[e,t]),r}var ie=/input|select|textarea|button|object/,ae=`a, input, select, textarea, button, object, [tabindex]`;function oe(e){return e.style.display===`none`}function se(e){if(e.getAttribute(`aria-hidden`)||e.getAttribute(`hidden`)||e.getAttribute(`type`)===`hidden`)return!1;let t=e;for(;t&&t!==document.body&&t.nodeType!==11;){if(oe(t))return!1;t=t.parentNode}return!0}function ce(e){let t=e.getAttribute(`tabindex`);return t===null&&(t=void 0),parseInt(t,10)}function le(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(ce(e));return(ie.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&se(e)}function ue(e){let t=ce(e);return(Number.isNaN(t)||t>=0)&&le(e)}function de(e){return Array.from(e.querySelectorAll(ae)).filter(ue)}function fe(e,t){let n=de(e);if(!n.length){t.preventDefault();return}let r=n[t.shiftKey?0:n.length-1],i=e.getRootNode(),a=r===i.activeElement||e===i.activeElement,o=i.activeElement;if(o.tagName===`INPUT`&&o.getAttribute(`type`)===`radio`&&(a=n.filter(e=>e.getAttribute(`type`)===`radio`&&e.getAttribute(`name`)===o.getAttribute(`name`)).includes(r)),!a)return;t.preventDefault();let s=n[t.shiftKey?n.length-1:0];s&&s.focus()}function pe(e=!0){let t=(0,E.useRef)(null),n=e=>{let t=e.querySelector(`[data-autofocus]`);if(!t){let n=Array.from(e.querySelectorAll(ae));t=n.find(ue)||n.find(le)||null,!t&&le(e)&&(t=e)}t?t.focus({preventScroll:!0}):console.warn(`[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node`,e)},r=(0,E.useCallback)(r=>{if(e){if(r===null){t.current=null;return}t.current!==r&&(setTimeout(()=>{r.getRootNode()?n(r):console.warn(`[@mantine/hooks/use-focus-trap] Ref node is not part of the dom`,r)}),t.current=r)}},[e]);return(0,E.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>{t.current&&n(t.current)});let r=e=>{e.key===`Tab`&&t.current&&fe(t.current,e)};return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[e]),r}function me(e,t,n){let r=(0,E.useEffectEvent)(t);(0,E.useEffect)(()=>(window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)),[e])}var D=g(),he={root:`m_515a97f8`},O=t(e=>{let t=m(`VisuallyHidden`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t;return(0,D.jsx)(x,{component:`span`,...h({name:`VisuallyHidden`,classes:he,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c})(`root`),...l})});O.classes=he,O.displayName=`@mantine/core/VisuallyHidden`;var ge={root:`m_9814e45f`},_e={zIndex:w(`modal`)},ve=a((e,{gradient:t,color:n,backgroundOpacity:r,blur:a,radius:o,zIndex:s})=>({root:{"--overlay-bg":t||(n!==void 0||r!==void 0)&&i(n||`#000`,r??.6)||void 0,"--overlay-filter":a?`blur(${u(a)})`:void 0,"--overlay-radius":o===void 0?void 0:c(o),"--overlay-z-index":s?.toString()}})),k=n(e=>{let t=m(`Overlay`,_e,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fixed:c,center:l,children:u,radius:d,zIndex:f,gradient:p,blur:g,color:_,backgroundOpacity:v,mod:y,attributes:b,...S}=t;return(0,D.jsx)(x,{...h({name:`Overlay`,props:t,classes:ge,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:ve})(`root`),mod:[{center:l,fixed:c},y],...S,children:u})});k.classes=ge,k.varsResolver=ve,k.displayName=`@mantine/core/Overlay`;function A({children:t,active:n=!0,refProp:r=`ref`,innerRef:i}){let a=e(pe(n),i),o=T(t);return o?(0,E.cloneElement)(o,{[r]:a}):t}function ye(e){return(0,D.jsx)(O,{tabIndex:-1,"data-autofocus":!0,...e})}A.displayName=`@mantine/core/FocusTrap`,ye.displayName=`@mantine/core/FocusTrapInitialFocus`,A.InitialFocus=ye;var[be,j]=ne(`ModalBase component was not found in tree`);function xe({opened:e,transitionDuration:t}){let[n,r]=(0,E.useState)(e),i=(0,E.useRef)(-1),a=s()?0:t;return(0,E.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function Se({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:o}){let s=d(e),[c,l]=(0,E.useState)(!1),[u,f]=(0,E.useState)(!1),p=xe({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return me(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&a()},{capture:!0}),re({opened:n,shouldReturnFocus:r&&o}),{_id:s,titleMounted:c,bodyMounted:u,shouldLockScroll:p,setTitleMounted:l,setBodyMounted:f}}var M=function(){return M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n`u`)return Xe;var t=Qe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},et=Ye(),P=`data-scroll-locked`,tt=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` - .${Ee} { - overflow: hidden ${r}; - padding-right: ${s}px ${r}; - } - body[${P}] { - overflow: hidden ${r}; - overscroll-behavior: contain; - ${[t&&`position: relative ${r};`,n===`margin`&&` - padding-left: ${i}px; - padding-top: ${a}px; - padding-right: ${o}px; - margin-left:0; - margin-top:0; - margin-right: ${s}px ${r}; - `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} - } - - .${N} { - right: ${s}px ${r}; - } - - .${Te} { - margin-right: ${s}px ${r}; - } - - .${N} .${N} { - right: 0 ${r}; - } - - .${Te} .${Te} { - margin-right: 0 ${r}; - } - - body[${P}] { - ${De}: ${s}px; - } -`},nt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},rt=function(){E.useEffect(function(){return document.body.setAttribute(P,(nt()+1).toString()),function(){var e=nt()-1;e<=0?document.body.removeAttribute(P):document.body.setAttribute(P,e.toString())}},[])},it=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;rt();var a=E.useMemo(function(){return $e(i)},[i]);return E.createElement(et,{styles:tt(a,!t,i,n?``:`!important`)})},at=!1;if(typeof window<`u`)try{var F=Object.defineProperty({},"passive",{get:function(){return at=!0,!0}});window.addEventListener(`test`,F,F),window.removeEventListener(`test`,F,F)}catch{at=!1}var I=at?{passive:!1}:!1,ot=function(e){return e.tagName===`TEXTAREA`},st=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ot(e)&&n[t]===`visible`)},ct=function(e){return st(e,`overflowY`)},lt=function(e){return st(e,`overflowX`)},ut=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),pt(e,r)){var i=mt(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dt=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},ft=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},pt=function(e,t){return e===`v`?ct(t):lt(t)},mt=function(e,t){return e===`v`?dt(t):ft(t)},ht=function(e,t){return e===`h`&&t===`rtl`?-1:1},gt=function(e,t,n,r,i){var a=ht(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=mt(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&pt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},L=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_t=function(e){return[e.deltaX,e.deltaY]},vt=function(e){return e&&`current`in e?e.current:e},yt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},bt=function(e){return` - .block-interactivity-${e} {pointer-events: none;} - .allow-interactivity-${e} {pointer-events: all;} -`},xt=0,R=[];function St(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(xt++)[0],a=E.useState(Ye)[0],o=E.useRef(e);E.useEffect(function(){o.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=we([e.lockRef.current],(e.shards||[]).map(vt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=E.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=L(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ut(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ut(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return gt(h,t,e,h===`h`?s:c,!0)},[]),c=E.useCallback(function(e){var n=e;if(R.length&&R[R.length-1]===a){var r=`deltaY`in n?_t(n):L(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&yt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(vt).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=E.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ct(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=E.useCallback(function(e){n.current=L(e),r.current=void 0},[]),d=E.useCallback(function(t){l(t.type,_t(t),t.target,s(t,e.lockRef.current))},[]),f=E.useCallback(function(t){l(t.type,L(t),t.target,s(t,e.lockRef.current))},[]);E.useEffect(function(){return R.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,I),document.addEventListener(`touchmove`,c,I),document.addEventListener(`touchstart`,u,I),function(){R=R.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,I),document.removeEventListener(`touchmove`,c,I),document.removeEventListener(`touchstart`,u,I)}},[]);var p=e.removeScrollBar,m=e.inert;return E.createElement(E.Fragment,null,m?E.createElement(a,{styles:bt(i)}):null,p?E.createElement(it,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ct(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var wt=ze(Be,St),Tt=E.forwardRef(function(e,t){return E.createElement(He,M({},e,{ref:t,sideCar:wt}))});Tt.classNames=He.classNames;function Et({keepMounted:e,keepMountedMode:t=`activity`,opened:n,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:o,onEnterTransitionEnd:s,trapFocus:c,closeOnEscape:u,returnFocus:d,closeOnClickOutside:f,withinPortal:p,portalProps:m,lockScroll:h,children:g,zIndex:v,shadow:y,padding:b,__vars:S,unstyled:C,removeScrollProps:te,...ne}){let{_id:T,titleMounted:E,bodyMounted:re,shouldLockScroll:ie,setTitleMounted:ae,setBodyMounted:oe}=Se({id:i,transitionProps:a,opened:n,trapFocus:c,closeOnEscape:u,onClose:r,returnFocus:d}),{key:se,...ce}=te||{};return(0,D.jsx)(ee,{...m,withinPortal:p,children:(0,D.jsx)(be,{value:{opened:n,onClose:r,closeOnClickOutside:f,onExitTransitionEnd:o,onEnterTransitionEnd:s,transitionProps:{...a,keepMounted:e,keepMountedMode:t},getTitleId:()=>`${T}-title`,getBodyId:()=>`${T}-body`,titleMounted:E,bodyMounted:re,setTitleMounted:ae,setBodyMounted:oe,trapFocus:c,closeOnEscape:u,zIndex:v,unstyled:C},children:(0,D.jsx)(Tt,{enabled:ie&&h,...ce,children:(0,D.jsx)(x,{...ne,id:T,__vars:{...S,"--mb-z-index":(v||w(`modal`)).toString(),"--mb-shadow":_(y),"--mb-padding":l(b)},children:g})},se)})})}Et.displayName=`@mantine/core/ModalBase`;function Dt(){let e=j();return(0,E.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var z={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function Ot({className:e,...t}){let n=Dt(),r=j();return(0,D.jsx)(x,{id:n,className:o({[z.body]:!r.unstyled},e),...t})}Ot.displayName=`@mantine/core/ModalBaseBody`;function kt({className:e,onClick:t,...n}){let r=j();return(0,D.jsx)(f,{...n,onClick:e=>{r.onClose(),t?.(e)},className:o({[z.close]:!r.unstyled},e),unstyled:r.unstyled})}kt.displayName=`@mantine/core/ModalBaseCloseButton`;function At({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...s}){let c=j();return(0,D.jsx)(b,{mounted:c.opened,transition:`pop`,...c.transitionProps,onExited:()=>{c.onExitTransitionEnd?.(),c.transitionProps?.onExited?.()},onEntered:()=>{c.onEnterTransitionEnd?.(),c.transitionProps?.onEntered?.()},...e,children:e=>(0,D.jsx)(`div`,{...n,className:o({[z.inner]:!c.unstyled},n.className),children:(0,D.jsx)(A,{active:c.opened&&c.trapFocus,innerRef:a,children:(0,D.jsx)(S,{...s,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":c.bodyMounted?c.getBodyId():void 0,"aria-labelledby":c.titleMounted?c.getTitleId():void 0,style:[i,e],className:o({[z.content]:!c.unstyled},t),unstyled:c.unstyled,children:s.children})})})})}At.displayName=`@mantine/core/ModalBaseContent`;function jt({className:e,...t}){let n=j();return(0,D.jsx)(x,{component:`header`,className:o({[z.header]:!n.unstyled},e),...t})}jt.displayName=`@mantine/core/ModalBaseHeader`;var Mt={duration:200,timingFunction:`ease`,transition:`fade`};function Nt(e){let t=j();return{...Mt,...t.transitionProps,...e}}function Pt({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=j(),o=Nt(t);return(0,D.jsx)(b,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,D.jsx)(k,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}Pt.displayName=`@mantine/core/ModalBaseOverlay`;function Ft(){let e=j();return(0,E.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function It({className:e,...t}){let n=Ft(),r=j();return(0,D.jsx)(x,{component:`h2`,className:o({[z.title]:!r.unstyled},e),id:n,...t})}It.displayName=`@mantine/core/ModalBaseTitle`;function Lt({children:e}){return(0,D.jsx)(D.Fragment,{children:e})}var[Rt,B]=ne(`Modal component was not found in tree`),V={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},H=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=m(`ModalBody`,null,e);return(0,D.jsx)(Ot,{...B().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});H.classes=V,H.displayName=`@mantine/core/ModalBody`;var U=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=m(`ModalCloseButton`,null,e);return(0,D.jsx)(kt,{...B().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});U.classes=V,U.displayName=`@mantine/core/ModalCloseButton`;var W=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=m(`ModalContent`,null,e),l=B(),d=l.scrollAreaComponent||Lt;return(0,D.jsx)(At,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,D.jsx)(d,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${u(l.yOffset)} * 2))`},children:o})})});W.classes=V,W.displayName=`@mantine/core/ModalContent`;var G=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=m(`ModalHeader`,null,e);return(0,D.jsx)(jt,{...B().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});G.classes=V,G.displayName=`@mantine/core/ModalHeader`;var K=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=m(`ModalOverlay`,null,e);return(0,D.jsx)(Pt,{...B().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});K.classes=V,K.displayName=`@mantine/core/ModalOverlay`;var zt={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:w(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},Bt=a((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:c(t),"--modal-size":v(n,`modal-size`),"--modal-y-offset":u(r),"--modal-x-offset":u(i)}})),q=t(e=>{let t=m(`ModalRoot`,zt,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:g,attributes:_,...v}=t,y=h({name:g,classes:V,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:_,vars:s,varsResolver:Bt});return(0,D.jsx)(Rt,{value:{yOffset:c,scrollAreaComponent:l,getStyles:y,fullScreen:d},children:(0,D.jsx)(Et,{...y(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===te.Autosize||void 0,unstyled:o,...v})})});q.classes=V,q.varsResolver=Bt,q.displayName=`@mantine/core/ModalRoot`;var Vt=(0,E.createContext)(null);function Ht({children:e}){let[t,n]=(0,E.useState)([]),[r,i]=(0,E.useState)(w(`modal`));return(0,D.jsx)(Vt,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Ht.displayName=`@mantine/core/ModalStack`;var Ut=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=m(`ModalTitle`,null,e);return(0,D.jsx)(It,{...B().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});Ut.classes=V,Ut.displayName=`@mantine/core/ModalTitle`;var Wt={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:w(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},J=t(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=m(`Modal`,Wt,e),f=(0,E.use)(Vt),p=!!t||i,h=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l)}:{},g=n===!1?!1:l&&f?f.currentId===l:c;return(0,E.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||w(`modal`)):f.removeModal(l))},[c,l,u]),(0,D.jsxs)(q,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...h,children:[n&&(0,D.jsx)(K,{visible:g,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,D.jsxs)(W,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,D.jsxs)(G,{children:[t&&(0,D.jsx)(Ut,{children:t}),i&&(0,D.jsx)(U,{...a})]}),(0,D.jsx)(H,{children:o})]})]})});J.classes=V,J.displayName=`@mantine/core/Modal`,J.Root=q,J.Overlay=K,J.Content=W,J.Body=H,J.Header=G,J.Title=Ut,J.CloseButton=U,J.Stack=Ht;var Gt=E.createContext(void 0),Kt=e=>{let t=E.useContext(Gt);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},qt=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,D.jsx)(Gt.Provider,{value:e,children:t})),Jt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Y=new class{#e=Jt;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Yt(e){setTimeout(e,0)}var Xt=typeof window>`u`||`Deno`in globalThis;function X(){}function Zt(e,t){return typeof e==`function`?e(t):e}function Qt(e){return typeof e==`number`&&e>=0&&e!==1/0}function $t(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Z(e,t){return typeof e==`function`?e(t):e}function en(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==nn(o,t.options))return!1}else if(!Q(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function tn(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(rn(t.options.mutationKey)!==rn(a))return!1}else if(!Q(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function nn(e,t){return(t?.queryKeyHashFn||rn)(e)}function rn(e){return JSON.stringify(e,(e,t)=>ln(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Q(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n500)return t;let r=cn(e)&&cn(t);if(!r&&!(ln(e)&&ln(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l{Y.setTimeout(t,e)})}function fn(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:on(e,t)}function pn(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function mn(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var hn=Symbol();function gn(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===hn?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _n(e,t){return typeof e==`function`?e(...t):!!e}function vn(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var yn=()=>Xt,bn=()=>yn(),xn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Sn=new class extends xn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Cn=Yt;function wn(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Cn,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var $=wn(),Tn=new class extends xn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function En(e){return Math.min(1e3*2**e,3e4)}function Dn(e){return(e??`online`)!==`online`||Tn.isOnline()}var On=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function kn(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(X);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new On(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Sn.isFocused()&&(e.networkMode===`always`||Tn.isOnline())&&e.canRun(),p=()=>Dn(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(bn()?0:3),a=e.retryDelay??En,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&nf()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var An=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qt(this.gcTime)&&(this.#e=Y.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bn()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Y.clearTimeout(this.#e),this.#e=void 0)}};function jn(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{vn(e,()=>t.signal,()=>n=!0)},u=gn(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?mn:pn;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Nn:Mn,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Mn(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(ct.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Mn(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Nn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Pn(e,t){return t?Mn(e,t)!=null:!1}function Fn(e,t){return!t||!e.getPreviousPageParam?!1:Nn(e,t)!=null}var In=class extends An{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=zn(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=zn(this.options);e.data!==void 0&&(this.setState(Rn(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=fn(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(X).catch(X):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Z(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===hn||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Z(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!$t(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=gn(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?jn(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=kn({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof On&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof On){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ln(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Rn(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),$.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ln(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Dn(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Rn(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function zn(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Bn=class extends xn{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Hn(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Un(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Un(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Z(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!sn(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Wn(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Z(this.options.enabled,this.#t)!==Z(t.enabled,this.#t)||Z(this.options.staleTime,this.#t)!==Z(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Z(this.options.enabled,this.#t)!==Z(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return sn(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(X)),t}#h(e){return!bn()&&Z(this.options.enabled,this.#t)!==!1&&Qt(e)}#g(){this.#b();let e=Z(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=$t(this.#r.dataUpdatedAt,e)+1;this.#u=Y.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=Y.setInterval(()=>{(this.options.refetchIntervalInBackground||Sn.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(Y.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(Y.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Hn(e,t),o=i&&Wn(e,n,t,r);(a||o)&&(l={...l,...Ln(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=fn(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=fn(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Gn(e,t),refetch:this.refetch,isEnabled:Z(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),sn(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();$.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Vn(e,t){return Z(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Z(t.retryOnMount,e)!==!1)}function Hn(e,t){return Vn(e,t)||e.state.data!==void 0&&Un(e,t,t.refetchOnMount)}function Un(e,t,n){if(Z(t.enabled,e)!==!1&&Z(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Gn(e,t)}return!1}function Wn(e,t,n,r){return(e!==t||Z(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Gn(e,n)}function Gn(e,t){return Z(t.enabled,e)!==!1&&e.isStaleByTime(Z(t.staleTime,e))}var Kn=class extends An{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||qn(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=kn({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),$.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function qn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Jn=E.createContext(!1),Yn=()=>E.useContext(Jn);Jn.Provider;function Xn(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Zn=E.createContext(Xn()),Qn=()=>E.useContext(Zn),$n=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?_n(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},er=e=>{E.useEffect(()=>{e.clearReset()},[e])},tr=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||_n(n,[e.error,r])),nr=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},rr=(e,t)=>e?.suspense&&t.isPending,ir=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ar(e,t,n){let r=Yn(),i=Qn(),a=Kt(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,nr(o),$n(o,i,s),er(i);let[l]=E.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(E.useSyncExternalStore(E.useCallback(e=>{let t=d?l.subscribe($.batchCalls(e)):X;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),E.useEffect(()=>{l.setOptions(o)},[o,l]),rr(o,u))throw ir(o,l,i);if(tr({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function or(e,t){return ar(e,Bn,t)}var sr=[`dashboards`],cr=[`agent-threads`];async function lr(e){let t=await C(e);if(!t.ok)throw Error(`Request failed (${t.status})`);return t.json()}export{Lt as A,k as B,Z as C,qt as D,hn as E,kt as F,me as H,Ot as I,Et as L,Pt as M,jt as N,Kt as O,At as P,Tt as R,Q as S,_n as T,re as U,O as V,rn as _,ar as a,en as b,Bn as c,Fn as d,Tn as f,Zt as g,xn as h,or as i,It as j,J as k,In as l,Sn as m,lr as n,Kn as o,$ as p,cr as r,qn as s,sr as t,Pn as u,nn as v,sn as w,X as x,tn as y,A as z}; \ No newline at end of file diff --git a/internal/ui/dist/assets/api-R4Y_TvpM.js b/internal/ui/dist/assets/api-R4Y_TvpM.js new file mode 100644 index 00000000..07d8db52 --- /dev/null +++ b/internal/ui/dist/assets/api-R4Y_TvpM.js @@ -0,0 +1,41 @@ +import{$ as e,C as t,S as n,U as r,X as i,Y as a,Z as o,at as s,ct as c,dt as l,et as u,g as d,gt as f,j as p,k as m,mt as h,ot as g,st as _,tt as v,v as y,x as b,y as x,yt as S}from"./brand-CnsMBQCm.js";import{i as C}from"./auth-DmDDao4N.js";import{C as w,n as ee,o as te,w as ne,x as re}from"./Tooltip-DTTsbr27.js";var T=S(f(),1);function ie({opened:e,shouldReturnFocus:t=!0}){let n=(0,T.useRef)(null),r=()=>{n.current&&`focus`in n.current&&typeof n.current.focus==`function`&&n.current?.focus({preventScroll:!0})};return v(()=>{let i=-1,a=e=>{e.key===`Tab`&&window.clearTimeout(i)};if(document.addEventListener(`keydown`,a),e)n.current=document.activeElement;else if(t){let e=document.activeElement;i=window.setTimeout(()=>{let t=document.activeElement;(t===null||t===document.body||t===e)&&r()},10)}return()=>{window.clearTimeout(i),document.removeEventListener(`keydown`,a)}},[e,t]),r}var ae=/input|select|textarea|button|object/,oe=`a, input, select, textarea, button, object, [tabindex]`;function se(e){return e.style.display===`none`}function ce(e){if(e.getAttribute(`aria-hidden`)||e.getAttribute(`hidden`)||e.getAttribute(`type`)===`hidden`)return!1;let t=e;for(;t&&t!==document.body&&t.nodeType!==11;){if(se(t))return!1;t=t.parentNode}return!0}function le(e){let t=e.getAttribute(`tabindex`);return t===null&&(t=void 0),parseInt(t,10)}function E(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(le(e));return(ae.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&ce(e)}function ue(e){let t=le(e);return(Number.isNaN(t)||t>=0)&&E(e)}function de(e){return Array.from(e.querySelectorAll(oe)).filter(ue)}function fe(e,t){let n=de(e);if(!n.length){t.preventDefault();return}let r=n[t.shiftKey?0:n.length-1],i=e.getRootNode(),a=r===i.activeElement||e===i.activeElement,o=i.activeElement;if(o.tagName===`INPUT`&&o.getAttribute(`type`)===`radio`&&(a=n.filter(e=>e.getAttribute(`type`)===`radio`&&e.getAttribute(`name`)===o.getAttribute(`name`)).includes(r)),!a)return;t.preventDefault();let s=n[t.shiftKey?n.length-1:0];s&&s.focus()}function pe(e=!0){let t=(0,T.useRef)(null),n=e=>{let t=e.querySelector(`[data-autofocus]`);if(!t){let n=Array.from(e.querySelectorAll(oe));t=n.find(ue)||n.find(E)||null,!t&&E(e)&&(t=e)}t?t.focus({preventScroll:!0}):console.warn(`[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node`,e)},r=(0,T.useCallback)(r=>{if(e){if(r===null){t.current=null;return}t.current!==r&&(setTimeout(()=>{r.getRootNode()?n(r):console.warn(`[@mantine/hooks/use-focus-trap] Ref node is not part of the dom`,r)}),t.current=r)}},[e]);return(0,T.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>{t.current&&n(t.current)});let r=e=>{e.key===`Tab`&&t.current&&fe(t.current,e)};return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[e]),r}function me(e,t,n){let r=(0,T.useEffectEvent)(t);(0,T.useEffect)(()=>(window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)),[e])}var D=h(),he={root:`m_515a97f8`},O=t(e=>{let t=p(`VisuallyHidden`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t,u=m({name:`VisuallyHidden`,classes:he,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c});return(0,D.jsx)(b,{component:`span`,...u(`root`),...l})});O.classes=he,O.displayName=`@mantine/core/VisuallyHidden`;var ge={root:`m_9814e45f`},_e={zIndex:w(`modal`)},ve=i((e,{gradient:t,color:n,backgroundOpacity:i,blur:a,radius:o,zIndex:c})=>({root:{"--overlay-bg":t||(n!==void 0||i!==void 0)&&r(n||`#000`,i??.6)||void 0,"--overlay-filter":a?`blur(${l(a)})`:void 0,"--overlay-radius":o===void 0?void 0:s(o),"--overlay-z-index":c?.toString()}})),k=n(e=>{let t=p(`Overlay`,_e,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fixed:c,center:l,children:u,radius:d,zIndex:f,gradient:h,blur:g,color:_,backgroundOpacity:v,mod:y,attributes:x,...S}=t,C=m({name:`Overlay`,props:t,classes:ge,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:x,vars:s,varsResolver:ve});return(0,D.jsx)(b,{...C(`root`),mod:[{center:l,fixed:c},y],...S,children:u})});k.classes=ge,k.varsResolver=ve,k.displayName=`@mantine/core/Overlay`;function A({children:t,active:n=!0,refProp:r=`ref`,innerRef:i}){let a=pe(n),o=e(a,i),s=re(t);return s?(0,T.cloneElement)(s,{[r]:o}):t}function ye(e){return(0,D.jsx)(O,{tabIndex:-1,"data-autofocus":!0,...e})}A.displayName=`@mantine/core/FocusTrap`,ye.displayName=`@mantine/core/FocusTrapInitialFocus`,A.InitialFocus=ye;var[be,j]=ne(`ModalBase component was not found in tree`);function xe({opened:e,transitionDuration:t}){let[n,r]=(0,T.useState)(e),i=(0,T.useRef)(-1),a=o()?0:t;return(0,T.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function Se({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:o,handledEscapeEvents:s}){let c=u(e),[l,d]=(0,T.useState)(!1),[f,p]=(0,T.useState)(!1),m=xe({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return me(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&!s?.has(e)&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&(s?.add(e),a())},{capture:!0}),ie({opened:n,shouldReturnFocus:r&&o}),{_id:c,titleMounted:l,bodyMounted:f,shouldLockScroll:m,setTitleMounted:d,setBodyMounted:p}}var M=function(){return M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n`u`)return Ze;var t=$e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},tt=Xe(),N=`data-scroll-locked`,nt=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` + .${De} { + overflow: hidden ${r}; + padding-right: ${s}px ${r}; + } + body[${N}] { + overflow: hidden ${r}; + overscroll-behavior: contain; + ${[t&&`position: relative ${r};`,n===`margin`&&` + padding-left: ${i}px; + padding-top: ${a}px; + padding-right: ${o}px; + margin-left:0; + margin-top:0; + margin-right: ${s}px ${r}; + `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} + } + + .${Te} { + right: ${s}px ${r}; + } + + .${Ee} { + margin-right: ${s}px ${r}; + } + + .${Te} .${Te} { + right: 0 ${r}; + } + + .${Ee} .${Ee} { + margin-right: 0 ${r}; + } + + body[${N}] { + ${Oe}: ${s}px; + } +`},rt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},it=function(){T.useEffect(function(){return document.body.setAttribute(N,(rt()+1).toString()),function(){var e=rt()-1;e<=0?document.body.removeAttribute(N):document.body.setAttribute(N,e.toString())}},[])},at=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;it();var a=T.useMemo(function(){return et(i)},[i]);return T.createElement(tt,{styles:nt(a,!t,i,n?``:`!important`)})},ot=!1;if(typeof window<`u`)try{var P=Object.defineProperty({},"passive",{get:function(){return ot=!0,!0}});window.addEventListener(`test`,P,P),window.removeEventListener(`test`,P,P)}catch{ot=!1}var F=ot?{passive:!1}:!1,st=function(e){return e.tagName===`TEXTAREA`},ct=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!st(e)&&n[t]===`visible`)},lt=function(e){return ct(e,`overflowY`)},ut=function(e){return ct(e,`overflowX`)},dt=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),mt(e,r)){var i=ht(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ft=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},pt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},mt=function(e,t){return e===`v`?lt(t):ut(t)},ht=function(e,t){return e===`v`?ft(t):pt(t)},gt=function(e,t){return e===`h`&&t===`rtl`?-1:1},_t=function(e,t,n,r,i){var a=gt(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=ht(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&mt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},I=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vt=function(e){return[e.deltaX,e.deltaY]},yt=function(e){return e&&`current`in e?e.current:e},bt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xt=function(e){return` + .block-interactivity-${e} {pointer-events: none;} + .allow-interactivity-${e} {pointer-events: all;} +`},St=0,L=[];function Ct(e){var t=T.useRef([]),n=T.useRef([0,0]),r=T.useRef(),i=T.useState(St++)[0],a=T.useState(Xe)[0],o=T.useRef(e);T.useEffect(function(){o.current=e},[e]),T.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=we([e.lockRef.current],(e.shards||[]).map(yt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=T.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=I(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=dt(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=dt(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return _t(h,t,e,h===`h`?s:c,!0)},[]),c=T.useCallback(function(e){var n=e;if(L.length&&L[L.length-1]===a){var r=`deltaY`in n?vt(n):I(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&bt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(yt).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=T.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:wt(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=T.useCallback(function(e){n.current=I(e),r.current=void 0},[]),d=T.useCallback(function(t){l(t.type,vt(t),t.target,s(t,e.lockRef.current))},[]),f=T.useCallback(function(t){l(t.type,I(t),t.target,s(t,e.lockRef.current))},[]);T.useEffect(function(){return L.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,F),document.addEventListener(`touchmove`,c,F),document.addEventListener(`touchstart`,u,F),function(){L=L.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,F),document.removeEventListener(`touchmove`,c,F),document.removeEventListener(`touchstart`,u,F)}},[]);var p=e.removeScrollBar,m=e.inert;return T.createElement(T.Fragment,null,m?T.createElement(a,{styles:xt(i)}):null,p?T.createElement(at,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function wt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Tt=Be(Ve,Ct),Et=T.forwardRef(function(e,t){return T.createElement(Ue,M({},e,{ref:t,sideCar:Tt}))});Et.classNames=Ue.classNames;function Dt({keepMounted:e,keepMountedMode:t=`activity`,opened:n,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:o,onEnterTransitionEnd:s,trapFocus:l,closeOnEscape:u,returnFocus:d,closeOnClickOutside:f,withinPortal:p,portalProps:m,lockScroll:h,children:_,zIndex:v,shadow:y,padding:x,__vars:S,unstyled:C,removeScrollProps:te,__handledEscapeEvents:ne,...re}){let{_id:T,titleMounted:ie,bodyMounted:ae,shouldLockScroll:oe,setTitleMounted:se,setBodyMounted:ce}=Se({id:i,transitionProps:a,opened:n,trapFocus:l,closeOnEscape:u,onClose:r,returnFocus:d,handledEscapeEvents:ne}),{key:le,...E}=te||{};return(0,D.jsx)(ee,{...m,withinPortal:p,children:(0,D.jsx)(be,{value:{opened:n,onClose:r,closeOnClickOutside:f,onExitTransitionEnd:o,onEnterTransitionEnd:s,transitionProps:{...a,keepMounted:e,keepMountedMode:t},getTitleId:()=>`${T}-title`,getBodyId:()=>`${T}-body`,titleMounted:ie,bodyMounted:ae,setTitleMounted:se,setBodyMounted:ce,trapFocus:l,closeOnEscape:u,zIndex:v,unstyled:C},children:(0,D.jsx)(Et,{enabled:oe&&h,...E,children:(0,D.jsx)(b,{...re,id:T,__vars:{...S,"--mb-z-index":(v||w(`modal`)).toString(),"--mb-shadow":g(y),"--mb-padding":c(x)},children:_})},le)})})}Dt.displayName=`@mantine/core/ModalBase`;function Ot(){let e=j();return(0,T.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var R={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function kt({className:e,...t}){let n=Ot(),r=j();return(0,D.jsx)(b,{id:n,className:a({[R.body]:!r.unstyled},e),...t})}kt.displayName=`@mantine/core/ModalBaseBody`;function At({className:e,onClick:t,...n}){let r=j();return(0,D.jsx)(d,{...n,onClick:e=>{r.onClose(),t?.(e)},className:a({[R.close]:!r.unstyled},e),unstyled:r.unstyled})}At.displayName=`@mantine/core/ModalBaseCloseButton`;function jt({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:o,...s}){let c=j();return(0,D.jsx)(y,{mounted:c.opened,transition:`pop`,...c.transitionProps,onExited:()=>{c.onExitTransitionEnd?.(),c.transitionProps?.onExited?.()},onEntered:()=>{c.onEnterTransitionEnd?.(),c.transitionProps?.onEntered?.()},...e,children:e=>(0,D.jsx)(`div`,{...n,className:a({[R.inner]:!c.unstyled},n.className),children:(0,D.jsx)(A,{active:c.opened&&c.trapFocus,innerRef:o,children:(0,D.jsx)(x,{...s,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":c.bodyMounted?c.getBodyId():void 0,"aria-labelledby":c.titleMounted?c.getTitleId():void 0,style:[i,e],className:a({[R.content]:!c.unstyled},t),unstyled:c.unstyled,children:s.children})})})})}jt.displayName=`@mantine/core/ModalBaseContent`;function Mt({className:e,...t}){let n=j();return(0,D.jsx)(b,{component:`header`,className:a({[R.header]:!n.unstyled},e),...t})}Mt.displayName=`@mantine/core/ModalBaseHeader`;var Nt={duration:200,timingFunction:`ease`,transition:`fade`};function Pt(e){let t=j();return{...Nt,...t.transitionProps,...e}}function Ft({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=j(),o=Pt(t);return(0,D.jsx)(y,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,D.jsx)(k,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}Ft.displayName=`@mantine/core/ModalBaseOverlay`;function It(){let e=j();return(0,T.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function Lt({className:e,...t}){let n=It(),r=j();return(0,D.jsx)(b,{component:`h2`,className:a({[R.title]:!r.unstyled},e),id:n,...t})}Lt.displayName=`@mantine/core/ModalBaseTitle`;function Rt({children:e}){return(0,D.jsx)(D.Fragment,{children:e})}var[zt,z]=ne(`Modal component was not found in tree`),B={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},V=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=p(`ModalBody`,null,e),s=z();return(0,D.jsx)(kt,{...s.getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});V.classes=B,V.displayName=`@mantine/core/ModalBody`;var H=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=p(`ModalCloseButton`,null,e),s=z();return(0,D.jsx)(At,{...s.getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});H.classes=B,H.displayName=`@mantine/core/ModalCloseButton`;var U=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=p(`ModalContent`,null,e),u=z(),d=u.scrollAreaComponent||Rt;return(0,D.jsx)(jt,{...u.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:u.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,D.jsx)(d,{style:{maxHeight:u.fullScreen?`100dvh`:`calc(100dvh - (${l(u.yOffset)} * 2))`},children:o})})});U.classes=B,U.displayName=`@mantine/core/ModalContent`;var W=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=p(`ModalHeader`,null,e),s=z();return(0,D.jsx)(Mt,{...s.getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});W.classes=B,W.displayName=`@mantine/core/ModalHeader`;var G=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=p(`ModalOverlay`,null,e),s=z();return(0,D.jsx)(Ft,{...s.getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});G.classes=B,G.displayName=`@mantine/core/ModalOverlay`;var Bt={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:w(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},Vt=i((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:s(t),"--modal-size":_(n,`modal-size`),"--modal-y-offset":l(r),"--modal-x-offset":l(i)}})),K=t(e=>{let t=p(`ModalRoot`,Bt,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:h,__staticSelector:g,attributes:_,...v}=t,y=m({name:g,classes:B,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:_,vars:s,varsResolver:Vt});return(0,D.jsx)(zt,{value:{yOffset:c,scrollAreaComponent:l,getStyles:y,fullScreen:d},children:(0,D.jsx)(Dt,{...y(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===te.Autosize||void 0,unstyled:o,...v})})});K.classes=B,K.varsResolver=Vt,K.displayName=`@mantine/core/ModalRoot`;var Ht=(0,T.createContext)(null);function Ut({children:e}){let[t,n]=(0,T.useState)([]),[r,i]=(0,T.useState)(w(`modal`)),[a]=(0,T.useState)(()=>new WeakSet);return(0,D.jsx)(Ht,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r,handledEscapeEvents:a},children:e})}Ut.displayName=`@mantine/core/ModalStack`;var q=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=p(`ModalTitle`,null,e),s=z();return(0,D.jsx)(Lt,{...s.getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});q.classes=B,q.displayName=`@mantine/core/ModalTitle`;var Wt={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:w(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},J=t(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=p(`Modal`,Wt,e),f=(0,T.use)(Ht),m=!!t||i,h=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l),__handledEscapeEvents:f.handledEscapeEvents}:{},g=n===!1?!1:l&&f?f.currentId===l:c;return(0,T.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||w(`modal`)):f.removeModal(l))},[c,l,u]),(0,D.jsxs)(K,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...h,children:[n&&(0,D.jsx)(G,{visible:g,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,D.jsxs)(U,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[m&&(0,D.jsxs)(W,{children:[t&&(0,D.jsx)(q,{children:t}),i&&(0,D.jsx)(H,{...a})]}),(0,D.jsx)(V,{children:o})]})]})});J.classes=B,J.displayName=`@mantine/core/Modal`,J.Root=K,J.Overlay=G,J.Content=U,J.Body=V,J.Header=W,J.Title=q,J.CloseButton=H,J.Stack=Ut;var Gt=T.createContext(void 0),Kt=e=>{let t=T.useContext(Gt);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},qt=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,D.jsx)(Gt.Provider,{value:e,children:t})),Jt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Y=new class{#e=Jt;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Yt(e){setTimeout(e,0)}var Xt=typeof window>`u`||`Deno`in globalThis;function X(){}function Zt(e,t){return typeof e==`function`?e(t):e}function Qt(e){return typeof e==`number`&&e>=0&&e!==1/0}function $t(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Z(e,t){return typeof e==`function`?e(t):e}function en(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==nn(o,t.options))return!1}else if(!Q(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function tn(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(rn(t.options.mutationKey)!==rn(a))return!1}else if(!Q(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function nn(e,t){return(t?.queryKeyHashFn||rn)(e)}function rn(e){return JSON.stringify(e,(e,t)=>ln(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Q(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n500)return t;let r=cn(e)&&cn(t);if(!r&&!(ln(e)&&ln(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l{Y.setTimeout(t,e)})}function fn(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:on(e,t)}function pn(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function mn(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var hn=Symbol();function gn(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===hn?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _n(e,t){return typeof e==`function`?e(...t):!!e}function vn(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var yn=()=>Xt,bn=()=>yn(),xn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Sn=new class extends xn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Cn=Yt;function wn(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Cn,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var $=wn(),Tn=new class extends xn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function En(e){return Math.min(1e3*2**e,3e4)}function Dn(e){return(e??`online`)!==`online`||Tn.isOnline()}var On=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function kn(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(X);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new On(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Sn.isFocused()&&(e.networkMode===`always`||Tn.isOnline())&&e.canRun(),p=()=>Dn(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(bn()?0:3),a=e.retryDelay??En,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&nf()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var An=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qt(this.gcTime)&&(this.#e=Y.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bn()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Y.clearTimeout(this.#e),this.#e=void 0)}};function jn(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{vn(e,()=>t.signal,()=>n=!0)},u=gn(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?mn:pn;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Nn:Mn,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Mn(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(ct.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Mn(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Nn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Pn(e,t){return t?Mn(e,t)!=null:!1}function Fn(e,t){return!t||!e.getPreviousPageParam?!1:Nn(e,t)!=null}var In=class extends An{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=zn(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=zn(this.options);e.data!==void 0&&(this.setState(Rn(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=fn(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(X).catch(X):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Z(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===hn||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Z(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!$t(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=gn(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?jn(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=kn({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof On&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof On){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ln(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Rn(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),$.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ln(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Dn(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Rn(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function zn(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Bn=class extends xn{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Hn(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Un(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Un(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Z(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!sn(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Wn(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Z(this.options.enabled,this.#t)!==Z(t.enabled,this.#t)||Z(this.options.staleTime,this.#t)!==Z(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Z(this.options.enabled,this.#t)!==Z(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return sn(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(X)),t}#h(e){return!bn()&&Z(this.options.enabled,this.#t)!==!1&&Qt(e)}#g(){this.#b();let e=Z(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=$t(this.#r.dataUpdatedAt,e)+1;this.#u=Y.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Z(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=Y.setInterval(()=>{(this.options.refetchIntervalInBackground||Sn.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(Y.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(Y.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Hn(e,t),o=i&&Wn(e,n,t,r);(a||o)&&(l={...l,...Ln(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=fn(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=fn(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Gn(e,t),refetch:this.refetch,isEnabled:Z(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),sn(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();$.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Vn(e,t){return Z(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Z(t.retryOnMount,e)!==!1)}function Hn(e,t){return Vn(e,t)||e.state.data!==void 0&&Un(e,t,t.refetchOnMount)}function Un(e,t,n){if(Z(t.enabled,e)!==!1&&Z(t.staleTime,e)!==`static`){let r=Z(n,e);return r===`always`||r!==!1&&Gn(e,t)}return!1}function Wn(e,t,n,r){return(e!==t||Z(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Gn(e,n)}function Gn(e,t){return Z(t.enabled,e)!==!1&&e.isStaleByTime(Z(t.staleTime,e))}var Kn=class extends An{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||qn(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=kn({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),$.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function qn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Jn=T.createContext(!1),Yn=()=>T.useContext(Jn);Jn.Provider;function Xn(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Zn=T.createContext(Xn()),Qn=()=>T.useContext(Zn),$n=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?_n(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},er=e=>{T.useEffect(()=>{e.clearReset()},[e])},tr=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||_n(n,[e.error,r])),nr=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},rr=(e,t)=>e?.suspense&&t.isPending,ir=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ar(e,t,n){let r=Yn(),i=Qn(),a=Kt(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,nr(o),$n(o,i,s),er(i);let[l]=T.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(T.useSyncExternalStore(T.useCallback(e=>{let t=d?l.subscribe($.batchCalls(e)):X;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),T.useEffect(()=>{l.setOptions(o)},[o,l]),rr(o,u))throw ir(o,l,i);if(tr({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function or(e,t){return ar(e,Bn,t)}var sr=[`dashboards`],cr=[`agent-threads`];async function lr(e){let t=await C(e);if(!t.ok)throw Error(`Request failed (${t.status})`);return t.json()}export{Rt as A,k as B,Z as C,qt as D,hn as E,At as F,me as H,kt as I,Dt as L,Ft as M,Mt as N,Kt as O,jt as P,Et as R,Q as S,_n as T,ie as U,O as V,rn as _,ar as a,en as b,Bn as c,Fn as d,Tn as f,Zt as g,xn as h,or as i,Lt as j,J as k,In as l,Sn as m,lr as n,Kn as o,$ as p,cr as r,qn as s,sr as t,Pn as u,nn as v,sn as w,X as x,tn as y,A as z}; \ No newline at end of file diff --git a/internal/ui/dist/assets/auth-Co_9Gxq0.js b/internal/ui/dist/assets/auth-Co_9Gxq0.js deleted file mode 100644 index 9c370593..00000000 --- a/internal/ui/dist/assets/auth-Co_9Gxq0.js +++ /dev/null @@ -1 +0,0 @@ -import{A as e,C as t,K as n,Q as r,St as i,X as a,_ as o,a as s,c,d as l,et as ee,f as u,gt as d,h as f,i as te,j as p,k as ne,l as re,m,mt as h,o as g,p as _,r as ie,s as v,st as ae,t as oe,u as y,x as se,y as ce}from"./brand-MzZ03bSa.js";var b=i(d(),1),le=b.use,x=b.useLayoutEffect;function S(e,t,n){b.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function C(e){let t=b.useRef(null);return b.useImperativeHandle(e,()=>t.current,[]),t}var w=b.createContext(null);function T(e){return b.useContext(w)}function E(e){let t=T();return b.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function D(e){let t=T(),n=E(),r=b.useRef(null);return x(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function O({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,b.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}var k={root:`m_b183c0a2`},A=h(),ue=a((e,{color:t})=>({root:{"--code-bg":t?n(t,e):void 0}})),j=t(e=>{let t=p(`Code`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,block:l,mod:ee,attributes:u,...d}=t,f=ne({name:`Code`,props:t,classes:k,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:ue});return(0,A.jsx)(se,{component:l?`pre`:`code`,mod:[{block:l},ee],...f(`root`),...d,dir:`ltr`})});j.classes=k,j.varsResolver=ue,j.displayName=`@mantine/core/Code`;function M(e,t){if(e<1)return[];let n=Array(e).fill(``);if(t){let r=t.trim().split(``);for(let t=0;t({root:{"--pin-input-size":ae(t??`sm`,`pin-input-size`)}})),L=t(t=>{let{name:n,form:i,className:a,value:o,defaultValue:s,variant:c,gap:l,style:u,size:d,classNames:te,styles:re,unstyled:h,length:g,onChange:_,onComplete:ie,manageFocus:v,autoFocus:ae,error:oe,success:y,radius:se,disabled:ce,oneTimeCode:le,placeholder:x,type:S,mask:C,readOnly:w,inputType:T,inputMode:E,ariaLabel:D,vars:k,id:ue,hiddenInputProps:j,rootRef:L,getInputProps:R,attributes:z,ref:de,...fe}=p([`Input`,`PinInput`],F,t),B=ee(ue),pe=ne({name:`PinInput`,classes:N,props:t,className:a,style:u,classNames:te,styles:re,unstyled:h,attributes:z,vars:k,varsResolver:I}),{resolvedClassNames:V,resolvedStyles:H}=e({classNames:te,styles:re,props:t}),[U,me]=(0,b.useState)(-1),W=(0,b.useRef)([]),G=g??4,he=(0,b.useRef)(!1),[ge,K]=O({value:o===void 0?void 0:M(G,o),defaultValue:s?.split(``).slice(0,G),finalValue:M(G,``),onChange:e=>{let t=e.join(``).trim();_?.(t),t.length===G&&!he.current?(he.current=!0,ie?.(t)):t.length(S instanceof RegExp?S:S&&S in P?P[S]:null)?.test(e),X=(e,t)=>{if(v){if(e===`next`){let e=t+1;e=0&&W.current[e]?.focus()}}},Z=(e,t)=>{let n=[...q];return n[t]=e,K(n),n},_e=(e,t)=>{let n=e.target.value;if(n.length>1){if(n.length>2){if(Y(n)){K(M(G,n));let e=Math.min(n.length,G);e{let{ctrlKey:n,metaKey:r,key:i,shiftKey:a,target:o}=e,s=o.value;if(E===`numeric`){let t=[`Backspace`,`Tab`,`Control`,`Delete`,`ArrowLeft`,`ArrowRight`],a=n||r;if(!(t.includes(i)||a||!Number.isNaN(Number(i)))){e.preventDefault();return}}switch(i){case`ArrowLeft`:e.preventDefault(),X(`prev`,t);break;case`ArrowRight`:e.preventDefault(),X(`next`,t);break;case`Tab`:a&&t>0&&v&&(e.preventDefault(),X(`prev`,t));break;case` `:e.preventDefault(),X(`next`,t);break;case`Delete`:e.preventDefault(),Z(``,t);break;case`Backspace`:s===``?(e.preventDefault(),X(`prev`,t)):(Z(``,t),t0&&i===q[t]&&(e.preventDefault(),X(`next`,t))}},ye=(e,t)=>{e.target.select(),me(t)},Q=()=>{me(-1)},$=e=>{e.preventDefault();let t=e.clipboardData.getData(`text/plain`).replace(/[\n\r\s]+/g,``);if(Y(t.trim())){let e=M(G,t);K(e);let n=e.filter(e=>e!==``).length;n>=G?W.current[G-1]?.focus():W.current[n]?.focus()}};return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(f,{...fe,...pe(`root`),ref:L,role:`group`,id:B,gap:l,unstyled:h,wrap:`nowrap`,variant:c,__size:d,dir:`ltr`,children:q.map((e,t)=>(0,b.createElement)(m,{component:`input`,...pe(`pinInput`,{style:{"--input-padding":`0`,"--input-text-align":`center`}}),classNames:V,styles:H,size:d,__staticSelector:`PinInput`,id:`${B}-${t+1}`,key:`${B}-${t}`,inputMode:E||(S===`number`?`numeric`:`text`),onChange:e=>_e(e,t),onKeyDown:e=>ve(e,t),onFocus:e=>ye(e,t),onBlur:Q,onPaste:$,type:T||(C?`password`:S===`number`?`tel`:`text`),radius:se,error:oe,success:y,variant:c,disabled:ce,ref:e=>{e&&(t===0&&r(de,e),W.current[t]=e)},autoComplete:le?`one-time-code`:`off`,placeholder:U===t?``:x,value:e,autoFocus:ae&&t===0,unstyled:h,"aria-label":D,readOnly:w,...R?.(t)}))}),(0,A.jsx)(`input`,{type:`hidden`,name:n,form:i,value:J,...j})]})});L.classes={...N,..._.classes},L.varsResolver=I,L.displayName=`@mantine/core/PinInput`;var R=t(e=>(0,A.jsx)(_,{component:`input`,...p([`Input`,`InputWrapper`,`TextInput`],null,e),__staticSelector:`TextInput`}));R.classes=_.classes,R.displayName=`@mantine/core/TextInput`;var z=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M112,56V200L40,128Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z`}))]]),de=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M216,128l-72,72V56Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z`}))]]),fe=new Map([[`bold`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M256,136a12,12,0,0,1-12,12h-8v8a12,12,0,0,1-24,0v-8h-8a12,12,0,0,1,0-24h8v-8a12,12,0,0,1,24,0v8h8A12,12,0,0,1,256,136Zm-54.81,56.28a12,12,0,1,1-18.38,15.44C169.12,191.42,145,172,108,172c-28.89,0-55.46,12.68-74.81,35.72a12,12,0,0,1-18.38-15.44A124.08,124.08,0,0,1,63.5,156.53a72,72,0,1,1,89,0A124,124,0,0,1,201.19,192.28ZM108,148a48,48,0,1,0-48-48A48.05,48.05,0,0,0,108,148Z`}))],[`duotone`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M168,100a60,60,0,1,1-60-60A60,60,0,0,1,168,100Z`,opacity:`0.2`}),b.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z`}))],[`fill`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136ZM144,157.68a68,68,0,1,0-71.9,0c-20.65,6.76-39.23,19.39-54.17,37.17A8,8,0,0,0,24,208H192a8,8,0,0,0,6.13-13.15C183.18,177.07,164.6,164.44,144,157.68Z`}))],[`light`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M254,136a6,6,0,0,1-6,6H230v18a6,6,0,0,1-12,0V142H200a6,6,0,0,1,0-12h18V112a6,6,0,0,1,12,0v18h18A6,6,0,0,1,254,136Zm-57.41,60.14a6,6,0,1,1-9.18,7.72C166.9,179.45,138.69,166,108,166s-58.89,13.45-79.41,37.86a6,6,0,0,1-9.18-7.72C35.14,177.41,55,164.48,77,158.25a66,66,0,1,1,62,0C161,164.48,180.86,177.41,196.59,196.14ZM108,154a54,54,0,1,0-54-54A54.06,54.06,0,0,0,108,154Z`}))],[`regular`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z`}))],[`thin`,b.createElement(b.Fragment,null,b.createElement(`path`,{d:`M252,136a4,4,0,0,1-4,4H228v20a4,4,0,0,1-8,0V140H200a4,4,0,0,1,0-8h20V112a4,4,0,0,1,8,0v20h20A4,4,0,0,1,252,136Zm-56.94,61.43a4,4,0,0,1-6.12,5.14C168,177.7,139.3,164,108,164s-60,13.7-80.94,38.57a4,4,0,1,1-6.12-5.14c16.71-19.9,38.13-33.13,61.89-38.59a64,64,0,1,1,50.34,0C156.93,164.3,178.35,177.53,195.06,197.43ZM108,156a56,56,0,1,0-56-56A56.06,56.06,0,0,0,108,156Z`}))]]),B=b.forwardRef((e,t)=>b.createElement(s,{ref:t,...e,weights:z}));B.displayName=`ArrowLeftIcon`;var pe=B,V=b.forwardRef((e,t)=>b.createElement(s,{ref:t,...e,weights:de}));V.displayName=`ArrowRightIcon`;var H=V,U=b.forwardRef((e,t)=>b.createElement(s,{ref:t,...e,weights:fe}));U.displayName=`UserPlusIcon`;var me=U,W=`fanout.access-token`,G=`fanout:unauthorized`;function he(){let e=new URLSearchParams(window.location.search).get(`return_to`);if(!e)return``;let t=new URL(e,window.location.origin);return t.origin!==window.location.origin||t.pathname!==`/api/auth/oauth/authorize`?``:`${t.pathname}${t.search}`}function ge(e){return!e||typeof e!=`object`||!(`id`in e)||typeof e.id!=`string`||e.id===``?`none`:`user`}function K(){localStorage.removeItem(W)}function q(){K(),window.dispatchEvent(new Event(G))}async function J(e,t={}){let n=new Headers(t.headers);n.set(`Fanout-Request`,`1`);let r=await fetch(e,{...t,headers:n,credentials:`same-origin`});if(r.status===401&&q(),r.status===403){let e=await r.clone().json().catch(()=>({}));throw Error(e.message??e.error??`You do not have permission to perform this action.`)}return r}async function Y(){let e=await J(`/api/auth/logout`,{method:`POST`});if(!e.ok&&e.status!==401)throw Error(`Sign-out failed — your session is still active.`);e.status!==401&&q(),window.location.assign(`/`)}var X=(0,b.createContext)(null);function Z(){let e=(0,b.useContext)(X);if(!e)throw Error(`Fanout runtime status is unavailable`);return e}var _e=(0,b.createContext)(null);function ve(){let e=(0,b.useContext)(_e);if(!e)throw Error(`Fanout viewer is unavailable`);return e}function ye(e){if(!e||typeof e!=`object`)return null;let t=e;return typeof t.id!=`string`||t.id===``?null:{id:t.id,email:typeof t.email==`string`?t.email:``,name:typeof t.name==`string`?t.name:``,role:typeof t.role==`string`?t.role:``}}async function Q(e,t){let n=await fetch(e,{method:t===void 0?`GET`:`POST`,headers:t===void 0?void 0:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t),credentials:`same-origin`}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.message??r.error??`Request failed (${n.status})`);return r}function $({children:e,wide:t=!1}){return(0,A.jsx)(se,{mih:`100dvh`,style:{background:`radial-gradient(circle at 50% -12%, var(--mantine-color-brand-light), transparent 38%), linear-gradient(180deg, var(--mantine-color-default-hover), var(--mantine-color-body) 62%)`},children:(0,A.jsx)(re,{mih:`100dvh`,px:`md`,py:48,children:(0,A.jsx)(c,{size:t?680:480,w:`100%`,children:(0,A.jsx)(ce,{radius:28,p:{base:24,sm:40},style:{background:`var(--mantine-color-body)`,border:`1px solid var(--mantine-color-default-border)`,boxShadow:`var(--mantine-shadow-xl)`},children:e})})})})}function be(){return typeof window>`u`?``:new URLSearchParams(window.location.search).get(`setup_token`)??``}function xe(){return typeof window>`u`?``:new URLSearchParams(window.location.search).get(`login_token`)??``}function Se({children:e}){let t=E(),[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(!1),[s,c]=(0,b.useState)(`none`),[ee,d]=(0,b.useState)(null),[p,ne]=(0,b.useState)(!1),[m,h]=(0,b.useState)(``),[_,ae]=(0,b.useState)(``),[ce,le]=(0,b.useState)(be),[x,S]=(0,b.useState)(xe),[C,w]=(0,b.useState)(``),[T,D]=(0,b.useState)(!1),[O,k]=(0,b.useState)(0),[ue,M]=(0,b.useState)(()=>Date.now()),[N,P]=(0,b.useState)(!1),[F,I]=(0,b.useState)(``),[z,de]=(0,b.useState)(null),[fe,B]=(0,b.useState)(!1),V=(0,b.useRef)(null),U=he(),W=s===`user`;async function q(){let e=await fetch(`/api/auth/me`,{credentials:`same-origin`});if(!e.ok){c(`none`),d(null);return}let t=await e.json().catch(()=>null);c(ge(t)),d(ye(t))}async function J(){try{let e=await fetch(`/api/auth/me`,{credentials:`same-origin`});if(!e.ok)return;d(ye(await e.json().catch(()=>null)))}catch{}}(0,b.useEffect)(()=>{let e=new URL(window.location.href);(e.searchParams.has(`setup_token`)||e.searchParams.has(`login_token`))&&(e.searchParams.delete(`setup_token`),e.searchParams.delete(`login_token`),t({href:e.pathname+e.search+e.hash,replace:!0}))},[t]),(0,b.useEffect)(()=>{K(),Q(`/api/auth/status`).then(r).catch(e=>I(String(e))).finally(()=>a(!0)),q().catch(()=>c(`none`)).finally(()=>ne(!0));let e=()=>{c(`none`),d(null)};return window.addEventListener(G,e),()=>window.removeEventListener(G,e)},[]),(0,b.useEffect)(()=>{p&&s===`none`&&x&&(P(!0),I(``),Q(`/api/auth/link/verify`,{token:x}).then(()=>{c(`user`),J()}).catch(e=>I(e instanceof Error?e.message:String(e))).finally(()=>{S(``),P(!1)}))},[x,p,s]),(0,b.useEffect)(()=>{W&&p&&U&&window.location.replace(U)},[W,U,p]),(0,b.useEffect)(()=>{if(O<=Date.now())return;let e=setInterval(()=>{M(Date.now()),Date.now()>=O&&clearInterval(e)},1e3);return()=>clearInterval(e)},[O]);let Y=Math.max(0,Math.ceil((O-ue)/1e3));(0,b.useEffect)(()=>{T&&!N&&F&&V.current?.querySelector(`input`)?.focus()},[N,T,F]);async function Z(e){try{await navigator.clipboard.writeText(e),B(!0)}catch{I(`Clipboard access failed. Select and copy the token manually.`)}}if(z?.ingest_token)return(0,A.jsx)($,{wide:!0,children:(0,A.jsxs)(v,{gap:`lg`,children:[(0,A.jsx)(oe,{}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(l,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Setup complete`}),(0,A.jsx)(g,{order:1,mt:`xs`,fz:{base:28,sm:32},lh:1.08,children:`Save your ingest token`})]}),(0,A.jsx)(l,{c:`dimmed`,children:`Fanout shows this token once. Store it with your collector secrets before continuing.`}),(0,A.jsxs)(v,{gap:`xs`,children:[(0,A.jsx)(l,{size:`sm`,fw:600,children:`OTLP endpoint`}),(0,A.jsx)(j,{block:!0,children:z.suggested_endpoint??window.location.origin})]}),(0,A.jsxs)(v,{gap:`xs`,children:[(0,A.jsx)(l,{size:`sm`,fw:600,children:`Header`}),(0,A.jsxs)(j,{block:!0,children:[z.ingest_header_name??`Authorization`,`: Bearer `,z.ingest_token]})]}),F&&(0,A.jsx)(u,{color:`bad`,radius:`md`,children:F}),(0,A.jsxs)(f,{grow:!0,align:`stretch`,children:[(0,A.jsx)(y,{variant:`light`,radius:`md`,leftSection:fe?(0,A.jsx)(te,{size:16,weight:`bold`}):(0,A.jsx)(ie,{size:16}),onClick:()=>void Z(`${z.ingest_header_name??`Authorization`}: Bearer ${z.ingest_token}`),children:fe?`Copied`:`Copy header`}),(0,A.jsx)(y,{radius:`md`,rightSection:(0,A.jsx)(H,{size:16,weight:`bold`}),onClick:()=>{c(`user`),de(null),J()},children:`Continue to Fanout`})]}),(0,A.jsx)(y,{variant:`subtle`,size:`compact-xs`,onClick:()=>void Z(z.ingest_token??``),children:`Copy token only`})]})});if(!p||!i||x)return(0,A.jsx)(re,{mih:`100dvh`,children:(0,A.jsx)(o,{size:`sm`})});if(!n)return(0,A.jsx)($,{children:(0,A.jsxs)(v,{gap:`lg`,children:[(0,A.jsx)(oe,{}),(0,A.jsx)(g,{order:1,children:`Fanout is unavailable`}),(0,A.jsx)(u,{color:`bad`,radius:`md`,children:F||`Authentication status could not be loaded.`})]})});if(W&&U)return null;if(W)return(0,A.jsx)(X.Provider,{value:n,children:(0,A.jsx)(_e.Provider,{value:ee??{id:``,email:m,name:_,role:``},children:e})});if(n&&!n.setup_required&&n.auth_mode===`oidc`){let e=U?`/api/auth/oidc/start?return_to=${encodeURIComponent(U)}`:`/api/auth/oidc/start`;return(0,A.jsx)($,{children:(0,A.jsxs)(v,{gap:28,children:[(0,A.jsx)(oe,{}),(0,A.jsxs)(v,{gap:10,children:[(0,A.jsx)(l,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Secure workspace`}),(0,A.jsx)(g,{order:1,fz:{base:28,sm:32},lh:1.08,children:`Sign in`}),(0,A.jsx)(l,{c:`dimmed`,size:`md`,lh:1.6,children:`Use your organization's identity provider to continue.`})]}),F&&(0,A.jsx)(u,{color:`bad`,radius:`md`,children:F}),(0,A.jsx)(y,{component:`a`,href:e,size:`md`,radius:`md`,rightSection:(0,A.jsx)(H,{size:17,weight:`bold`}),children:`Continue with SSO`})]})})}async function ve(){P(!0),I(``);try{await Q(`/api/auth/code/send`,{email:m}),D(!0),w(``),k(Date.now()+3e4),M(Date.now())}catch(e){I(e instanceof Error?e.message:String(e))}finally{P(!1)}}async function Se(e){P(!0),I(``);try{await Q(`/api/auth/code/verify`,{email:m,code:e}),c(`user`),D(!1),w(``),k(0),J()}catch(e){w(``),I(e instanceof Error?e.message:String(e))}finally{P(!1)}}function Ce(){D(!1),w(``),I(``)}async function we(e){e.preventDefault(),P(!0),I(``);try{if(n?.setup_required){let e=await Q(`/api/auth/setup`,{email:m,name:_,setup_token:ce});e.ingest_token?de(e):(c(`user`),J())}else if(T){await Se(C);return}else{await ve();return}}catch(e){I(e instanceof Error?e.message:String(e))}finally{P(!1)}}let Te=T&&!n?.setup_required,Ee=n?.setup_required?`Create the first admin`:Te?`Check your email`:n?.self_signup?`Sign in or create an account`:`Sign in`,De=n?.setup_required?`Use the one-time token printed by the Fanout process.`:n?.smtp_configured?Te?`We sent a code to ${m}.`:n?.self_signup?`Enter your email to sign in or create a viewer account. No password needed.`:`Enter your email and we’ll send a short verification code. No password needed.`:`Email delivery is not configured. Ask the operator to run fanout login-link with your email address.`;return(0,A.jsx)($,{children:(0,A.jsxs)(v,{gap:28,children:[(0,A.jsx)(oe,{}),(0,A.jsxs)(v,{gap:10,children:[(0,A.jsx)(l,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:n?.setup_required?`One-time setup`:`Secure workspace`}),(0,A.jsx)(g,{order:1,fz:{base:28,sm:32},lh:1.08,children:Ee}),De&&(0,A.jsx)(l,{c:`dimmed`,size:`md`,lh:1.6,maw:390,children:De})]}),(0,A.jsx)(`form`,{onSubmit:we,children:(0,A.jsxs)(v,{gap:`md`,children:[(0,A.jsx)(R,{label:`Email`,placeholder:`you@company.com`,type:`email`,required:!0,value:m,onChange:e=>h(e.currentTarget.value),disabled:T,variant:`filled`,radius:`md`,size:`md`,autoFocus:!T}),n?.setup_required&&(0,A.jsx)(R,{label:`Name`,placeholder:`Your name`,value:_,onChange:e=>ae(e.currentTarget.value),variant:`filled`,radius:`md`,size:`md`}),n?.setup_required&&(0,A.jsx)(R,{label:`Setup token`,placeholder:`from the setup URL printed at startup`,required:!0,value:ce,onChange:e=>le(e.currentTarget.value),autoComplete:`one-time-code`,variant:`filled`,radius:`md`,size:`md`}),Te&&(0,A.jsxs)(v,{gap:`xs`,children:[(0,A.jsx)(l,{size:`sm`,fw:600,children:`Verification code`}),(0,A.jsx)(se,{ref:V,children:(0,A.jsx)(L,{length:6,type:`number`,oneTimeCode:!0,autoFocus:!0,value:C,onChange:w,onComplete:e=>void Se(e),disabled:N,error:!!F,size:`md`,radius:`md`,"aria-label":`Verification code`,getInputProps:e=>({"aria-label":`Digit ${e+1}`})})}),(0,A.jsxs)(f,{justify:`space-between`,gap:`xs`,children:[(0,A.jsxs)(l,{c:`dimmed`,size:`xs`,children:[`Sent to `,m]}),(0,A.jsx)(y,{variant:`subtle`,size:`compact-xs`,leftSection:(0,A.jsx)(pe,{size:12,weight:`bold`}),onClick:Ce,disabled:N,children:`Change email`})]}),(0,A.jsxs)(f,{justify:`space-between`,gap:`xs`,children:[(0,A.jsx)(l,{c:`dimmed`,size:`xs`,children:`Codes expire in 5 minutes`}),(0,A.jsx)(y,{variant:`subtle`,size:`compact-xs`,onClick:()=>void ve(),disabled:N||Y>0,children:Y>0?`Resend in ${Y}s`:`Resend code`})]})]}),F&&(0,A.jsx)(u,{color:`bad`,radius:`md`,children:F}),Te?(0,A.jsx)(y,{type:`submit`,size:`md`,radius:`md`,mt:4,loading:N,disabled:N||C.length<6,rightSection:(0,A.jsx)(H,{size:17,weight:`bold`}),children:`Verify code`}):(0,A.jsx)(y,{type:`submit`,size:`md`,radius:`md`,mt:4,loading:N,disabled:!n||!n.setup_required&&!n.smtp_configured,leftSection:n?.setup_required?(0,A.jsx)(me,{size:17,weight:`bold`}):void 0,rightSection:n?.setup_required?void 0:(0,A.jsx)(H,{size:17,weight:`bold`}),children:n?.setup_required?`Create admin`:`Send code`})]})})]})})}export{Y as a,O as c,T as d,w as f,x as g,S as h,J as i,D as l,C as m,Z as n,R as o,le as p,ve as r,j as s,Se as t,E as u}; \ No newline at end of file diff --git a/internal/ui/dist/assets/auth-DmDDao4N.js b/internal/ui/dist/assets/auth-DmDDao4N.js new file mode 100644 index 00000000..99e1cafb --- /dev/null +++ b/internal/ui/dist/assets/auth-DmDDao4N.js @@ -0,0 +1 @@ +import{A as e,C as t,K as n,Q as r,X as i,_ as a,a as o,c as s,d as c,et as l,f as u,gt as ee,h as d,i as te,j as f,k as p,l as ne,m as re,mt as m,o as h,p as g,r as ie,s as _,st as v,t as y,u as b,x as ae,y as oe,yt as se}from"./brand-CnsMBQCm.js";var x=se(ee(),1),ce=x.use,S=x.useLayoutEffect,C=x.createContext(null);function w(e){return x.useContext(C)}function le(e){let t=w();return x.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function T(e){let t=w(),n=le(),r=x.useRef(null);return S(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function E({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,x.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}var D={root:`m_b183c0a2`},O=m(),k=i((e,{color:t})=>({root:{"--code-bg":t?n(t,e):void 0}})),A=t(e=>{let t=f(`Code`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,block:l,mod:u,attributes:ee,...d}=t,te=p({name:`Code`,props:t,classes:D,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:ee,vars:s,varsResolver:k});return(0,O.jsx)(ae,{component:l?`pre`:`code`,mod:[{block:l},u],...te(`root`),...d,dir:`ltr`})});A.classes=D,A.varsResolver=k,A.displayName=`@mantine/core/Code`;function j(e,t){if(e<1)return[];let n=Array(e).fill(``);if(t){let r=t.trim().split(``);for(let t=0;t({root:{"--pin-input-size":v(t??`sm`,`pin-input-size`)}})),P=t(t=>{let{name:n,form:i,className:a,value:o,defaultValue:s,variant:c,gap:u,style:ee,size:te,classNames:ne,styles:m,unstyled:h,length:g,onChange:ie,onComplete:_,manageFocus:v,autoFocus:y,error:b,success:ae,radius:oe,disabled:se,oneTimeCode:ce,placeholder:S,type:C,mask:w,readOnly:le,inputType:T,inputMode:D,ariaLabel:k,vars:A,id:P,hiddenInputProps:F,rootRef:I,getInputProps:L,attributes:R,ref:z,...fe}=f([`Input`,`PinInput`],M,t),B=l(P),V=p({name:`PinInput`,classes:ue,props:t,className:a,style:ee,classNames:ne,styles:m,unstyled:h,attributes:R,vars:A,varsResolver:N}),{resolvedClassNames:pe,resolvedStyles:me}=e({classNames:ne,styles:m,props:t}),[he,H]=(0,x.useState)(-1),U=(0,x.useRef)([]),W=g??4,G=(0,x.useRef)(!1),[K,q]=E({value:o===void 0?void 0:j(W,o),defaultValue:s?.split(``).slice(0,W),finalValue:j(W,``),onChange:e=>{let t=e.join(``).trim();ie?.(t),t.length===W&&!G.current?(G.current=!0,_?.(t)):t.length(C instanceof RegExp?C:C&&C in de?de[C]:null)?.test(e),X=(e,t)=>{if(v){if(e===`next`){let e=t+1;e=0&&U.current[e]?.focus()}}},Z=(e,t)=>{let n=[...J];return n[t]=e,q(n),n},_e=(e,t)=>{let n=e.target.value;if(n.length>1){if(n.length>2){if(Y(n)){q(j(W,n));let e=Math.min(n.length,W);e{let{ctrlKey:n,metaKey:r,key:i,shiftKey:a,target:o}=e,s=o.value;if(D===`numeric`){let t=[`Backspace`,`Tab`,`Control`,`Delete`,`ArrowLeft`,`ArrowRight`],a=n||r;if(!(t.includes(i)||a||!Number.isNaN(Number(i)))){e.preventDefault();return}}switch(i){case`ArrowLeft`:e.preventDefault(),X(`prev`,t);break;case`ArrowRight`:e.preventDefault(),X(`next`,t);break;case`Tab`:a&&t>0&&v&&(e.preventDefault(),X(`prev`,t));break;case` `:e.preventDefault(),X(`next`,t);break;case`Delete`:e.preventDefault(),Z(``,t);break;case`Backspace`:s===``?(e.preventDefault(),X(`prev`,t)):(Z(``,t),t0&&i===J[t]&&(e.preventDefault(),X(`next`,t))}},$=(e,t)=>{e.target.select(),H(t)},ve=()=>{H(-1)},ye=e=>{e.preventDefault();let t=e.clipboardData.getData(`text/plain`).replace(/[\n\r\s]+/g,``);if(Y(t.trim())){let e=j(W,t);q(e);let n=e.filter(e=>e!==``).length;n>=W?U.current[W-1]?.focus():U.current[n]?.focus()}};return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(d,{...fe,...V(`root`),ref:I,role:`group`,id:B,gap:u,unstyled:h,wrap:`nowrap`,variant:c,__size:te,dir:`ltr`,children:J.map((e,t)=>(0,x.createElement)(re,{component:`input`,...V(`pinInput`,{style:{"--input-padding":`0`,"--input-text-align":`center`}}),classNames:pe,styles:me,size:te,__staticSelector:`PinInput`,id:`${B}-${t+1}`,key:`${B}-${t}`,inputMode:D||(C===`number`?`numeric`:`text`),onChange:e=>_e(e,t),onKeyDown:e=>Q(e,t),onFocus:e=>$(e,t),onBlur:ve,onPaste:ye,type:T||(w?`password`:C===`number`?`tel`:`text`),radius:oe,error:b,success:ae,variant:c,disabled:se,ref:e=>{e&&(t===0&&r(z,e),U.current[t]=e)},autoComplete:ce?`one-time-code`:`off`,placeholder:he===t?``:S,value:e,autoFocus:y&&t===0,unstyled:h,"aria-label":k,readOnly:le,...L?.(t)}))}),(0,O.jsx)(`input`,{type:`hidden`,name:n,form:i,value:ge,...F})]})});P.classes={...ue,...g.classes},P.varsResolver=N,P.displayName=`@mantine/core/PinInput`;var F=t(e=>{let t=f([`Input`,`InputWrapper`,`TextInput`],null,e);return(0,O.jsx)(g,{component:`input`,...t,__staticSelector:`TextInput`})});F.classes=g.classes,F.displayName=`@mantine/core/TextInput`;var I=new Map([[`bold`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z`}))],[`duotone`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M112,56V200L40,128Z`,opacity:`0.2`}),x.createElement(`path`,{d:`M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z`}))],[`fill`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z`}))],[`light`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z`}))],[`regular`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z`}))],[`thin`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z`}))]]),L=new Map([[`bold`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z`}))],[`duotone`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M216,128l-72,72V56Z`,opacity:`0.2`}),x.createElement(`path`,{d:`M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z`}))],[`fill`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`light`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z`}))],[`regular`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`thin`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z`}))]]),R=new Map([[`bold`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M256,136a12,12,0,0,1-12,12h-8v8a12,12,0,0,1-24,0v-8h-8a12,12,0,0,1,0-24h8v-8a12,12,0,0,1,24,0v8h8A12,12,0,0,1,256,136Zm-54.81,56.28a12,12,0,1,1-18.38,15.44C169.12,191.42,145,172,108,172c-28.89,0-55.46,12.68-74.81,35.72a12,12,0,0,1-18.38-15.44A124.08,124.08,0,0,1,63.5,156.53a72,72,0,1,1,89,0A124,124,0,0,1,201.19,192.28ZM108,148a48,48,0,1,0-48-48A48.05,48.05,0,0,0,108,148Z`}))],[`duotone`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M168,100a60,60,0,1,1-60-60A60,60,0,0,1,168,100Z`,opacity:`0.2`}),x.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z`}))],[`fill`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136ZM144,157.68a68,68,0,1,0-71.9,0c-20.65,6.76-39.23,19.39-54.17,37.17A8,8,0,0,0,24,208H192a8,8,0,0,0,6.13-13.15C183.18,177.07,164.6,164.44,144,157.68Z`}))],[`light`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M254,136a6,6,0,0,1-6,6H230v18a6,6,0,0,1-12,0V142H200a6,6,0,0,1,0-12h18V112a6,6,0,0,1,12,0v18h18A6,6,0,0,1,254,136Zm-57.41,60.14a6,6,0,1,1-9.18,7.72C166.9,179.45,138.69,166,108,166s-58.89,13.45-79.41,37.86a6,6,0,0,1-9.18-7.72C35.14,177.41,55,164.48,77,158.25a66,66,0,1,1,62,0C161,164.48,180.86,177.41,196.59,196.14ZM108,154a54,54,0,1,0-54-54A54.06,54.06,0,0,0,108,154Z`}))],[`regular`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z`}))],[`thin`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M252,136a4,4,0,0,1-4,4H228v20a4,4,0,0,1-8,0V140H200a4,4,0,0,1,0-8h20V112a4,4,0,0,1,8,0v20h20A4,4,0,0,1,252,136Zm-56.94,61.43a4,4,0,0,1-6.12,5.14C168,177.7,139.3,164,108,164s-60,13.7-80.94,38.57a4,4,0,1,1-6.12-5.14c16.71-19.9,38.13-33.13,61.89-38.59a64,64,0,1,1,50.34,0C156.93,164.3,178.35,177.53,195.06,197.43ZM108,156a56,56,0,1,0-56-56A56.06,56.06,0,0,0,108,156Z`}))]]),z=x.forwardRef((e,t)=>x.createElement(o,{ref:t,...e,weights:I}));z.displayName=`ArrowLeftIcon`;var fe=z,B=x.forwardRef((e,t)=>x.createElement(o,{ref:t,...e,weights:L}));B.displayName=`ArrowRightIcon`;var V=B,pe=x.forwardRef((e,t)=>x.createElement(o,{ref:t,...e,weights:R}));pe.displayName=`UserPlusIcon`;var me=pe,he=`fanout.access-token`,H=`fanout:unauthorized`;function U(){let e=new URLSearchParams(window.location.search).get(`return_to`);if(!e)return``;let t=new URL(e,window.location.origin);return t.origin!==window.location.origin||t.pathname!==`/api/auth/oauth/authorize`?``:`${t.pathname}${t.search}`}function W(e){return!e||typeof e!=`object`||!(`id`in e)||typeof e.id!=`string`||e.id===``?`none`:`user`}function G(){localStorage.removeItem(he)}function K(){G(),window.dispatchEvent(new Event(H))}async function q(e,t={}){let n=new Headers(t.headers);n.set(`Fanout-Request`,`1`);let r=await fetch(e,{...t,headers:n,credentials:`same-origin`});if(r.status===401&&K(),r.status===403){let e=await r.clone().json().catch(()=>({}));throw Error(e.message??e.error??`You do not have permission to perform this action.`)}return r}async function J(){let e=await q(`/api/auth/logout`,{method:`POST`});if(!e.ok&&e.status!==401)throw Error(`Sign-out failed — your session is still active.`);e.status!==401&&K(),window.location.assign(`/`)}var ge=(0,x.createContext)(null);function Y(){let e=(0,x.useContext)(ge);if(!e)throw Error(`Fanout runtime status is unavailable`);return e}var X=(0,x.createContext)(null);function Z(){let e=(0,x.useContext)(X);if(!e)throw Error(`Fanout viewer is unavailable`);return e}function _e(e){if(!e||typeof e!=`object`)return null;let t=e;return typeof t.id!=`string`||t.id===``?null:{id:t.id,email:typeof t.email==`string`?t.email:``,name:typeof t.name==`string`?t.name:``,role:typeof t.role==`string`?t.role:``}}async function Q(e,t){let n=await fetch(e,{method:t===void 0?`GET`:`POST`,headers:t===void 0?void 0:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t),credentials:`same-origin`}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.message??r.error??`Request failed (${n.status})`);return r}function $({children:e,wide:t=!1}){return(0,O.jsx)(ae,{mih:`100dvh`,style:{background:`radial-gradient(circle at 50% -12%, var(--mantine-color-brand-light), transparent 38%), linear-gradient(180deg, var(--mantine-color-default-hover), var(--mantine-color-body) 62%)`},children:(0,O.jsx)(ne,{mih:`100dvh`,px:`md`,py:48,children:(0,O.jsx)(s,{size:t?680:480,w:`100%`,children:(0,O.jsx)(oe,{radius:28,p:{base:24,sm:40},style:{background:`var(--mantine-color-body)`,border:`1px solid var(--mantine-color-default-border)`,boxShadow:`var(--mantine-shadow-xl)`},children:e})})})})}function ve(){return typeof window>`u`?``:new URLSearchParams(window.location.search).get(`setup_token`)??``}function ye(){return typeof window>`u`?``:new URLSearchParams(window.location.search).get(`login_token`)??``}function be({children:e}){let t=le(),[n,r]=(0,x.useState)(null),[i,o]=(0,x.useState)(!1),[s,l]=(0,x.useState)(`none`),[ee,f]=(0,x.useState)(null),[p,re]=(0,x.useState)(!1),[m,g]=(0,x.useState)(``),[v,oe]=(0,x.useState)(``),[se,ce]=(0,x.useState)(ve),[S,C]=(0,x.useState)(ye),[w,T]=(0,x.useState)(``),[E,D]=(0,x.useState)(!1),[k,j]=(0,x.useState)(0),[ue,de]=(0,x.useState)(()=>Date.now()),[M,N]=(0,x.useState)(!1),[I,L]=(0,x.useState)(``),[R,z]=(0,x.useState)(null),[B,pe]=(0,x.useState)(!1),he=(0,x.useRef)(null),K=U(),q=s===`user`;async function J(){let e=await fetch(`/api/auth/me`,{credentials:`same-origin`});if(!e.ok){l(`none`),f(null);return}let t=await e.json().catch(()=>null);l(W(t)),f(_e(t))}async function Y(){try{let e=await fetch(`/api/auth/me`,{credentials:`same-origin`});if(!e.ok)return;f(_e(await e.json().catch(()=>null)))}catch{}}(0,x.useEffect)(()=>{let e=new URL(window.location.href);(e.searchParams.has(`setup_token`)||e.searchParams.has(`login_token`))&&(e.searchParams.delete(`setup_token`),e.searchParams.delete(`login_token`),t({href:e.pathname+e.search+e.hash,replace:!0}))},[t]),(0,x.useEffect)(()=>{G(),Q(`/api/auth/status`).then(r).catch(e=>L(String(e))).finally(()=>o(!0)),J().catch(()=>l(`none`)).finally(()=>re(!0));let e=()=>{l(`none`),f(null)};return window.addEventListener(H,e),()=>window.removeEventListener(H,e)},[]),(0,x.useEffect)(()=>{p&&s===`none`&&S&&(N(!0),L(``),Q(`/api/auth/link/verify`,{token:S}).then(()=>{l(`user`),Y()}).catch(e=>L(e instanceof Error?e.message:String(e))).finally(()=>{C(``),N(!1)}))},[S,p,s]),(0,x.useEffect)(()=>{q&&p&&K&&window.location.replace(K)},[q,K,p]),(0,x.useEffect)(()=>{if(k<=Date.now())return;let e=setInterval(()=>{de(Date.now()),Date.now()>=k&&clearInterval(e)},1e3);return()=>clearInterval(e)},[k]);let Z=Math.max(0,Math.ceil((k-ue)/1e3));(0,x.useEffect)(()=>{E&&!M&&I&&he.current?.querySelector(`input`)?.focus()},[M,E,I]);async function be(e){try{await navigator.clipboard.writeText(e),pe(!0)}catch{L(`Clipboard access failed. Select and copy the token manually.`)}}if(R?.ingest_token)return(0,O.jsx)($,{wide:!0,children:(0,O.jsxs)(_,{gap:`lg`,children:[(0,O.jsx)(y,{}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(c,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Setup complete`}),(0,O.jsx)(h,{order:1,mt:`xs`,fz:{base:28,sm:32},lh:1.08,children:`Save your ingest token`})]}),(0,O.jsx)(c,{c:`dimmed`,children:`Fanout shows this token once. Store it with your collector secrets before continuing.`}),(0,O.jsxs)(_,{gap:`xs`,children:[(0,O.jsx)(c,{size:`sm`,fw:600,children:`OTLP endpoint`}),(0,O.jsx)(A,{block:!0,children:R.suggested_endpoint??window.location.origin})]}),(0,O.jsxs)(_,{gap:`xs`,children:[(0,O.jsx)(c,{size:`sm`,fw:600,children:`Header`}),(0,O.jsxs)(A,{block:!0,children:[R.ingest_header_name??`Authorization`,`: Bearer `,R.ingest_token]})]}),I&&(0,O.jsx)(u,{color:`bad`,radius:`md`,children:I}),(0,O.jsxs)(d,{grow:!0,align:`stretch`,children:[(0,O.jsx)(b,{variant:`light`,radius:`md`,leftSection:B?(0,O.jsx)(te,{size:16,weight:`bold`}):(0,O.jsx)(ie,{size:16}),onClick:()=>void be(`${R.ingest_header_name??`Authorization`}: Bearer ${R.ingest_token}`),children:B?`Copied`:`Copy header`}),(0,O.jsx)(b,{radius:`md`,rightSection:(0,O.jsx)(V,{size:16,weight:`bold`}),onClick:()=>{l(`user`),z(null),Y()},children:`Continue to Fanout`})]}),(0,O.jsx)(b,{variant:`subtle`,size:`compact-xs`,onClick:()=>void be(R.ingest_token??``),children:`Copy token only`})]})});if(!p||!i||S)return(0,O.jsx)(ne,{mih:`100dvh`,children:(0,O.jsx)(a,{size:`sm`})});if(!n)return(0,O.jsx)($,{children:(0,O.jsxs)(_,{gap:`lg`,children:[(0,O.jsx)(y,{}),(0,O.jsx)(h,{order:1,children:`Fanout is unavailable`}),(0,O.jsx)(u,{color:`bad`,radius:`md`,children:I||`Authentication status could not be loaded.`})]})});if(q&&K)return null;if(q)return(0,O.jsx)(ge.Provider,{value:n,children:(0,O.jsx)(X.Provider,{value:ee??{id:``,email:m,name:v,role:``},children:e})});if(n&&!n.setup_required&&n.auth_mode===`oidc`){let e=K?`/api/auth/oidc/start?return_to=${encodeURIComponent(K)}`:`/api/auth/oidc/start`;return(0,O.jsx)($,{children:(0,O.jsxs)(_,{gap:28,children:[(0,O.jsx)(y,{}),(0,O.jsxs)(_,{gap:10,children:[(0,O.jsx)(c,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Secure workspace`}),(0,O.jsx)(h,{order:1,fz:{base:28,sm:32},lh:1.08,children:`Sign in`}),(0,O.jsx)(c,{c:`dimmed`,size:`md`,lh:1.6,children:`Use your organization's identity provider to continue.`})]}),I&&(0,O.jsx)(u,{color:`bad`,radius:`md`,children:I}),(0,O.jsx)(b,{component:`a`,href:e,size:`md`,radius:`md`,rightSection:(0,O.jsx)(V,{size:17,weight:`bold`}),children:`Continue with SSO`})]})})}async function xe(){N(!0),L(``);try{await Q(`/api/auth/code/send`,{email:m}),D(!0),T(``),j(Date.now()+3e4),de(Date.now())}catch(e){L(e instanceof Error?e.message:String(e))}finally{N(!1)}}async function Se(e){N(!0),L(``);try{await Q(`/api/auth/code/verify`,{email:m,code:e}),l(`user`),D(!1),T(``),j(0),Y()}catch(e){T(``),L(e instanceof Error?e.message:String(e))}finally{N(!1)}}function Ce(){D(!1),T(``),L(``)}async function we(e){e.preventDefault(),N(!0),L(``);try{if(n?.setup_required){let e=await Q(`/api/auth/setup`,{email:m,name:v,setup_token:se});e.ingest_token?z(e):(l(`user`),Y())}else if(E){await Se(w);return}else{await xe();return}}catch(e){L(e instanceof Error?e.message:String(e))}finally{N(!1)}}let Te=E&&!n?.setup_required,Ee=n?.setup_required?`Create the first admin`:Te?`Check your email`:n?.self_signup?`Sign in or create an account`:`Sign in`,De=n?.setup_required?`Use the one-time token printed by the Fanout process.`:n?.smtp_configured?Te?`We sent a code to ${m}.`:n?.self_signup?`Enter your email to sign in or create a viewer account. No password needed.`:`Enter your email and we’ll send a short verification code. No password needed.`:`Email delivery is not configured. Ask the operator to run fanout login-link with your email address.`;return(0,O.jsx)($,{children:(0,O.jsxs)(_,{gap:28,children:[(0,O.jsx)(y,{}),(0,O.jsxs)(_,{gap:10,children:[(0,O.jsx)(c,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:n?.setup_required?`One-time setup`:`Secure workspace`}),(0,O.jsx)(h,{order:1,fz:{base:28,sm:32},lh:1.08,children:Ee}),De&&(0,O.jsx)(c,{c:`dimmed`,size:`md`,lh:1.6,maw:390,children:De})]}),(0,O.jsx)(`form`,{onSubmit:we,children:(0,O.jsxs)(_,{gap:`md`,children:[(0,O.jsx)(F,{label:`Email`,placeholder:`you@company.com`,type:`email`,required:!0,value:m,onChange:e=>g(e.currentTarget.value),disabled:E,variant:`filled`,radius:`md`,size:`md`,autoFocus:!E}),n?.setup_required&&(0,O.jsx)(F,{label:`Name`,placeholder:`Your name`,value:v,onChange:e=>oe(e.currentTarget.value),variant:`filled`,radius:`md`,size:`md`}),n?.setup_required&&(0,O.jsx)(F,{label:`Setup token`,placeholder:`from the setup URL printed at startup`,required:!0,value:se,onChange:e=>ce(e.currentTarget.value),autoComplete:`one-time-code`,variant:`filled`,radius:`md`,size:`md`}),Te&&(0,O.jsxs)(_,{gap:`xs`,children:[(0,O.jsx)(c,{size:`sm`,fw:600,children:`Verification code`}),(0,O.jsx)(ae,{ref:he,children:(0,O.jsx)(P,{length:6,type:`number`,oneTimeCode:!0,autoFocus:!0,value:w,onChange:T,onComplete:e=>void Se(e),disabled:M,error:!!I,size:`md`,radius:`md`,"aria-label":`Verification code`,getInputProps:e=>({"aria-label":`Digit ${e+1}`})})}),(0,O.jsxs)(d,{justify:`space-between`,gap:`xs`,children:[(0,O.jsxs)(c,{c:`dimmed`,size:`xs`,children:[`Sent to `,m]}),(0,O.jsx)(b,{variant:`subtle`,size:`compact-xs`,leftSection:(0,O.jsx)(fe,{size:12,weight:`bold`}),onClick:Ce,disabled:M,children:`Change email`})]}),(0,O.jsxs)(d,{justify:`space-between`,gap:`xs`,children:[(0,O.jsx)(c,{c:`dimmed`,size:`xs`,children:`Codes expire in 5 minutes`}),(0,O.jsx)(b,{variant:`subtle`,size:`compact-xs`,onClick:()=>void xe(),disabled:M||Z>0,children:Z>0?`Resend in ${Z}s`:`Resend code`})]})]}),I&&(0,O.jsx)(u,{color:`bad`,radius:`md`,children:I}),Te?(0,O.jsx)(b,{type:`submit`,size:`md`,radius:`md`,mt:4,loading:M,disabled:M||w.length<6,rightSection:(0,O.jsx)(V,{size:17,weight:`bold`}),children:`Verify code`}):(0,O.jsx)(b,{type:`submit`,size:`md`,radius:`md`,mt:4,loading:M,disabled:!n||!n.setup_required&&!n.smtp_configured,leftSection:n?.setup_required?(0,O.jsx)(me,{size:17,weight:`bold`}):void 0,rightSection:n?.setup_required?void 0:(0,O.jsx)(V,{size:17,weight:`bold`}),children:n?.setup_required?`Create admin`:`Send code`})]})})]})})}export{J as a,E as c,w as d,C as f,q as i,T as l,S as m,Y as n,F as o,ce as p,Z as r,A as s,be as t,le as u}; \ No newline at end of file diff --git a/internal/ui/dist/assets/brand-CnsMBQCm.js b/internal/ui/dist/assets/brand-CnsMBQCm.js new file mode 100644 index 00000000..09f4c908 --- /dev/null +++ b/internal/ui/dist/assets/brand-CnsMBQCm.js @@ -0,0 +1 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u{t.exports=u()})),f=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=f()})),m=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),h=o(((e,t)=>{t.exports=m()})),g=l(d(),1),_=h();function v(e){return Object.keys(e)}function y(e){return e&&typeof e==`object`&&!Array.isArray(e)}function b(e,t){let n={...e},r=t;return y(e)&&y(t)&&Object.keys(t).forEach(t=>{y(r[t])&&t in e?n[t]=b(n[t],r[t]):n[t]=r[t]}),n}function x(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function S(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function C(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?S(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?S(n):n}}return r}return n}var w=C(`rem`,{shouldScale:!0}),T=C(`em`);function E(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function D(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}function O(e,t=`size`,n=!0){if(e!==void 0)return D(e)?n?w(e):e:`var(--${t}-${e})`}function k(e){return O(e,`mantine-spacing`)}function A(e){return e===void 0?`var(--mantine-radius-default)`:O(e,`mantine-radius`)}function j(e){return O(e,`mantine-font-size`)}function M(e){return O(e,`mantine-line-height`,!1)}function N(e){if(e)return O(e,`mantine-shadow`,!1)}function P(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function F(e,t){if(typeof t==`boolean`)return t;if(typeof window<`u`&&`matchMedia`in window)try{return window.matchMedia(e).matches}catch{return!1}return!1}function ee(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,g.useState)(n?t:F(e));return(0,g.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var I=typeof document<`u`?g.useLayoutEffect:g.useEffect;function te(e,t){return e.length!==t.length||t.some((t,n)=>!Object.is(t,e[n]))}function L(e,t){let n=(0,g.useRef)(!1),r=(0,g.useRef)(null),i=(0,g.useRef)(void 0),a={};(0,g.useEffect)(()=>{let o=r.current===a,s=i.current;if(r.current=a,i.current=t,!n.current){n.current=!0;return}if(!o&&!(t&&s&&!te(s,t)))return e()},t)}function ne(e){let t=(0,g.useId)(),[n,r]=(0,g.useState)(`mantine-${t.replace(/:/g,``)}`),i=(0,g.useRef)(!1);return I(()=>{i.current||(i.current=!0,r(P()))},[]),typeof e==`string`?e:n}function R(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function z(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=R(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():R(e,null)}),t.clear()}}}function B(...e){return(0,g.useCallback)(z(...e),e)}function re(e,t){return ee(`(prefers-reduced-motion: reduce)`,e,t)}function V(e){return e}function ie(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=H(t[e],n):t[e]=n})}),t}function U({theme:e,classNames:t,props:n,stylesCtx:r}){return oe((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||ae))}function se({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function W(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function ce(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function le(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function ue(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function de(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function fe(e){return ce(e)?le(e):e.startsWith(`rgb`)?ue(e):e.startsWith(`hsl`)?de(e):{r:0,g:0,b:0,a:1}}function pe(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function me(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function he(e){if(e.startsWith(`oklch(`))return(me(e)||0)/100;let{r:t,g:n,b:r}=fe(e),i=t/255,a=n/255,o=r/255,s=pe(i),c=pe(a),l=pe(o);return .2126*s+.7152*c+.0722*l}function ge(e,t=.179){return!e.startsWith(`var(`)&&he(e)>t}function _e({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:ge(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:ge(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:ge(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][W(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:ge(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:ge(e,t.luminanceThreshold),shade:a,variable:void 0}}function ve(e,t){let n=_e({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function ye(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function be(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=fe(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function xe(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=ve(n.from,t),i=ve(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function Se(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=fe(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var Ce=Se,we=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=_e({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&ye(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${w(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${w(1)} solid transparent`}:{background:e,hover:be(e,.1),color:r,border:`${w(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${w(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:be(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${w(1)} solid transparent`}}return{background:Se(e,.1),hover:Se(e,.12),color:e,border:`${w(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${w(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:Se(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${w(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:Se(e,.05),color:e,border:`${w(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${w(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:Se(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${w(1)} solid transparent`}}return{background:`transparent`,hover:Se(e,.12),color:e,border:`${w(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${w(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${w(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${w(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:be(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${w(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:be(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${w(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:be(t.white,.01),color:e,border:`${w(1)} solid transparent`}:n===`gradient`?{background:xe(r,t),hover:xe(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${w(1)} solid var(--mantine-color-default-border)`}:{}},Te=(0,g.createContext)(null);function G(){let e=(0,g.use)(Te);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function Ee(){return G().cssVariablesResolver}function De(){return G().classNamesPrefix}function Oe(){return G().getStyleNonce}function ke(){return G().withStaticClasses}function Ae(){return G().headless}function je(){return G().stylesTransform?.sx}function Me(){return G().stylesTransform?.styles}function Ne(){return G().env||`default`}function Pe(){return G().deduplicateInlineStyles}var Fe={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},Ie=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,Le={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:Fe,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:we,autoContrast:!1,luminanceThreshold:.3,fontFamily:Ie,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:Ie,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:w(34),lineHeight:`1.3`},h2:{fontSize:w(26),lineHeight:`1.35`},h3:{fontSize:w(22),lineHeight:`1.4`},h4:{fontSize:w(18),lineHeight:`1.45`},h5:{fontSize:w(16),lineHeight:`1.5`},h6:{fontSize:w(14),lineHeight:`1.5`}}},fontSizes:{xs:w(12),sm:w(14),md:w(16),lg:w(18),xl:w(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:w(2),sm:w(4),md:w(8),lg:w(16),xl:w(32)},spacing:{xs:w(10),sm:w(12),md:w(16),lg:w(20),xl:w(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${w(1)} ${w(3)} rgba(0, 0, 0, 0.05), 0 ${w(1)} ${w(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${w(1)} ${w(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${w(10)} ${w(15)} ${w(-5)}, rgba(0, 0, 0, 0.04) 0 ${w(7)} ${w(7)} ${w(-5)}`,md:`0 ${w(1)} ${w(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${w(20)} ${w(25)} ${w(-5)}, rgba(0, 0, 0, 0.04) 0 ${w(10)} ${w(10)} ${w(-5)}`,lg:`0 ${w(1)} ${w(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${w(28)} ${w(23)} ${w(-7)}, rgba(0, 0, 0, 0.04) 0 ${w(12)} ${w(12)} ${w(-7)}`,xl:`0 ${w(1)} ${w(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${w(36)} ${w(28)} ${w(-7)}, rgba(0, 0, 0, 0.04) 0 ${w(17)} ${w(17)} ${w(-7)}`},other:{},components:{}},Re=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,ze=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function Be(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function Ve(e){if(!(e.primaryColor in e.colors))throw Error(Re);if(typeof e.primaryShade==`object`&&(!Be(e.primaryShade.dark)||!Be(e.primaryShade.light))||typeof e.primaryShade==`number`&&!Be(e.primaryShade))throw Error(ze)}function He(e,t){if(!t)return Ve(e),e;let n=b(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),Ve(n),n}var Ue=(0,g.createContext)(null),We=()=>(0,g.use)(Ue)||Le;function Ge(){let e=(0,g.use)(Ue);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function Ke({theme:e,children:t,inherit:n=!0}){let r=We(),i=(0,g.useMemo)(()=>He(n?r:Le,e),[e,r,n]);return(0,_.jsx)(Ue,{value:i,children:t})}Ke.displayName=`@mantine/core/MantineThemeProvider`;function K(e,t,n){let r=Ge(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...E(n)}}function qe({classNames:e,styles:t,props:n,stylesCtx:r}){let i=Ge();return{resolvedClassNames:e===void 0?void 0:U({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:t===void 0?void 0:se({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var Je={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function Ye({theme:e,options:t,unstyled:n}){return H(t?.focusable&&!n&&(e.focusClassName||Je[e.focusRing]),t?.active&&!n&&e.activeClassName)}function Xe(e,t,n=1){if(Object.is(e,t))return!0;if(n===0||typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r`${t}-${e}-${n}`)}function nt({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function rt({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return H(Ye({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),nt({options:t,classes:s,selector:r,unstyled:c||m}),a[r],Qe({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),Ze({selector:r,stylesCtx:f,options:t,props:d,theme:e}),$e({rootSelector:u,selector:r,className:l}),et({selector:r,classes:s,unstyled:c||m}),p&&!m&&tt({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function it({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...it({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function at({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&se({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...it({style:n?.style,theme:e})}}function ot(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...E(t[n])}}),e),{})}function st({props:e,stylesCtx:t,themeName:n,theme:r}){let i=Me()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function q({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f,stable:p}){let m=Ge(),h=De(),g=ke(),_=Ae(),v=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:y,getTransformedStyles:b}=st({props:n,stylesCtx:r,themeName:v,theme:m}),x=U({theme:m,classNames:c,props:n,stylesCtx:r}),S=v.map(e=>U({theme:m,classNames:m.components[e]?.classNames,props:n,stylesCtx:r})),C=y?{}:se({theme:m,styles:l,props:n,stylesCtx:r}),w={};if(!y)for(let e of v){let t=se({theme:m,styles:m.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))w[e]={...w[e],...t[e]}}let T=ot([_?{}:d?.(m,n,r),...v.map(e=>m.components?.[e]?.vars?.(m,n,r)),u?.(m,n,r)]),E=it({style:a,theme:m});return ct((e,a)=>({...f?.[e],className:rt({theme:m,options:a,themeName:v,selector:e,classNamesPrefix:h,resolvedClassNames:x,resolvedThemeClassNames:S,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:g,headless:_,transformedStyles:b([a?.styles,l])}),style:at({theme:m,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:y,resolvedStyles:C,resolvedThemeStyles:w,resolvedVars:T,resolvedRootStyle:E})}),!!p,[m,h,g,_,y?n:null,t,s,i,o,f,r,x,S,C,w,T,E])}function ct(e,t,n){let r=(0,g.useRef)(null);return t?((!r.current||!Xe(r.current.deps,n,3))&&(r.current={deps:n,getStyles:e}),r.current.getStyles):e}function lt(e){return v(e).reduce((t,n)=>e[n]===void 0?t:`${t}${x(n)}:${e[n]};`,``).trim()}function ut({selector:e,styles:t,media:n,container:r}){let i=t?lt(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${lt(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${lt(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function dt(e){let t=5381;for(let n=0;n>>0).toString(36)}function ft({deduplicate:e,...t}){let n=Oe(),r=ut(t);return e?(0,_.jsx)(`style`,{href:`mantine-${dt(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,_.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function pt(e){let t=5381;for(let n=0;n>>0).toString(36)}function mt(e,t){return`__mdi__-${pt(`${e?lt(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${lt(e.styles)}`).join(`|`):``}`)}`}function ht(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:D,opacity:O,ff:k,fz:A,fw:j,lts:M,ta:N,lh:P,fs:F,tt:ee,td:I,w:te,miw:L,maw:ne,h:R,mih:z,mah:B,bgsz:re,bgp:V,bgr:ie,bga:H,pos:ae,top:oe,left:U,bottom:se,right:W,inset:ce,display:le,flex:ue,hiddenFrom:de,visibleFrom:fe,lightHidden:pe,darkHidden:me,sx:he,...ge}=e;return{styleProps:E({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:D,opacity:O,ff:k,fz:A,fw:j,lts:M,ta:N,lh:P,fs:F,tt:ee,td:I,w:te,miw:L,maw:ne,h:R,mih:z,mah:B,bgsz:re,bgp:V,bgr:ie,bga:H,pos:ae,top:oe,left:U,bottom:se,right:W,inset:ce,display:le,flex:ue,bdrs:w,hiddenFrom:de,visibleFrom:fe,lightHidden:pe,darkHidden:me,sx:he}),rest:ge}}var gt={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function _t(e,t){let n=_e({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function vt(e,t){let n=_e({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:_t(e,t)}function yt(e,t){if(typeof e==`number`)return w(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${w(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${_t(i.join(` `),t)}`),a.trim()}return e}var bt={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function xt(e){return typeof e==`string`&&e in bt?bt[e]:e}var St=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Ct(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&St.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?w(e):e}function wt(e){return e}var Tt=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Et(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&Tt.includes(e)?`var(--mantine-${e}-line-height)`:e}function Dt(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?w(e):e}function Ot(e){return typeof e==`number`?w(e):e}function kt(e,t){if(typeof e==`number`)return w(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return w(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var At={color:_t,textColor:vt,fontSize:Ct,spacing:kt,radius:Dt,identity:wt,size:Ot,lineHeight:Et,fontFamily:xt,border:yt};function jt(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function Mt({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(jt(e))-Number(jt(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function Nt(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function Pt(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Ft(e){return typeof e==`object`&&e?v(e).filter(e=>e!==`base`):[]}function It(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Lt({styleProps:e,data:t,theme:n}){return Mt(v(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=Pt(e[i]);if(!Nt(e[i]))return o.forEach(e=>{r.inlineStyles[e]=At[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=Ft(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=At[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:At[a.type](It(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Rt(){return`__m__-${(0,g.useId)().replace(/[:«»]/g,``)}`}function zt(e){return e}var Bt=zt;function Vt(e){return e}function J(e){let t=e;return t.extend=Vt,t.withProps=e=>{let n=n=>(0,_.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Ht(e){return J(e)}function Y(e){let t=e;return t.withProps=e=>{let n=n=>(0,_.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Vt,t}function Ut(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function Wt(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[Ut(n)]=e[n]),t},{})}function Gt(e){return e?typeof e==`string`?{[Ut(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...Gt(t)}),{}):Wt(e):null}function Kt(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Kt(n,t)}),{}):typeof e==`function`?e(t):e??{}}function qt({theme:e,style:t,vars:n,styleProps:r}){let i=Kt(t,e),a=Kt(n,e);return{...i,...a,...r}}function Jt({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=Ge(),g=e||`div`,{styleProps:v,rest:y}=ht(m),b=je()?.()?.(v.sx),x=Rt(),S=Lt({styleProps:v,theme:h,data:gt}),C=Pe(),w=C&&S.hasResponsiveStyles?mt(S.styles,S.media):x,T={ref:p,style:qt({theme:h,style:t,vars:n,styleProps:S.inlineStyles}),className:H(r,b,{[w]:S.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":D(o)?void 0:o||void 0,size:f,...Gt(a),...y};return(0,_.jsxs)(_.Fragment,{children:[S.hasResponsiveStyles&&(0,_.jsx)(ft,{selector:`.${w}`,styles:S.styles,media:S.media,deduplicate:C}),typeof d==`function`?d(T):(0,_.jsx)(g,{...T})]})}Jt.displayName=`@mantine/core/Box`;var X=Bt(Jt),Yt={root:`m_87cf2631`},Xt={__staticSelector:`UnstyledButton`},Zt=Y(e=>{let t=K(`UnstyledButton`,Xt,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t,d=q({name:i,props:t,classes:Yt,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l});return(0,_.jsx)(X,{...d(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});Zt.classes=Yt,Zt.displayName=`@mantine/core/UnstyledButton`;var Qt={root:`m_1b7284a3`},$t=V((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:A(t),"--paper-shadow":N(n)}})),en=Y(e=>{let t=K(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=q({name:`Paper`,props:t,classes:Qt,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:$t});return(0,_.jsx)(X,{mod:[{withBorder:s},f],...h(`root`),variant:d,...m})});en.classes=Qt,en.varsResolver=$t,en.displayName=`@mantine/core/Paper`;var tn=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),nn={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...tn(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...tn(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...tn(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...tn(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...tn(`top`),common:{transformOrigin:`top right`}}},rn={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function an({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in nn?{transitionProperty:nn[e].transitionProperty,...i,...nn[e].common,...nn[e][rn[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[rn[t]]}}var on=l(p(),1);function sn({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=Ge(),d=re(),f=u.respectReducedMotion?d:!1,[p,m]=(0,g.useState)(f?0:e),[h,_]=(0,g.useState)(r?`entered`:`exited`),v=(0,g.useRef)(-1),y=(0,g.useRef)(-1),b=(0,g.useRef)(-1);function x(){window.clearTimeout(v.current),window.clearTimeout(y.current),cancelAnimationFrame(b.current)}let S=n=>{x();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),_(n?`entered`:`exited`)):b.current=requestAnimationFrame(()=>{on.flushSync(()=>{_(n?`pre-entering`:`pre-exiting`)}),b.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),_(n?`entering`:`exiting`),v.current=window.setTimeout(()=>{typeof c==`function`&&c(),_(n?`entered`:`exited`)},l)})})},C=e=>{if(x(),typeof(e?c:l)!=`number`){S(e);return}y.current=window.setTimeout(()=>{S(e)},e?c:l)};return L(()=>{C(r)},[r]),(0,g.useEffect)(()=>()=>{x()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function cn({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=Ne(),{transitionDuration:h,transitionStatus:v,transitionTimingFunction:y}=sn({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,_.jsx)(_.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,_.jsx)(_.Fragment,{children:o({})}):o({display:`none`}):(0,_.jsx)(g.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,_.jsx)(_.Fragment,{children:o({})}):null;let b=v===`exited`;if(e){let e=o(b?t===`display-none`?{display:`none`}:{}:an({transition:n,duration:h,state:v,timingFunction:y}));return t===`display-none`?e:(0,_.jsx)(g.Activity,{mode:b?`hidden`:`visible`,children:e})}return b?null:(0,_.jsx)(_.Fragment,{children:o(an({transition:n,duration:h,state:v,timingFunction:y}))})}cn.displayName=`@mantine/core/Transition`;var Z={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},ln=({className:e,...t})=>(0,_.jsxs)(X,{component:`span`,className:H(Z.barsLoader,e),...t,children:[(0,_.jsx)(`span`,{className:Z.bar}),(0,_.jsx)(`span`,{className:Z.bar}),(0,_.jsx)(`span`,{className:Z.bar})]});ln.displayName=`@mantine/core/Bars`;var un=({className:e,...t})=>(0,_.jsxs)(X,{component:`span`,className:H(Z.dotsLoader,e),...t,children:[(0,_.jsx)(`span`,{className:Z.dot}),(0,_.jsx)(`span`,{className:Z.dot}),(0,_.jsx)(`span`,{className:Z.dot})]});un.displayName=`@mantine/core/Dots`;var dn=({className:e,...t})=>(0,_.jsx)(X,{component:`span`,className:H(Z.ovalLoader,e),...t});dn.displayName=`@mantine/core/Oval`;var fn={bars:ln,oval:dn,dots:un},pn={loaders:fn,type:`oval`},mn=V((e,{size:t,color:n})=>({root:{"--loader-size":O(t,`loader-size`),"--loader-color":n?ve(n,e):void 0}})),hn=J(e=>{let t=K(`Loader`,pn,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=q({name:`Loader`,props:t,classes:Z,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:mn});return p?(0,_.jsx)(X,{...g(`root`),...h,children:p}):(0,_.jsx)(X,{...g(`root`),component:d[i],variant:f,size:n,...h})});hn.defaultLoaders=fn,hn.classes=Z,hn.varsResolver=mn,hn.displayName=`@mantine/core/Loader`;function gn({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,_.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,_.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}gn.displayName=`@mantine/core/CloseIcon`;var _n={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},vn={variant:`subtle`},yn=V((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":O(t,`cb-size`),"--cb-radius":n===void 0?void 0:A(n),"--cb-icon-size":w(r)}})),bn=Y(e=>{let t=K(`CloseButton`,vn,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:v,...y}=t,b=q({name:v||`CloseButton`,props:t,className:o,style:c,classes:_n,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:yn});return(0,_.jsxs)(Zt,{...y,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...b(`root`,{variant:p,active:!f&&!d}),children:[m||(0,_.jsx)(gn,{}),r]})});bn.classes=_n,bn.varsResolver=yn,bn.displayName=`@mantine/core/CloseButton`;function xn(e){return g.Children.toArray(e).filter(Boolean)}var Sn={root:`m_4081bf90`},Cn={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},wn=V((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":k(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),Tn=J(e=>{let t=K(`Group`,Cn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:v,attributes:y,...b}=t,x=xn(s),S=x.length,C=k(c??`md`),w=q({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/S}% - (${C} - ${C} / ${S}))`},className:r,style:i,classes:Sn,classNames:n,styles:a,unstyled:o,attributes:y,vars:m,varsResolver:wn});return(0,_.jsx)(X,{...w(`root`),variant:h,mod:[{grow:f},v],size:g,...b,children:x})});Tn.classes=Sn,Tn.varsResolver=wn,Tn.displayName=`@mantine/core/Group`;var En=(0,g.createContext)({size:`sm`}),Dn=J(e=>{let t=K(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,g.use)(En),{resolvedClassNames:l,resolvedStyles:u}=qe({classNames:a,styles:o,props:t});return(0,_.jsx)(bn,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});Dn.displayName=`@mantine/core/InputClearButton`;var On={xs:7,sm:8,md:10,lg:12,xl:15};function kn({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,_.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:On[i]},children:[o,n||r]}):n===null?null:n||o||r}var An=(0,g.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),Q={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,bottomSection:`m_93f4ed57`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,success:`m_9d9d40e0`,description:`m_fe47ce59`},jn=V((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${j(t)} - ${w(2)})`}})),Mn=J(e=>{let t=K(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=K(`InputDescription`,null,t),f=(0,g.use)(An),p=q({name:[`InputWrapper`,c],props:t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:jn}),m=l&&f?.getStyles||p;return(0,_.jsx)(X,{component:`p`,...m(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});Mn.classes=Q,Mn.varsResolver=jn,Mn.displayName=`@mantine/core/InputDescription`;var Nn=V((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${j(t)} - ${w(2)})`}})),Pn=J(e=>{let t=K(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=q({name:[`InputWrapper`,l],props:t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:Nn}),p=(0,g.use)(An),m=u&&p?.getStyles||f;return(0,_.jsx)(X,{component:`p`,...m(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});Pn.classes=Q,Pn.varsResolver=Nn,Pn.displayName=`@mantine/core/InputError`;var Fn={labelElement:`label`},In=V((e,{size:t})=>({label:{"--input-label-size":j(t),"--input-asterisk-color":void 0}})),Ln=J(e=>{let t=K(`InputLabel`,Fn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...v}=t,y=q({name:[`InputWrapper`,p],props:t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:In}),b=(0,g.use)(An),x=b?.getStyles||y,S=v.component||c,C=typeof S!=`string`||S===`label`;return(0,_.jsxs)(X,{...x(`label`,b?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:C?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...v,children:[f,l&&(0,_.jsx)(`span`,{...x(`required`),"aria-hidden":!0,children:` *`})]})});Ln.classes=Q,Ln.varsResolver=In,Ln.displayName=`@mantine/core/InputLabel`;var Rn=J(e=>{let t=K(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t,p=q({name:[`InputPlaceholder`,c],props:t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`});return(0,_.jsx)(X,{...p(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});Rn.classes=Q,Rn.displayName=`@mantine/core/InputPlaceholder`;var zn=V((e,{size:t})=>({success:{"--input-success-size":t===void 0?void 0:`calc(${j(t)} - ${w(2)})`}})),Bn=J(e=>{let t=K(`InputSuccess`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=q({name:[`InputWrapper`,l],props:t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`success`,vars:s,varsResolver:zn}),p=(0,g.use)(An),m=u&&p?.getStyles||f;return(0,_.jsx)(X,{component:`p`,...m(`success`,p?.getStyles?{className:r,style:i}:void 0),...d})});Bn.classes=Q,Bn.varsResolver=zn,Bn.displayName=`@mantine/core/InputSuccess`;function Vn(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var Hn={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},Un=V((e,{size:t})=>({label:{"--input-label-size":j(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${j(t)} - ${w(2)})`},success:{"--input-success-size":t===void 0?void 0:`calc(${j(t)} - ${w(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${j(t)} - ${w(2)})`}})),Wn=J(e=>{let t=K(`InputWrapper`,Hn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,success:h,description:v,labelProps:y,descriptionProps:b,errorProps:x,successProps:S,labelElement:C,children:w,withAsterisk:T,id:E,required:D,__stylesApiProps:O,mod:k,attributes:A,...j}=t,M=q({name:[`InputWrapper`,u],props:O||t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:A,vars:s,varsResolver:Un}),N={size:c,variant:l,__staticSelector:u},P=ne(E),F=typeof T==`boolean`?T:D,ee=x?.id||`${P}-error`,I=S?.id||`${P}-success`,te=b?.id||`${P}-description`,L=P,R=!!m&&typeof m!=`boolean`,z=!!h&&typeof h!=`boolean`&&!m,B=!!v,re=R&&f.includes(`error`),V=z&&f.includes(`error`),ie=B&&f.includes(`description`),H=`${re?ee:``} ${V?I:``} ${ie?te:``}`,ae=H.trim().length>0?H.trim():void 0,oe=y?.id||`${P}-label`,U=p&&(0,_.jsx)(Ln,{labelElement:C,id:oe,htmlFor:L,required:F,...N,...y,children:p},`label`),se=B&&(0,_.jsx)(Mn,{...b,...N,size:b?.size||N.size,id:b?.id||te,children:v},`description`),W=(0,_.jsx)(g.Fragment,{children:d(w)},`input`),ce=R&&(0,g.createElement)(Pn,{...x,...N,size:x?.size||N.size,key:`error`,id:x?.id||ee},m),le=z&&(0,g.createElement)(Bn,{...S,...N,size:S?.size||N.size,key:`success`,id:S?.id||I},h),ue=f.map(e=>{switch(e){case`label`:return U;case`input`:return W;case`description`:return se;case`error`:return ce||le;default:return null}});return(0,_.jsx)(An,{value:{getStyles:M,describedBy:ae,inputId:L,labelId:U&&f.includes(`label`)?oe:void 0,...Vn(f,{hasDescription:B,hasError:R||z})},children:(0,_.jsx)(X,{variant:l,size:c,mod:[{error:!!m,success:!!h&&!m},k],id:C===`label`?void 0:E,...M(`root`),...j,children:ue})})});Wn.classes=Q,Wn.varsResolver=Un,Wn.displayName=`@mantine/core/InputWrapper`;var Gn={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,withSuccessStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},Kn=V((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":O(t.size,`input-height`),"--input-fz":j(t.size),"--input-radius":t.radius===void 0?void 0:A(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:w(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:w(t.rightSectionWidth),"--input-padding-y":t.multiline?O(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),$=Y(e=>{let t=K(`Input`,Gn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,success:p,disabled:m,leftSection:h,leftSectionProps:v,leftSectionWidth:y,rightSection:b,rightSectionProps:x,rightSectionWidth:S,rightSectionPointerEvents:C,leftSectionPointerEvents:w,variant:T,vars:E,pointer:D,multiline:O,radius:k,id:A,withAria:j,withErrorStyles:M,withSuccessStyles:N,mod:P,inputSize:F,attributes:ee,__clearSection:I,__clearable:te,__clearSectionMode:L,__defaultRightSection:ne,loading:R,loadingPosition:z,__bottomSection:B,__bottomSectionProps:re,rootRef:V,dir:ie,...H}=t,{styleProps:ae,rest:oe}=ht(H),U=(0,g.use)(An),se={offsetBottom:U?.offsetBottom,offsetTop:U?.offsetTop},W=q({name:[`Input`,c],props:l||t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:ee,stylesCtx:se,rootSelector:`wrapper`,vars:E,varsResolver:Kn}),ce=j?{required:s,disabled:m,"aria-invalid":f?!0:void 0,"aria-describedby":U?.describedBy,id:U?.inputId||A}:{},le=R?(0,_.jsx)(hn,{size:z===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,ue=R&&z===`left`?le:h,de=kn({__clearable:te,__clearSection:I,rightSection:R&&z===`right`?le:b,__defaultRightSection:ne,size:u,__clearSectionMode:L});return(0,_.jsx)(En,{value:{size:u||`sm`},children:(0,_.jsxs)(X,{ref:V,dir:ie,...W(`wrapper`),...ae,...d,mod:[{error:!!f&&M,success:!!p&&!f&&N,pointer:D,disabled:m,multiline:O,withRightSection:!!de,withLeftSection:!!ue,withBottomSection:!!B},P],variant:T,size:u,children:[ue&&(0,_.jsx)(`div`,{...v,"data-position":`left`,...W(`section`,{className:v?.className,style:v?.style}),children:ue}),(0,_.jsx)(X,{component:`input`,...oe,...ce,required:s,mod:{disabled:m,error:!!f&&M,success:!!p&&!f&&N},variant:T,__size:F,...W(`input`)}),B&&(0,_.jsx)(`div`,{...re,...W(`bottomSection`,{className:re?.className,style:re?.style}),children:B}),de&&(0,_.jsx)(`div`,{...x,"data-position":`right`,...W(`section`,{className:x?.className,style:x?.style}),children:de})]})})});$.classes=Q,$.varsResolver=Kn,$.Wrapper=Wn,$.Label=Ln,$.Error=Pn,$.Success=Bn,$.Description=Mn,$.Placeholder=Rn,$.ClearButton=Dn,$.displayName=`@mantine/core/Input`;function qn(e,t,n){let r=K([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,success:s,required:c,classNames:l,styles:u,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,wrapperProps:y,id:b,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,vars:D,mod:O,attributes:k,...A}=r,{styleProps:j,rest:M}=ht(A),N={label:i,description:a,error:o,success:s,required:c,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,unstyled:f,styles:u,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,id:b,mod:O,attributes:k,...y};return{...M,classNames:l,styles:u,unstyled:f,wrapperProps:{...N,...j},inputProps:{required:c,classNames:l,styles:u,unstyled:f,size:x,__staticSelector:p,__stylesApiProps:m||r,error:o,success:s,variant:E,id:b,attributes:k}}}var Jn={__staticSelector:`InputBase`,withAria:!0,size:`sm`},Yn=Y(e=>{let{inputProps:t,wrapperProps:n,...r}=qn(`InputBase`,Jn,e);return(0,_.jsx)($.Wrapper,{...n,children:(0,_.jsx)($,{...t,...r})})});Yn.classes={...$.classes,...$.Wrapper.classes},Yn.displayName=`@mantine/core/InputBase`;var Xn={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},Zn=V((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:A(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),Qn=J(e=>{let t=K(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:v,autoContrast:y,role:b,attributes:x,...S}=t,C=q({name:`Alert`,classes:Xn,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:x,vars:s,varsResolver:Zn}),w=ne(f),T=u&&`${w}-title`||void 0,E=`${w}-body`;return(0,_.jsx)(X,{id:w,...C(`root`,{variant:v}),variant:v,...S,role:b||`alert`,"aria-describedby":d?E:void 0,"aria-labelledby":u?T:void 0,children:(0,_.jsxs)(`div`,{...C(`wrapper`),children:[p&&(0,_.jsx)(`div`,{...C(`icon`),children:p}),(0,_.jsxs)(`div`,{...C(`body`),children:[u&&(0,_.jsx)(`div`,{...C(`title`),"data-with-close-button":m||void 0,children:(0,_.jsx)(`span`,{id:T,...C(`label`),children:u})}),d&&(0,_.jsx)(`div`,{id:E,...C(`message`),"data-variant":v,children:d})]}),m&&(0,_.jsx)(bn,{...C(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});Qn.classes=Xn,Qn.varsResolver=Zn,Qn.displayName=`@mantine/core/Alert`;var $n={root:`m_b6d8b162`};function er(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var tr={inherit:!1},nr=V((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":j(i),"--text-lh":M(i),"--text-gradient":t===`gradient`?xe(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),rr=Y(e=>{let t=K(`Text`,tr,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:v,size:y,attributes:b,...x}=t,S=q({name:[`Text`,l],props:t,classes:$n,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:b,vars:u,varsResolver:nr});return(0,_.jsx)(X,{...S(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{truncate:er(r),lineClamp:typeof n==`number`,inline:i,inherit:a},v],size:y,...x})});rr.classes=$n,rr.varsResolver=nr,rr.displayName=`@mantine/core/Text`;var ir={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},ar={orientation:`horizontal`},or=V((e,{borderWidth:t})=>({group:{"--button-border-width":w(t)}})),sr=J(e=>{let t=K(`ButtonGroup`,ar,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=K(`ButtonGroup`,ar,e),p=q({name:`ButtonGroup`,props:t,classes:ir,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:or,rootSelector:`group`});return(0,_.jsx)(X,{...p(`group`),mod:[{orientation:s},u],role:`group`,...f})});sr.classes=ir,sr.varsResolver=or,sr.displayName=`@mantine/core/ButtonGroup`;var cr=V((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":O(o,`section-height`),"--section-padding-x":O(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?j(o.replace(`compact-`,``)):j(o),"--section-radius":t===void 0?void 0:A(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),lr=J(e=>{let t=K(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t,p=q({name:`ButtonGroupSection`,props:t,classes:ir,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:cr,rootSelector:`groupSection`});return(0,_.jsx)(X,{...p(`groupSection`),...f})});lr.classes=ir,lr.varsResolver=cr,lr.displayName=`@mantine/core/ButtonGroupSection`;var ur={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${w(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},dr=V((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":O(a,`button-height`),"--button-padding-x":O(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?j(a.replace(`compact-`,``)):j(a),"--button-radius":t===void 0?void 0:A(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),fr=Y(e=>{let t=K(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:v,unstyled:y,"data-disabled":b,autoContrast:x,mod:S,attributes:C,...w}=t,T=q({name:`Button`,props:t,classes:ir,className:i,style:n,classNames:g,styles:v,unstyled:y,attributes:C,vars:r,varsResolver:dr}),E=!!c,D=!!l;return(0,_.jsxs)(Zt,{...T(`root`,{active:!o&&!p&&!b}),unstyled:y,variant:d,disabled:o||p,mod:[{disabled:o||b,loading:p,block:u,"with-left-section":E,"with-right-section":D},S],...w,children:[typeof p==`boolean`&&(0,_.jsx)(cn,{mounted:p,transition:ur,duration:150,children:e=>(0,_.jsx)(X,{component:`span`,...T(`loader`,{style:e}),"aria-hidden":!0,children:(0,_.jsx)(hn,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,_.jsxs)(`span`,{...T(`inner`),children:[c&&(0,_.jsx)(X,{component:`span`,...T(`section`),mod:{position:`left`},children:c}),(0,_.jsx)(X,{component:`span`,mod:{loading:p},...T(`label`),children:s}),l&&(0,_.jsx)(X,{component:`span`,...T(`section`),mod:{position:`right`},children:l})]})]})});fr.classes=ir,fr.varsResolver=dr,fr.displayName=`@mantine/core/Button`,fr.Group=sr,fr.GroupSection=lr;var pr={root:`m_4451eb3a`},mr=Y(e=>{let t=K(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=q({name:`Center`,props:t,classes:pr,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,_.jsx)(X,{mod:[{inline:c},l],...f(`root`),...d})});mr.classes=pr,mr.displayName=`@mantine/core/Center`;var hr={root:`m_7485cace`},gr={strategy:`block`},_r=V((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:O(t,`container-size`)}})),vr=J(e=>{let t=K(`Container`,gr,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fluid:c,mod:l,attributes:u,strategy:d,...f}=t,p=q({name:`Container`,classes:hr,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:_r});return(0,_.jsx)(X,{mod:[{fluid:c,strategy:d},l],...p(`root`),...f})});vr.classes=hr,vr.varsResolver=_r,vr.displayName=`@mantine/core/Container`;var yr={root:`m_6d731127`},br={gap:`md`,align:`stretch`,justify:`flex-start`},xr=V((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":k(t),"--stack-align":n,"--stack-justify":r}})),Sr=J(e=>{let t=K(`Stack`,br,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t,m=q({name:`Stack`,props:t,classes:yr,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:xr});return(0,_.jsx)(X,{...m(`root`),variant:d,...p})});Sr.classes=yr,Sr.varsResolver=xr,Sr.displayName=`@mantine/core/Stack`;var Cr={root:`m_7341320d`},wr=V((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":O(t,`ti-size`),"--ti-radius":n===void 0?void 0:A(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),Tr=J(e=>{let t=K(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t,d=q({name:`ThemeIcon`,classes:Cr,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:wr});return(0,_.jsx)(X,{...d(`root`),...u})});Tr.classes=Cr,Tr.varsResolver=wr,Tr.displayName=`@mantine/core/ThemeIcon`;var Er=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],Dr=[`xs`,`sm`,`md`,`lg`,`xl`];function Or(e,t){let n=t===void 0?`h${e}`:t;return Er.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:Dr.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:w(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var kr={root:`m_8a5d1357`},Ar={order:1},jr=V((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=Or(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),Mr=J(e=>{let t=K(`Title`,Ar,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=q({name:`Title`,props:t,classes:kr,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:jr});return[1,2,3,4,5,6].includes(s)?(0,_.jsx)(X,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,lineClamp:typeof d==`number`},p],size:l,...h}):null});Mr.classes=kr,Mr.varsResolver=jr,Mr.displayName=`@mantine/core/Title`;var Nr=new Map([[`bold`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),g.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),Pr=new Map([[`bold`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),g.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,g.createElement(g.Fragment,null,g.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),Fr=(0,g.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),Ir=g.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=g.useContext(Fr);return g.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&g.createElement(`title`,null,n),s,c.get(a??f))});Ir.displayName=`IconBase`;var Lr=g.forwardRef((e,t)=>g.createElement(Ir,{ref:t,...e,weights:Nr}));Lr.displayName=`CheckIcon`;var Rr=Lr,zr=g.forwardRef((e,t)=>g.createElement(Ir,{ref:t,...e,weights:Pr}));zr.displayName=`CopyIcon`;var Br=zr,Vr={small:{fontSize:15,gap:12,tracking:`0.16em`},regular:{fontSize:18,gap:14,tracking:`0.17em`},large:{fontSize:22,gap:16,tracking:`0.18em`}};function Hr({size:e=`regular`}){let t=Vr[e];return(0,_.jsxs)(Tn,{component:`span`,gap:t.gap,wrap:`nowrap`,"aria-label":`Fanout`,children:[(0,_.jsx)(Ur,{size:e}),(0,_.jsx)(rr,{component:`span`,fz:t.fontSize,fw:800,lh:1,lts:t.tracking,tt:`uppercase`,children:`Fanout`})]})}function Ur({size:e=`regular`}){let t={small:32,regular:46,large:50}[e];return(0,_.jsx)(Tr,{size:t,variant:`transparent`,"aria-hidden":`true`,children:(0,_.jsx)(Wr,{})})}function Wr(){let e=(0,g.useId)().replace(/[^a-zA-Z0-9-]/g,``),t=`fo-top-${e}`,n=`fo-mid-${e}`,r=`fo-bot-${e}`;return(0,_.jsxs)(`svg`,{viewBox:`35 44 200 200`,width:`100%`,height:`100%`,"aria-hidden":`true`,children:[(0,_.jsxs)(`defs`,{children:[(0,_.jsxs)(`linearGradient`,{id:t,x1:`54`,y1:`52`,x2:`210`,y2:`104`,gradientUnits:`userSpaceOnUse`,children:[(0,_.jsx)(`stop`,{offset:`0`,stopColor:`#5FE8CE`}),(0,_.jsx)(`stop`,{offset:`0.55`,stopColor:`#81E4B9`}),(0,_.jsx)(`stop`,{offset:`1`,stopColor:`#D9F276`})]}),(0,_.jsxs)(`linearGradient`,{id:n,x1:`58`,y1:`112`,x2:`176`,y2:`154`,gradientUnits:`userSpaceOnUse`,children:[(0,_.jsx)(`stop`,{offset:`0`,stopColor:`#536FFF`}),(0,_.jsx)(`stop`,{offset:`0.52`,stopColor:`#41B6F8`}),(0,_.jsx)(`stop`,{offset:`1`,stopColor:`#66D0EE`})]}),(0,_.jsxs)(`linearGradient`,{id:r,x1:`58`,y1:`166`,x2:`145`,y2:`220`,gradientUnits:`userSpaceOnUse`,children:[(0,_.jsx)(`stop`,{offset:`0`,stopColor:`#725BFF`}),(0,_.jsx)(`stop`,{offset:`0.52`,stopColor:`#9A50F4`}),(0,_.jsx)(`stop`,{offset:`1`,stopColor:`#CB55E8`})]})]}),(0,_.jsx)(`path`,{d:`M58 116V88C58 67 75 52 96 52H191C204 52 212 61 212 72C212 84 203 94 191 94H101C82 94 67 102 58 116Z`,fill:`url(#${t})`}),(0,_.jsx)(`path`,{d:`M58 170V139C58 120 72 107 91 107H162C174 107 182 115 182 126C182 137 174 145 162 145H99C79 145 66 154 58 170Z`,fill:`url(#${n})`}),(0,_.jsx)(`path`,{d:`M58 219V188C58 170 71 157 89 157H126C138 157 146 165 146 176C146 187 138 195 126 195H100C89 195 84 200 84 211C84 225 74 235 61 235H58Z`,fill:`url(#${r})`})]})}export{B as $,qe as A,Oe as B,J as C,mt as D,Lt as E,Te as F,ye as G,Ce as H,G as I,W as J,ve as K,Ee as L,Ke as M,Ge as N,ft as O,Le as P,R as Q,Pe as R,Y as S,Rt as T,Se as U,we as V,be as W,V as X,H as Y,re as Z,hn as _,o as _t,Ir as a,A as at,Zt as b,vr as c,k as ct,rr as d,w as dt,ne as et,Qn as f,b as ft,bn as g,d as gt,Tn as h,p as ht,Rr as i,j as it,K as j,q as k,mr as l,E as lt,$ as m,h as mt,Ur as n,I as nt,Mr as o,N as ot,Yn as p,v as pt,_e as q,Br as r,ee as rt,Sr as s,O as st,Hr as t,L as tt,fr as u,T as ut,cn as v,s as vt,Ht as w,X as x,en as y,l as yt,Ne as z}; \ No newline at end of file diff --git a/internal/ui/dist/assets/brand-MzZ03bSa.js b/internal/ui/dist/assets/brand-MzZ03bSa.js deleted file mode 100644 index 4e863b4b..00000000 --- a/internal/ui/dist/assets/brand-MzZ03bSa.js +++ /dev/null @@ -1 +0,0 @@ -var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e),f=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")}),p=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=p()})),h=s((e=>{var t=m();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),v=s(((e,t)=>{t.exports=_()})),y=u(m(),1),b=v();function x(e){return Object.keys(e)}function S(e){return e&&typeof e==`object`&&!Array.isArray(e)}function C(e,t){let n={...e},r=t;return S(e)&&S(t)&&Object.keys(t).forEach(t=>{S(r[t])&&t in e?n[t]=C(n[t],r[t]):n[t]=r[t]}),n}function w(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function T(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function E(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?T(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?T(n):n}}return r}return n}var D=E(`rem`,{shouldScale:!0}),O=E(`em`);function k(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function A(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}function j(e,t=`size`,n=!0){if(e!==void 0)return A(e)?n?D(e):e:`var(--${t}-${e})`}function M(e){return j(e,`mantine-spacing`)}function N(e){return e===void 0?`var(--mantine-radius-default)`:j(e,`mantine-radius`)}function P(e){return j(e,`mantine-font-size`)}function ee(e){return j(e,`mantine-line-height`,!1)}function F(e){if(e)return j(e,`mantine-shadow`,!1)}function te(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function ne(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window&&window.matchMedia(e).matches}function re(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,y.useState)(n?t:ne(e));return(0,y.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var I=typeof document<`u`?y.useLayoutEffect:y.useEffect;function L(e,t){let n=(0,y.useRef)(!1);(0,y.useEffect)(()=>()=>{n.current=!1},[]),(0,y.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}function R(e){let[t,n]=(0,y.useState)(`mantine-${(0,y.useId)().replace(/:/g,``)}`),r=(0,y.useRef)(!1);return I(()=>{r.current||(r.current=!0,n(te()))},[]),typeof e==`string`?e:t}function z(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function ie(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=z(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():z(e,null)}),t.clear()}}}function ae(...e){return(0,y.useCallback)(ie(...e),e)}function oe(e,t){return re(`(prefers-reduced-motion: reduce)`,e,t)}function B(e){return e}function se(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=V(t[e],n):t[e]=n})}),t}function H({theme:e,classNames:t,props:n,stylesCtx:r}){return le((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||ce))}function U({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function ue(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function de(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function fe(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function pe(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function me(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function he(e){return de(e)?fe(e):e.startsWith(`rgb`)?pe(e):e.startsWith(`hsl`)?me(e):{r:0,g:0,b:0,a:1}}function ge(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function _e(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function ve(e){if(e.startsWith(`oklch(`))return(_e(e)||0)/100;let{r:t,g:n,b:r}=he(e),i=t/255,a=n/255,o=r/255,s=ge(i),c=ge(a),l=ge(o);return .2126*s+.7152*c+.0722*l}function ye(e,t=.179){return!e.startsWith(`var(`)&&ve(e)>t}function be({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:ye(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:ye(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:ye(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][ue(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:ye(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:ye(e,t.luminanceThreshold),shade:a,variable:void 0}}function xe(e,t){let n=be({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function Se(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function Ce(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=he(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function we(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=xe(n.from,t),i=xe(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function W(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=he(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var Te=W,Ee=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=be({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&Se(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${D(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${D(1)} solid transparent`}:{background:e,hover:Ce(e,.1),color:r,border:`${D(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${D(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:Ce(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${D(1)} solid transparent`}}return{background:W(e,.1),hover:W(e,.12),color:e,border:`${D(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${D(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:W(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${D(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:W(e,.05),color:e,border:`${D(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${D(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:W(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${D(1)} solid transparent`}}return{background:`transparent`,hover:W(e,.12),color:e,border:`${D(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${D(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${D(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${D(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:Ce(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${D(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Ce(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${D(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Ce(t.white,.01),color:e,border:`${D(1)} solid transparent`}:n===`gradient`?{background:we(r,t),hover:we(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${D(1)} solid var(--mantine-color-default-border)`}:{}},De=(0,y.createContext)(null);function G(){let e=(0,y.use)(De);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function Oe(){return G().cssVariablesResolver}function ke(){return G().classNamesPrefix}function Ae(){return G().getStyleNonce}function je(){return G().withStaticClasses}function Me(){return G().headless}function Ne(){return G().stylesTransform?.sx}function Pe(){return G().stylesTransform?.styles}function Fe(){return G().env||`default`}function Ie(){return G().deduplicateInlineStyles}var Le={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},Re=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,ze={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:Le,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:Ee,autoContrast:!1,luminanceThreshold:.3,fontFamily:Re,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:Re,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:D(34),lineHeight:`1.3`},h2:{fontSize:D(26),lineHeight:`1.35`},h3:{fontSize:D(22),lineHeight:`1.4`},h4:{fontSize:D(18),lineHeight:`1.45`},h5:{fontSize:D(16),lineHeight:`1.5`},h6:{fontSize:D(14),lineHeight:`1.5`}}},fontSizes:{xs:D(12),sm:D(14),md:D(16),lg:D(18),xl:D(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:D(2),sm:D(4),md:D(8),lg:D(16),xl:D(32)},spacing:{xs:D(10),sm:D(12),md:D(16),lg:D(20),xl:D(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${D(1)} ${D(3)} rgba(0, 0, 0, 0.05), 0 ${D(1)} ${D(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${D(1)} ${D(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${D(10)} ${D(15)} ${D(-5)}, rgba(0, 0, 0, 0.04) 0 ${D(7)} ${D(7)} ${D(-5)}`,md:`0 ${D(1)} ${D(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${D(20)} ${D(25)} ${D(-5)}, rgba(0, 0, 0, 0.04) 0 ${D(10)} ${D(10)} ${D(-5)}`,lg:`0 ${D(1)} ${D(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${D(28)} ${D(23)} ${D(-7)}, rgba(0, 0, 0, 0.04) 0 ${D(12)} ${D(12)} ${D(-7)}`,xl:`0 ${D(1)} ${D(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${D(36)} ${D(28)} ${D(-7)}, rgba(0, 0, 0, 0.04) 0 ${D(17)} ${D(17)} ${D(-7)}`},other:{},components:{}},Be=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,Ve=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function He(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function Ue(e){if(!(e.primaryColor in e.colors))throw Error(Be);if(typeof e.primaryShade==`object`&&(!He(e.primaryShade.dark)||!He(e.primaryShade.light))||typeof e.primaryShade==`number`&&!He(e.primaryShade))throw Error(Ve)}function We(e,t){if(!t)return Ue(e),e;let n=C(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),Ue(n),n}var Ge=(0,y.createContext)(null),Ke=()=>(0,y.use)(Ge)||ze;function qe(){let e=(0,y.use)(Ge);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function Je({theme:e,children:t,inherit:n=!0}){let r=Ke(),i=(0,y.useMemo)(()=>We(n?r:ze,e),[e,r,n]);return(0,b.jsx)(Ge,{value:i,children:t})}Je.displayName=`@mantine/core/MantineThemeProvider`;function K(e,t,n){let r=qe(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...k(n)}}function Ye({classNames:e,styles:t,props:n,stylesCtx:r}){let i=qe();return{resolvedClassNames:e===void 0?void 0:H({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:t===void 0?void 0:U({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var Xe={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function Ze({theme:e,options:t,unstyled:n}){return V(t?.focusable&&!n&&(e.focusClassName||Xe[e.focusRing]),t?.active&&!n&&e.activeClassName)}function Qe({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return H({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function $e({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return H({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function et({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function tt({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function nt({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function rt({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function it({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return V(Ze({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),rt({options:t,classes:s,selector:r,unstyled:c||m}),a[r],$e({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),Qe({selector:r,stylesCtx:f,options:t,props:d,theme:e}),et({rootSelector:u,selector:r,className:l}),tt({selector:r,classes:s,unstyled:c||m}),p&&!m&&nt({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function at({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...at({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function ot({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&U({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...at({style:n?.style,theme:e})}}function st(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...k(t[n])}}),e),{})}function ct({props:e,stylesCtx:t,themeName:n,theme:r}){let i=Pe()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function q({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=qe(),m=ke(),h=je(),g=Me(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=ct({props:n,stylesCtx:r,themeName:_,theme:p}),b=H({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>H({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:U({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=U({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=st([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=at({style:a,theme:p});return(e,a)=>({...f?.[e],className:it({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:ot({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function lt(e){return x(e).reduce((t,n)=>e[n]===void 0?t:`${t}${w(n)}:${e[n]};`,``).trim()}function ut({selector:e,styles:t,media:n,container:r}){let i=t?lt(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${lt(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${lt(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function dt(e){let t=5381;for(let n=0;n>>0).toString(36)}function ft({deduplicate:e,...t}){let n=Ae(),r=ut(t);return e?(0,b.jsx)(`style`,{href:`mantine-${dt(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,b.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function pt(e){let t=5381;for(let n=0;n>>0).toString(36)}function mt(e,t){return`__mdi__-${pt(`${e?lt(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${lt(e.styles)}`).join(`|`):``}`)}`}function ht(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:A,fw:j,lts:M,ta:N,lh:P,fs:ee,tt:F,td:te,w:ne,miw:re,maw:I,h:L,mih:R,mah:z,bgsz:ie,bgp:ae,bgr:oe,bga:B,pos:se,top:V,left:ce,bottom:le,right:H,inset:U,display:ue,flex:de,hiddenFrom:fe,visibleFrom:pe,lightHidden:me,darkHidden:he,sx:ge,..._e}=e;return{styleProps:k({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:A,fw:j,lts:M,ta:N,lh:P,fs:ee,tt:F,td:te,w:ne,miw:re,maw:I,h:L,mih:R,mah:z,bgsz:ie,bgp:ae,bgr:oe,bga:B,pos:se,top:V,left:ce,bottom:le,right:H,inset:U,display:ue,flex:de,bdrs:w,hiddenFrom:fe,visibleFrom:pe,lightHidden:me,darkHidden:he,sx:ge}),rest:_e}}var gt={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function _t(e,t){let n=be({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function vt(e,t){let n=be({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:_t(e,t)}function yt(e,t){if(typeof e==`number`)return D(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${D(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${_t(i.join(` `),t)}`),a.trim()}return e}var bt={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function xt(e){return typeof e==`string`&&e in bt?bt[e]:e}var St=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Ct(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&St.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?D(e):e}function wt(e){return e}var Tt=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Et(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&Tt.includes(e)?`var(--mantine-${e}-line-height)`:e}function Dt(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?D(e):e}function Ot(e){return typeof e==`number`?D(e):e}function kt(e,t){if(typeof e==`number`)return D(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return D(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var At={color:_t,textColor:vt,fontSize:Ct,spacing:kt,radius:Dt,identity:wt,size:Ot,lineHeight:Et,fontFamily:xt,border:yt};function jt(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function Mt({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(jt(e))-Number(jt(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function Nt(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function Pt(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Ft(e){return typeof e==`object`&&e?x(e).filter(e=>e!==`base`):[]}function It(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Lt({styleProps:e,data:t,theme:n}){return Mt(x(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=Pt(e[i]);if(!Nt(e[i]))return o.forEach(e=>{r.inlineStyles[e]=At[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=Ft(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=At[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:At[a.type](It(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Rt(){return`__m__-${(0,y.useId)().replace(/[:«»]/g,``)}`}function zt(e){return e}var Bt=zt;function Vt(e){return e}function J(e){let t=e;return t.extend=Vt,t.withProps=e=>{let n=n=>(0,b.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Ht(e){return J(e)}function Y(e){let t=e;return t.withProps=e=>{let n=n=>(0,b.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Vt,t}function Ut(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function Wt(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[Ut(n)]=e[n]),t},{})}function Gt(e){return e?typeof e==`string`?{[Ut(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...Gt(t)}),{}):Wt(e):null}function Kt(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Kt(n,t)}),{}):typeof e==`function`?e(t):e??{}}function qt({theme:e,style:t,vars:n,styleProps:r}){let i=Kt(t,e),a=Kt(n,e);return{...i,...a,...r}}function Jt({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=qe(),g=e||`div`,{styleProps:_,rest:v}=ht(m),y=Ne()?.()?.(_.sx),x=Rt(),S=Lt({styleProps:_,theme:h,data:gt}),C=Ie(),w=C&&S.hasResponsiveStyles?mt(S.styles,S.media):x,T={ref:p,style:qt({theme:h,style:t,vars:n,styleProps:S.inlineStyles}),className:V(r,y,{[w]:S.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":A(o)?void 0:o||void 0,size:f,...Gt(a),...v};return(0,b.jsxs)(b.Fragment,{children:[S.hasResponsiveStyles&&(0,b.jsx)(ft,{selector:`.${w}`,styles:S.styles,media:S.media,deduplicate:C}),typeof d==`function`?d(T):(0,b.jsx)(g,{...T})]})}Jt.displayName=`@mantine/core/Box`;var X=Bt(Jt),Yt={root:`m_87cf2631`},Xt={__staticSelector:`UnstyledButton`},Zt=Y(e=>{let t=K(`UnstyledButton`,Xt,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,b.jsx)(X,{...q({name:i,props:t,classes:Yt,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});Zt.classes=Yt,Zt.displayName=`@mantine/core/UnstyledButton`;var Qt={root:`m_1b7284a3`},$t=B((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:N(t),"--paper-shadow":F(n)}})),en=Y(e=>{let t=K(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=q({name:`Paper`,props:t,classes:Qt,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:$t});return(0,b.jsx)(X,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});en.classes=Qt,en.varsResolver=$t,en.displayName=`@mantine/core/Paper`;var tn=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),nn={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...tn(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...tn(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...tn(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...tn(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...tn(`top`),common:{transformOrigin:`top right`}}},rn={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function an({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in nn?{transitionProperty:nn[e].transitionProperty,...i,...nn[e].common,...nn[e][rn[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[rn[t]]}}var on=u(g(),1);function sn({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=qe(),d=oe(),f=u.respectReducedMotion?d:!1,[p,m]=(0,y.useState)(f?0:e),[h,g]=(0,y.useState)(r?`entered`:`exited`),_=(0,y.useRef)(-1),v=(0,y.useRef)(-1),b=(0,y.useRef)(-1);function x(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(b.current)}let S=n=>{x();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):b.current=requestAnimationFrame(()=>{on.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),b.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},C=e=>{if(x(),typeof(e?c:l)!=`number`){S(e);return}v.current=window.setTimeout(()=>{S(e)},e?c:l)};return L(()=>{C(r)},[r]),(0,y.useEffect)(()=>()=>{x()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function cn({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=Fe(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=sn({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,b.jsx)(b.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,b.jsx)(b.Fragment,{children:o({})}):o({display:`none`}):(0,b.jsx)(y.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,b.jsx)(b.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:an({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,b.jsx)(y.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,b.jsx)(b.Fragment,{children:o(an({transition:n,duration:h,state:g,timingFunction:_}))})}cn.displayName=`@mantine/core/Transition`;var Z={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},ln=({className:e,...t})=>(0,b.jsxs)(X,{component:`span`,className:V(Z.barsLoader,e),...t,children:[(0,b.jsx)(`span`,{className:Z.bar}),(0,b.jsx)(`span`,{className:Z.bar}),(0,b.jsx)(`span`,{className:Z.bar})]});ln.displayName=`@mantine/core/Bars`;var un=({className:e,...t})=>(0,b.jsxs)(X,{component:`span`,className:V(Z.dotsLoader,e),...t,children:[(0,b.jsx)(`span`,{className:Z.dot}),(0,b.jsx)(`span`,{className:Z.dot}),(0,b.jsx)(`span`,{className:Z.dot})]});un.displayName=`@mantine/core/Dots`;var dn=({className:e,...t})=>(0,b.jsx)(X,{component:`span`,className:V(Z.ovalLoader,e),...t});dn.displayName=`@mantine/core/Oval`;var fn={bars:ln,oval:dn,dots:un},pn={loaders:fn,type:`oval`},mn=B((e,{size:t,color:n})=>({root:{"--loader-size":j(t,`loader-size`),"--loader-color":n?xe(n,e):void 0}})),hn=J(e=>{let t=K(`Loader`,pn,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=q({name:`Loader`,props:t,classes:Z,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:mn});return p?(0,b.jsx)(X,{...g(`root`),...h,children:p}):(0,b.jsx)(X,{...g(`root`),component:d[i],variant:f,size:n,...h})});hn.defaultLoaders=fn,hn.classes=Z,hn.varsResolver=mn,hn.displayName=`@mantine/core/Loader`;function gn({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,b.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,b.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}gn.displayName=`@mantine/core/CloseIcon`;var _n={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},vn={variant:`subtle`},yn=B((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":j(t,`cb-size`),"--cb-radius":n===void 0?void 0:N(n),"--cb-icon-size":D(r)}})),bn=Y(e=>{let t=K(`CloseButton`,vn,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=q({name:_||`CloseButton`,props:t,className:o,style:c,classes:_n,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:yn});return(0,b.jsxs)(Zt,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,b.jsx)(gn,{}),r]})});bn.classes=_n,bn.varsResolver=yn,bn.displayName=`@mantine/core/CloseButton`;function xn(e){return y.Children.toArray(e).filter(Boolean)}var Sn={root:`m_4081bf90`},Cn={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},wn=B((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":M(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),Tn=J(e=>{let t=K(`Group`,Cn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,x=xn(s),S=x.length,C=M(c??`md`);return(0,b.jsx)(X,{...q({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/S}% - (${C} - ${C} / ${S}))`},className:r,style:i,classes:Sn,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:wn})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:x})});Tn.classes=Sn,Tn.varsResolver=wn,Tn.displayName=`@mantine/core/Group`;var En=(0,y.createContext)({size:`sm`}),Dn=J(e=>{let t=K(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,y.use)(En),{resolvedClassNames:l,resolvedStyles:u}=Ye({classNames:a,styles:o,props:t});return(0,b.jsx)(bn,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});Dn.displayName=`@mantine/core/InputClearButton`;var On={xs:7,sm:8,md:10,lg:12,xl:15};function kn({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,b.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:On[i]},children:[o,n||r]}):n===null?null:n||o||r}var An=(0,y.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),Q={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,bottomSection:`m_93f4ed57`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,success:`m_9d9d40e0`,description:`m_fe47ce59`},jn=B((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${P(t)} - ${D(2)})`}})),Mn=J(e=>{let t=K(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=K(`InputDescription`,null,t),f=(0,y.use)(An),p=q({name:[`InputWrapper`,c],props:t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:jn});return(0,b.jsx)(X,{component:`p`,...(l&&f?.getStyles||p)(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});Mn.classes=Q,Mn.varsResolver=jn,Mn.displayName=`@mantine/core/InputDescription`;var Nn=B((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${P(t)} - ${D(2)})`}})),Pn=J(e=>{let t=K(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=q({name:[`InputWrapper`,l],props:t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:Nn}),p=(0,y.use)(An);return(0,b.jsx)(X,{component:`p`,...(u&&p?.getStyles||f)(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});Pn.classes=Q,Pn.varsResolver=Nn,Pn.displayName=`@mantine/core/InputError`;var Fn={labelElement:`label`},In=B((e,{size:t})=>({label:{"--input-label-size":P(t),"--input-asterisk-color":void 0}})),Ln=J(e=>{let t=K(`InputLabel`,Fn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=q({name:[`InputWrapper`,p],props:t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:In}),v=(0,y.use)(An),x=v?.getStyles||_,S=g.component||c,C=typeof S!=`string`||S===`label`;return(0,b.jsxs)(X,{...x(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:C?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,b.jsx)(`span`,{...x(`required`),"aria-hidden":!0,children:` *`})]})});Ln.classes=Q,Ln.varsResolver=In,Ln.displayName=`@mantine/core/InputLabel`;var Rn=J(e=>{let t=K(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t;return(0,b.jsx)(X,{...q({name:[`InputPlaceholder`,c],props:t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});Rn.classes=Q,Rn.displayName=`@mantine/core/InputPlaceholder`;var zn=B((e,{size:t})=>({success:{"--input-success-size":t===void 0?void 0:`calc(${P(t)} - ${D(2)})`}})),Bn=J(e=>{let t=K(`InputSuccess`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=q({name:[`InputWrapper`,l],props:t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`success`,vars:s,varsResolver:zn}),p=(0,y.use)(An);return(0,b.jsx)(X,{component:`p`,...(u&&p?.getStyles||f)(`success`,p?.getStyles?{className:r,style:i}:void 0),...d})});Bn.classes=Q,Bn.varsResolver=zn,Bn.displayName=`@mantine/core/InputSuccess`;function Vn(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var Hn={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},Un=B((e,{size:t})=>({label:{"--input-label-size":P(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${P(t)} - ${D(2)})`},success:{"--input-success-size":t===void 0?void 0:`calc(${P(t)} - ${D(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${P(t)} - ${D(2)})`}})),Wn=J(e=>{let t=K(`InputWrapper`,Hn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,success:h,description:g,labelProps:_,descriptionProps:v,errorProps:x,successProps:S,labelElement:C,children:w,withAsterisk:T,id:E,required:D,__stylesApiProps:O,mod:k,attributes:A,...j}=t,M=q({name:[`InputWrapper`,u],props:O||t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:A,vars:s,varsResolver:Un}),N={size:c,variant:l,__staticSelector:u},P=R(E),ee=typeof T==`boolean`?T:D,F=x?.id||`${P}-error`,te=S?.id||`${P}-success`,ne=v?.id||`${P}-description`,re=P,I=!!m&&typeof m!=`boolean`,L=!!h&&typeof h!=`boolean`&&!m,z=!!g,ie=I&&f.includes(`error`),ae=L&&f.includes(`error`),oe=z&&f.includes(`description`),B=`${ie?F:``} ${ae?te:``} ${oe?ne:``}`,se=B.trim().length>0?B.trim():void 0,V=_?.id||`${P}-label`,ce=p&&(0,b.jsx)(Ln,{labelElement:C,id:V,htmlFor:re,required:ee,...N,..._,children:p},`label`),le=z&&(0,b.jsx)(Mn,{...v,...N,size:v?.size||N.size,id:v?.id||ne,children:g},`description`),H=(0,b.jsx)(y.Fragment,{children:d(w)},`input`),U=I&&(0,y.createElement)(Pn,{...x,...N,size:x?.size||N.size,key:`error`,id:x?.id||F},m),ue=L&&(0,y.createElement)(Bn,{...S,...N,size:S?.size||N.size,key:`success`,id:S?.id||te},h),de=f.map(e=>{switch(e){case`label`:return ce;case`input`:return H;case`description`:return le;case`error`:return U||ue;default:return null}});return(0,b.jsx)(An,{value:{getStyles:M,describedBy:se,inputId:re,labelId:V,...Vn(f,{hasDescription:z,hasError:I||L})},children:(0,b.jsx)(X,{variant:l,size:c,mod:[{error:!!m,success:!!h&&!m},k],id:C===`label`?void 0:E,...M(`root`),...j,children:de})})});Wn.classes=Q,Wn.varsResolver=Un,Wn.displayName=`@mantine/core/InputWrapper`;var Gn={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,withSuccessStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},Kn=B((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":j(t.size,`input-height`),"--input-fz":P(t.size),"--input-radius":t.radius===void 0?void 0:N(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:D(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:D(t.rightSectionWidth),"--input-padding-y":t.multiline?j(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),$=Y(e=>{let t=K(`Input`,Gn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,success:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:x,rightSectionWidth:S,rightSectionPointerEvents:C,leftSectionPointerEvents:w,variant:T,vars:E,pointer:D,multiline:O,radius:k,id:A,withAria:j,withErrorStyles:M,withSuccessStyles:N,mod:P,inputSize:ee,attributes:F,__clearSection:te,__clearable:ne,__clearSectionMode:re,__defaultRightSection:I,loading:L,loadingPosition:R,__bottomSection:z,__bottomSectionProps:ie,rootRef:ae,dir:oe,...B}=t,{styleProps:se,rest:V}=ht(B),ce=(0,y.use)(An),le={offsetBottom:ce?.offsetBottom,offsetTop:ce?.offsetTop},H=q({name:[`Input`,c],props:l||t,classes:Q,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:F,stylesCtx:le,rootSelector:`wrapper`,vars:E,varsResolver:Kn}),U=j?{required:s,disabled:m,"aria-invalid":f?!0:void 0,"aria-describedby":ce?.describedBy,id:ce?.inputId||A}:{},ue=L?(0,b.jsx)(hn,{size:R===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,de=L&&R===`left`?ue:h,fe=kn({__clearable:ne,__clearSection:te,rightSection:L&&R===`right`?ue:v,__defaultRightSection:I,size:u,__clearSectionMode:re});return(0,b.jsx)(En,{value:{size:u||`sm`},children:(0,b.jsxs)(X,{ref:ae,dir:oe,...H(`wrapper`),...se,...d,mod:[{error:!!f&&M,success:!!p&&!f&&N,pointer:D,disabled:m,multiline:O,"data-with-right-section":!!fe,"data-with-left-section":!!de,"data-with-bottom-section":!!z},P],variant:T,size:u,children:[de&&(0,b.jsx)(`div`,{...g,"data-position":`left`,...H(`section`,{className:g?.className,style:g?.style}),children:de}),(0,b.jsx)(X,{component:`input`,...V,...U,required:s,mod:{disabled:m,error:!!f&&M,success:!!p&&!f&&N},variant:T,__size:ee,...H(`input`)}),z&&(0,b.jsx)(`div`,{...ie,...H(`bottomSection`,{className:ie?.className,style:ie?.style}),children:z}),fe&&(0,b.jsx)(`div`,{...x,"data-position":`right`,...H(`section`,{className:x?.className,style:x?.style}),children:fe})]})})});$.classes=Q,$.varsResolver=Kn,$.Wrapper=Wn,$.Label=Ln,$.Error=Pn,$.Success=Bn,$.Description=Mn,$.Placeholder=Rn,$.ClearButton=Dn,$.displayName=`@mantine/core/Input`;function qn(e,t,n){let r=K([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,success:s,required:c,classNames:l,styles:u,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,wrapperProps:y,id:b,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,vars:D,mod:O,attributes:k,...A}=r,{styleProps:j,rest:M}=ht(A),N={label:i,description:a,error:o,success:s,required:c,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,unstyled:f,styles:u,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,id:b,mod:O,attributes:k,...y};return{...M,classNames:l,styles:u,unstyled:f,wrapperProps:{...N,...j},inputProps:{required:c,classNames:l,styles:u,unstyled:f,size:x,__staticSelector:p,__stylesApiProps:m||r,error:o,success:s,variant:E,id:b,attributes:k}}}var Jn={__staticSelector:`InputBase`,withAria:!0,size:`sm`},Yn=Y(e=>{let{inputProps:t,wrapperProps:n,...r}=qn(`InputBase`,Jn,e);return(0,b.jsx)($.Wrapper,{...n,children:(0,b.jsx)($,{...t,...r})})});Yn.classes={...$.classes,...$.Wrapper.classes},Yn.displayName=`@mantine/core/InputBase`;var Xn={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},Zn=B((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:N(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),Qn=J(e=>{let t=K(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:x,...S}=t,C=q({name:`Alert`,classes:Xn,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:x,vars:s,varsResolver:Zn}),w=R(f),T=u&&`${w}-title`||void 0,E=`${w}-body`;return(0,b.jsx)(X,{id:w,...C(`root`,{variant:_}),variant:_,...S,role:y||`alert`,"aria-describedby":d?E:void 0,"aria-labelledby":u?T:void 0,children:(0,b.jsxs)(`div`,{...C(`wrapper`),children:[p&&(0,b.jsx)(`div`,{...C(`icon`),children:p}),(0,b.jsxs)(`div`,{...C(`body`),children:[u&&(0,b.jsx)(`div`,{...C(`title`),"data-with-close-button":m||void 0,children:(0,b.jsx)(`span`,{id:T,...C(`label`),children:u})}),d&&(0,b.jsx)(`div`,{id:E,...C(`message`),"data-variant":_,children:d})]}),m&&(0,b.jsx)(bn,{...C(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});Qn.classes=Xn,Qn.varsResolver=Zn,Qn.displayName=`@mantine/core/Alert`;var $n={root:`m_b6d8b162`};function er(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var tr={inherit:!1},nr=B((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":P(i),"--text-lh":ee(i),"--text-gradient":t===`gradient`?we(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),rr=Y(e=>{let t=K(`Text`,tr,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...x}=t;return(0,b.jsx)(X,{...q({name:[`Text`,l],props:t,classes:$n,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:nr})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":er(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...x})});rr.classes=$n,rr.varsResolver=nr,rr.displayName=`@mantine/core/Text`;var ir={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},ar={orientation:`horizontal`},or=B((e,{borderWidth:t})=>({group:{"--button-border-width":D(t)}})),sr=J(e=>{let t=K(`ButtonGroup`,ar,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=K(`ButtonGroup`,ar,e);return(0,b.jsx)(X,{...q({name:`ButtonGroup`,props:t,classes:ir,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:or,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});sr.classes=ir,sr.varsResolver=or,sr.displayName=`@mantine/core/ButtonGroup`;var cr=B((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":j(o,`section-height`),"--section-padding-x":j(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?P(o.replace(`compact-`,``)):P(o),"--section-radius":t===void 0?void 0:N(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),lr=J(e=>{let t=K(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,b.jsx)(X,{...q({name:`ButtonGroupSection`,props:t,classes:ir,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:cr,rootSelector:`groupSection`})(`groupSection`),...f})});lr.classes=ir,lr.varsResolver=cr,lr.displayName=`@mantine/core/ButtonGroupSection`;var ur={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${D(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},dr=B((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":j(a,`button-height`),"--button-padding-x":j(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?P(a.replace(`compact-`,``)):P(a),"--button-radius":t===void 0?void 0:N(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),fr=Y(e=>{let t=K(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:x,mod:S,attributes:C,...w}=t,T=q({name:`Button`,props:t,classes:ir,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:C,vars:r,varsResolver:dr}),E=!!c,D=!!l;return(0,b.jsxs)(Zt,{...T(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":E,"with-right-section":D},S],...w,children:[typeof p==`boolean`&&(0,b.jsx)(cn,{mounted:p,transition:ur,duration:150,children:e=>(0,b.jsx)(X,{component:`span`,...T(`loader`,{style:e}),"aria-hidden":!0,children:(0,b.jsx)(hn,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,b.jsxs)(`span`,{...T(`inner`),children:[c&&(0,b.jsx)(X,{component:`span`,...T(`section`),mod:{position:`left`},children:c}),(0,b.jsx)(X,{component:`span`,mod:{loading:p},...T(`label`),children:s}),l&&(0,b.jsx)(X,{component:`span`,...T(`section`),mod:{position:`right`},children:l})]})]})});fr.classes=ir,fr.varsResolver=dr,fr.displayName=`@mantine/core/Button`,fr.Group=sr,fr.GroupSection=lr;var pr={root:`m_4451eb3a`},mr=Y(e=>{let t=K(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=q({name:`Center`,props:t,classes:pr,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,b.jsx)(X,{mod:[{inline:c},l],...f(`root`),...d})});mr.classes=pr,mr.displayName=`@mantine/core/Center`;var hr={root:`m_7485cace`},gr={strategy:`block`},_r=B((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:j(t,`container-size`)}})),vr=J(e=>{let t=K(`Container`,gr,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fluid:c,mod:l,attributes:u,strategy:d,...f}=t,p=q({name:`Container`,classes:hr,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:_r});return(0,b.jsx)(X,{mod:[{fluid:c,strategy:d},l],...p(`root`),...f})});vr.classes=hr,vr.varsResolver=_r,vr.displayName=`@mantine/core/Container`;var yr={root:`m_6d731127`},br={gap:`md`,align:`stretch`,justify:`flex-start`},xr=B((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":M(t),"--stack-align":n,"--stack-justify":r}})),Sr=J(e=>{let t=K(`Stack`,br,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,b.jsx)(X,{...q({name:`Stack`,props:t,classes:yr,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:xr})(`root`),variant:d,...p})});Sr.classes=yr,Sr.varsResolver=xr,Sr.displayName=`@mantine/core/Stack`;var Cr={root:`m_7341320d`},wr=B((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":j(t,`ti-size`),"--ti-radius":n===void 0?void 0:N(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),Tr=J(e=>{let t=K(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t;return(0,b.jsx)(X,{...q({name:`ThemeIcon`,classes:Cr,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:wr})(`root`),...u})});Tr.classes=Cr,Tr.varsResolver=wr,Tr.displayName=`@mantine/core/ThemeIcon`;var Er=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],Dr=[`xs`,`sm`,`md`,`lg`,`xl`];function Or(e,t){let n=t===void 0?`h${e}`:t;return Er.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:Dr.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:D(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var kr={root:`m_8a5d1357`},Ar={order:1},jr=B((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=Or(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),Mr=J(e=>{let t=K(`Title`,Ar,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=q({name:`Title`,props:t,classes:kr,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:jr});return[1,2,3,4,5,6].includes(s)?(0,b.jsx)(X,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});Mr.classes=kr,Mr.varsResolver=jr,Mr.displayName=`@mantine/core/Title`;var Nr=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),Pr=new Map([[`bold`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,y.createElement(y.Fragment,null,y.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),Fr=(0,y.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),Ir=y.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=y.useContext(Fr);return y.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&y.createElement(`title`,null,n),s,c.get(a??f))});Ir.displayName=`IconBase`;var Lr=y.forwardRef((e,t)=>y.createElement(Ir,{ref:t,...e,weights:Nr}));Lr.displayName=`CheckIcon`;var Rr=Lr,zr=y.forwardRef((e,t)=>y.createElement(Ir,{ref:t,...e,weights:Pr}));zr.displayName=`CopyIcon`;var Br=zr,Vr={small:{fontSize:15,gap:12,tracking:`0.16em`},regular:{fontSize:18,gap:14,tracking:`0.17em`},large:{fontSize:22,gap:16,tracking:`0.18em`}};function Hr({size:e=`regular`}){let t=Vr[e];return(0,b.jsxs)(Tn,{component:`span`,gap:t.gap,wrap:`nowrap`,"aria-label":`Fanout`,children:[(0,b.jsx)(Ur,{size:e}),(0,b.jsx)(rr,{component:`span`,fz:t.fontSize,fw:800,lh:1,lts:t.tracking,tt:`uppercase`,children:`Fanout`})]})}function Ur({size:e=`regular`}){let t={small:32,regular:46,large:50}[e];return(0,b.jsx)(Tr,{size:t,variant:`transparent`,"aria-hidden":`true`,children:(0,b.jsx)(Wr,{})})}function Wr(){let e=(0,y.useId)().replace(/[^a-zA-Z0-9-]/g,``),t=`fo-top-${e}`,n=`fo-mid-${e}`,r=`fo-bot-${e}`;return(0,b.jsxs)(`svg`,{viewBox:`35 44 200 200`,width:`100%`,height:`100%`,"aria-hidden":`true`,children:[(0,b.jsxs)(`defs`,{children:[(0,b.jsxs)(`linearGradient`,{id:t,x1:`54`,y1:`52`,x2:`210`,y2:`104`,gradientUnits:`userSpaceOnUse`,children:[(0,b.jsx)(`stop`,{offset:`0`,stopColor:`#5FE8CE`}),(0,b.jsx)(`stop`,{offset:`0.55`,stopColor:`#81E4B9`}),(0,b.jsx)(`stop`,{offset:`1`,stopColor:`#D9F276`})]}),(0,b.jsxs)(`linearGradient`,{id:n,x1:`58`,y1:`112`,x2:`176`,y2:`154`,gradientUnits:`userSpaceOnUse`,children:[(0,b.jsx)(`stop`,{offset:`0`,stopColor:`#536FFF`}),(0,b.jsx)(`stop`,{offset:`0.52`,stopColor:`#41B6F8`}),(0,b.jsx)(`stop`,{offset:`1`,stopColor:`#66D0EE`})]}),(0,b.jsxs)(`linearGradient`,{id:r,x1:`58`,y1:`166`,x2:`145`,y2:`220`,gradientUnits:`userSpaceOnUse`,children:[(0,b.jsx)(`stop`,{offset:`0`,stopColor:`#725BFF`}),(0,b.jsx)(`stop`,{offset:`0.52`,stopColor:`#9A50F4`}),(0,b.jsx)(`stop`,{offset:`1`,stopColor:`#CB55E8`})]})]}),(0,b.jsx)(`path`,{d:`M58 116V88C58 67 75 52 96 52H191C204 52 212 61 212 72C212 84 203 94 191 94H101C82 94 67 102 58 116Z`,fill:`url(#${t})`}),(0,b.jsx)(`path`,{d:`M58 170V139C58 120 72 107 91 107H162C174 107 182 115 182 126C182 137 174 145 162 145H99C79 145 66 154 58 170Z`,fill:`url(#${n})`}),(0,b.jsx)(`path`,{d:`M58 219V188C58 170 71 157 89 157H126C138 157 146 165 146 176C146 187 138 195 126 195H100C89 195 84 200 84 211C84 225 74 235 61 235H58Z`,fill:`url(#${r})`})]})}export{ae as $,Ye as A,Ae as B,J as C,mt as D,Lt as E,De as F,Se as G,Te as H,G as I,ue as J,xe as K,Oe as L,Je as M,qe as N,ft as O,ze as P,z as Q,Ie as R,Y as S,u as St,Rt as T,W as U,Ee as V,Ce as W,B as X,V as Y,oe as Z,hn as _,s as _t,Ir as a,N as at,Zt as b,f as bt,vr as c,M as ct,rr as d,D as dt,R as et,Qn as f,C as ft,bn as g,m as gt,Tn as h,g as ht,Rr as i,P as it,K as j,q as k,mr as l,k as lt,$ as m,v as mt,Ur as n,I as nt,Mr as o,F as ot,Yn as p,x as pt,be as q,Br as r,re as rt,Sr as s,j as st,Hr as t,L as tt,fr as u,O as ut,cn as v,o as vt,Ht as w,X as x,d as xt,en as y,c as yt,Fe as z}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat-CDy0rSDz.js b/internal/ui/dist/assets/chat-CDy0rSDz.js new file mode 100644 index 00000000..b12cf5f3 --- /dev/null +++ b/internal/ui/dist/assets/chat-CDy0rSDz.js @@ -0,0 +1,30 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mcp-app-frame-CNfakaT6.js","assets/brand-CnsMBQCm.js","assets/auth-DmDDao4N.js","assets/use-computed-color-scheme-B3cychmA.js","assets/index-e7JI4Tgx.js","assets/tokens-BZZ0emRD.js","assets/Tooltip-DTTsbr27.js","assets/api-R4Y_TvpM.js","assets/preload-helper-CT-UWP0u.js","assets/index-D-3bf9Ad.css"])))=>i.map(i=>d[i]); +import{$ as e,C as t,_ as n,_t as r,a as i,c as a,d as o,f as s,gt as c,h as l,i as u,j as d,k as f,l as p,mt as m,n as h,o as g,p as _,r as v,s as y,u as b,vt as x,x as S,y as C,yt as w}from"./brand-CnsMBQCm.js";import{t as T}from"./Tooltip-DTTsbr27.js";import{a as E,o as ee,s as D,t as te}from"./preload-helper-CT-UWP0u.js";import{c as O,n as ne,s as k}from"./format-C4WhhFye.js";function A(){return`development`}var j=w(c(),1),M=m(),N=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],re={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function ie(e){Object.keys(re).forEach(t=>{e.style.setProperty(t,re[t],`important`)})}function ae(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of N)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var P=null;function oe(e,t,n=1,r=1/0){P||(P=document.createElement(`textarea`),P.setAttribute(`tabindex`,`-1`),P.setAttribute(`aria-hidden`,`true`),P.setAttribute(`aria-label`,`autosize measurement`),ie(P)),P.parentNode===null&&document.body.appendChild(P);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{P.style[e]=o[e]}),ie(P),P.value=t;let c=s===`border-box`?P.scrollHeight+a:P.scrollHeight-i;P.value=t,c=s===`border-box`?P.scrollHeight+a:P.scrollHeight-i,P.value=`x`;let l=P.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function se({maxRows:t,minRows:n,onChange:r,ref:i,...a}){let o=a.value!==void 0,s=(0,j.useRef)(null),c=e(s,i),l=(0,j.useRef)(0),u=(0,j.useRef)(0),d=()=>{let e=s.current;if(!e)return;let r=ae(e);if(!r)return;let[i]=oe(r,e.value||e.placeholder||`x`,n,t);l.current!==i&&(l.current=i,e.style.setProperty(`height`,`${i}px`,`important`))},f=(0,j.useEffectEvent)(d),p=e=>{o||d(),r?.(e)};return(0,j.useLayoutEffect)(d),(0,j.useEffect)(()=>{let e=()=>d();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,j.useEffect)(()=>{let e=s.current;if(!e||typeof ResizeObserver>`u`)return;u.current=e.offsetWidth;let t=0,n=new ResizeObserver(()=>{s.current&&s.current.offsetWidth!==u.current&&(u.current=s.current.offsetWidth,cancelAnimationFrame(t),t=requestAnimationFrame(f))});return n.observe(e),()=>{cancelAnimationFrame(t),n.disconnect()}},[]),(0,j.useEffect)(()=>{let e=()=>d();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,j.useEffect)(()=>{let e=e=>{if(s.current?.form===e.target&&!o){let e=s.current.value;requestAnimationFrame(()=>{s.current&&e!==s.current.value&&d()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[o]),(0,M.jsx)(`textarea`,{rows:n,...a,onChange:p,ref:c})}var ce=t(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,bottomSection:o,bottomSectionProps:s,...c}=d([`Input`,`InputWrapper`,`Textarea`],null,e),l=t&&A()!==`test`,u=l?{maxRows:n,minRows:r}:{};return(0,M.jsx)(_,{component:l?se:`textarea`,...c,__staticSelector:i||`Textarea`,__bottomSection:o,__bottomSectionProps:s,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...u})});ce.classes=_.classes,ce.displayName=`@mantine/core/Textarea`;var le={root:`m_d08caa0`},ue=t(e=>{let t=d(`Typography`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,attributes:s,...c}=t,l=f({name:`Typography`,classes:le,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:s});return(0,M.jsx)(S,{...l(`root`),...c})});ue.classes=le,ue.displayName=`@mantine/core/Typography`;var de=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z`}))]]),fe=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z`}))]]),pe=j.forwardRef((e,t)=>j.createElement(i,{ref:t,...e,weights:de}));pe.displayName=`PaperPlaneTiltIcon`;var me=pe,he=j.forwardRef((e,t)=>j.createElement(i,{ref:t,...e,weights:fe}));he.displayName=`StopIcon`;var ge=he;function _e(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ve=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ye=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,be={};function xe(e,t){return((t||be).jsx?ye:ve).test(e)}var Se=/[ \t\n\f\r]/g;function Ce(e){return typeof e==`object`?e.type===`text`&&we(e.value):we(e)}function we(e){return e.replace(Se,``)===``}var Te=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Te.prototype.normal={},Te.prototype.property={},Te.prototype.space=void 0;function Ee(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Te(n,r,t)}function De(e){return e.toLowerCase()}var F=class{constructor(e,t){this.attribute=t,this.property=e}};F.prototype.attribute=``,F.prototype.booleanish=!1,F.prototype.boolean=!1,F.prototype.commaOrSpaceSeparated=!1,F.prototype.commaSeparated=!1,F.prototype.defined=!1,F.prototype.mustUseProperty=!1,F.prototype.number=!1,F.prototype.overloadedBoolean=!1,F.prototype.property=``,F.prototype.spaceSeparated=!1,F.prototype.space=void 0;var Oe=x({boolean:()=>I,booleanish:()=>L,commaOrSpaceSeparated:()=>B,commaSeparated:()=>je,number:()=>R,overloadedBoolean:()=>Ae,spaceSeparated:()=>z}),ke=0,I=Me(),L=Me(),Ae=Me(),R=Me(),z=Me(),je=Me(),B=Me();function Me(){return 2**++ke}var Ne=Object.keys(Oe),Pe=class extends F{constructor(e,t,n,r){let i=-1;if(super(e,t),Fe(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&Je.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(qe,Ze);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!qe.test(e)){let n=e.replace(Ke,Xe);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Pe}return new i(r,t)}function Xe(e){return`-`+e.toLowerCase()}function Ze(e){return e.charAt(1).toUpperCase()}var Qe=Ee([Le,Be,He,Ue,We],`html`),$e=Ee([Le,Ve,He,Ue,We],`svg`);function et(e){return e.join(` `).trim()}var tt=r(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` +`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),nt=r((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(tt());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),rt=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),it=r(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(nt()),r=rt();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),at=st(`end`),ot=st(`start`);function st(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function ct(e){let t=ot(e),n=at(e);if(t&&n)return{start:t,end:n}}function lt(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?dt(e.position):`start`in e||`end`in e?dt(e):`line`in e||`column`in e?ut(e):``}function ut(e){return ft(e&&e.line)+`:`+ft(e&&e.column)}function dt(e){return ut(e&&e.start)+`-`+ut(e&&e.end)}function ft(e){return e&&typeof e==`number`?e:1}var V=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=lt(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};V.prototype.file=``,V.prototype.name=``,V.prototype.reason=``,V.prototype.message=``,V.prototype.stack=``,V.prototype.column=void 0,V.prototype.line=void 0,V.prototype.ancestors=void 0,V.prototype.cause=void 0,V.prototype.fatal=void 0,V.prototype.place=void 0,V.prototype.ruleId=void 0,V.prototype.source=void 0;var pt=w(it(),1),mt={}.hasOwnProperty,ht=new Map,gt=/[A-Z]/g,_t=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),vt=new Set([`td`,`th`]),yt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function bt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=jt(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=At(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?$e:Qe,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=xt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function xt(e,t,n){if(t.type===`element`)return St(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Ct(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Tt(e,t,n);if(t.type===`mdxjsEsm`)return wt(e,t);if(t.type===`root`)return Et(e,t,n);if(t.type===`text`)return Dt(e,t)}function St(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=$e,e.schema=i),e.ancestors.push(t);let a=Lt(e,t.tagName,!1),o=Mt(e,t),s=Pt(e,t);return _t.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Ce(e)})),Ot(e,o,a,t),kt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ct(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Rt(e,t.position)}function wt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Rt(e,t.position)}function Tt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=$e,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Lt(e,t.name,!0),o=Nt(e,t),s=Pt(e,t);return Ot(e,o,a,t),kt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Et(e,t,n){let r={};return kt(r,Pt(e,t)),e.create(t,e.Fragment,r,n)}function Dt(e,t){return t.value}function Ot(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function kt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function At(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function jt(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=ot(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Mt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&mt.call(t.properties,i)){let a=Ft(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&vt.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Nt(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Rt(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Rt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Pt(e,t){let n=[],r=-1,i=e.passKeys?new Map:ht;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(H(e,e.length,0,t),e):t}var Xt={}.hasOwnProperty;function Zt(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function W(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var G=ln(/[A-Za-z]/),K=ln(/[\dA-Za-z]/),tn=ln(/[#-'*+\--9=?A-Z^-~]/);function nn(e){return e!==null&&(e<32||e===127)}var rn=ln(/\d/),an=ln(/[\dA-Fa-f]/),on=ln(/[!-/:-@[-`{-~]/);function q(e){return e!==null&&e<-2}function J(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}var sn=ln(/\p{P}|\p{S}/u),cn=ln(/\s/);function ln(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function un(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function X(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Y(r)?(e.enter(n),s(r)):t(r)}function s(r){return Y(r)&&a++0&&Y(t)?(e.enter(r),c(t)):l(t)}function c(t){return Y(t)&&o=i?t(e):n(e)}}var fn={tokenize:pn};function pn(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),X(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var mn=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){hn(this,e,t,n,!1)}addBefore(e,t,n){hn(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function hn(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var gn={tokenize:vn},_n={tokenize:yn};function vn(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(ro))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function yn(e,t,n){return X(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function bn(e){if(e===null||J(e)||cn(e))return 1;if(sn(e))return 2}function xn(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Tn(o,-a),Tn(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=U(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=U(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=U(r,xn(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=U(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=U(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),H(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n0&&Y(t)?X(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||q(t)?e.check(Rn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Y(t)?X(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Y(t)?X(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Hn={name:`codeIndented`,tokenize:Wn},Un={partial:!0,tokenize:Gn};function Wn(e,t,n){return r;function r(t){return e.enter(`codeIndented`),dn(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):q(t)?e.attempt(Un,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||q(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Gn(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):q(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):dn(e,t,a,`linePrefix`,4,4)(o)}function a(e){return q(e)?i(e):n(e)}}var Kn={name:`codeText`,previous:Jn,resolve:qn,tokenize:Yn};function qn(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Zn(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Zn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Zn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function ar(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||nn(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||J(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Y(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function sr(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),X(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function cr(e,t){let n;return r;function r(i){return q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Y(i)?X(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var lr={name:`definition`,tokenize:dr},ur={partial:!0,tokenize:fr};function dr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return or.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=W(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return J(t)?cr(e,l)(t):l(t)}function l(t){return ar(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(ur,d,d)(t)}function d(t){return Y(t)?X(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function fr(e,t,n){return r;function r(t){return J(t)?cr(e,i)(t):n(t)}function i(t){return sr(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Y(t)?X(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||q(e)?t(e):n(e)}}var pr={name:`hardBreakEscape`,tokenize:mr};function mr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var hr={name:`headingAtx`,resolve:gr,tokenize:_r};function gr(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};H(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function _r(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||J(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||q(n)?(e.exit(`atxHeading`),t(n)):Y(n)?X(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||J(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var vr=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),yr=[`pre`,`script`,`style`,`textarea`],br={concrete:!0,name:`htmlFlow`,resolveTo:Sr,tokenize:Cr},xr={partial:!0,tokenize:wr};function Sr(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Cr(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:N):G(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):G(a)?(e.consume(a),i=4,r.interrupt?t:N):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:N):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return G(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||J(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&yr.includes(l)?(i=1,r.interrupt?t(s):D(s)):vr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||K(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return Y(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||G(t)?(e.consume(t),b):Y(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||K(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Y(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Y(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||J(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Y(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||q(t)?D(t):Y(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),k):t===60&&i===1?(e.consume(t),A):t===62&&i===4?(e.consume(t),re):t===63&&i===3?(e.consume(t),N):t===93&&i===5?(e.consume(t),M):q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(xr,ie,te)(t)):t===null||q(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(Rn,O,ie)(t)}function O(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return t===null||q(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function k(t){return t===45?(e.consume(t),N):D(t)}function A(t){return t===47?(e.consume(t),o=``,j):D(t)}function j(t){if(t===62){let n=o.toLowerCase();return yr.includes(n)?(e.consume(t),re):D(t)}return G(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),j):D(t)}function M(t){return t===93?(e.consume(t),N):D(t)}function N(t){return t===62?(e.consume(t),re):t===45&&i===2?(e.consume(t),N):D(t)}function re(t){return t===null||q(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function wr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(On,t,n)}}var Tr={name:`htmlText`,tokenize:Er};function Er(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):G(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):G(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):q(t)?(o=d,A(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?k(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):q(t)?(o=h,A(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?k(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?k(t):q(t)?(o=v,A(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):q(t)?(o=y,A(t)):(e.consume(t),y)}function b(e){return e===62?k(e):y(e)}function x(t){return G(t)?(e.consume(t),S):n(t)}function S(t){return t===45||K(t)?(e.consume(t),S):C(t)}function C(t){return q(t)?(o=C,A(t)):Y(t)?(e.consume(t),C):k(t)}function w(t){return t===45||K(t)?(e.consume(t),w):t===47||t===62||J(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),k):t===58||t===95||G(t)?(e.consume(t),E):q(t)?(o=T,A(t)):Y(t)?(e.consume(t),T):k(t)}function E(t){return t===45||t===46||t===58||t===95||K(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):q(t)?(o=ee,A(t)):Y(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):q(t)?(o=D,A(t)):Y(t)?(e.consume(t),D):(e.consume(t),O)}function te(t){return t===i?(e.consume(t),i=void 0,ne):t===null?n(t):q(t)?(o=te,A(t)):(e.consume(t),te)}function O(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||J(t)?T(t):(e.consume(t),O)}function ne(e){return e===47||e===62||J(e)?T(e):n(e)}function k(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function A(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return Y(t)?X(e,M,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):M(t)}function M(t){return e.enter(`htmlTextData`),o(t)}}var Dr={name:`labelEnd`,resolveAll:jr,resolveTo:Mr,tokenize:Nr},Or={tokenize:Pr},kr={tokenize:Fr},Ar={tokenize:Ir};function jr(e){let t=-1,n=[];for(;++t0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(W(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Or,u,o?u:d)(t):t===91?e.attempt(kr,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Ar,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Pr(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return J(t)?cr(e,a)(t):a(t)}function a(t){return t===41?u(t):ar(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return J(t)?cr(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?sr(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return J(t)?cr(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Fr(e,t,n){let r=this;return i;function i(t){return or.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(W(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ir(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Lr={name:`labelStartImage`,resolveAll:Dr.resolveAll,tokenize:Rr};function Rr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var zr={name:`labelStartLink`,resolveAll:Dr.resolveAll,tokenize:Br};function Br(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Vr={name:`lineEnding`,tokenize:Hr};function Hr(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),X(e,t,`linePrefix`)}}var Ur={name:`thematicBreak`,tokenize:Wr};function Wr(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Y(t)?X(e,s,`whitespace`)(t):s(t))}}var Z={continuation:{tokenize:Jr},exit:Xr,name:`list`,tokenize:qr},Gr={partial:!0,tokenize:Zr},Kr={partial:!0,tokenize:Yr};function qr(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:rn(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Ur,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return rn(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(On,r.interrupt?n:u,e.attempt(Gr,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Y(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Jr(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(On,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Y(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Kr,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(Z,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Yr(e,t,n){let r=this;return X(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Xr(e){e.exit(this.containerState.type)}function Zr(e,t,n){let r=this;return X(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Y(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Qr={name:`setextUnderline`,resolveTo:$r,tokenize:ei};function $r(e,t){let n=new mn,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function ei(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Y(t)?X(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var ti={tokenize:ni};function ni(e){let t=this,n=e.attempt(On,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(er,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ri={resolveAll:si()},ii=oi(`string`),ai=oi(`text`);function oi(e){return{resolveAll:si(e===`text`?ci:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i_i,contentInitial:()=>di,disable:()=>vi,document:()=>ui,flow:()=>pi,flowInitial:()=>fi,insideSpan:()=>gi,string:()=>mi,text:()=>hi}),ui={42:Z,43:Z,45:Z,48:Z,49:Z,50:Z,51:Z,52:Z,53:Z,54:Z,55:Z,56:Z,57:Z,62:An},di={91:lr},fi={[-2]:Hn,[-1]:Hn,32:Hn},pi={35:hr,42:Ur,45:[Qr,Ur],60:br,61:Qr,95:Ur,96:Bn,126:Bn},mi={38:In,92:Pn},hi={[-5]:Vr,[-4]:Vr,[-3]:Vr,33:Lr,38:In,42:Sn,60:[En,Tr],91:zr,92:[pr,Pn],93:Dr,95:Sn,96:Kn},gi={null:[Sn,ri]},_i={null:[42,95]},vi={null:[]};function yi(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=U(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=xn(a,l.events,l),l.events):[]}function f(e,t){return xi(p(e),t)}function p(e){return bi(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function xi(e,t){let n=-1,r=[],i;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Fi).call(a,void 0,e[0])}for(r.position={start:Mi(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Mi(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Bi(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vi(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hi(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=un(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Ui(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wi(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Gi(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Ki(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gi(e,t);let i={src:un(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function qi(e,t){let n={src:un(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ji(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Yi(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Gi(e,t);let i={href:un(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Xi(e,t){let n={href:un(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Zi(e,t,n){let r=e.all(t),i=n?Qi(n):$i(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s1}function ea(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=ot(t.children[1]),o=at(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function aa(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ua(t.slice(i),i>0,!1)),a.join(``)}function ua(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===sa||t===ca;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===sa||t===ca;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function da(e,t){let n={type:`text`,value:la(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fa(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var pa={blockquote:Li,break:Ri,code:zi,delete:Bi,emphasis:Vi,footnoteReference:Hi,heading:Ui,html:Wi,imageReference:Ki,image:qi,inlineCode:Ji,linkReference:Yi,link:Xi,listItem:Zi,list:ea,paragraph:ta,root:na,strong:ra,table:ia,tableCell:oa,tableRow:aa,text:da,thematicBreak:fa,toml:ma,yaml:ma,definition:ma,footnoteDefinition:ma};function ma(){}var{defineProperty:ha}=Object,ga=typeof self==`object`?self:globalThis,_a=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new ga[e](t)},va=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?ha(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof ga[e]==`function`?_a(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(_a(a,o),i)};return r},ya=e=>va(new Map,e)(0),ba=``,{toString:xa}={},{keys:Sa,is:Ca}=Object,wa=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=xa.call(e).slice(8,-1);switch(n){case`Array`:return[1,ba];case`Object`:return[2,ba];case`Date`:return[3,ba];case`RegExp`:return[4,ba];case`Map`:return[5,ba];case`Set`:return[6,ba];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Ta=([e,t])=>e===0&&(t===`function`||t===`symbol`),Ea=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=wa(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Ca(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Sa(o))(e||!Ta(wa(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?ba:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Ta(wa(n))||Ta(wa(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Ta(wa(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Da=(e,{json:t,lossy:n}={})=>{let r=[];return Ea(!(t||n),!!t,new Map,r)(e),r},Oa=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?ya(Da(e,t)):structuredClone(e):(e,t)=>ya(Da(e,t));function ka(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Aa(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function ja(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||ka,r=e.options.footnoteBackLabel||Aa,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Oa(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` +`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` +`}]}}var Ma=(function(e){if(e==null)return La;if(typeof e==`function`)return Ia(e);if(typeof e==`object`)return Array.isArray(e)?Na(e):Pa(e);if(typeof e==`string`)return Fa(e);throw Error(`Expected function, string, or object as test`)});function Na(e){let t=[],n=-1;for(;++n`:``))+`)`})}return u;function u(){let l=Ba,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Ha(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d0&&n.push({type:`text`,value:` +`}),n}function Za(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Qa(e,t){let n=Ka(e,t),r=n.one(e,void 0),i=ja(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` +`},i)),a}function $a(e,t){return e&&`run`in e?async function(n,r){let i=Qa(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Qa(n,{file:r,...e||t})}}function eo(e){if(e)throw e}var to=w(r(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Q={basename:ao,dirname:oo,extname:so,join:co,sep:`/`};function ao(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);fo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function oo(e){if(fo(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function so(e){fo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function co(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function uo(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function fo(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var po={cwd:mo};function mo(){return`/`}function ho(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function go(e){if(typeof e==`string`)e=new URL(e);else if(!ho(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return _o(e)}function _o(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];no(o)&&no(r)&&(r=(0,to.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Do(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Oo(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function ko(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ao(e){if(!no(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function jo(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mo(e){return No(e)?e:new yo(e)}function No(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Po(e){return typeof e==`string`||Fo(e)}function Fo(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Io=[],Lo={allowDangerousHtml:!0},Ro=/^(https?|ircs?|mailto|xmpp)$/i,zo=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Bo(e){let t=Vo(e),n=Ho(e);return Uo(t.runSync(t.parse(n),n),e)}function Vo(e){let t=e.rehypePlugins||Io,n=e.remarkPlugins||Io,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Lo}:Lo;return Eo().use(Ii).use(n).use($a,r).use(t)}function Ho(e){let t=e.children||``,n=new yo;return typeof t==`string`?n.value=t:``+t,n}function Uo(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Wo;for(let e of zo)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Ua(e,l),bt(e,{Fragment:M.Fragment,components:i,ignoreInvalidStyle:!0,jsx:M.jsx,jsxs:M.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Ht)if(Object.hasOwn(Ht,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Ht[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Wo(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ro.test(e.slice(0,t))?e:``}function Go(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ko(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function qo(e,t,n){let r=Ma((n||{}).ignore||[]),i=Jo(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Go(e,`(`),a=Go(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function fs(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||cn(n)||sn(n))&&(!t||n!==47)}Ss.peek=xs;function ps(){this.buffer()}function ms(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function hs(){this.buffer()}function gs(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function _s(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=W(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vs(e){this.exit(e)}function ys(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=W(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bs(e){this.exit(e)}function xs(){return`[`}function Ss(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Cs(){return{enter:{gfmFootnoteCallString:ps,gfmFootnoteCall:ms,gfmFootnoteDefinitionLabelString:hs,gfmFootnoteDefinition:gs},exit:{gfmFootnoteCallString:_s,gfmFootnoteCall:vs,gfmFootnoteDefinitionLabelString:ys,gfmFootnoteDefinition:bs}}}function ws(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ss},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` +`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Es:Ts))),s(),o}}function Ts(e,t,n){return t===0?e:Es(e,t,n)}function Es(e,t,n){return(n?``:` `)+e}var Ds=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Ms.attention=Ns,Ms.peek=Ps;function Os(){return{canContainEols:[`delete`],enter:{strikethrough:As},exit:{strikethrough:js}}}function ks(){return{handlers:{delete:Ms},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Ds}]}}function As(e){this.enter({type:`delete`,children:[],position:void 0},e)}function js(e){this.exit(e)}function Ms(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Ns(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Ps(){return`~`}function Fs(e){return e.length}function Is(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Fs,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Vs);return i(),o}function Vs(e,t,n){return`>`+(n?``:` `)+e}function Hs(e,t){return Us(e,t.inConstruct,!0)&&!Us(e,t.notInConstruct,!1)}function Us(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Ks(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function qs(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Js(e,t,n,r){let i=qs(n),a=e.value||``;if(Ks(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Ys);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(Gs(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:` +`,encode:["`"],...o.current()})),t()}return u+=o.move(` +`),a&&(u+=o.move(a+` +`)),u+=o.move(s),c(),u}function Ys(e,t,n){return(n?``:` `)+e}function Xs(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Zs(e,t,n,r){let i=Xs(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` +`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Qs(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}$s.attention=ec,$s.peek=tc;function $s(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function ec(e,t){return{construct:`emphasis`,markers:Qs(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function tc(e,t,n){return n.options.emphasis||`*`}function nc(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function rc(e,t){let n=!1;return Ua(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Wt(e)&&(t.options.setext||n))}function ic(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(rc(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` +`,after:` +`});return r(),t(),o+` +`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(` +`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:` +`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=nc(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}ac.peek=oc;function ac(e){return e.value||``}function oc(){return`<`}sc.peek=cc;function sc(e,t,n,r){let i=Xs(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function cc(){return`!`}lc.peek=uc;function lc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function uc(){return`!`}dc.peek=fc;function dc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}mc.peek=hc;function mc(e,t,n,r){let i=Xs(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(pc(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function hc(e,t,n){return pc(e,n)?`<`:`[`}gc.peek=_c;function gc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function _c(){return`[`}function vc(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function yc(e){let t=vc(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function bc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function xc(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Sc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?bc(n):vc(n),s=e.ordered?o===`.`?`)`:`.`:yc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),xc(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Tc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Ec(e,t,n,r){if(!e.children.some(function(e){return zs(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function Dc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Oc.attention=kc,Oc.peek=Ac;function Oc(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function kc(e,t){return{construct:`strong`,markers:Dc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Ac(e,t,n){return n.options.strong||`*`}function jc(e,t,n,r){return n.safe(e.value,r)}function Mc(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Nc(e,t,n){let r=(xc(n)+(n.options.ruleSpaces?` `:``)).repeat(Mc(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Pc={blockquote:Bs,break:Ws,code:Js,definition:Zs,emphasis:$s,hardBreak:Ws,heading:ic,html:ac,image:sc,imageReference:lc,inlineCode:dc,link:mc,linkReference:gc,list:Sc,listItem:wc,paragraph:Tc,root:Ec,strong:Oc,text:jc,thematicBreak:Nc};function Fc(){return{enter:{table:Ic,tableData:Bc,tableHeader:Bc,tableRow:Rc},exit:{codeText:Vc,table:Lc,tableData:zc,tableHeader:zc,tableRow:zc}}}function Ic(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Lc(e){this.exit(e),this.data.inTable=void 0}function Rc(e){this.enter({type:`tableRow`,children:[]},e)}function zc(e){this.exit(e)}function Bc(e){this.enter({type:`tableCell`,children:[]},e)}function Vc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Hc));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Hc(e,t){return t===`|`?t:e}function Uc(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` +`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` +`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Is(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var bl={tokenize:Ol,partial:!0};function xl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Tl,continuation:{tokenize:El},exit:Dl}},text:{91:{name:`gfmFootnoteCall`,tokenize:wl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Sl,resolveTo:Cl}}}}function Sl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=W(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Cl(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function wl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||J(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(W(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return J(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Tl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||J(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=W(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return J(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),X(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function El(e,t,n){return e.check(On,t,e.attempt(bl,t,n))}function Dl(e){e.exit(`gfmFootnoteDefinition`)}function Ol(e,t,n){let r=this;return X(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function kl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=bn(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Al=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){jl(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function jl(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Ml(e,t){let n=!1,r=[];for(;t-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Y(t)?X(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||J(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Y(t)?X(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Y(t)?X(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Y(t)?X(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||q(n)?(e.exit(`tableRow`),t(n)):Y(n)?X(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||J(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Fl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Al;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Rl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Ll(e,t,n,r,i){let a=[],o=Rl(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Rl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var zl={name:`tasklistCheck`,tokenize:Vl};function Bl(){return{text:{91:zl}}}function Vl(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return J(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return q(r)?t(r):Y(r)?e.check({tokenize:Hl},t,n)(r):n(r)}}function Hl(e,t,n){return X(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Ul(e){return Zt([al(),xl(),kl(e),Nl(),Bl()])}var Wl={};function Gl(e){let t=this,n=e||Wl,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Ul(n)),a.push(Yc()),o.push(Xc(n))}var Kl=64,ql=300;function Jl(){let e=(0,j.useRef)(null),t=(0,j.useRef)(!0),n=(0,j.useRef)(()=>{}),r=(0,j.useRef)(null),i=(0,j.useCallback)(()=>{let n=e.current;n&&t.current&&(n.scrollTop=n.scrollHeight)},[]);return{scrollRef:(0,j.useCallback)(r=>{if(n.current(),e.current=r,!r)return;let i=0,a=!1,o=()=>{i=Date.now()},s=()=>{a=!0},c=()=>{a=!1},l=()=>{r.scrollHeight-r.clientHeight-r.scrollTop<=Kl?t.current=!0:(a||Date.now()-i{r.removeEventListener(`scroll`,l),r.removeEventListener(`wheel`,o),r.removeEventListener(`touchmove`,o),r.removeEventListener(`keydown`,o),r.removeEventListener(`pointerdown`,s),window.removeEventListener(`pointerup`,c),n.current=()=>{}},t.current=!0,r.scrollTop=r.scrollHeight},[]),contentRef:(0,j.useCallback)(e=>{r.current?.disconnect(),r.current=null,e&&(r.current=new ResizeObserver(i),r.current.observe(e))},[i]),toBottom:(0,j.useCallback)(()=>{t.current=!0,i()},[i])}}var Yl=(0,j.lazy)(()=>te(()=>import(`./mcp-app-frame-CNfakaT6.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),Xl=[`Summarize system health for the last hour`,`Find the source of elevated errors`,`Map the current service dependencies`,`Show the slowest endpoints`];function Zl(){let{agentAvailable:e,messages:t,messageTimes:r,ready:i,running:c,activity:u,error:d,threadMissing:f,send:m,retry:h,reloadThread:_,newThread:v}=ee(),{scrollRef:x,contentRef:w,toBottom:T}=Jl(),E=t.filter(e=>e.role===`user`).at(-1)?.id;if((0,j.useEffect)(()=>{E&&T()},[E,T]),!e)return(0,M.jsx)(a,{size:`sm`,py:96,children:(0,M.jsx)(C,{withBorder:!0,radius:`lg`,p:{base:`xl`,sm:40},children:(0,M.jsxs)(y,{gap:`md`,children:[(0,M.jsx)(o,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Optional capability`}),(0,M.jsx)(g,{order:1,fz:28,children:`Chat is not configured`}),(0,M.jsx)(o,{c:`dimmed`,children:`Add an AI provider key to enable chat. Telemetry ingest, dashboards, traces, logs, and metrics remain available without it.`}),(0,M.jsx)(b,{component:`a`,href:`/dashboards`,variant:`light`,mt:`sm`,children:`Open dashboards`})]})})});let D=t.filter(e=>e.role!==`tool`);return(0,M.jsxs)(S,{className:`chat-pane`,children:[(0,M.jsx)(S,{className:`chat-scroll`,ref:x,tabIndex:0,role:`log`,"aria-label":`Conversation`,children:(0,M.jsxs)(a,{size:880,px:{base:`md`,sm:`xl`},py:`lg`,ref:w,children:[f&&(0,M.jsx)(s,{color:`warn`,radius:`lg`,title:`This chat no longer exists`,children:(0,M.jsxs)(l,{justify:`space-between`,children:[(0,M.jsx)(o,{size:`sm`,children:`It was deleted, or the link is wrong.`}),(0,M.jsx)(b,{size:`compact-sm`,variant:`light`,onClick:v,children:`New chat`})]})}),!f&&!i&&d&&(0,M.jsx)(Ql,{message:d,onRetry:_,onNewThread:v}),!f&&!i&&!d&&(0,M.jsxs)(p,{mih:`40vh`,children:[(0,M.jsx)(n,{size:`sm`}),(0,M.jsx)(o,{c:`dimmed`,size:`sm`,ml:`sm`,children:`Loading chat`})]}),!f&&i&&(0,M.jsxs)(M.Fragment,{children:[D.length===0&&(0,M.jsx)(eu,{onSelect:m}),(0,M.jsxs)(y,{gap:`lg`,"aria-live":`polite`,children:[D.map(e=>(0,M.jsx)(tu,{message:e,time:r[e.id],send:m},e.id)),c&&(0,M.jsxs)(l,{gap:`xs`,children:[(0,M.jsx)(n,{type:`dots`,size:`sm`}),(0,M.jsx)(o,{c:`dimmed`,size:`sm`,children:u||`Analyzing your system`})]}),d&&(0,M.jsx)(Ql,{message:d,onRetry:h})]})]})]})}),!f&&(0,M.jsx)($l,{})]})}function Ql({message:e,onRetry:t,onNewThread:n}){return(0,M.jsx)(s,{color:`bad`,radius:`lg`,title:`Something went wrong`,children:(0,M.jsxs)(l,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,M.jsx)(o,{size:`sm`,children:e}),(0,M.jsxs)(l,{gap:`xs`,wrap:`nowrap`,children:[n&&(0,M.jsx)(b,{size:`compact-sm`,variant:`subtle`,color:`bad`,onClick:n,children:`New chat`}),(0,M.jsx)(b,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:t,children:`Retry`})]})]})})}function $l(){let{input:e,setInput:t,inputRef:n,submit:r,send:i,stop:s,ready:c,running:u}=ee();return(0,M.jsx)(S,{className:`chat-composer`,children:(0,M.jsxs)(a,{size:880,px:{base:`md`,sm:`xl`},children:[(0,M.jsx)(C,{component:`form`,onSubmit:r,className:`chat-composer-field`,withBorder:!0,radius:24,py:6,pl:`lg`,pr:6,children:(0,M.jsxs)(l,{align:`flex-end`,gap:`xs`,wrap:`nowrap`,children:[(0,M.jsx)(ce,{ref:n,"aria-label":`Message Fanout`,value:e,onChange:e=>t(e.currentTarget.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),i(e))},placeholder:u?`Fanout is working…`:`Ask about health, errors, or latency…`,disabled:!c,autosize:!0,minRows:1,maxRows:8,variant:`unstyled`,flex:1}),u?(0,M.jsx)(T,{label:`Stop`,children:(0,M.jsx)(D,{type:`button`,variant:`default`,size:40,radius:`xl`,"aria-label":`Stop`,onClick:s,children:(0,M.jsx)(ge,{size:16,weight:`fill`})})}):(0,M.jsx)(D,{type:`submit`,variant:`filled`,size:40,radius:`xl`,disabled:!e.trim()||!c,"aria-label":`Send message`,children:(0,M.jsx)(me,{size:17,weight:`fill`})})]})}),(0,M.jsx)(o,{c:`dimmed`,size:`xs`,ta:`center`,mt:6,children:`Enter to send, Shift+Enter for a new line`})]})})}function eu({onSelect:e}){return(0,M.jsxs)(y,{align:`center`,gap:`md`,pt:{base:32,sm:88},pb:`xl`,ta:`center`,children:[(0,M.jsx)(h,{size:`large`}),(0,M.jsx)(g,{order:1,fz:24,fw:500,lh:1.25,maw:560,children:`What do you want to know about your system?`}),(0,M.jsx)(l,{justify:`center`,gap:`xs`,mt:`xs`,maw:720,children:Xl.map(t=>(0,M.jsx)(b,{variant:`default`,size:`sm`,radius:`xl`,onClick:()=>void e(t),children:t},t))})]})}function tu({message:e,time:t,send:r}){if(e.role===`activity`){let t=e;return t.activityType===`mcp-app`?(0,M.jsx)(C,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},"aria-label":E(t.content.toolName),children:(0,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(p,{mih:180,children:(0,M.jsx)(n,{size:`sm`})}),children:(0,M.jsx)(Yl,{content:t.content,onMessage:r})})}):null}let i=typeof e.content==`string`?e.content:JSON.stringify(e.content);if(!i&&e.role===`assistant`)return null;let a=e.role===`user`,s=t?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(t)):``;return(0,M.jsxs)(S,{className:`chat-message`,"data-role":a?`user`:`assistant`,children:[a?(0,M.jsx)(C,{radius:`lg`,px:`md`,py:`sm`,bg:`var(--mantine-color-brand-light)`,maw:`70%`,ml:`auto`,w:`fit-content`,children:(0,M.jsx)(o,{style:{whiteSpace:`pre-wrap`},children:i})}):(0,M.jsx)(ue,{className:`chat-markdown`,children:(0,M.jsx)(Bo,{remarkPlugins:[Gl],components:ru,children:i})}),(0,M.jsxs)(l,{className:`chat-message-meta`,gap:6,justify:a?`flex-end`:`flex-start`,mt:4,children:[s&&t&&(0,M.jsx)(o,{c:`dimmed`,size:`xs`,title:ne(t),children:s}),!a&&(0,M.jsx)(nu,{text:i,label:`Copy message`})]})]})}function nu({text:e,label:t}){let{state:n,copy:r}=k();return(0,M.jsx)(T,{label:n===`failed`?`Could not copy`:n===`copied`?`Copied`:t,children:(0,M.jsx)(D,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":t,"data-state":n===`idle`?void 0:n,onClick:()=>r(e),children:n===`copied`?(0,M.jsx)(u,{size:13,weight:`bold`}):(0,M.jsx)(v,{size:13})})})}var ru={table:({children:e})=>(0,M.jsx)(S,{className:`chat-table`,children:(0,M.jsx)(O,{striped:!0,highlightOnHover:!0,withTableBorder:!0,verticalSpacing:`xs`,fz:`sm`,children:e})}),thead:({children:e})=>(0,M.jsx)(O.Thead,{children:e}),tbody:({children:e})=>(0,M.jsx)(O.Tbody,{children:e}),tr:({children:e})=>(0,M.jsx)(O.Tr,{children:e}),th:({children:e})=>(0,M.jsx)(O.Th,{children:e}),td:({children:e})=>(0,M.jsx)(O.Td,{children:e}),pre:({children:e})=>(0,M.jsx)(iu,{children:e}),a:({href:e,children:t})=>(0,M.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:t})};function iu({children:e}){let t=au(e);return(0,M.jsxs)(S,{className:`chat-code`,pos:`relative`,children:[(0,M.jsx)(S,{className:`chat-code-actions`,pos:`absolute`,top:6,right:6,children:(0,M.jsx)(nu,{text:t,label:`Copy code`})}),(0,M.jsx)(`pre`,{children:e})]})}function au(e){return typeof e==`string`?e:Array.isArray(e)?e.map(au).join(``):e&&typeof e==`object`&&`props`in e?au(e.props.children):``}export{Zl as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat-DAwpDVN4.js b/internal/ui/dist/assets/chat-DAwpDVN4.js deleted file mode 100644 index 399b80ee..00000000 --- a/internal/ui/dist/assets/chat-DAwpDVN4.js +++ /dev/null @@ -1,30 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mcp-app-frame-DuNwMm4-.js","assets/brand-MzZ03bSa.js","assets/auth-Co_9Gxq0.js","assets/use-computed-color-scheme-6JIsge00.js"])))=>i.map(i=>d[i]); -import{$ as e,C as t,St as n,_ as r,_t as i,a,c as o,d as s,f as c,gt as l,h as u,i as d,j as f,k as p,l as m,mt as h,n as g,o as _,p as v,r as y,s as b,u as x,x as S,y as C,yt as w}from"./brand-MzZ03bSa.js";import{t as T}from"./Tooltip-BJiO7C_G.js";import{a as E,o as ee,s as D,t as te}from"./preload-helper-C6Mr44w1.js";import{c as O,n as ne,s as k}from"./format-urrStEsn.js";function A(){return`development`}var j=n(l(),1),M=h(),N=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],re={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function ie(e){Object.keys(re).forEach(t=>{e.style.setProperty(t,re[t],`important`)})}function ae(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of N)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var P=null;function oe(e,t,n=1,r=1/0){P||(P=document.createElement(`textarea`),P.setAttribute(`tabindex`,`-1`),P.setAttribute(`aria-hidden`,`true`),P.setAttribute(`aria-label`,`autosize measurement`),ie(P)),P.parentNode===null&&document.body.appendChild(P);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{P.style[e]=o[e]}),ie(P),P.value=t;let c=s===`border-box`?P.scrollHeight+a:P.scrollHeight-i;P.value=t,c=s===`border-box`?P.scrollHeight+a:P.scrollHeight-i,P.value=`x`;let l=P.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function se({maxRows:t,minRows:n,onChange:r,ref:i,...a}){let o=a.value!==void 0,s=(0,j.useRef)(null),c=e(s,i),l=(0,j.useRef)(0),u=(0,j.useRef)(0),d=()=>{let e=s.current;if(!e)return;let r=ae(e);if(!r)return;let[i]=oe(r,e.value||e.placeholder||`x`,n,t);l.current!==i&&(l.current=i,e.style.setProperty(`height`,`${i}px`,`important`))},f=e=>{o||d(),r?.(e)};return(0,j.useLayoutEffect)(d),(0,j.useEffect)(()=>{let e=()=>d();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,j.useEffect)(()=>{let e=s.current;if(!e||typeof ResizeObserver>`u`)return;u.current=e.offsetWidth;let t=new ResizeObserver(()=>{s.current&&s.current.offsetWidth!==u.current&&(u.current=s.current.offsetWidth,d())});return t.observe(e),()=>t.disconnect()},[]),(0,j.useEffect)(()=>{let e=()=>d();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,j.useEffect)(()=>{let e=e=>{if(s.current?.form===e.target&&!o){let e=s.current.value;requestAnimationFrame(()=>{s.current&&e!==s.current.value&&d()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[o]),(0,M.jsx)(`textarea`,{rows:n,...a,onChange:f,ref:c})}var ce=t(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,bottomSection:o,bottomSectionProps:s,...c}=f([`Input`,`InputWrapper`,`Textarea`],null,e),l=t&&A()!==`test`,u=l?{maxRows:n,minRows:r}:{};return(0,M.jsx)(v,{component:l?se:`textarea`,...c,__staticSelector:i||`Textarea`,__bottomSection:o,__bottomSectionProps:s,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...u})});ce.classes=v.classes,ce.displayName=`@mantine/core/Textarea`;var le={root:`m_d08caa0`},ue=t(e=>{let t=f(`Typography`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,attributes:s,...c}=t;return(0,M.jsx)(S,{...p({name:`Typography`,classes:le,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:s})(`root`),...c})});ue.classes=le,ue.displayName=`@mantine/core/Typography`;var de=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z`}))]]),fe=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z`}))]]),pe=j.forwardRef((e,t)=>j.createElement(a,{ref:t,...e,weights:de}));pe.displayName=`PaperPlaneTiltIcon`;var me=pe,he=j.forwardRef((e,t)=>j.createElement(a,{ref:t,...e,weights:fe}));he.displayName=`StopIcon`;var ge=he;function _e(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ve=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ye=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,be={};function xe(e,t){return((t||be).jsx?ye:ve).test(e)}var Se=/[ \t\n\f\r]/g;function Ce(e){return typeof e==`object`?e.type===`text`&&we(e.value):we(e)}function we(e){return e.replace(Se,``)===``}var Te=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Te.prototype.normal={},Te.prototype.property={},Te.prototype.space=void 0;function Ee(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Te(n,r,t)}function De(e){return e.toLowerCase()}var F=class{constructor(e,t){this.attribute=t,this.property=e}};F.prototype.attribute=``,F.prototype.booleanish=!1,F.prototype.boolean=!1,F.prototype.commaOrSpaceSeparated=!1,F.prototype.commaSeparated=!1,F.prototype.defined=!1,F.prototype.mustUseProperty=!1,F.prototype.number=!1,F.prototype.overloadedBoolean=!1,F.prototype.property=``,F.prototype.spaceSeparated=!1,F.prototype.space=void 0;var Oe=w({boolean:()=>I,booleanish:()=>L,commaOrSpaceSeparated:()=>B,commaSeparated:()=>je,number:()=>R,overloadedBoolean:()=>Ae,spaceSeparated:()=>z}),ke=0,I=Me(),L=Me(),Ae=Me(),R=Me(),z=Me(),je=Me(),B=Me();function Me(){return 2**++ke}var Ne=Object.keys(Oe),Pe=class extends F{constructor(e,t,n,r){let i=-1;if(super(e,t),Fe(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&Je.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(qe,Ze);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!qe.test(e)){let n=e.replace(Ke,Xe);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Pe}return new i(r,t)}function Xe(e){return`-`+e.toLowerCase()}function Ze(e){return e.charAt(1).toUpperCase()}var Qe=Ee([Le,Be,He,Ue,We],`html`),$e=Ee([Le,Ve,He,Ue,We],`svg`);function et(e){return e.join(` `).trim()}var tt=i(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` -`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),nt=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(tt());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),rt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),it=i(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(nt()),r=rt();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),at=st(`end`),ot=st(`start`);function st(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function ct(e){let t=ot(e),n=at(e);if(t&&n)return{start:t,end:n}}function lt(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?dt(e.position):`start`in e||`end`in e?dt(e):`line`in e||`column`in e?ut(e):``}function ut(e){return ft(e&&e.line)+`:`+ft(e&&e.column)}function dt(e){return ut(e&&e.start)+`-`+ut(e&&e.end)}function ft(e){return e&&typeof e==`number`?e:1}var V=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=lt(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};V.prototype.file=``,V.prototype.name=``,V.prototype.reason=``,V.prototype.message=``,V.prototype.stack=``,V.prototype.column=void 0,V.prototype.line=void 0,V.prototype.ancestors=void 0,V.prototype.cause=void 0,V.prototype.fatal=void 0,V.prototype.place=void 0,V.prototype.ruleId=void 0,V.prototype.source=void 0;var pt=n(it(),1),mt={}.hasOwnProperty,ht=new Map,gt=/[A-Z]/g,_t=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),vt=new Set([`td`,`th`]),yt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function bt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=jt(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=At(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?$e:Qe,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=xt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function xt(e,t,n){if(t.type===`element`)return St(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Ct(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Tt(e,t,n);if(t.type===`mdxjsEsm`)return wt(e,t);if(t.type===`root`)return Et(e,t,n);if(t.type===`text`)return Dt(e,t)}function St(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=$e,e.schema=i),e.ancestors.push(t);let a=Lt(e,t.tagName,!1),o=Mt(e,t),s=Pt(e,t);return _t.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Ce(e)})),Ot(e,o,a,t),kt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Ct(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Rt(e,t.position)}function wt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Rt(e,t.position)}function Tt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=$e,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Lt(e,t.name,!0),o=Nt(e,t),s=Pt(e,t);return Ot(e,o,a,t),kt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Et(e,t,n){let r={};return kt(r,Pt(e,t)),e.create(t,e.Fragment,r,n)}function Dt(e,t){return t.value}function Ot(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function kt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function At(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function jt(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=ot(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Mt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&mt.call(t.properties,i)){let a=Ft(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&vt.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Nt(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Rt(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Rt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Pt(e,t){let n=[],r=-1,i=e.passKeys?new Map:ht;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(H(e,e.length,0,t),e):t}var Xt={}.hasOwnProperty;function Zt(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function W(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var G=ln(/[A-Za-z]/),K=ln(/[\dA-Za-z]/),tn=ln(/[#-'*+\--9=?A-Z^-~]/);function nn(e){return e!==null&&(e<32||e===127)}var rn=ln(/\d/),an=ln(/[\dA-Fa-f]/),on=ln(/[!-/:-@[-`{-~]/);function q(e){return e!==null&&e<-2}function J(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}var sn=ln(/\p{P}|\p{S}/u),cn=ln(/\s/);function ln(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function un(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function X(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Y(r)?(e.enter(n),s(r)):t(r)}function s(r){return Y(r)&&a++o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function gn(e,t,n){return X(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function _n(e){if(e===null||J(e)||cn(e))return 1;if(sn(e))return 2}function vn(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Sn(d,-c),Sn(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=U(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=U(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=U(l,vn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=U(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=U(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,H(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&Y(t)?X(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||q(t)?e.check(Fn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Y(t)?X(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Y(t)?X(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Rn(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var zn={name:`codeIndented`,tokenize:Vn},Bn={partial:!0,tokenize:Hn};function Vn(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),X(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):q(t)?e.attempt(Bn,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||q(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Hn(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):X(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):q(e)?i(e):n(e)}}var Un={name:`codeText`,previous:Gn,resolve:Wn,tokenize:Kn};function Wn(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Jn(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Jn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Jn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function nr(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||nn(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||J(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Y(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function ir(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),X(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ar(e,t){let n;return r;function r(i){return q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Y(i)?X(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var or={name:`definition`,tokenize:cr},sr={partial:!0,tokenize:lr};function cr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return rr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=W(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return J(t)?ar(e,l)(t):l(t)}function l(t){return nr(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(sr,d,d)(t)}function d(t){return Y(t)?X(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function lr(e,t,n){return r;function r(t){return J(t)?ar(e,i)(t):n(t)}function i(t){return ir(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Y(t)?X(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||q(e)?t(e):n(e)}}var ur={name:`hardBreakEscape`,tokenize:dr};function dr(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var fr={name:`headingAtx`,resolve:pr,tokenize:mr};function pr(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},H(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function mr(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||J(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||q(n)?(e.exit(`atxHeading`),t(n)):Y(n)?X(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||J(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var hr=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),gr=[`pre`,`script`,`style`,`textarea`],_r={concrete:!0,name:`htmlFlow`,resolveTo:br,tokenize:xr},vr={partial:!0,tokenize:Cr},yr={partial:!0,tokenize:Sr};function br(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function xr(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:N):G(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):G(a)?(e.consume(a),i=4,r.interrupt?t:N):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:N):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return G(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||J(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&gr.includes(l)?(i=1,r.interrupt?t(s):D(s)):hr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||K(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return Y(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||G(t)?(e.consume(t),b):Y(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||K(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Y(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Y(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||J(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Y(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||q(t)?D(t):Y(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),k):t===60&&i===1?(e.consume(t),A):t===62&&i===4?(e.consume(t),re):t===63&&i===3?(e.consume(t),N):t===93&&i===5?(e.consume(t),M):q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(vr,ie,te)(t)):t===null||q(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(yr,O,ie)(t)}function O(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return t===null||q(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function k(t){return t===45?(e.consume(t),N):D(t)}function A(t){return t===47?(e.consume(t),o=``,j):D(t)}function j(t){if(t===62){let n=o.toLowerCase();return gr.includes(n)?(e.consume(t),re):D(t)}return G(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),j):D(t)}function M(t){return t===93?(e.consume(t),N):D(t)}function N(t){return t===62?(e.consume(t),re):t===45&&i===2?(e.consume(t),N):D(t)}function re(t){return t===null||q(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function Sr(e,t,n){let r=this;return i;function i(t){return q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Cr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Tn,t,n)}}var wr={name:`htmlText`,tokenize:Tr};function Tr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):G(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):G(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):q(t)?(o=d,A(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?k(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):q(t)?(o=h,A(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?k(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?k(t):q(t)?(o=v,A(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):q(t)?(o=y,A(t)):(e.consume(t),y)}function b(e){return e===62?k(e):y(e)}function x(t){return G(t)?(e.consume(t),S):n(t)}function S(t){return t===45||K(t)?(e.consume(t),S):C(t)}function C(t){return q(t)?(o=C,A(t)):Y(t)?(e.consume(t),C):k(t)}function w(t){return t===45||K(t)?(e.consume(t),w):t===47||t===62||J(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),k):t===58||t===95||G(t)?(e.consume(t),E):q(t)?(o=T,A(t)):Y(t)?(e.consume(t),T):k(t)}function E(t){return t===45||t===46||t===58||t===95||K(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):q(t)?(o=ee,A(t)):Y(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):q(t)?(o=D,A(t)):Y(t)?(e.consume(t),D):(e.consume(t),O)}function te(t){return t===i?(e.consume(t),i=void 0,ne):t===null?n(t):q(t)?(o=te,A(t)):(e.consume(t),te)}function O(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||J(t)?T(t):(e.consume(t),O)}function ne(e){return e===47||e===62||J(e)?T(e):n(e)}function k(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function A(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return Y(t)?X(e,M,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):M(t)}function M(t){return e.enter(`htmlTextData`),o(t)}}var Er={name:`labelEnd`,resolveAll:Ar,resolveTo:jr,tokenize:Mr},Dr={tokenize:Nr},Or={tokenize:Pr},kr={tokenize:Fr};function Ar(e){let t=-1,n=[];for(;++t=3&&(a===null||q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Y(t)?X(e,s,`whitespace`)(t):s(t))}}var Z={continuation:{tokenize:qr},exit:Yr,name:`list`,tokenize:Kr},Wr={partial:!0,tokenize:Xr},Gr={partial:!0,tokenize:Jr};function Kr(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:rn(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Hr,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return rn(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Tn,r.interrupt?n:u,e.attempt(Wr,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Y(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function qr(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Tn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Y(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Gr,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(Z,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Jr(e,t,n){let r=this;return X(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Yr(e){e.exit(this.containerState.type)}function Xr(e,t,n){let r=this;return X(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Y(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Zr={name:`setextUnderline`,resolveTo:Qr,tokenize:$r};function Qr(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function $r(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Y(t)?X(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var ei={tokenize:ti};function ti(e){let t=this,n=e.attempt(Tn,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Zn,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ni={resolveAll:oi()},ri=ai(`string`),ii=ai(`text`);function ai(e){return{resolveAll:oi(e===`text`?si:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++igi,contentInitial:()=>ui,disable:()=>_i,document:()=>li,flow:()=>fi,flowInitial:()=>di,insideSpan:()=>hi,string:()=>pi,text:()=>mi}),li={42:Z,43:Z,45:Z,48:Z,49:Z,50:Z,51:Z,52:Z,53:Z,54:Z,55:Z,56:Z,57:Z,62:Dn},ui={91:or},di={[-2]:zn,[-1]:zn,32:zn},fi={35:fr,42:Hr,45:[Zr,Hr],60:_r,61:Zr,95:Hr,96:In,126:In},pi={38:Nn,92:jn},mi={[-5]:Br,[-4]:Br,[-3]:Br,33:Ir,38:Nn,42:yn,60:[Cn,wr],91:Rr,92:[ur,jn],93:Er,95:yn,96:Un},hi={null:[yn,ni]},gi={null:[42,95]},_i={null:[]};function vi(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=U(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=vn(a,l.events,l),l.events):[]}function f(e,t){return bi(p(e),t)}function p(e){return yi(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function bi(e,t){let n=-1,r=[],i;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Pi).call(a,void 0,e[0])}for(r.position={start:ji(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ji(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function zi(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bi(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vi(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=un(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Hi(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ui(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Wi(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Gi(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Wi(e,t);let i={src:un(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Ki(e,t){let n={src:un(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function qi(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Ji(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Wi(e,t);let i={href:un(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Yi(e,t){let n={href:un(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Xi(e,t,n){let r=e.all(t),i=n?Zi(n):Qi(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s1}function $i(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=ot(t.children[1]),o=at(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function ia(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(la(t.slice(i),i>0,!1)),a.join(``)}function la(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===oa||t===sa;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===oa||t===sa;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function ua(e,t){let n={type:`text`,value:ca(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function da(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var fa={blockquote:Ii,break:Li,code:Ri,delete:zi,emphasis:Bi,footnoteReference:Vi,heading:Hi,html:Ui,imageReference:Gi,image:Ki,inlineCode:qi,linkReference:Ji,link:Yi,listItem:Xi,list:$i,paragraph:ea,root:ta,strong:na,table:ra,tableCell:aa,tableRow:ia,text:ua,thematicBreak:da,toml:pa,yaml:pa,definition:pa,footnoteDefinition:pa};function pa(){}var{defineProperty:ma}=Object,ha=typeof self==`object`?self:globalThis,ga=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new ha[e](t)},_a=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?ma(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof ha[e]==`function`?ga(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(ga(a,o),i)};return r},va=e=>_a(new Map,e)(0),ya=``,{toString:ba}={},{keys:xa,is:Sa}=Object,Ca=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=ba.call(e).slice(8,-1);switch(n){case`Array`:return[1,ya];case`Object`:return[2,ya];case`Date`:return[3,ya];case`RegExp`:return[4,ya];case`Map`:return[5,ya];case`Set`:return[6,ya];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},wa=([e,t])=>e===0&&(t===`function`||t===`symbol`),Ta=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Ca(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Sa(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of xa(o))(e||!wa(Ca(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?ya:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(wa(Ca(n))||wa(Ca(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!wa(Ca(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Ea=(e,{json:t,lossy:n}={})=>{let r=[];return Ta(!(t||n),!!t,new Map,r)(e),r},Da=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?va(Ea(e,t)):structuredClone(e):(e,t)=>va(Ea(e,t));function Oa(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function ka(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Aa(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Oa,r=e.options.footnoteBackLabel||ka,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Da(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` -`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` -`}]}}var ja=(function(e){if(e==null)return Ia;if(typeof e==`function`)return Fa(e);if(typeof e==`object`)return Array.isArray(e)?Ma(e):Na(e);if(typeof e==`string`)return Pa(e);throw Error(`Expected function, string, or object as test`)});function Ma(e){let t=[],n=-1;for(;++n`:``))+`)`})}return u;function u(){let l=za,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Va(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d0&&n.push({type:`text`,value:` -`}),n}function Xa(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Za(e,t){let n=Ga(e,t),r=n.one(e,void 0),i=Aa(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` -`},i)),a}function Qa(e,t){return e&&`run`in e?async function(n,r){let i=Za(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Za(n,{file:r,...e||t})}}function $a(e){if(e)throw e}var eo=n(i(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Q={basename:io,dirname:ao,extname:oo,join:so,sep:`/`};function io(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);uo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ao(e){if(uo(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function oo(e){uo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function so(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function lo(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function uo(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var fo={cwd:po};function po(){return`/`}function mo(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function ho(e){if(typeof e==`string`)e=new URL(e);else if(!mo(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return go(e)}function go(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];to(o)&&to(r)&&(r=(0,eo.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Eo(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Do(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Oo(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ko(e){if(!to(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Ao(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function jo(e){return Mo(e)?e:new vo(e)}function Mo(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function No(e){return typeof e==`string`||Po(e)}function Po(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Fo=[],Io={allowDangerousHtml:!0},Lo=/^(https?|ircs?|mailto|xmpp)$/i,Ro=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function zo(e){let t=Bo(e),n=Vo(e);return Ho(t.runSync(t.parse(n),n),e)}function Bo(e){let t=e.rehypePlugins||Fo,n=e.remarkPlugins||Fo,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Io}:Io;return To().use(Fi).use(n).use(Qa,r).use(t)}function Vo(e){let t=e.children||``,n=new vo;return typeof t==`string`?n.value=t:``+t,n}function Ho(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Uo;for(let e of Ro)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Ha(e,l),bt(e,{Fragment:M.Fragment,components:i,ignoreInvalidStyle:!0,jsx:M.jsx,jsxs:M.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Ht)if(Object.hasOwn(Ht,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Ht[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Uo(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Lo.test(e.slice(0,t))?e:``}function Wo(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Go(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Ko(e,t,n){let r=ja((n||{}).ignore||[]),i=qo(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Wo(e,`(`),a=Wo(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function ds(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||cn(n)||sn(n))&&(!t||n!==47)}xs.peek=bs;function fs(){this.buffer()}function ps(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function ms(){this.buffer()}function hs(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function gs(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=W(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _s(e){this.exit(e)}function vs(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=W(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ys(e){this.exit(e)}function bs(){return`[`}function xs(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Ss(){return{enter:{gfmFootnoteCallString:fs,gfmFootnoteCall:ps,gfmFootnoteDefinitionLabelString:ms,gfmFootnoteDefinition:hs},exit:{gfmFootnoteCallString:gs,gfmFootnoteCall:_s,gfmFootnoteDefinitionLabelString:vs,gfmFootnoteDefinition:ys}}}function Cs(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:xs},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` -`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Ts:ws))),s(),o}}function ws(e,t,n){return t===0?e:Ts(e,t,n)}function Ts(e,t,n){return(n?``:` `)+e}var Es=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];js.peek=Ms;function Ds(){return{canContainEols:[`delete`],enter:{strikethrough:ks},exit:{strikethrough:As}}}function Os(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Es}],handlers:{delete:js}}}function ks(e){this.enter({type:`delete`,children:[]},e)}function As(e){this.exit(e)}function js(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Ms(){return`~`}function Ns(e){return e.length}function Ps(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ns,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Rs);return i(),o}function Rs(e,t,n){return`>`+(n?``:` `)+e}function zs(e,t){return Bs(e,t.inConstruct,!0)&&!Bs(e,t.notInConstruct,!1)}function Bs(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Us(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Ws(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Gs(e,t,n,r){let i=Ws(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Us(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Ks);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Hs(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` -`,encode:["`"],...s.current()})),t()}return u+=s.move(` -`),a&&(u+=s.move(a+` -`)),u+=s.move(c),l(),u}function Ks(e,t,n){return(n?``:` `)+e}function qs(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Js(e,t,n,r){let i=qs(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` -`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Ys(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Xs(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Zs(e,t,n){let r=_n(e),i=_n(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Qs.peek=$s;function Qs(e,t,n,r){let i=Ys(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Zs(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Xs(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Zs(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Xs(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function $s(e,t,n){return n.options.emphasis||`*`}function ec(e,t){let n=!1;return Ha(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Wt(e)&&(t.options.setext||n))}function tc(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(ec(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` -`,after:` -`});return r(),t(),o+` -`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(` -`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:` -`,...a.current()});return/^[\t ]/.test(l)&&(l=Xs(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}nc.peek=rc;function nc(e){return e.value||``}function rc(){return`<`}ic.peek=ac;function ic(e,t,n,r){let i=qs(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function ac(){return`!`}oc.peek=sc;function oc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function sc(){return`!`}cc.peek=lc;function cc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}dc.peek=fc;function dc(e,t,n,r){let i=qs(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(uc(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function fc(e,t,n){return uc(e,n)?`<`:`[`}pc.peek=mc;function pc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function mc(){return`[`}function hc(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function gc(e){let t=hc(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function _c(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function vc(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function yc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?_c(n):hc(n),s=e.ordered?o===`.`?`)`:`.`:gc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),vc(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Sc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Cc=ja([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function wc(e,t,n,r){return(e.children.some(function(e){return Cc(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Tc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ec.peek=Dc;function Ec(e,t,n,r){let i=Tc(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Zs(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Xs(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Zs(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Xs(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Dc(e,t,n){return n.options.strong||`*`}function Oc(e,t,n,r){return n.safe(e.value,r)}function kc(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Ac(e,t,n){let r=(vc(n)+(n.options.ruleSpaces?` `:``)).repeat(kc(n));return n.options.ruleSpaces?r.slice(0,-1):r}var jc={blockquote:Ls,break:Vs,code:Gs,definition:Js,emphasis:Qs,hardBreak:Vs,heading:tc,html:nc,image:ic,imageReference:oc,inlineCode:cc,link:dc,linkReference:pc,list:yc,listItem:xc,paragraph:Sc,root:wc,strong:Ec,text:Oc,thematicBreak:Ac};function Mc(){return{enter:{table:Nc,tableData:Lc,tableHeader:Lc,tableRow:Fc},exit:{codeText:Rc,table:Pc,tableData:Ic,tableHeader:Ic,tableRow:Ic}}}function Nc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Pc(e){this.exit(e),this.data.inTable=void 0}function Fc(e){this.enter({type:`tableRow`,children:[]},e)}function Ic(e){this.exit(e)}function Lc(e){this.enter({type:`tableCell`,children:[]},e)}function Rc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,zc));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function zc(e,t){return t===`|`?t:e}function Bc(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` -`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` -`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Ps(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var _l={tokenize:Tl,partial:!0};function vl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Sl,continuation:{tokenize:Cl},exit:wl}},text:{91:{name:`gfmFootnoteCall`,tokenize:xl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:yl,resolveTo:bl}}}}function yl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=W(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function bl(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function xl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||J(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(W(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return J(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Sl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||J(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=W(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return J(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),X(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Cl(e,t,n){return e.check(Tn,t,e.attempt(_l,t,n))}function wl(e){e.exit(`gfmFootnoteDefinition`)}function Tl(e,t,n){let r=this;return X(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function El(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=_n(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Dl=class{constructor(){this.map=[]}add(e,t,n){Ol(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Ol(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Y(t)?X(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||J(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Y(t)?X(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Y(t)?X(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Y(t)?X(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||q(n)?(e.exit(`tableRow`),t(n)):Y(n)?X(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||J(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Ml(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Dl;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Fl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Pl(e,t,n,r,i){let a=[],o=Fl(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Fl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Il={name:`tasklistCheck`,tokenize:Rl};function Ll(){return{text:{91:Il}}}function Rl(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return J(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return q(r)?t(r):Y(r)?e.check({tokenize:zl},t,n)(r):n(r)}}function zl(e,t,n){return X(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Bl(e){return Zt([nl(),vl(),El(e),Al(),Ll()])}var Vl={};function Hl(e){let t=this,n=e||Vl,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Bl(n)),a.push(Kc()),o.push(qc(n))}var Ul=64,Wl=300;function Gl(){let e=(0,j.useRef)(null),t=(0,j.useRef)(!0),n=(0,j.useRef)(()=>{}),r=(0,j.useRef)(null),i=(0,j.useCallback)(()=>{let n=e.current;n&&t.current&&(n.scrollTop=n.scrollHeight)},[]);return{scrollRef:(0,j.useCallback)(r=>{if(n.current(),e.current=r,!r)return;let i=0,a=!1,o=()=>{i=Date.now()},s=()=>{a=!0},c=()=>{a=!1},l=()=>{r.scrollHeight-r.clientHeight-r.scrollTop<=Ul?t.current=!0:(a||Date.now()-i{r.removeEventListener(`scroll`,l),r.removeEventListener(`wheel`,o),r.removeEventListener(`touchmove`,o),r.removeEventListener(`keydown`,o),r.removeEventListener(`pointerdown`,s),window.removeEventListener(`pointerup`,c),n.current=()=>{}},t.current=!0,r.scrollTop=r.scrollHeight},[]),contentRef:(0,j.useCallback)(e=>{r.current?.disconnect(),r.current=null,e&&(r.current=new ResizeObserver(i),r.current.observe(e))},[i]),toBottom:(0,j.useCallback)(()=>{t.current=!0,i()},[i])}}var Kl=(0,j.lazy)(()=>te(()=>import(`./mcp-app-frame-DuNwMm4-.js`),__vite__mapDeps([0,1,2,3]))),ql=[`Summarize system health for the last hour`,`Find the source of elevated errors`,`Map the current service dependencies`,`Show the slowest endpoints`];function Jl(){let{agentAvailable:e,messages:t,messageTimes:n,ready:i,running:a,activity:l,error:d,threadMissing:f,send:p,retry:h,reloadThread:g,newThread:v}=ee(),{scrollRef:y,contentRef:w,toBottom:T}=Gl(),E=t.filter(e=>e.role===`user`).at(-1)?.id;if((0,j.useEffect)(()=>{E&&T()},[E,T]),!e)return(0,M.jsx)(o,{size:`sm`,py:96,children:(0,M.jsx)(C,{withBorder:!0,radius:`lg`,p:{base:`xl`,sm:40},children:(0,M.jsxs)(b,{gap:`md`,children:[(0,M.jsx)(s,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Optional capability`}),(0,M.jsx)(_,{order:1,fz:28,children:`Chat is not configured`}),(0,M.jsx)(s,{c:`dimmed`,children:`Add an AI provider key to enable chat. Telemetry ingest, dashboards, traces, logs, and metrics remain available without it.`}),(0,M.jsx)(x,{component:`a`,href:`/dashboards`,variant:`light`,mt:`sm`,children:`Open dashboards`})]})})});let D=t.filter(e=>e.role!==`tool`);return(0,M.jsxs)(S,{className:`chat-pane`,children:[(0,M.jsx)(S,{className:`chat-scroll`,ref:y,tabIndex:0,role:`log`,"aria-label":`Conversation`,children:(0,M.jsxs)(o,{size:880,px:{base:`md`,sm:`xl`},py:`lg`,ref:w,children:[f&&(0,M.jsx)(c,{color:`warn`,radius:`lg`,title:`This chat no longer exists`,children:(0,M.jsxs)(u,{justify:`space-between`,children:[(0,M.jsx)(s,{size:`sm`,children:`It was deleted, or the link is wrong.`}),(0,M.jsx)(x,{size:`compact-sm`,variant:`light`,onClick:v,children:`New chat`})]})}),!f&&!i&&d&&(0,M.jsx)(Yl,{message:d,onRetry:g,onNewThread:v}),!f&&!i&&!d&&(0,M.jsxs)(m,{mih:`40vh`,children:[(0,M.jsx)(r,{size:`sm`}),(0,M.jsx)(s,{c:`dimmed`,size:`sm`,ml:`sm`,children:`Loading chat`})]}),!f&&i&&(0,M.jsxs)(M.Fragment,{children:[D.length===0&&(0,M.jsx)(Zl,{onSelect:p}),(0,M.jsxs)(b,{gap:`lg`,"aria-live":`polite`,children:[D.map(e=>(0,M.jsx)(Ql,{message:e,time:n[e.id],send:p},e.id)),a&&(0,M.jsxs)(u,{gap:`xs`,children:[(0,M.jsx)(r,{type:`dots`,size:`sm`}),(0,M.jsx)(s,{c:`dimmed`,size:`sm`,children:l||`Analyzing your system`})]}),d&&(0,M.jsx)(Yl,{message:d,onRetry:h})]})]})]})}),!f&&(0,M.jsx)(Xl,{})]})}function Yl({message:e,onRetry:t,onNewThread:n}){return(0,M.jsx)(c,{color:`bad`,radius:`lg`,title:`Something went wrong`,children:(0,M.jsxs)(u,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,M.jsx)(s,{size:`sm`,children:e}),(0,M.jsxs)(u,{gap:`xs`,wrap:`nowrap`,children:[n&&(0,M.jsx)(x,{size:`compact-sm`,variant:`subtle`,color:`bad`,onClick:n,children:`New chat`}),(0,M.jsx)(x,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:t,children:`Retry`})]})]})})}function Xl(){let{input:e,setInput:t,inputRef:n,submit:r,send:i,stop:a,ready:c,running:l}=ee();return(0,M.jsx)(S,{className:`chat-composer`,children:(0,M.jsxs)(o,{size:880,px:{base:`md`,sm:`xl`},children:[(0,M.jsx)(C,{component:`form`,onSubmit:r,className:`chat-composer-field`,withBorder:!0,radius:24,py:6,pl:`lg`,pr:6,children:(0,M.jsxs)(u,{align:`flex-end`,gap:`xs`,wrap:`nowrap`,children:[(0,M.jsx)(ce,{ref:n,"aria-label":`Message Fanout`,value:e,onChange:e=>t(e.currentTarget.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),i(e))},placeholder:l?`Fanout is working…`:`Ask about health, errors, or latency…`,disabled:!c,autosize:!0,minRows:1,maxRows:8,variant:`unstyled`,flex:1}),l?(0,M.jsx)(T,{label:`Stop`,children:(0,M.jsx)(D,{type:`button`,variant:`default`,size:40,radius:`xl`,"aria-label":`Stop`,onClick:a,children:(0,M.jsx)(ge,{size:16,weight:`fill`})})}):(0,M.jsx)(D,{type:`submit`,variant:`filled`,size:40,radius:`xl`,disabled:!e.trim()||!c,"aria-label":`Send message`,children:(0,M.jsx)(me,{size:17,weight:`fill`})})]})}),(0,M.jsx)(s,{c:`dimmed`,size:`xs`,ta:`center`,mt:6,children:`Enter to send, Shift+Enter for a new line`})]})})}function Zl({onSelect:e}){return(0,M.jsxs)(b,{align:`center`,gap:`md`,pt:{base:32,sm:88},pb:`xl`,ta:`center`,children:[(0,M.jsx)(g,{size:`large`}),(0,M.jsx)(_,{order:1,fz:24,fw:500,lh:1.25,maw:560,children:`What do you want to know about your system?`}),(0,M.jsx)(u,{justify:`center`,gap:`xs`,mt:`xs`,maw:720,children:ql.map(t=>(0,M.jsx)(x,{variant:`default`,size:`sm`,radius:`xl`,onClick:()=>void e(t),children:t},t))})]})}function Ql({message:e,time:t,send:n}){if(e.role===`activity`){let t=e;return t.activityType===`mcp-app`?(0,M.jsx)(C,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},"aria-label":E(t.content.toolName),children:(0,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(m,{mih:180,children:(0,M.jsx)(r,{size:`sm`})}),children:(0,M.jsx)(Kl,{content:t.content,onMessage:n})})}):null}let i=typeof e.content==`string`?e.content:JSON.stringify(e.content);if(!i&&e.role===`assistant`)return null;let a=e.role===`user`,o=t?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(t)):``;return(0,M.jsxs)(S,{className:`chat-message`,"data-role":a?`user`:`assistant`,children:[a?(0,M.jsx)(C,{radius:`lg`,px:`md`,py:`sm`,bg:`var(--mantine-color-brand-light)`,maw:`70%`,ml:`auto`,w:`fit-content`,children:(0,M.jsx)(s,{style:{whiteSpace:`pre-wrap`},children:i})}):(0,M.jsx)(ue,{className:`chat-markdown`,children:(0,M.jsx)(zo,{remarkPlugins:[Hl],components:eu,children:i})}),(0,M.jsxs)(u,{className:`chat-message-meta`,gap:6,justify:a?`flex-end`:`flex-start`,mt:4,children:[o&&t&&(0,M.jsx)(s,{c:`dimmed`,size:`xs`,title:ne(t),children:o}),!a&&(0,M.jsx)($l,{text:i,label:`Copy message`})]})]})}function $l({text:e,label:t}){let{state:n,copy:r}=k();return(0,M.jsx)(T,{label:n===`failed`?`Could not copy`:n===`copied`?`Copied`:t,children:(0,M.jsx)(D,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":t,"data-state":n===`idle`?void 0:n,onClick:()=>r(e),children:n===`copied`?(0,M.jsx)(d,{size:13,weight:`bold`}):(0,M.jsx)(y,{size:13})})})}var eu={table:({children:e})=>(0,M.jsx)(S,{className:`chat-table`,children:(0,M.jsx)(O,{striped:!0,highlightOnHover:!0,withTableBorder:!0,verticalSpacing:`xs`,fz:`sm`,children:e})}),thead:({children:e})=>(0,M.jsx)(O.Thead,{children:e}),tbody:({children:e})=>(0,M.jsx)(O.Tbody,{children:e}),tr:({children:e})=>(0,M.jsx)(O.Tr,{children:e}),th:({children:e})=>(0,M.jsx)(O.Th,{children:e}),td:({children:e})=>(0,M.jsx)(O.Td,{children:e}),pre:({children:e})=>(0,M.jsx)(tu,{children:e}),a:({href:e,children:t})=>(0,M.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:t})};function tu({children:e}){let t=nu(e);return(0,M.jsxs)(S,{className:`chat-code`,pos:`relative`,children:[(0,M.jsx)(S,{className:`chat-code-actions`,pos:`absolute`,top:6,right:6,children:(0,M.jsx)($l,{text:t,label:`Copy code`})}),(0,M.jsx)(`pre`,{children:e})]})}function nu(e){return typeof e==`string`?e:Array.isArray(e)?e.map(nu).join(``):e&&typeof e==`object`&&`props`in e?nu(e.props.children):``}export{Jl as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat._threadId-CDrUSu7Q.js b/internal/ui/dist/assets/chat._threadId-CDrUSu7Q.js new file mode 100644 index 00000000..cbea662e --- /dev/null +++ b/internal/ui/dist/assets/chat._threadId-CDrUSu7Q.js @@ -0,0 +1 @@ +import{t as e}from"./chat-CDy0rSDz.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat._threadId-CUHuiYQG.js b/internal/ui/dist/assets/chat._threadId-CUHuiYQG.js deleted file mode 100644 index fe47ad64..00000000 --- a/internal/ui/dist/assets/chat._threadId-CUHuiYQG.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./chat-DAwpDVN4.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat.index-CDrUSu7Q.js b/internal/ui/dist/assets/chat.index-CDrUSu7Q.js new file mode 100644 index 00000000..cbea662e --- /dev/null +++ b/internal/ui/dist/assets/chat.index-CDrUSu7Q.js @@ -0,0 +1 @@ +import{t as e}from"./chat-CDy0rSDz.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat.index-CUHuiYQG.js b/internal/ui/dist/assets/chat.index-CUHuiYQG.js deleted file mode 100644 index fe47ad64..00000000 --- a/internal/ui/dist/assets/chat.index-CUHuiYQG.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./chat-DAwpDVN4.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboard-CGsOX0Hw.js b/internal/ui/dist/assets/dashboard-CGsOX0Hw.js deleted file mode 100644 index 37311fa7..00000000 --- a/internal/ui/dist/assets/dashboard-CGsOX0Hw.js +++ /dev/null @@ -1,24 +0,0 @@ -import{$ as e,A as t,C as n,D as r,E as i,K as a,N as o,O as s,R as c,S as l,St as u,T as d,X as f,Y as p,_ as m,_t as h,a as g,at as _,ct as v,d as y,dt as b,et as x,f as S,gt as C,h as w,ht as T,i as E,it as D,j as O,k,l as A,lt as j,m as M,mt as N,o as P,p as ee,pt as te,r as ne,s as re,st as ie,u as ae,w as oe,x as se,y as ce,yt as le}from"./brand-MzZ03bSa.js";import{c as ue,i as F,o as I}from"./auth-Co_9Gxq0.js";import{C as de,D as fe,E as pe,N as me,O as he,S as ge,T as _e,_ as ve,b as ye,c as be,f as xe,g as Se,h as Ce,i as we,j as Te,l as Ee,m as De,n as Oe,o as ke,p as Ae,s as je,u as Me,v as Ne,w as Pe,x as Fe,y as Ie}from"./tokens-eDtvR5uq.js";import{S as Le,T as Re,o as ze,t as Be,w as Ve,x as He}from"./Tooltip-BJiO7C_G.js";import{t as Ue}from"./use-computed-color-scheme-6JIsge00.js";import{O as We,V as Ge,i as Ke,k as qe,n as Je,t as Ye}from"./api-D6Wt-jwp.js";import{s as Xe}from"./preload-helper-C6Mr44w1.js";import{a as Ze,c as Qe,i as $e,n as et,o as tt,r as nt,s as rt,t as it}from"./format-urrStEsn.js";import{n as at,t as ot}from"./WarningCircle.es-hJZtxy-A.js";var L=u(C(),1),R=N();function st(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function ct(e){let t=(0,L.useRef)(void 0);return(0,L.useEffect)(()=>{t.current=e},[e]),t.current}function lt(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t{let t=O(`Flex`,null,e),{classNames:n,className:a,style:l,styles:u,unstyled:f,vars:p,gap:m,rowGap:h,columnGap:g,align:_,justify:v,wrap:y,direction:b,attributes:x,...S}=t,C=k({name:`Flex`,classes:mt,props:t,className:a,style:l,classNames:n,styles:u,unstyled:f,attributes:x,vars:p}),w=o(),T=d(),E=i({styleProps:{gap:m,rowGap:h,columnGap:g,align:_,justify:v,wrap:y,direction:b},theme:w,data:pt}),D=c(),A=D&&E.hasResponsiveStyles?r(E.styles,E.media):T;return(0,R.jsxs)(R.Fragment,{children:[E.hasResponsiveStyles&&(0,R.jsx)(s,{selector:`.${A}`,styles:E.styles,media:E.media,deduplicate:D}),(0,R.jsx)(se,{...C(`root`,{className:A,style:j(E.inlineStyles)}),...S})]})});ht.classes=mt,ht.displayName=`@mantine/core/Flex`;function gt(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>gt(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function _t(e){return e?e.map(e=>gt(e)):[]}function vt(e){return e.reduce((e,t)=>`group`in t?{...e,...vt(t.items)}:(e[`${t.value}`]=t,e),{})}var yt={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},bt={error:null},xt=f((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":ie(t,`combobox-chevron-size`),"--combobox-chevron-color":n?a(n,e):void 0}})),St=n(e=>{let t=O(`ComboboxChevron`,bt,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=k({name:`ComboboxChevron`,classes:yt,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:xt,attributes:u,rootSelector:`chevron`});return(0,R.jsx)(se,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,R.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});St.classes=yt,St.varsResolver=xt,St.displayName=`@mantine/core/ComboboxChevron`;var[Ct,wt]=Ve(`Combobox component was not found in tree`);function Tt({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,R.jsx)(M.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}Tt.displayName=`@mantine/core/ComboboxClearButton`;var Et=n(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=O(`ComboboxDropdown`,null,e),s=wt();return(0,R.jsx)(fe.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});Et.classes=yt,Et.displayName=`@mantine/core/ComboboxDropdown`;var Dt={refProp:`ref`},Ot=n(e=>{let{children:t,refProp:n,ref:r}=O(`ComboboxDropdownTarget`,Dt,e);if(wt(),!Re(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,R.jsx)(fe.Target,{ref:r,refProp:n,children:t})});Ot.displayName=`@mantine/core/ComboboxDropdownTarget`;var kt=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ComboboxEmpty`,null,e);return(0,R.jsx)(se,{...wt().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});kt.classes=yt,kt.displayName=`@mantine/core/ComboboxEmpty`;function At({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=wt(),[c,l]=(0,L.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var jt={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Mt=n(t=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,ref:l,...u}=O(`ComboboxEventsTarget`,jt,t),d=He(n);if(!d)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=wt();return(0,L.cloneElement)(d,{...At({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:c}),...u,[r]:e(l,f.store.targetRef,Le(d))})});Mt.displayName=`@mantine/core/ComboboxEventsTarget`;var Nt=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ComboboxFooter`,null,e);return(0,R.jsx)(se,{...wt().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Nt.classes=yt,Nt.displayName=`@mantine/core/ComboboxFooter`;var Pt=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=O(`ComboboxGroup`,null,e),u=wt(),d=x(c),f=s!=null&&s!==!1&&s!==``;return(0,R.jsxs)(se,{role:`group`,"aria-labelledby":f?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[f&&(0,R.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});Pt.classes=yt,Pt.displayName=`@mantine/core/ComboboxGroup`;var Ft=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ComboboxHeader`,null,e);return(0,R.jsx)(se,{...wt().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Ft.classes=yt,Ft.displayName=`@mantine/core/ComboboxHeader`;function It({value:e,valuesDivider:t=`,`,...n}){return(0,R.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}It.displayName=`@mantine/core/ComboboxHiddenInput`;var Lt=n(e=>{let t=O(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=wt(),_=(0,L.useId)(),v=c||_;return(0,R.jsx)(se,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});Lt.classes=yt,Lt.displayName=`@mantine/core/ComboboxOption`;var Rt=n(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=O(`ComboboxOptions`,null,e),l=wt(),u=x(a);return(0,L.useEffect)(()=>{l.store.setListId(u)},[u]),(0,R.jsx)(se,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});Rt.classes=yt,Rt.displayName=`@mantine/core/ComboboxOptions`;var zt={withAriaAttributes:!0,withKeyboardNavigation:!0},Bt=n(t=>{let{classNames:n,styles:r,unstyled:i,vars:a,withAriaAttributes:o,onKeyDown:s,onClick:c,withKeyboardNavigation:l,size:u,ref:d,...f}=O(`ComboboxSearch`,zt,t),p=wt(),m=p.getStyles(`search`),h=At({targetType:`input`,withAriaAttributes:o,withKeyboardNavigation:l,withExpandedAttribute:!1,onKeyDown:s,onClick:c,autoComplete:`off`});return(0,R.jsx)(M,{ref:e(d,p.store.searchRef),classNames:[{input:m.className},n],styles:[{input:m.style},r],size:u||p.size,...h,...f,__staticSelector:`Combobox`})});Bt.classes=yt,Bt.displayName=`@mantine/core/ComboboxSearch`;var Vt={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Ht=n(t=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,ref:l,...u}=O(`ComboboxTarget`,Vt,t),d=He(n);if(!d)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=wt(),p=(0,L.cloneElement)(d,{...At({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:c}),...u});return(0,R.jsx)(fe.Target,{refProp:r,ref:e(l,f.store.targetRef),children:p})});Ht.displayName=`@mantine/core/ComboboxTarget`;function Ut(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Wt(e,t,n){for(let n=e+1;n{s||(c(!0),i?.(e))},[c,i,s]),_=(0,L.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,L.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,L.useCallback)(()=>{let e=dt(f.current),t=lt(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,L.useCallback)(e=>{let t=dt(f.current),n=lt(`#${l.current}`,t),r=n?ut(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,L.useCallback)(()=>{let e=dt(f.current),t=lt(`#${l.current} [data-combobox-active]`,e);if(t){let n=ut(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,L.useCallback)(()=>{let e=dt(f.current),t=ut(`#${l.current} [data-combobox-option]`,e);return b(Wt(u.current,t,a))},[b,a]),C=(0,L.useCallback)(()=>{let e=dt(f.current),t=ut(`#${l.current} [data-combobox-option]`,e);return b(Ut(u.current,t,a))},[b,a]),w=(0,L.useCallback)(()=>{let e=dt(f.current),t=ut(`#${l.current} [data-combobox-option]`,e);return b(Gt(t))},[b]),T=(0,L.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=dt(f.current),r=ut(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=dt(f.current),r=ut(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),E=(0,L.useCallback)(()=>{u.current=-1,y()},[y]),D=(0,L.useCallback)(()=>{let e=dt(f.current);(ut(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),O=(0,L.useCallback)(e=>{l.current=e},[]),k=(0,L.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),A=(0,L.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),j=(0,L.useCallback)(()=>u.current,[]);return(0,L.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:j,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:O,clickSelectedOption:D,searchRef:d,focusSearchInput:k,targetRef:f,focusTarget:A}}var qt={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Jt=f((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":D(t),"--combobox-option-padding":ie(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:b(n),"--combobox-option-fz":D(t),"--combobox-option-padding":ie(t,`combobox-option-padding`)}})),Yt=e=>{let t=O(`Combobox`,qt,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,floatingHeight:g,middlewares:_,...v}=t,y=g===`viewport`?{..._,flip:!1,size:{...typeof _?.size==`object`?_.size:{},padding:typeof _?.size==`object`&&_.size.padding!==void 0?_.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=_?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:_,b=Kt(),x=o||b,S=k({name:p||`Combobox`,classes:yt,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:Jt}),C=()=>{l?.(),x.closeDropdown()};return(0,R.jsx)(Ct,{value:{getStyles:S,store:x,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m,floatingHeight:g},children:(0,R.jsx)(fe,{opened:x.dropdownOpened,...v,middlewares:y,onChange:e=>!e&&C(),withRoles:!1,unstyled:i,children:a})})};Yt.extend=e=>e,Yt.classes=yt,Yt.varsResolver=Jt,Yt.displayName=`@mantine/core/Combobox`,Yt.Target=Ht,Yt.Dropdown=Et,Yt.Options=Rt,Yt.Option=Lt,Yt.Search=Bt,Yt.Empty=kt,Yt.Chevron=St,Yt.Footer=Nt,Yt.Header=Ft,Yt.EventsTarget=Mt,Yt.DropdownTarget=Ot,Yt.Group=Pt,Yt.ClearButton=Tt,Yt.HiddenInput=It;function Xt(e){return`group`in e}function Zt({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a0)return!1;return!0}function $t(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Xt(n))$t(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function en(e,t){return Array.isArray(e)?e.includes(t):e===t}function tn({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Xt(e)){let s=en(r,e.value),c=t&&(s?(0,R.jsx)(pe,{className:yt.optionsDropdownCheckIcon}):n?(0,R.jsx)(`div`,{className:yt.optionsDropdownCheckPlaceholder}):null),l=(0,R.jsxs)(R.Fragment,{children:[i===`left`&&c,(0,R.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,R.jsx)(Yt.Option,{value:e.value,disabled:e.disabled,className:p({[yt.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,R.jsx)(tn,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,R.jsx)(Yt.Group,{label:e.group,children:s})}function nn({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=wt();$t(e);let x=typeof i==`string`?(r||Zt)({options:e,search:l?i:``,limit:a??1/0}):e,S=Qt(x),C=x.map((e,t)=>(0,R.jsx)(tn,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},Xt(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,R.jsx)(Yt.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,R.jsxs)(Yt.Options,{labelledBy:g,"aria-label":y,children:[c?(0,R.jsx)(ze.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,R.jsx)(Yt.Empty,{children:m})]})})}function rn(e){let t=e.currentTarget;return dt(t).activeElement!==t}function an(e,t){let n=t.trim().toLowerCase();if(n===``)return;let r=Object.values(e).filter(e=>!e.disabled&&e.label.trim().toLowerCase()===n);return r.length===1?r[0]:void 0}var[on,sn]=Ve(`Progress.Root component was not found in tree`),cn={root:`m_db6d6462`,section:`m_2242eb65`,"stripes-animation":`m_81a374bd`,"stripes-animation-vertical":`m_e0fb7a86`,label:`m_91e40b74`},ln=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ProgressLabel`,null,e);return(0,R.jsx)(se,{...sn().getStyles(`label`,{className:n,style:r,classNames:t,styles:i}),...o})});ln.classes=cn,ln.displayName=`@mantine/core/ProgressLabel`;var un=f((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":ie(t,`progress-size`),"--progress-radius":n===void 0?void 0:_(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),dn=n(e=>{let t=O(`ProgressRoot`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,transitionDuration:l,orientation:u,attributes:d,mod:f,...p}=t,m=k({name:`Progress`,classes:cn,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:un});return(0,R.jsx)(on,{value:{getStyles:m,autoContrast:c},children:(0,R.jsx)(se,{mod:[{orientation:u},f],...m(`root`),...p})})});dn.classes=cn,dn.varsResolver=un,dn.displayName=`@mantine/core/ProgressRoot`;var fn={withAria:!0},pn=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:s,value:c,withAria:l,color:u,striped:d,animated:f,mod:p,...m}=O(`ProgressSection`,fn,e),h=sn(),g=o(),_=l?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c,"aria-valuetext":`${c}%`}:{};return(0,R.jsx)(se,{...h.getStyles(`section`,{className:n,classNames:t,styles:i,style:r}),...m,..._,mod:[{striped:d||f,animated:f},p],__vars:{"--progress-section-size":`${c}%`,"--progress-section-color":a(u,g),"--progress-label-color":ft(h.autoContrast,g)?he({color:u,theme:g,autoContrast:h.autoContrast}):void 0}})});pn.classes=cn,pn.displayName=`@mantine/core/ProgressSection`;var mn=n(e=>{let n=O(`Progress`,null,e),{value:r,classNames:i,styles:a,vars:o,color:s,striped:c,animated:l,"aria-label":u,...d}=n,{resolvedClassNames:f,resolvedStyles:p}=t({classNames:i,styles:a,props:n});return(0,R.jsx)(dn,{classNames:f,styles:p,vars:o,...d,children:(0,R.jsx)(pn,{value:r,color:s,striped:c,animated:l,"aria-label":u})})});mn.classes=cn,mn.displayName=`@mantine/core/Progress`,mn.Section=pn,mn.Root=dn,mn.Label=ln;var hn={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},gn=oe(e=>{let n=O([`Input`,`InputWrapper`,`Select`],hn,e),{classNames:r,styles:i,unstyled:a,vars:o,dropdownOpened:s,defaultDropdownOpened:c,onDropdownClose:l,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:p,onChange:m,data:h,value:g,defaultValue:_,selectFirstOptionOnChange:v,selectFirstOptionOnDropdownOpen:y,onOptionSubmit:b,comboboxProps:S,readOnly:C,disabled:w,filter:T,limit:E,withScrollArea:D,maxDropdownHeight:k,floatingHeight:A,size:j,searchable:M,rightSection:N,checkIconPosition:P,withCheckIcon:te,withAlignedLabels:ne,nothingFoundMessage:re,name:ie,form:ae,searchValue:oe,defaultSearchValue:se,onSearchChange:ce,allowDeselect:le,error:F,rightSectionPointerEvents:I,id:de,clearable:fe,clearSectionMode:pe,clearButtonProps:me,hiddenInputProps:he,renderOption:ge,onClear:_e,autoComplete:ve,scrollAreaProps:ye,__defaultRightSection:be,__clearSection:xe,__clearable:Se,chevronColor:Ce,autoSelectOnBlur:we,openOnFocus:Te,attributes:Ee,...De}=n,Oe=(0,L.useMemo)(()=>_t(h),[h]),ke=(0,L.useRef)({}),Ae=(0,L.useMemo)(()=>vt(Oe),[Oe]),je=x(de),[Me,Ne,Pe]=ue({value:g,defaultValue:_,finalValue:null,onChange:m}),Fe=Me==null?void 0:`${Me}`in Ae?Ae[`${Me}`]:ke.current[`${Me}`],Ie=ct(Fe),[Le,Re,ze]=ue({value:oe,defaultValue:se,finalValue:Fe?Fe.label:``,onChange:ce}),Be=Kt({opened:s,defaultOpened:c,onDropdownOpen:()=>{u?.(),y?Be.selectFirstOption():Be.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{l?.(),setTimeout(Be.resetSelectedOption,0)}}),Ve=e=>{Re(e),Be.resetSelectedOption()},{resolvedClassNames:He,resolvedStyles:Ue}=t({props:n,styles:i,classNames:r});(0,L.useEffect)(()=>{v&&Be.selectFirstOption()},[v,Le]),(0,L.useEffect)(()=>{g===null&&Ve(``),g!=null&&Fe&&(Ie?.value!==Fe.value||Ie?.label!==Fe.label)&&Ve(Fe.label)},[g,Fe]),(0,L.useEffect)(()=>{!Pe&&!ze&&Ve(Me==null?``:`${Me}`in Ae?Ae[`${Me}`]?.label:ke.current[`${Me}`]?.label||``)},[Ae,Me]),(0,L.useEffect)(()=>{Me&&`${Me}`in Ae&&(ke.current[`${Me}`]=Ae[`${Me}`])},[Ae,Me]);let We=(0,R.jsx)(Yt.ClearButton,{...me,onClear:()=>{Ne(null,null),Ve(``),_e?.()}}),Ge=fe&&Me!=null&&!w&&!C;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Yt,{store:Be,__staticSelector:`Select`,classNames:He,styles:Ue,unstyled:a,readOnly:C,size:j,attributes:Ee,floatingHeight:A,keepMounted:we,onOptionSubmit:e=>{b?.(e);let t=le&&`${Ae[e].value}`==`${Me}`?null:Ae[e],n=t?t.value:null;n!==Me&&Ne(n,t),!Pe&&Ve(n==null?``:t?.label||``),Be.closeDropdown()},...S,children:[(0,R.jsx)(Yt.Target,{targetType:M?`input`:`button`,autoComplete:ve,withExpandedAttribute:!0,children:(0,R.jsx)(ee,{id:je,__defaultRightSection:(0,R.jsx)(Yt.Chevron,{size:j,error:F,unstyled:a,color:Ce}),__clearSection:We,__clearable:Ge,__clearSectionMode:pe,rightSection:N,rightSectionPointerEvents:I||`none`,...De,size:j,__staticSelector:`Select`,disabled:w,readOnly:C||!M,value:Le,onChange:e=>{if(rn(e)){if(!C){let t=an(Ae,e.currentTarget.value);t&&`${t.value}`!=`${Me}`&&(Ne(t.value,t),!Pe&&Ve(t.label))}return}Ve(e.currentTarget.value),Be.openDropdown(),v&&Be.selectFirstOption()},onFocus:e=>{Te&&M&&Be.openDropdown(),d?.(e)},onBlur:e=>{we&&Be.clickSelectedOption(),M&&Be.closeDropdown();let t=Me!=null&&(`${Me}`in Ae?Ae[`${Me}`]:ke.current[`${Me}`]);Ve(t&&t.label||``),f?.(e)},onClick:e=>{M?Be.openDropdown():Be.toggleDropdown(),p?.(e)},classNames:He,styles:Ue,unstyled:a,pointer:!M,error:F,attributes:Ee})}),(0,R.jsx)(nn,{data:Oe,hidden:C||w,filter:T,search:Le,limit:E,hiddenWhenEmpty:!re,withScrollArea:D,maxDropdownHeight:k,filterOptions:!!M&&Fe?.label!==Le,value:Me,checkIconPosition:P,withCheckIcon:te,withAlignedLabels:ne,nothingFoundMessage:re,unstyled:a,labelId:De.label?`${je}-label`:void 0,"aria-label":De.label?void 0:De[`aria-label`],renderOption:ge,scrollAreaProps:ye})]}),(0,R.jsx)(Yt.HiddenInput,{value:Me,name:ie,form:ae,disabled:w,...he})]})});gn.classes={...ee.classes,...Yt.classes},gn.displayName=`@mantine/core/Select`;function _n(e){if(e!==void 0)return typeof e==`number`?b(e):e}function vn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let c=o(),l=t===void 0?e:t,u=r!==void 0,d=j({"--sg-spacing-x":v(st(e)),"--sg-spacing-y":v(st(l)),"--sg-auto-rows":i,...u?{"--sg-min-col-width":_n(r)}:{"--sg-cols":st(n)?.toString()}}),f=te(c.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=v(e[r])),typeof l==`object`&&l[r]!==void 0&&(t[r][`--sg-spacing-y`]=v(l[r])),!u&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,R.jsx)(s,{styles:d,media:Te(te(f),c.breakpoints).filter(e=>te(f[e.value]).length>0).map(e=>({query:`(min-width: ${c.breakpoints[e.value]})`,styles:f[e.value]})),selector:a})}function yn(e){return typeof e==`object`&&e?te(e):[]}function bn(e){return e.sort((e,t)=>me(e)-me(t))}function xn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return bn(Array.from(new Set([...yn(e),...yn(t),...r===void 0?yn(n):[]])))}function Sn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,c=r!==void 0,l=j({"--sg-spacing-x":v(st(e)),"--sg-spacing-y":v(st(o)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":_n(r)}:{"--sg-cols":st(n)?.toString()}}),u=xn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),d=u.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=v(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=v(o[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,R.jsx)(s,{styles:l,container:u.map(e=>({query:`simple-grid (min-width: ${e})`,styles:d[e]})),selector:a})}var Cn={container:`m_925c2d2c`,root:`m_2415a157`},wn={cols:1,spacing:`md`,type:`media`},Tn=n(e=>{let t=O(`SimpleGrid`,wn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:f,minColWidth:p,autoFlow:m,autoRows:h,attributes:g,..._}=t,v=k({name:`SimpleGrid`,classes:Cn,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s}),y=d(),b=p===void 0?void 0:m||`auto-fill`;return f===`container`?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Sn,{...t,selector:`.${y}`}),(0,R.jsx)(`div`,{...v(`container`),children:(0,R.jsx)(se,{...v(`root`,{className:y}),..._,"data-auto-cols":b})})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(vn,{...t,selector:`.${y}`}),(0,R.jsx)(se,{...v(`root`,{className:y}),..._,"data-auto-cols":b})]})});Tn.classes=Cn,Tn.displayName=`@mantine/core/SimpleGrid`;var En=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),Dn=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),On=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M28,64A12,12,0,0,1,40,52H216a12,12,0,0,1,0,24H40A12,12,0,0,1,28,64Zm12,76h64a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm80,40H40a12,12,0,0,0,0,24h80a12,12,0,0,0,0-24Zm120.49,20.49a12,12,0,0,1-17,0l-18.08-18.08a44,44,0,1,1,17-17l18.08,18.07A12,12,0,0,1,240.49,200.49ZM184,164a20,20,0,1,0-20-20A20,20,0,0,0,184,164Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M216,144a32,32,0,1,1-32-32A32,32,0,0,1,216,144Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,2.34L217.36,166A40,40,0,1,0,206,177.36l20.3,20.3a8,8,0,0,0,11.32-11.32Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M34,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H40A6,6,0,0,1,34,64Zm6,70h72a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12Zm88,52H40a6,6,0,0,0,0,12h88a6,6,0,0,0,0-12Zm108.24,10.24a6,6,0,0,1-8.48,0l-21.49-21.48a38.06,38.06,0,1,1,8.49-8.49l21.48,21.49A6,6,0,0,1,236.24,196.24ZM184,170a26,26,0,1,0-26-26A26,26,0,0,0,184,170Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M36,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H40A4,4,0,0,1,36,64Zm4,68h72a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8Zm88,56H40a4,4,0,0,0,0,8h88a4,4,0,0,0,0-8Zm106.83,6.83a4,4,0,0,1-5.66,0l-22.72-22.72a36.06,36.06,0,1,1,5.66-5.66l22.72,22.72A4,4,0,0,1,234.83,194.83ZM184,172a28,28,0,1,0-28-28A28,28,0,0,0,184,172Z`}))]]),kn=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,92H70.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24H137.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24Zm64-24A12,12,0,1,1,92,80,12,12,0,0,1,104,68Zm112,96H201.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24h94.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24Zm-48,24a12,12,0,1,1,12-12A12,12,0,0,1,168,188Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M128,80a24,24,0,1,1-24-24A24,24,0,0,1,128,80Zm40,72a24,24,0,1,0,24,24A24,24,0,0,0,168,152Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,86H74.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12H133.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12Zm64-24A18,18,0,1,1,86,80,18,18,0,0,1,104,62ZM216,170H197.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12h98.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12Zm-48,24a18,18,0,1,1,18-18A18,18,0,0,1,168,194Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,84H76.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8H131.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8Zm64-24A20,20,0,1,1,84,80,20,20,0,0,1,104,60ZM216,172H195.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8H140.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8Zm-48,24a20,20,0,1,1,20-20A20,20,0,0,1,168,196Z`}))]]),An=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:En}));An.displayName=`ArrowUpRightIcon`;var jn=An,Mn=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:Dn}));Mn.displayName=`CaretDownIcon`;var Nn=Mn,Pn=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:On}));Pn.displayName=`ListMagnifyingGlassIcon`;var Fn=Pn,In=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:kn}));In.displayName=`SlidersHorizontalIcon`;var Ln=In;function Rn(e){let{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function zn(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function Bn(e,t,n,r,i,a,o){let{margin:s,containerPadding:c,rowHeight:l}=e,u=Rn(e),d,f,p,m;if(o?(d=Math.round(o.width),f=Math.round(o.height)):(d=zn(r,u,s[0]),f=zn(i,l,s[1])),a?(p=Math.round(a.top),m=Math.round(a.left)):o?(p=Math.round(o.top),m=Math.round(o.left)):(p=Math.round((l+s[1])*n+c[1]),m=Math.round((u+s[0])*t+c[0])),!a&&!o){if(Number.isFinite(r)){let e=Math.round((u+s[0])*(t+r)+c[0])-m-d;e!==s[0]&&(d+=e-s[0])}if(Number.isFinite(i)){let e=Math.round((l+s[1])*(n+i)+c[1])-p-f;e!==s[1]&&(f+=e-s[1])}}return{top:p,left:m,width:d,height:f}}function Vn(e,t,n,r,i){let{margin:a,containerPadding:o,cols:s,rowHeight:c,maxRows:l}=e,u=Rn(e),d=Math.round((n-o[0])/(u+a[0])),f=Math.round((t-o[1])/(c+a[1]));return d=Wn(d,0,s-r),f=Wn(f,0,l-i),{x:d,y:f}}function Hn(e,t,n){let{margin:r,containerPadding:i,rowHeight:a}=e,o=Rn(e);return{x:Math.round((n-i[0])/(o+r[0])),y:Math.round((t-i[1])/(a+r[1]))}}function Un(e,t,n){let{margin:r,rowHeight:i}=e,a=Rn(e);return{w:Math.max(1,Math.round((t+r[0])/(a+r[0]))),h:Math.max(1,Math.round((n+r[1])/(i+r[1])))}}function Wn(e,t,n){return Math.max(Math.min(e,n),t)}function Gn(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function Kn(e,t){for(let n=0;nGn(e,t))}function Jn(e,t){return t===`horizontal`?Xn(e):t===`vertical`||t===`wrap`?Yn(e):[...e]}function Yn(e){return[...e].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y)}function Xn(e){return[...e].sort((e,t)=>e.x===t.x?e.y-t.y:e.x-t.x)}function Zn(e){let t=0;for(let n=0;nt&&(t=e)}}return t}function Qn(e,t){for(let n=0;ne.static===!0)}function er(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function tr(e){let t=Array(e.length);for(let n=0;nt.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;Kn(n,i);)i.y++}}return e}function ar(e,t,n,r,i,a,o,s,c){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return[...e];let l=t.x,u=t.y;typeof n==`number`&&(t.x=n),typeof r==`number`&&(t.y=r),t.moved=!0;let d=Jn(e,o);(o===`vertical`&&typeof r==`number`?u>=r:o===`horizontal`&&typeof n==`number`&&l>=n)&&(d=d.reverse());let f=qn(d,t),p=f.length>0;if(p&&c)return tr(e);if(p&&a)return t.x=l,t.y=u,t.moved=!1,e;let m=[...e];for(let e=0;et.y,d=l!==void 0&&t.x+t.w>l.x;if(!l)return ar(e,n,o?a.x:void 0,s?a.y:void 0,r,c,i);if(u&&s)return ar(e,n,void 0,n.y+1,r,c,i);if(u&&i===null)return t.y=n.y,n.y+=n.h,[...e];if(d&&o)return ar(e,t,n.x,void 0,r,c,i)}let l=o?n.x+1:void 0,u=s?n.y+1:void 0;return l===void 0&&u===void 0?[...e]:ar(e,n,l,u,r,c,i)}function sr(e,t,n){return Math.max(t,Math.min(n,e))}var cr=[{name:`gridBounds`,constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:sr(t,0,Math.max(0,r-e.w)),y:sr(n,0,Math.max(0,i-e.h))}},constrainSize(e,t,n,r,{cols:i,maxRows:a}){let o=r===`w`||r===`nw`||r===`sw`?e.x+e.w:i-e.x,s=r===`n`||r===`nw`||r===`ne`?e.y+e.h:a-e.y;return{w:sr(t,1,Math.max(1,o)),h:sr(n,1,Math.max(1,s))}}},{name:`minMaxSize`,constrainSize(e,t,n){return{w:sr(t,e.minW??1,e.maxW??1/0),h:sr(n,e.minH??1,e.maxH??1/0)}}}];function lr(e,t,n,r,i){let a={x:n,y:r};for(let n of e)n.constrainPosition&&(a=n.constrainPosition(t,a.x,a.y,i));if(t.constraints)for(let e of t.constraints)e.constrainPosition&&(a=e.constrainPosition(t,a.x,a.y,i));return a}function ur(e,t,n,r,i,a){let o={w:n,h:r};for(let n of e)n.constrainSize&&(o=n.constrainSize(t,o.w,o.h,i,a));if(t.constraints)for(let e of t.constraints)e.constrainSize&&(o=e.constrainSize(t,o.w,o.h,i,a));return o}function dr({top:e,left:t,width:n,height:r}){let i=`translate(${t}px,${e}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${n}px`,height:`${r}px`,position:`absolute`}}function fr({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:`absolute`}}function pr(e){return e*100+`%`}function mr(e,t,n,r){return e+n>r?t:n}function hr(e,t,n){return e<0?t:n}function gr(e){return Math.max(0,e)}function _r(e){return Math.max(0,e)}var vr=(e,t,n)=>{let{left:r,height:i,width:a}=t,o=e.top-(i-e.height);return{left:r,width:a,height:hr(o,e.height,i),top:_r(o)}},yr=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{top:r,height:a,width:mr(e.left,e.width,o,n),left:gr(i)}},br=(e,t,n)=>{let{top:r,height:i,width:a}=t,o=e.left+e.width-a;return o<0?{height:i,width:e.left+e.width,top:_r(r),left:0}:{height:i,width:a,top:_r(r),left:o}},xr=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{width:o,left:i,height:hr(r,e.height,a),top:_r(r)}},Sr={n:vr,ne:(e,t,n)=>vr(e,yr(e,t,n)),e:yr,se:(e,t,n)=>xr(e,yr(e,t,n)),s:xr,sw:(e,t,n)=>xr(e,br(e,t)),w:br,nw:(e,t,n)=>vr(e,br(e,t))};function Cr(e,t,n,r){let i=Sr[e];return i?i(t,{...t,...n},r):n}var wr={type:`transform`,scale:1,calcStyle(e){return dr(e)}},Tr={type:`absolute`,scale:1,calcStyle(e){return fr(e)}};function Er(e){return{type:`transform`,scale:e,calcStyle(e){return dr(e)},calcDragPosition(t,n,r,i){return{left:(t-r)/e,top:(n-i)/e}}}}var Dr=wr,Or={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},kr={enabled:!0,bounded:!1,threshold:3},Ar={enabled:!0,handles:[`se`]},jr={enabled:!1,defaultItem:{w:1,h:1}};function Mr(e,t,n,r,i){let a=r===`x`?`w`:`h`;t[r]+=1;let o=e.findIndex(e=>e.i===t.i),s=i??$n(e).length>0;for(let i=o+1;it.y+t.h)break;Gn(t,o)&&Mr(e,o,n+t[a],r,s)}}t[r]=n}function Nr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!Kn(e,t);)t.y--;let i;for(;(i=Kn(e,t))!==void 0;)Mr(n,t,i.y+i.h,`y`);return t.y=Math.max(t.y,0),t}function Pr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!Kn(e,t);)t.x--;let i;for(;(i=Kn(e,t))!==void 0;)if(Mr(r,t,i.x+i.w,`x`),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!Kn(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var Fr={type:`vertical`,allowOverlap:!1,compact(e,t){let n=$n(e),r=Zn(n),i=Yn(e),a=Array(e.length);for(let t=0;te[t]-e[n])}function Ur(e,t){let n=Hr(e),r=n[0];if(r===void 0)throw Error(`No breakpoints defined`);for(let i=1;ie[a]&&(r=a)}return r}function Wr(e,t){let n=t[e];if(n===void 0)throw Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function Gr(e,t,n,r,i,a){let o=e[n];if(o)return tr(o);let s=e[r],c=Hr(t),l=c.slice(c.indexOf(n));for(let t=0;t{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Jr=h(((e,t)=>{var n=qr();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Yr=h(((e,t)=>{t.exports=Jr()()})),Xr=u(Yr(),1),Zr=u(T(),1);function Qr(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&Qr(e.changedTouches,e=>t===e.identifier)}function Si(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function Ci(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function wi(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??Ci();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} -`,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} -`,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&Di(e.body,`react-draggable-transparent-selection`)}function Ti(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{Ei(e)}):Ei(e)}function Ei(e){if(e)try{e.body&&Oi(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function Di(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function Oi(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function ki(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:Ii(r);let i=Li(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+ti(s.paddingLeft)+ti(o.marginLeft),top:-i.offsetTop+ti(s.paddingTop)+ti(o.marginTop),right:gi(a)-mi(i)-i.offsetLeft+ti(s.paddingRight)-ti(o.marginRight),bottom:hi(a)-pi(i)-i.offsetTop+ti(s.paddingBottom)-ti(o.marginBottom)}}return ei(r.right)&&(t=Math.min(t,r.right)),ei(r.bottom)&&(n=Math.min(n,r.bottom)),ei(r.left)&&(t=Math.max(t,r.left)),ei(r.top)&&(n=Math.max(n,r.top)),[t,n]}function Ai(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function ji(e){return e.props.axis===`both`||e.props.axis===`x`}function Mi(e){return e.props.axis===`both`||e.props.axis===`y`}function Ni(e,t,n){let r=typeof t==`number`?xi(e,t):null;if(typeof t==`number`&&!r)return null;let i=Li(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return _i(r||e,a,n.props.scale)}function Pi(e,t,n){let r=!ei(e.lastX),i=Li(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function Fi(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function Ii(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function Li(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var Ri=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},zi={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},Bi=zi.mouse,Vi=class extends L.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!ui(e.target,this.props.handle,t)||this.props.cancel&&ui(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=Si(e);this.touchIdentifier=r;let i=Ni(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=Pi(this,a,o);Ri(`DraggableCore: handleDragStart: %j`,s),Ri(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&wi(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,di(n,Bi.move,this.handleDrag),di(n,Bi.stop,this.handleDragStop))},this.handleDrag=e=>{let t=Ni(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=Ai(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=Pi(this,n,r);if(Ri(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=Ni(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=Ai(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=Pi(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&Ti(a.ownerDocument),Ri(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(Ri(`DraggableCore: Removing handlers`),fi(a.ownerDocument,Bi.move,this.handleDrag),fi(a.ownerDocument,Bi.stop,this.handleDragStop))},this.onMouseDown=e=>(Bi=zi.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(Bi=zi.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(Bi=zi.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(Bi=zi.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&di(e,zi.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;fi(t,zi.mouse.move,this.handleDrag),fi(t,zi.touch.move,this.handleDrag),fi(t,zi.mouse.stop,this.handleDragStop),fi(t,zi.touch.stop,this.handleDragStop),fi(e,zi.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&Ti(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Zr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(Ri(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return L.cloneElement(L.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Vi.displayName=`DraggableCore`,Vi.propTypes={allowAnyClick:Xr.default.bool,allowMobileScroll:Xr.default.bool,children:Xr.default.node.isRequired,disabled:Xr.default.bool,enableUserSelectHack:Xr.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Xr.default.arrayOf(Xr.default.number),handle:Xr.default.string,cancel:Xr.default.string,nodeRef:Xr.default.object,nonce:Xr.default.string,onStart:Xr.default.func,onDrag:Xr.default.func,onStop:Xr.default.func,onMouseDown:Xr.default.func,scale:Xr.default.number,className:ni,style:ni,transform:ni},Vi.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Hi=class extends L.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(Ri(`Draggable: onDragStart: %j`,t),this.props.onStart(e,Fi(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;Ri(`Draggable: onDrag: %j`,t);let n=Fi(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=ki(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,Fi(this,t))===!1)return!1;Ri(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(Ri(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Zr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,m=!s||this.state.dragging,h=s||r,g={x:ji(this)&&m?this.state.x:h.x,y:Mi(this)&&m?this.state.y:h.y};this.state.isElementSVG?f=yi(g,c):d=vi(g,c);let _=L.Children.only(n),v=p(_.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return L.createElement(Vi,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},L.cloneElement(_,{className:v,style:{..._.props.style,...d},transform:f}))}};Hi.displayName=`Draggable`,Hi.propTypes={...Vi.propTypes,axis:Xr.default.oneOf([`both`,`x`,`y`,`none`]),bounds:Xr.default.oneOfType([Xr.default.shape({left:Xr.default.number,right:Xr.default.number,top:Xr.default.number,bottom:Xr.default.number}),Xr.default.string,Xr.default.oneOf([!1])]),defaultClassName:Xr.default.string,defaultClassNameDragging:Xr.default.string,defaultClassNameDragged:Xr.default.string,defaultPosition:Xr.default.shape({x:Xr.default.number,y:Xr.default.number}),positionOffset:Xr.default.shape({x:Xr.default.oneOfType([Xr.default.number,Xr.default.string]),y:Xr.default.oneOfType([Xr.default.number,Xr.default.string])}),position:Xr.default.shape({x:Xr.default.number,y:Xr.default.number}),className:ni,style:ni,transform:ni},Hi.defaultProps={...Vi.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1};var Ui=h(((e,t)=>{function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},u=(e,t,i)=>(i=e==null?{}:n(o(e)),l(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),d=e=>l(r({},`__esModule`,{value:!0}),e),f={};c(f,{DraggableCore:()=>Oe,default:()=>ke}),t.exports=d(f);var p=u(C()),m=u(Yr()),h=u(T()),g=Ui();function _(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&_(e.changedTouches,e=>t===e.identifier)}function ce(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function le(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function ue(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??le();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} -`,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} -`,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&de(e.body,`react-draggable-transparent-selection`)}function F(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{I(e)}):I(e)}function I(e){if(e)try{e.body&&fe(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function de(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function fe(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function pe(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:be(r);let i=xe(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+b(s.paddingLeft)+b(o.marginLeft),top:-i.offsetTop+b(s.paddingTop)+b(o.marginTop),right:ne(a)-ee(i)-i.offsetLeft+b(s.paddingRight)-b(o.marginRight),bottom:te(a)-P(i)-i.offsetTop+b(s.paddingBottom)-b(o.marginBottom)}}return y(r.right)&&(t=Math.min(t,r.right)),y(r.bottom)&&(n=Math.min(n,r.bottom)),y(r.left)&&(t=Math.max(t,r.left)),y(r.top)&&(n=Math.max(n,r.top)),[t,n]}function me(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function he(e){return e.props.axis===`both`||e.props.axis===`x`}function ge(e){return e.props.axis===`both`||e.props.axis===`y`}function _e(e,t,n){let r=typeof t==`number`?se(e,t):null;if(typeof t==`number`&&!r)return null;let i=xe(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return re(r||e,a,n.props.scale)}function ve(e,t,n){let r=!y(e.lastX),i=xe(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function ye(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function be(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function xe(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var Se=u(C()),Ce=u(Yr()),we=u(T()),Te=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},Ee={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},De=Ee.mouse,Oe=class extends Se.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!j(e.target,this.props.handle,t)||this.props.cancel&&j(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=ce(e);this.touchIdentifier=r;let i=_e(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=ve(this,a,o);Te(`DraggableCore: handleDragStart: %j`,s),Te(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&ue(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,M(n,De.move,this.handleDrag),M(n,De.stop,this.handleDragStop))},this.handleDrag=e=>{let t=_e(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=me(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=ve(this,n,r);if(Te(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=_e(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=me(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=ve(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&F(a.ownerDocument),Te(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(Te(`DraggableCore: Removing handlers`),N(a.ownerDocument,De.move,this.handleDrag),N(a.ownerDocument,De.stop,this.handleDragStop))},this.onMouseDown=e=>(De=Ee.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(De=Ee.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(De=Ee.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(De=Ee.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&M(e,Ee.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;N(t,Ee.mouse.move,this.handleDrag),N(t,Ee.touch.move,this.handleDrag),N(t,Ee.mouse.stop,this.handleDragStop),N(t,Ee.touch.stop,this.handleDragStop),N(e,Ee.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&F(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=we.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(Te(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return Se.cloneElement(Se.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Oe.displayName=`DraggableCore`,Oe.propTypes={allowAnyClick:Ce.default.bool,allowMobileScroll:Ce.default.bool,children:Ce.default.node.isRequired,disabled:Ce.default.bool,enableUserSelectHack:Ce.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Ce.default.arrayOf(Ce.default.number),handle:Ce.default.string,cancel:Ce.default.string,nodeRef:Ce.default.object,nonce:Ce.default.string,onStart:Ce.default.func,onDrag:Ce.default.func,onStop:Ce.default.func,onMouseDown:Ce.default.func,scale:Ce.default.number,className:x,style:x,transform:x},Oe.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var ke=class extends p.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(Te(`Draggable: onDragStart: %j`,t),this.props.onStart(e,ye(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;Te(`Draggable: onDrag: %j`,t);let n=ye(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=pe(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,ye(this,t))===!1)return!1;Te(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(Te(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=h.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,m=!s||this.state.dragging,h=s||r,_={x:he(this)&&m?this.state.x:h.x,y:ge(this)&&m?this.state.y:h.y};this.state.isElementSVG?f=ae(_,c):d=ie(_,c);let v=p.Children.only(n),y=(0,g.clsx)(v.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return p.createElement(Oe,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},p.cloneElement(v,{className:y,style:{...v.props.style,...d},transform:f}))}};ke.displayName=`Draggable`,ke.propTypes={...Oe.propTypes,axis:m.default.oneOf([`both`,`x`,`y`,`none`]),bounds:m.default.oneOfType([m.default.shape({left:m.default.number,right:m.default.number,top:m.default.number,bottom:m.default.number}),m.default.string,m.default.oneOf([!1])]),defaultClassName:m.default.string,defaultClassNameDragging:m.default.string,defaultClassNameDragged:m.default.string,defaultPosition:m.default.shape({x:m.default.number,y:m.default.number}),positionOffset:m.default.shape({x:m.default.oneOfType([m.default.number,m.default.string]),y:m.default.oneOfType([m.default.number,m.default.string])}),position:m.default.shape({x:m.default.number,y:m.default.number}),className:x,style:x,transform:x},ke.defaultProps={...Oe.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1},0&&(t.exports={DraggableCore:Oe})})),Gi=h(((e,t)=>{var n=Wi(),r=n.DraggableCore,i=n.default||n;t.exports=i,t.exports.default=i,t.exports.DraggableCore=r})),Ki=h((e=>{e.__esModule=!0,e.cloneElement=c;var t=n(C());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{e.__esModule=!0,e.resizableProps=void 0;var t=n(Yr());Gi();function n(e){return e&&e.__esModule?e:{default:e}}e.resizableProps={axis:t.default.oneOf([`both`,`x`,`y`,`none`]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:typeof Element<`u`?t.default.instanceOf(Element):t.default.any,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`y`?t.default.number.isRequired(...e):t.default.number(...e)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),transformScale:t.default.number,width:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`x`?t.default.number.isRequired(...e):t.default.number(...e)}}})),Ji=h((e=>{e.__esModule=!0,e.default=void 0;var t=o(C()),n=Gi(),r=Ki(),i=qi(),a=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];function o(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;tMath.abs(i*n)?t=e/n:e=t*n}let o=e,s=t,c=this.slack||[0,0],l=c[0],u=c[1];return e+=l,t+=u,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[l+(o-e),u+(s-t)],[e,t]}resizeHandler(e,t){return(n,r)=>{let i=r.node,a=r.deltaX,o=r.deltaY;e===`onResizeStart`&&this.resetData();let s=(this.props.axis===`both`||this.props.axis===`x`)&&t!==`n`&&t!==`s`,c=(this.props.axis===`both`||this.props.axis===`y`)&&t!==`e`&&t!==`w`;if(!s&&!c)return;let l=t[0],u=t[t.length-1],d=i.getBoundingClientRect();if(this.lastHandleRect!=null){if(u===`w`){let e=d.left-this.lastHandleRect.left;a+=e}if(l===`n`){let e=d.top-this.lastHandleRect.top;o+=e}}this.lastHandleRect=d,u===`w`&&(a=-a),l===`n`&&(o=-o);let f=this.lastSize?.width??this.props.width,p=this.lastSize?.height??this.props.height,m=f+(s?a/this.props.transformScale:0),h=p+(c?o/this.props.transformScale:0);var g=this.runConstraints(m,h);if(m=g[0],h=g[1],e===`onResizeStop`&&this.lastSize){var _=this.lastSize;m=_.width,h=_.height}let v=m!==f||h!==p;e!==`onResizeStop`&&(this.lastSize={width:m,height:h});let y=typeof this.props[e]==`function`?this.props[e]:null;y&&(e!==`onResize`||v)&&(n.persist==null||n.persist(),y(n,{node:i,size:{width:m,height:h},handle:t})),e===`onResizeStop`&&this.resetData()}}renderResizeHandle(e,n){let r=this.props.handle;if(!r)return t.createElement(`span`,{className:`react-resizable-handle react-resizable-handle-`+e,ref:n});if(typeof r==`function`)return r(e,n);let i=typeof r.type==`string`,a=u({ref:n},i?{}:{handleAxis:e});return t.cloneElement(r,a)}render(){let e=this.props,i=e.children,o=e.className,l=e.draggableOpts;e.width,e.height,e.handle,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart;let d=e.resizeHandles;e.transformScale;let f=c(e,a);return(0,r.cloneElement)(i,u(u({},f),{},{className:(o?o+` `:``)+`react-resizable`,children:[...t.Children.toArray(i.props.children),...d.map(e=>{let r=this.handleRefs[e]??(this.handleRefs[e]=t.createRef());return t.createElement(n.DraggableCore,s({},l,{nodeRef:r,key:`resizableHandle-`+e,onStop:this.resizeHandler(`onResizeStop`,e),onStart:this.resizeHandler(`onResizeStart`,e),onDrag:this.resizeHandler(`onResize`,e)}),this.renderResizeHandle(e,r))})]}))}};e.default=m,m.propTypes=i.resizableProps,m.defaultProps={axis:`both`,handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:[`se`],transformScale:1}})),Yi=h((e=>{e.__esModule=!0,e.default=void 0;var t=s(C()),n=o(Yr()),r=o(Ji()),i=qi(),a=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n=t.size;this.props.onResize?(e.persist==null||e.persist(),this.setState(n,()=>this.props.onResize&&this.props.onResize(e,t))):this.setState(n)}}static getDerivedStateFromProps(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null}render(){let e=this.props,n=e.handle,i=e.handleSize;e.onResize;let o=e.onResizeStart,s=e.onResizeStop,l=e.draggableOpts,d=e.minConstraints,f=e.maxConstraints,p=e.lockAspectRatio,h=e.axis;e.width,e.height;let g=e.resizeHandles,_=e.style,v=e.transformScale,y=m(e,a);return t.createElement(r.default,{axis:h,draggableOpts:l,handle:n,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:f,minConstraints:d,onResizeStart:o,onResize:this.onResize,onResizeStop:s,resizeHandles:g,transformScale:v,width:this.state.width},t.createElement(`div`,c({},y,{style:u(u({},_),{},{width:this.state.width+`px`,height:this.state.height+`px`})})))}};e.default=h,h.propTypes=u(u({},i.resizableProps),{},{children:n.default.element})})),Xi=h(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Ji().default,t.exports.ResizableBox=Yi().default})),Zi=h(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`fast-equals`]={}))})(e,(function(e){function t(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function n(e){return function(t,n,r,i){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r,i);var a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);var s=e(t,n,r,i);return i.delete(t),i.delete(n),s}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function i(e){return e.constructor===Object||e.constructor==null}function a(e){return typeof e.then==`function`}function o(e,t){return e===t||e!==e&&t!==t}var s=Object.prototype.toString;function c(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,c=e.areObjectsEqual,l=e.areRegExpsEqual,u=e.areSetsEqual,d=e.createIsNestedEqual,f=d(p);function p(e,d,p){if(e===d)return!0;if(!e||!d||typeof e!=`object`||typeof d!=`object`)return e!==e&&d!==d;if(i(e)&&i(d))return c(e,d,f,p);var m=Array.isArray(e),h=Array.isArray(d);if(m||h)return m===h&&t(e,d,f,p);var g=s.call(e);return g===s.call(d)?g===`[object Date]`?n(e,d,f,p):g===`[object RegExp]`?l(e,d,f,p):g===`[object Map]`?r(e,d,f,p):g===`[object Set]`?u(e,d,f,p):g===`[object Object]`||g===`[object Arguments]`?a(e)||a(d)?!1:c(e,d,f,p):g===`[object Boolean]`||g===`[object Number]`||g===`[object String]`?o(e.valueOf(),d.valueOf()):!1:!1}return p}function l(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-->0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var u=n(l);function d(e,t){return o(e.valueOf(),t.valueOf())}function f(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},o=0;return e.forEach(function(s,c){if(i){var l=!1,u=0;t.forEach(function(i,d){!l&&!a[u]&&(l=n(c,d,o,u,e,t,r)&&n(s,i,c,d,e,t,r))&&(a[u]=!0),u++}),o++,i=l}}),i}var p=n(f),m=`_owner`,h=Object.prototype.hasOwnProperty;function g(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var o;a-->0;){if(o=i[a],o===m){var s=!!e.$$typeof,c=!!t.$$typeof;if((s||c)&&s!==c)return!1}if(!h.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var _=n(g);function v(e,t){return e.source===t.source&&e.flags===t.flags}function y(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(o,s){if(i){var c=!1,l=0;t.forEach(function(i,u){!c&&!a[l]&&(c=n(o,i,s,u,e,t,r))&&(a[l]=!0),l++}),i=c}}),i}var b=n(y),x=Object.freeze({areArraysEqual:l,areDatesEqual:d,areMapsEqual:f,areObjectsEqual:g,areRegExpsEqual:v,areSetsEqual:y,createIsNestedEqual:t}),S=Object.freeze({areArraysEqual:u,areDatesEqual:d,areMapsEqual:p,areObjectsEqual:_,areRegExpsEqual:v,areSetsEqual:b,createIsNestedEqual:t}),C=c(x);function w(e,t){return C(e,t,void 0)}var T=c(r(x,{createIsNestedEqual:function(){return o}}));function E(e,t){return T(e,t,void 0)}var D=c(S);function O(e,t){return D(e,t,new WeakMap)}var k=c(r(S,{createIsNestedEqual:function(){return o}}));function A(e,t){return k(e,t,new WeakMap)}function j(e){return c(r(x,e(x)))}function M(e){var t=c(r(S,e(S)));return(function(e,n,r){return r===void 0&&(r=new WeakMap),t(e,n,r)})}e.circularDeepEqual=O,e.circularShallowEqual=A,e.createCustomCircularEqual=M,e.createCustomEqual=j,e.deepEqual=w,e.sameValueZeroEqual=o,e.shallowEqual=E,Object.defineProperty(e,"__esModule",{value:!0})}))})),Qi=Xi(),$i=Zi();function ea(e){let{children:t,cols:n,containerWidth:r,margin:i,containerPadding:a,rowHeight:o,maxRows:s,isDraggable:c,isResizable:l,isBounded:u,static:d,useCSSTransforms:f=!0,usePercentages:m=!1,transformScale:h=1,positionStrategy:g,dragThreshold:_=0,droppingPosition:v,className:y=``,style:b,handle:x=``,cancel:S=``,x:C,y:w,w:T,h:E,minW:D=1,maxW:O=1/0,minH:k=1,maxH:A=1/0,i:j,resizeHandles:M,resizeHandle:N,constraints:P=cr,layoutItem:ee,layout:te=[],onDragStart:ne,onDrag:re,onDragStop:ie,onResizeStart:ae,onResize:oe,onResizeStop:se}=e,[ce,le]=(0,L.useState)(!1),[ue,F]=(0,L.useState)(!1),I=(0,L.useRef)(null),de=(0,L.useRef)({left:0,top:0}),fe=(0,L.useRef)({top:0,left:0,width:0,height:0}),pe=(0,L.useRef)(void 0),me=(0,L.useRef)(te);me.current=te;let he=(0,L.useRef)(null),ge=(0,L.useRef)(null),_e=(0,L.useRef)(!1),ve=(0,L.useRef)({x:0,y:0}),ye=(0,L.useRef)(!1),be=(0,L.useMemo)(()=>({cols:n,containerPadding:a,containerWidth:r,margin:i,maxRows:s,rowHeight:o}),[n,a,r,i,s,o]),xe=(0,L.useMemo)(()=>({cols:n,maxRows:s,containerWidth:r,containerHeight:0,rowHeight:o,margin:i,layout:[]}),[n,s,r,o,i]),Se=(0,L.useCallback)(()=>({...xe,layout:me.current}),[xe]),Ce=(0,L.useMemo)(()=>ee??{i:j,x:C,y:w,w:T,h:E,minW:D,maxW:O,minH:k,maxH:A},[ee,j,C,w,T,E,D,O,k,A]),we=(0,L.useCallback)(e=>{if(g?.calcStyle)return g.calcStyle(e);if(f)return dr(e);let t=fr(e);return m?{...t,left:pr(e.left/r),width:pr(e.width/r)}:t},[g,f,m,r]),Te=(0,L.useCallback)((e,{node:t})=>{if(!ne)return;let{offsetParent:n}=t;if(!n)return;let r=n.getBoundingClientRect(),i=t.getBoundingClientRect(),a=i.left/h,o=r.left/h,s=i.top/h,c=r.top/h,l;if(g?.calcDragPosition){let t=e;l=g.calcDragPosition(t.clientX,t.clientY,t.clientX-i.left,t.clientY-i.top)}else l={left:a-o+n.scrollLeft,top:s-c+n.scrollTop};if(de.current=l,_>0){let t=e;ve.current={x:t.clientX,y:t.clientY},_e.current=!0,ye.current=!1,le(!0);return}le(!0);let u=Hn(be,l.top,l.left),{x:d,y:f}=lr(P,Ce,u.x,u.y,Se());ne(j,d,f,{e,node:t,newPosition:l})},[ne,h,be,g,_,P,Ce,Se,j]),Ee=(0,L.useCallback)((e,{node:t,deltaX:n,deltaY:a})=>{if(!re||!ce)return;let s=e;if(_e.current&&!ye.current){let n=s.clientX-ve.current.x,r=s.clientY-ve.current.y;if(Math.hypot(n,r)<_)return;if(ye.current=!0,_e.current=!1,ne){let n=Hn(be,de.current.top,de.current.left),{x:r,y:i}=lr(P,Ce,n.x,n.y,Se());ne(j,r,i,{e,node:t,newPosition:de.current})}}let c=de.current.top+a,l=de.current.left+n;if(u){let{offsetParent:e}=t;if(e){let t=e.clientHeight-zn(E,o,i[1]);c=Wn(c,0,t);let n=Rn(be),a=r-zn(T,n,i[0]);l=Wn(l,0,a)}}let d={top:c,left:l};de.current=d;let f=Hn(be,c,l),{x:p,y:m}=lr(P,Ce,f.x,f.y,Se());re(j,p,m,{e,node:t,newPosition:d})},[re,ne,ce,_,u,E,o,i,be,r,T,j,P,Ce,Se]),De=(0,L.useCallback)((e,{node:t})=>{if(!ie||!ce)return;let n=_e.current;if(_e.current=!1,ye.current=!1,ve.current={x:0,y:0},n){le(!1),de.current={left:0,top:0};return}let{left:r,top:i}=de.current,a={top:i,left:r};le(!1),de.current={left:0,top:0};let o=Hn(be,i,r),{x:s,y:c}=lr(P,Ce,o.x,o.y,Se());ie(j,s,c,{e,node:t,newPosition:a})},[ie,ce,be,P,Ce,Se,j]);he.current=Te,ge.current=Ee;let Oe=(0,L.useCallback)((e,{node:t,size:n,handle:i},a,o)=>{let s=o===`onResizeStart`?ae:o===`onResize`?oe:se;if(!s)return;let c;c=t?Cr(i,a,n,r):{...n,top:a.top,left:a.left},fe.current=c;let l=Un(be,c.width,c.height),{w:u,h:d}=ur(P,Ce,l.w,l.h,i,Se());s(j,u,d,{e:e.nativeEvent??e,node:t,size:c,handle:i})},[ae,oe,se,r,be,j,P,Ce,Se]),ke=(0,L.useCallback)((e,t)=>{F(!0);let n=Bn(be,C,w,T,E),r={...t,handle:t.handle};Oe(e,r,n,`onResizeStart`)},[Oe,be,C,w,T,E]),Ae=(0,L.useCallback)((e,t)=>{let n=Bn(be,C,w,T,E),r={...t,handle:t.handle};Oe(e,r,n,`onResize`)},[Oe,be,C,w,T,E]),je=(0,L.useCallback)((e,t)=>{F(!1),fe.current={top:0,left:0,width:0,height:0};let n=Bn(be,C,w,T,E),r={...t,handle:t.handle};Oe(e,r,n,`onResizeStop`)},[Oe,be,C,w,T,E]);(0,L.useEffect)(()=>{if(!v)return;let e=I.current;if(!e)return;let t=pe.current||{left:0,top:0},n=ce&&(v.left!==t.left||v.top!==t.top);if(!ce){let t={node:e,deltaX:v.left,deltaY:v.top,lastX:0,lastY:0,x:v.left,y:v.top};he.current?.(v.e,t)}else if(n){let t={node:e,deltaX:v.left-de.current.left,deltaY:v.top-de.current.top,lastX:de.current.left,lastY:de.current.top,x:v.left,y:v.top};ge.current?.(v.e,t)}pe.current=v},[v,ce,j]);let Me=Bn(be,C,w,T,E,ce?de.current:null,ue?fe.current:null),Ne=L.Children.only(t),Pe=Rn(be),Fe=[zn(D,Pe,i[0]),zn(k,o,i[1])],Ie=[zn(O,Pe,i[0]),zn(A,o,i[1])],Le=Ne.props,Re=Le.className,ze=Le.style,Be=L.cloneElement(Ne,{ref:I,className:p(`react-grid-item`,Re,y,{static:d,resizing:ue,"react-draggable":c,"react-draggable-dragging":ce,dropping:!!v,cssTransforms:f}),style:{...b,...ze,...we(Me)}}),Ve=N;return Be=(0,R.jsx)(Qi.Resizable,{draggableOpts:{disabled:!l},className:l?void 0:`react-resizable-hide`,width:Me.width,height:Me.height,minConstraints:Fe,maxConstraints:Ie,onResizeStart:ke,onResize:Ae,onResizeStop:je,transformScale:h,resizeHandles:M,handle:Ve,children:Be}),Be=(0,R.jsx)(Vi,{disabled:!c,onStart:Te,onDrag:Ee,onStop:De,handle:x,cancel:`.react-resizable-handle`+(S?`,`+S:``),scale:h,nodeRef:I,children:Be}),Be}var ta=()=>{},na=`react-grid-layout`,ra=!1;try{ra=/firefox/i.test(navigator.userAgent)}catch{}function ia(e,t){let n=L.Children.toArray(e),r=L.Children.toArray(t);if(n.length!==r.length)return!1;for(let e=0;e{if(!L.isValidElement(t)||t.key===null)return;let n=String(t.key);a.add(n);let r=e.find(e=>e.i===n);if(r)i.push(er(r));else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Zn(i),w:1,h:1})}});let o=ir(i,{cols:n});return r.compact(o,n)}function oa(e){let{children:t,width:n,gridConfig:r,dragConfig:i,resizeConfig:a,dropConfig:o,positionStrategy:s=Dr,compactor:c,constraints:l=cr,layout:u=[],droppingItem:d,autoSize:f=!0,className:m=``,style:h={},innerRef:g,onLayoutChange:_=ta,onDragStart:v=ta,onDrag:y=ta,onDragStop:b=ta,onResizeStart:x=ta,onResize:S=ta,onResizeStop:C=ta,onDrop:w=ta,onDropDragOver:T=ta}=e,E=(0,L.useMemo)(()=>({...Or,...r}),[r]),D=(0,L.useMemo)(()=>({...kr,...i}),[i]),O=(0,L.useMemo)(()=>({...Ar,...a}),[a]),k=(0,L.useMemo)(()=>({...jr,...o}),[o]),{cols:A,rowHeight:j,maxRows:M,margin:N,containerPadding:P}=E,{enabled:ee,bounded:te,handle:ne,cancel:re,threshold:ie}=D,{enabled:ae,handles:oe,handleComponent:se}=O,{enabled:ce,defaultItem:le,onDragOver:ue}=k,F=c??Vr(`vertical`),I=F.type,de=F.allowOverlap,fe=F.preventCollision??!1,pe=(0,L.useMemo)(()=>d??{i:`__dropping-elem__`,...le},[d,le]),me=s.type===`transform`,he=s.scale,ge=P??N,[_e,ve]=(0,L.useState)(!1),[ye,be]=(0,L.useState)(()=>aa(u,t,A,F)),[xe,Se]=(0,L.useState)(null),[Ce,we]=(0,L.useState)(!1),[Te,Ee]=(0,L.useState)(null),[De,Oe]=(0,L.useState)(),ke=(0,L.useRef)(null),Ae=(0,L.useRef)(null),je=(0,L.useRef)(null),Me=(0,L.useRef)(0),Ne=(0,L.useRef)(ye),Pe=(0,L.useRef)(u),Fe=(0,L.useRef)(t),Ie=(0,L.useRef)(I),Le=(0,L.useRef)(ye);Le.current=ye,(0,L.useEffect)(()=>{ve(!0),(0,$i.deepEqual)(ye,u)||_(ye)},[]),(0,L.useEffect)(()=>{if(xe||Te)return;let e=!(0,$i.deepEqual)(u,Pe.current),n=!ia(t,Fe.current),r=I!==Ie.current;if(e||n||r){let n=aa(e?u:ye,t,A,F);(0,$i.deepEqual)(n,ye)||be(n)}Pe.current=u,Fe.current=t,Ie.current=I},[u,t,A,I,F,xe,Te,ye]),(0,L.useEffect)(()=>{if(!xe&&!(0,$i.deepEqual)(ye,Ne.current)){Ne.current=ye;let e=ye.filter(e=>e.i!==pe.i);_(e)}},[ye,xe,_,pe.i]);let Re=(0,L.useMemo)(()=>{if(!f)return;let e=Zn(ye),t=ge[1];return e*j+(e-1)*N[1]+t*2+`px`},[f,ye,j,N,ge]),ze=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Qn(i,e);if(!a)return;let o={w:a.w,h:a.h,x:a.x,y:a.y,i:e};ke.current=er(a),je.current=i,Se(o),v(i,a,a,null,r.e,r.node)},[v]),Be=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=ke.current,o=Qn(i,e);if(!o)return;let s={w:o.w,h:o.h,x:o.x,y:o.y,i:e},c=ar(i,o,t,n,!0,fe,I,A,de);y(c,a,o,s,r.e,r.node),be(F.compact(c,A)),Se(s)},[fe,I,A,de,F,y]),Ve=(0,L.useCallback)((e,t,n,r)=>{if(!xe)return;let i=Le.current,a=ke.current,o=Qn(i,e);if(!o)return;let s=ar(i,o,t,n,!0,fe,I,A,de),c=F.compact(s,A);b(c,a,o,null,r.e,r.node);let l=je.current;ke.current=null,je.current=null,Se(null),be(c),l&&!(0,$i.deepEqual)(l,c)&&_(c)},[xe,fe,I,A,de,F,b,_]),He=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Qn(i,e);a&&(Ae.current=er(a),je.current=i,we(!0),x(i,a,a,null,r.e,r.node))},[x]),Ue=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Ae.current,{handle:o}=r,s=!1,c,l,[u,d]=rr(i,e,e=>(c=e.x,l=e.y,[`sw`,`w`,`nw`,`n`,`ne`].includes(o)&&([`sw`,`nw`,`w`].includes(o)&&(c=e.x+(e.w-t),t=e.x!==c&&c<0?e.w:t,c=c<0?0:c),[`ne`,`n`,`nw`].includes(o)&&(l=e.y+(e.h-n),n=e.y!==l&&l<0?e.h:n,l=l<0?0:l),s=!0),fe&&!de&&qn(i,{...e,w:t,h:n,x:c??e.x,y:l??e.y}).filter(t=>t.i!==e.i).length>0&&(l=e.y,n=e.h,c=e.x,t=e.w,s=!1),e.w=t,e.h=n,e));if(!d)return;let f=u;s&&c!==void 0&&l!==void 0&&(f=ar(u,d,c,l,!0,fe,I,A,de));let p={w:d.w,h:d.h,x:d.x,y:d.y,i:e,static:!0};S(f,a,d,p,r.e,r.node),be(F.compact(f,A)),Se(p)},[fe,I,A,de,F,S]),We=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Ae.current,o=Qn(i,e),s=F.compact(i,A);C(s,a,o??null,null,r.e,r.node);let c=je.current;Ae.current=null,je.current=null,Se(null),we(!1),be(s),c&&!(0,$i.deepEqual)(c,s)&&_(s)},[A,F,C,_]),Ge=(0,L.useCallback)(()=>{let e=Le.current;if(!e.some(e=>e.i===pe.i)){Ee(null),Se(null),Oe(void 0);return}let t=F.compact(e.filter(e=>e.i!==pe.i),A);be(t),Ee(null),Se(null),Oe(void 0)},[pe.i,A,F]),Ke=(0,L.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),ra&&!e.nativeEvent.target?.classList.contains(na))return!1;let t=ue?ue(e.nativeEvent):T(e);if(t===!1)return Te&&Ge(),!1;let{dragOffsetX:r=0,dragOffsetY:i=0,...a}=t??{},o={...pe,...a},s=e.currentTarget.getBoundingClientRect(),c={cols:A,margin:N,maxRows:M,rowHeight:j,containerWidth:n,containerPadding:ge},l=Rn(c),u=zn(o.w,l,N[0]),d=zn(o.h,j,N[1]),f=u/2,p=d/2,m=e.clientX-s.left+r-f,h=e.clientY-s.top+i-p,g=Math.max(0,m),_=Math.max(0,h),v={left:g/he,top:_/he,e:e.nativeEvent};if(Te)De&&(De.left!==v.left||De.top!==v.top)&&Oe(v);else{let e=Vn(c,_,g,o.w,o.h);Ee((0,R.jsx)(`div`,{},o.i)),Oe(v);let t=Le.current.filter(e=>e.i!==o.i);be([...t,{...o,x:e.x,y:e.y,static:!1,isDraggable:!0}])}},[Te,De,pe,ue,T,Ge,he,A,N,M,j,n,ge]),qe=(0,L.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),Me.current--,Me.current<0&&(Me.current=0),Me.current===0&&Ge()},[Ge]),Je=(0,L.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),Me.current++},[]),Ye=(0,L.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=Le.current,n=t.find(e=>e.i===pe.i);Me.current=0,Ge(),w(t,n,e.nativeEvent)},[pe.i,Ge,w]),Xe=(0,L.useCallback)((e,t)=>{if(!e||!e.key)return null;let r=Qn(ye,String(e.key));if(!r)return null;let i=typeof r.isDraggable==`boolean`?r.isDraggable:!r.static&&ee,a=typeof r.isResizable==`boolean`?r.isResizable:!r.static&&ae,o=r.resizeHandles||[...oe],c=i&&te&&r.isBounded!==!1,u=se;return(0,R.jsx)(ea,{containerWidth:n,cols:A,margin:N,containerPadding:ge,maxRows:M,rowHeight:j,cancel:re,handle:ne,onDragStart:ze,onDrag:Be,onDragStop:Ve,onResizeStart:He,onResize:Ue,onResizeStop:We,isDraggable:i,isResizable:a,isBounded:c,useCSSTransforms:me&&_e,usePercentages:!_e,transformScale:he,positionStrategy:s,dragThreshold:ie,w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minH:r.minH,minW:r.minW,maxH:r.maxH,maxW:r.maxW,static:r.static,droppingPosition:t?De:void 0,resizeHandles:o,resizeHandle:u,constraints:l,layoutItem:r,layout:ye,children:e},r.i)},[ye,n,A,N,ge,M,j,re,ne,ze,Be,Ve,He,Ue,We,ee,ae,te,me,_e,he,s,ie,De,oe,se,l]),Ze=()=>xe?(0,R.jsx)(ea,{w:xe.w,h:xe.h,x:xe.x,y:xe.y,i:xe.i,className:`react-grid-placeholder ${Ce?`placeholder-resizing`:``}`,containerWidth:n,cols:A,margin:N,containerPadding:ge,maxRows:M,rowHeight:j,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:me,transformScale:he,constraints:l,layout:ye,children:(0,R.jsx)(`div`,{})}):null,Qe=p(na,m),$e={height:Re,...h};return(0,R.jsxs)(`div`,{ref:g,className:Qe,style:$e,onDrop:ce?Ye:void 0,onDragLeave:ce?qe:void 0,onDragEnter:ce?Je:void 0,onDragOver:ce?Ke:void 0,children:[L.Children.map(t,e=>L.isValidElement(e)?Xe(e):null),ce&&Te&&Xe(Te,!0),Ze()]})}var sa={lg:1200,md:996,sm:768,xs:480,xxs:0},ca={lg:12,md:10,sm:6,xs:4,xxs:2},la=()=>{};function ua(e,t,n,r){let i=[];L.Children.forEach(t,t=>{if(!L.isValidElement(t)||t.key===null)return;let n=String(t.key),r=e.find(e=>e.i===n);if(r)i.push({...r,i:n});else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Zn(i),w:1,h:1})}});let a=ir(i,{cols:n});return r.compact(a,n)}function da(e){let{children:t,width:n,breakpoint:r,breakpoints:i=sa,cols:a=ca,layouts:o={},rowHeight:s=150,maxRows:c=1/0,margin:l=[10,10],containerPadding:u=null,compactor:d,onBreakpointChange:f=la,onLayoutChange:p=la,onWidthChange:m=la,...h}=e,g=d??Vr(`vertical`),_=g.type,v=g.allowOverlap,y=(0,L.useMemo)(()=>r??Ur(i,n),[]),b=(0,L.useMemo)(()=>Wr(y,a),[y,a]),x=(0,L.useMemo)(()=>Gr(o,i,y,y,b,_),[]),[S,C]=(0,L.useState)(y),[w,T]=(0,L.useState)(b),[E,D]=(0,L.useState)(x),[O,k]=(0,L.useState)(o),A=(0,L.useRef)(n),j=(0,L.useRef)(r),M=(0,L.useRef)(i),N=(0,L.useRef)(a),P=(0,L.useRef)(o),ee=(0,L.useRef)(_),te=(0,L.useRef)(O);(0,L.useEffect)(()=>{te.current=O},[O]);let ne=(0,L.useMemo)(()=>(0,$i.deepEqual)(o,P.current)?null:Gr(o,i,S,S,w,g),[o,i,S,w,g]),re=ne??E;(0,L.useEffect)(()=>{ne!==null&&(D(ne),k(o),te.current=o,P.current=o)},[ne,o]),(0,L.useEffect)(()=>{if(_!==ee.current){let e=g.compact(tr(re),w),t={...te.current,[S]:e};D(e),k(t),te.current=t,p(e,t),ee.current=_}},[_,g,re,w,v,S,p]),(0,L.useEffect)(()=>{let e=n!==A.current,o=r!==j.current,s=!(0,$i.deepEqual)(i,M.current),c=!(0,$i.deepEqual)(a,N.current);if(e||o||s||c){let e=r??Ur(i,n),o=Wr(e,a),d=S;if(d!==e||s||c){let n={...te.current};n[d]||(n[d]=tr(E));let r=Gr(n,i,e,d,o,g);r=ua(r,t,o,g),n[e]=r,C(e),T(o),D(r),k(n),te.current=n,f(e,o),p(r,n)}let h=Kr(l,e),_=u?Kr(u,e):null;m(n,h,o,_),A.current=n,j.current=r,M.current=i,N.current=a}},[n,r,i,a,S,w,E,t,g,_,v,l,u,f,p,m]);let ie=(0,L.useCallback)(e=>{let t={...te.current,[S]:e};D(e),k(t),te.current=t,p(e,t)},[S,p]),ae=(0,L.useMemo)(()=>Kr(l,S),[l,S]),oe=(0,L.useMemo)(()=>u===null?null:Kr(u,S),[u,S]),se=(0,L.useMemo)(()=>({cols:w,rowHeight:s,maxRows:c,margin:ae,containerPadding:oe}),[w,s,c,ae,oe]);return(0,R.jsx)(oa,{...h,width:n,gridConfig:se,compactor:g,onLayoutChange:ie,layout:re,children:t})}function fa(e){let{children:t,width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,rowHeight:u,maxRows:d,margin:f,containerPadding:p,droppingItem:m,compactType:h,preventCollision:g=!1,allowOverlap:_=!1,verticalCompact:v,isDraggable:y=!0,isBounded:b=!1,draggableHandle:x,draggableCancel:S,isResizable:C=!0,resizeHandles:w=[`se`],resizeHandle:T,isDroppable:E=!1,useCSSTransforms:D=!0,transformScale:O=1,autoSize:k,className:A,style:j,innerRef:M,onDragStart:N,onDrag:P,onDragStop:ee,onResizeStart:te,onResize:ne,onResizeStop:re,onDrop:ie,onDropDragOver:ae}=e,oe=h===void 0?`vertical`:h;v===!1&&(oe=null);let se={enabled:y,bounded:b,handle:x,cancel:S},ce={enabled:C,handles:w,handleComponent:T},le={enabled:E},ue;ue=D?O===1?wr:Er(O):Tr;let F=Vr(oe,_,g);return(0,R.jsx)(da,{width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,rowHeight:u,maxRows:d,margin:f,containerPadding:p,compactor:F,dragConfig:se,resizeConfig:ce,dropConfig:le,positionStrategy:ue,droppingItem:m,autoSize:k,className:A,style:j,innerRef:M,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,onDragStart:N,onDrag:P,onDragStop:ee,onResizeStart:te,onResize:ne,onResizeStop:re,onDrop:ie,onDropDragOver:ae,children:t})}fa.displayName=`ResponsiveReactGridLayout`;var pa=fa,ma=`react-grid-layout`;function ha(e){function t(t){let{measureBeforeMount:n=!1,className:r,style:i,...a}=t,[o,s]=(0,L.useState)(1280),[c,l]=(0,L.useState)(!1),u=(0,L.useRef)(null),d=(0,L.useRef)(null);return(0,L.useEffect)(()=>{l(!0)},[]),(0,L.useEffect)(()=>{let e=u.current;if(!(e instanceof HTMLElement))return;let t=null,n=new ResizeObserver(e=>{if(e[0]){let n=Math.round(e[0].contentRect.width);t!==null&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{s(e=>e===n?e:n),t=null})}});return n.observe(e),d.current=n,()=>{t!==null&&cancelAnimationFrame(t),n.unobserve(e),n.disconnect()}},[c]),n&&!c?(0,R.jsx)(`div`,{className:p(r,ma),style:i,ref:u}):(0,R.jsx)(e,{innerRef:u,className:r,style:i,...a,width:o})}return t.displayName=`WidthProvider(${e.displayName||e.name||`Component`})`,t}function ga(e){return e.reduce((e,t)=>Math.max(e,t.y+t.h),0)}function _a(e,t){return e.map(e=>({...e,x:0,w:t,minW:Math.min(e.minW??1,t)}))}var va=[`overview`,`topology`,`activity`,`assistant`,`performance`,`trace`,`logs`],ya={overview:{w:4,h:3,minW:3,minH:3},activity:{w:4,h:5,minW:3,minH:4},assistant:{w:4,h:3,minW:3,minH:3},topology:{w:8,h:5,minW:4,minH:4},performance:{w:8,h:5,minW:4,minH:4},logs:{w:8,h:5,minW:4,minH:4},trace:{w:8,h:4,minW:4,minH:4}};function ba(e,t){return e.xe.y)),o=(t,r)=>!e.some(e=>ba(e,{x:t,y:a,w:r,h:n}));for(let e=0;e+t<=r;e+=1)if(o(e,t))return{x:e,y:a,w:t};let s=e.reduce((e,t)=>ba(t,{x:0,y:a,w:r,h:n})?Math.max(e,t.x+t.w):e,0),c={x:s,w:0};for(let e=Math.min(s,r);ec.w&&(c={x:e,w:t-e}),e=t}return c.w>=i?{x:c.x,y:a,w:c.w}:{x:0,y:ga(e),w:t}}function Sa(e){if(e>=2e3)return`bad`;if(e>=750)return`warn`}function Ca(e){return e>=.05?`bad`:e>=.01?`warn`:`dimmed`}var wa=function(e,t){return wa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},wa(e,t)};function z(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);wa(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ta=`12px sans-serif`,Ea=20,Da=100,Oa=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function ka(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;c=Wa&&(Ua=0),Ua++}function Ka(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function B(e){if(typeof e!=`object`||!e)return e;var t=e,n=Pa.call(e);if(n===`[object Array]`){if(!So(e)){t=[];for(var r=0,i=e.length;r`u`&&typeof self<`u`?No.worker=!0:!No.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(No.node=!0,No.svgSupported=!0):Po(navigator.userAgent,No);function Po(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Fo=`.`,Io=`___EC__COMPONENT__CONTAINER___`,Lo=`___EC__EXTENDED_CLASS___`;function Ro(e){var t={main:``,sub:``};if(e){var n=e.split(Fo);t.main=n[0]||``,t.sub=n[1]||``}return t}function zo(e){vo(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Bo(e){return!!(e&&e[Lo])}function Vo(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Ho(t)?n=function(e){z(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Za(n,this)),V(n.prototype,e),n[Lo]=!0,n.extend=this.extend,n.superCall=Ko,n.superApply=qo,n.superClass=t,n}}function Ho(e){return K(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Uo(e,t){e.extend=t.extend}var Wo=Math.round(Math.random()*10);function Go(e){var t=[`__\0is_clz`,Wo++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Ko(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function qo(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Jo(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){zo(r),e.prototype.type=r;var i=Ro(r);if(!i.sub)t[i.main]=e;else if(i.sub!==Io){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Io]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Ro(e),r=[],i=t[n.main];return i&&i[Io]?H(i,function(e,t){t!==Io&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Ro(e).main]},e.getAllClassMainTypes=function(){var e=[];return H(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Ro(e).main];return n&&n[Io]};function n(e){var n=t[e.main];return(!n||!n[Io])&&(n=t[e.main]={},n[Io]=!0),n}}function Yo(e,t){for(var n=0;n=0||i&&Xa(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Xo=Yo([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Zo=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Xo(this,e,t)},e}(),Qo=function(){function e(e){this.value=e}return e}(),$o=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Qo(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),es=function(){function e(e){this._list=new $o,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Qo(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),ts=new es(50);function ns(e){if(typeof e==`string`){var t=ts.get(e);return t&&t.image}return e}function rs(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=ts.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!as(t)&&a.pending.push(o)):(t=ja.loadImage(e,is,is),t.__zrImageSrc=e,ts.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function is(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;tu||d>f||p>m||h>g)return!1;var _=!(u=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){Js(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&Js(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Rs.x=Bs.x=t.x,Rs.y=Vs.y=t.y,zs.x=Vs.x=t.x+t.width,zs.y=Bs.y=t.y+t.height,Rs.transform(n),Vs.transform(n),zs.transform(n),Bs.transform(n),e.x=Ns(Rs.x,zs.x,Bs.x,Vs.x),e.y=Ns(Rs.y,zs.y,Bs.y,Vs.y);var s=Ps(Rs.x,zs.x,Bs.x,Vs.x),c=Ps(Rs.y,zs.y,Bs.y,Vs.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=ss(e||[]),us(e,e,_s(ec,-t.x,-t.y)),fs(e,e,_s(ec,r,i)),us(e,e,_s(ec,n.x,n.y)),e},e}(),Ks=Z.create,qs=Z.set,Js=Z.copy,Ys=Z.calculateTransform,Xs=Z.applyTransform,Zs=Z.contain,Qs=new Z(0,0,0,0),$s=new Z(0,0,0,0),ec=[];function tc(e,t,n,r,i,a,o,s){var c=Fs(t-n),l=Fs(r-e),u=Ns(c,l),d=Is[i],f=Is[1-i],p=Ls[i];t=l||!Hs.bidirectional)&&(Us[d]=-l,Us[f]=0,Hs.useDir&&Hs.calcDirMTV())))}function nc(){var e=0,t=new Ms,n=new Ms,r={minTv:new Ms,maxTv:new Ms,useDir:!1,dirMinTv:new Ms,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Ps(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=sc)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=ja.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?oc=sc:i>2&&oc++,t}}var oc=0,sc=5;function cc(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=ac(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function lc(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=ja.measureText(t,e.font).width,n.put(t,r)),r}function uc(e,t,n,r){var i=lc(rc(t),e),a=mc(t);return new Z(fc(0,i,n),pc(0,a,r),i,a)}function dc(e,t,n,r){var i=((e||``)+``).split(` -`);if(i.length===1)return uc(i[0],t,n,r);for(var a=new Z(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function gc(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=hc(r[0],n.width),l+=hc(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var _c=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function vc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(` -`);a=yc(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l=s;l++)c-=s;var u=lc(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function bc(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=lc(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?xc(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=lc(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function xc(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=yc(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)bc(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=rc(l),S=0;S<_.length;S++)w=Math.max(lc(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Cc=function(){function e(){}return e}(),wc=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Tc=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Ec(e,t,n,r,i){var a=new Tc,o=Fc(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=_c.lastIndex=0,h;(h=_c.exec(o))!=null;){var g=h.index;g>m&&Dc(a,o.substring(m,g),t,p),Dc(a,h[2],t,p,h[1]),m=_c.lastIndex}md){var ee=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` -`),l=!0),r.accumWidth=m}else{var h=jc(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` -`);for(var g=rc(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var kc=eo(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Ac(e){return!Oc(e)||!!kc[e]}function jc(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=rc(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Mc(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;Z.set(Nc,fc(n,o,i),pc(r,s,a),o,s),Z.intersect(t,Nc,null,Pc);var c=Pc.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=fc(c.x,c.width,i,!0),e.baseY=pc(c.y,c.height,a,!0)}}var Nc=new Z(0,0,0,0),Pc={outIntersectRect:{},clamp:!0};function Fc(e){return e==null?e=``:e+=``}function Ic(e){var t=Fc(e.text),n=e.font;return Lc(e,lc(rc(n),t),mc(n),null)}function Lc(e,t,n,r){var i=new Z(fc(e.x||0,t,e.textAlign),pc(e.y||0,n,e.textBaseline),t,n),a=r??(Rc(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Rc(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var zc=ss,Bc=5e-5;function Vc(e){return e>Bc||e<-Bc}var Hc=[],Uc=[],Wc=os(),Gc=Math.abs,Kc=function(){function e(){}return e.prototype.getLocalTransform=function(e){return qc(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Vc(this.rotation)||Vc(this.x)||Vc(this.y)||Vc(this.scaleX-1)||Vc(this.scaleY-1)||Vc(this.skewX)||Vc(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(zc(n),this.invTransform=null);return}n||=os(),t?this.getLocalTransform(n):zc(n),e&&(t?ls(n,e,n):cs(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||os(),ps(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Hc);var n=Hc[0]<0?-1:1,r=Hc[1]<0?-1:1,i=((Hc[0]-n)*t+n)/Hc[0]||0,a=((Hc[1]-r)*t+r)/Hc[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||os(),ls(Uc,e.invTransform,t),t=Uc);var n=this.originX,r=this.originY;(n||r)&&(Wc[4]=n,Wc[5]=r,ls(Uc,t,Wc),Uc[4]-=n,Uc[5]-=r,t=Uc),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&ks(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&ks(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Gc(e[0]-1)>1e-10&&Gc(e[3]-1)>1e-10?Math.sqrt(Gc(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Xc(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&ds(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),qc=Kc.getLocalTransform;function Jc(){return new Kc}var Yc=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Xc(e,t){return Ja(e,t,Yc)}var Zc={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Zc.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Zc.bounceIn(e*2)*.5:Zc.bounceOut(e*2-1)*.5+.5}},Qc=Math.pow,$c=Math.sqrt,el=1e-8,tl=1e-4,nl=$c(3),rl=1/3,il=ms(),al=ms(),ol=ms();function sl(e){return e>-el&&eel||e<-el}function ll(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function ul(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function dl(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(sl(u)&&sl(d)){if(sl(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(sl(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=$c(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Qc(-y,rl):Qc(y,rl),b=b<0?-Qc(-b,rl):Qc(b,rl);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*$c(u*u*u)),S=Math.acos(x)/3,C=$c(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+nl*Math.sin(S)))/(3*o),T=(-s+C*(w-nl*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function fl(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(sl(o)){if(cl(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(sl(u))i[0]=-a/(2*o);else if(u>0){var d=$c(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function pl(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function ml(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;il[0]=c,il[1]=l;for(var v=0;v<1;v+=.05)al[0]=ll(e,n,i,o,v),al[1]=ll(t,r,a,s,v),g=Os(il,al),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(sl(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=$c(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function yl(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function bl(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function xl(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;il[0]=o,il[1]=s;for(var f=0;f<1;f+=.05){al[0]=gl(e,n,i,f),al[1]=gl(t,r,a,f);var p=Os(il,al);p=0&&p=1?1:dl(0,r,a,1,e,s)&&ll(0,i,o,1,s[0])}}}var Tl=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ao,this.ondestroy=e.ondestroy||Ao,this.onrestart=e.onrestart||Ao,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=K(e)?e:Zc[e]||wl(e)},e}(),El={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Dl(e){return e=Math.round(e),e<0?0:e>255?255:e}function Ol(e){return e=Math.round(e),e<0?0:e>360?360:e}function kl(e){return e<0?0:e>1?1:e}function Al(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Dl(parseFloat(t)/100*255):Dl(parseInt(t,10))}function jl(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?kl(parseFloat(t)/100):kl(parseFloat(t))}function Ml(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Nl(e,t,n){return e+(t-e)*n}function Pl(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Fl(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Il=new es(20),Ll=null;function Rl(e,t){Ll&&Fl(Ll,t),Ll=Il.put(e,Ll||t.slice())}function zl(e,t){if(e){t||=[];var n=Il.get(e);if(n)return Fl(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in El)return Fl(t,El[r]),Rl(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Pl(t,0,0,0,1);return}return Pl(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Rl(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Pl(t,0,0,0,1);return}return Pl(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Rl(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Pl(t,+l[0],+l[1],+l[2],1):Pl(t,0,0,0,1);u=jl(l.pop());case`rgb`:if(l.length>=3)return Pl(t,Al(l[0]),Al(l[1]),Al(l[2]),l.length===3?u:jl(l[3])),Rl(e,t),t;Pl(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Pl(t,0,0,0,1);return}return l[3]=jl(l[3]),Bl(l,t),Rl(e,t),t;case`hsl`:if(l.length!==3){Pl(t,0,0,0,1);return}return Bl(l,t),Rl(e,t),t;default:return}}Pl(t,0,0,0,1)}}function Bl(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=jl(e[1]),i=jl(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Pl(t,Dl(Ml(o,a,n+1/3)*255),Dl(Ml(o,a,n)*255),Dl(Ml(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Vl(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Hl(e,t){var n=zl(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return ql(n,n.length===4?`rgba`:`rgb`)}}function Ul(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Dl(Nl(o[0],s[0],c)),n[1]=Dl(Nl(o[1],s[1],c)),n[2]=Dl(Nl(o[2],s[2],c)),n[3]=kl(Nl(o[3],s[3],c)),n}}function Wl(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=zl(t[i]),s=zl(t[a]),c=r-i,l=ql([Dl(Nl(o[0],s[0],c)),Dl(Nl(o[1],s[1],c)),Dl(Nl(o[2],s[2],c)),kl(Nl(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Gl(e,t,n,r){var i=zl(e);if(e)return i=Vl(i),t!=null&&(i[0]=Ol(K(t)?t(i[0]):t)),n!=null&&(i[1]=jl(K(n)?n(i[1]):n)),r!=null&&(i[2]=jl(K(r)?r(i[2]):r)),ql(Bl(i),`rgba`)}function Kl(e,t){var n=zl(e);if(n&&t!=null)return n[3]=kl(t),ql(n,`rgba`)}function ql(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Jl(e,t){var n=zl(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Yl=new es(100);function Xl(e){if(q(e)){var t=Yl.get(e);return t||(t=Hl(e,-.1),Yl.put(e,t)),t}if(fo(e)){var n=V({},e);return n.colorStops=U(e.colorStops,function(e){return{offset:e.offset,color:Hl(e.color,-.1)}}),n}return e}var Zl=Math.round;function Ql(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=zl(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var $l=1e-4;function eu(e){return e<$l&&e>-$l}function tu(e){return Zl(e*1e3)/1e3}function nu(e){return Zl(e*1e4)/1e4}function ru(e){return`matrix(`+tu(e[0])+`,`+tu(e[1])+`,`+tu(e[2])+`,`+tu(e[3])+`,`+nu(e[4])+`,`+nu(e[5])+`)`}var iu={left:`start`,right:`end`,center:`middle`,middle:`middle`};function au(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function ou(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function su(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function cu(e){return e&&!!e.image}function lu(e){return e&&!!e.svgElement}function uu(e){return cu(e)||lu(e)}function du(e){return e.type===`linear`}function fu(e){return e.type===`radial`}function pu(e){return e&&(e.type===`linear`||e.type===`radial`)}function mu(e){return`url(#`+e+`)`}function hu(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function gu(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*jo,i=Y(e.scaleX,1),a=Y(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Zl(o*jo)+`deg, `+Zl(s*jo)+`deg)`),c.join(` `)}var _u=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),vu=Array.prototype.slice;function yu(e,t,n){return(t-e)*n+e}function bu(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Fu,s=t;if($a(t)){var c=Ou(t);o=c,(c===1&&!so(t[0])||c===2&&!so(t[0][0]))&&(a=!0)}else if(so(t)&&!po(t))o=ku;else if(q(t)){if(!isNaN(+t))o=ku;else{var l=zl(t);l&&(s=l,o=Mu)}}else if(fo(t)){var u=V({},s);u.colorStops=U(t.colorStops,function(e){return{offset:e.offset,color:zl(e.color)}}),du(t)?o=Nu:fu(t)&&(o=Pu),s=u}i===0?this.valType=o:(o!==this.valType||o===Fu)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=K(n)?n:Zc[n]||wl(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Lu(r),c=Iu(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Ru:e[s];if((Lu(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Lu(i))i===Au?bu(g,f[r],p[r],h):xu(g,f[r],p[r],h);else if(Iu(i)){var _=f[r],v=p[r],y=i===Nu;e[s]={type:y?`linear`:`radial`,x:yu(_.x,v.x,h),y:yu(_.y,v.y,h),colorStops:U(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:yu(e.offset,n.offset,h),color:Du(bu([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=yu(_.x2,v.x2,h),e[s].y2=yu(_.y2,v.y2,h)):e[s].r=yu(_.r,v.r,h)}else if(c)bu(g,f[r],p[r],h),n||(e[s]=Du(g));else{var b=yu(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ku?e[n]=e[n]+r:t===Mu?(zl(e[n],Ru),Su(Ru,Ru,r,1),e[n]=Du(Ru)):t===Au?Su(e[n],e[n],r,1):t===ju&&Cu(e[n],e[n],r,1)},e}(),Bu=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Ka(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ro(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,Eu(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Eu(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Vu=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ku:Gu},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&zl(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,ql(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},V(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(J(e))for(var n=ro(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Ju,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Ju;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(Xa(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Ka(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=cd(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,ud(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=Xa(r,e),a=Xa(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var dd=`__zr_style_`+Math.round(Math.random()*10),fd={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},pd={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};fd[dd]=!0;var md=[`z`,`z2`,`invisible`],hd=[`invisible`],gd=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=ro(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Td[0]=Cd(i)*n+e,Td[1]=Sd(i)*r+t,Ed[0]=Cd(a)*n+e,Ed[1]=Sd(a)*r+t,l(s,Td,Ed),u(c,Td,Ed),i%=wd,i<0&&(i+=wd),a%=wd,a<0&&(a+=wd),i>a&&!o?a+=wd:ii&&(Dd[0]=Cd(p)*n+e,Dd[1]=Sd(p)*r+t,l(s,Dd,s),u(c,Dd,c))}var Fd={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Id=[],Ld=[],Rd=[],zd=[],Bd=[],Vd=[],Hd=Math.min,Ud=Math.max,Wd=Math.cos,Gd=Math.sin,Kd=Math.abs,qd=Math.PI,Jd=qd*2,Yd=typeof Float32Array<`u`,Xd=[];function Zd(e){return Math.round(e/qd*1e8)/1e8%2*qd}function Qd(e,t){var n=Zd(e[0]);n<0&&(n+=Jd);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Jd?i=n+Jd:t&&n-i>=Jd?i=n-Jd:!t&&n>i?i=n+(Jd-Zd(n-i)):t&&n0&&(this._ux=Kd(n/Uu/e)||0,this._uy=Kd(n/Uu/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Fd.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Kd(e-this._xi),r=Kd(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Fd.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Fd.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Fd.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Xd[0]=r,Xd[1]=i,Qd(Xd,a),r=Xd[0],i=Xd[1];var o=i-r;return this.addData(Fd.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Wd(i)*n+e,this._yi=Gd(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Fd.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Fd.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Yd&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Rd[0]=Rd[1]=Bd[0]=Bd[1]=Number.MAX_VALUE,zd[0]=zd[1]=Vd[0]=Vd[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Kd(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Fd.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=hl(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Fd.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Sl(i,a,y,b,h,g,10),i=h,a=g;break;case Fd.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Wd(D)*T+C,s=Gd(D)*E+w),m=Ud(T,E)*Hd(Jd,Math.abs(O)),i=Wd(k)*T+C,a=Gd(k)*E+w;break;case Fd.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Fd.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Fd.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Fd.L:u=n[x++],d=n[x++];var w=Kd(u-c),T=Kd(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Fd.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],P=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;pl(c,k,j,N,D,Id),pl(l,A,M,P,D,Ld),e.bezierCurveTo(Id[1],Ld[1],Id[2],Ld[2],Id[3],Ld[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case Fd.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;bl(c,k,j,D,Id),bl(l,A,M,D,Ld),e.quadraticCurveTo(Id[1],Ld[1],Id[2],Ld[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Fd.A:var ee=n[x++],te=n[x++],ne=n[x++],re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=!n[x++],ce=ne>re?ne:re,le=Kd(ne-re)>.001,ue=ie+ae,F=!1;if(f){var E=p[g++];h+E>_&&(ue=ie+ae*(_-h)/E,F=!0),h+=E}if(le&&e.ellipse?e.ellipse(ee,te,ne,re,oe,ie,ue,se):e.arc(ee,te,ce,ie,ue,se),F)break lo;C&&(o=Wd(ie)*ne+ee,s=Gd(ie)*re+te),c=Wd(ue)*ne+ee,l=Gd(ue)*re+te;break;case Fd.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var I=n[x++],de=n[x++];if(f){var E=p[g++];if(h+E>_){var fe=_-h;e.moveTo(u,d),e.lineTo(u+Hd(fe,I),d),fe-=I,fe>0&&e.lineTo(u+I,d+Hd(fe,de)),fe-=de,fe>0&&e.lineTo(u+Ud(I-fe,0),d+de),fe-=I,fe>0&&e.lineTo(u,d+Ud(de-fe,0));break lo}h+=E}e.rect(u,d,I,de);break;case Fd.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Fd,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function ef(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=of);var f=Math.atan2(c,s);return f<0&&(f+=of),f>=r&&f<=i||f+of>=r&&f+of<=i}function cf(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var lf=$d.CMD,uf=Math.PI*2,df=1e-4;function ff(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&hf(),p=ll(t,r,a,s,mf[0]),f>1&&(m=ll(t,r,a,s,mf[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=gl(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);pf[0]=-c,pf[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=uf-1e-4){r=0,i=uf;var u=a?1:-1;return o>=pf[0]+e&&o<=pf[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=uf,i+=uf);for(var f=0,p=0;p<2;p++){var m=pf[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=uf+h),(h>=r&&h<=i||h+uf>=r&&h+uf<=i)&&(h>Math.PI/2&&h1&&(n||(s+=cf(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case lf.M:u=a[m++],d=a[m++],c=u,l=d;break;case lf.L:if(n){if(ef(c,l,a[m],a[m+1],t,r,i))return!0}else s+=cf(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lf.C:if(n){if(tf(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=gf(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lf.Q:if(n){if(nf(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=_f(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lf.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=cf(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(sf(_,v,b,x,x+S,C,t,w,i))return!0}else s+=vf(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case lf.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(ef(u,d,f,d,t,r,i)||ef(f,d,f,p,t,r,i)||ef(f,p,u,p,t,r,i)||ef(u,p,u,d,t,r,i))return!0}else s+=cf(f,d,f,p,r,i),s+=cf(u,p,u,d,r,i);break;case lf.Z:if(n){if(ef(c,l,u,d,t,r,i))return!0}else s+=cf(c,l,u,d,r,i);c=u,l=d}}return!n&&!ff(l,d)&&(s+=cf(c,l,u,d,r,i)||0),s!==0}function bf(e,t,n){return yf(e,0,!1,t,n)}function xf(e,t,n,r){return yf(e,t,!0,n,r)}var Sf=Ya({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},fd),Cf={style:Ya({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},pd.style)},wf=Yc.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Tf=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Gu:t>.2?qu:Ku}if(e)return Ku}return Gu},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(q(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Jl(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new $d(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),xf(a,o/s,e,t)))return!0}if(this.hasFill())return bf(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:V(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Oo(Sf,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=V({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=V({},r.shape),V(c,n.shape)):(c=V({},i?this.shape:r.shape),V(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=V({},this.shape);for(var l={},u=ro(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Nf=Math.round;function Pf(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Nf(r*2)===Nf(i*2)&&(e.x1=e.x2=If(r,s,!0)),Nf(a*2)===Nf(o*2)&&(e.y1=e.y2=If(a,s,!0)),e):e}}function Ff(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=If(r,s,!0),e.y=If(i,s,!0),e.width=Math.max(If(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(If(i+o,s,!1)-e.y,o===0?0:1),e):e}}function If(e,t,n){if(!t)return e;var r=Nf(e*2);return(r+Nf(t))%2==0?r/2:(r+(n?1:-1))/2}var Lf=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Rf={},zf=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Lf},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Ff(Rf,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Mf(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Tf);zf.prototype.type=`rect`;var Bf={fill:`#000`},Vf=2,Hf={},Uf={style:Ya({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},pd.style)},Wf=function(e){z(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Bf,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&rp(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=tp(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Df),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=ep(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=$f(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Vf,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=ho(s.opacity,t.opacity,1),Yf(p,s),y&&(p.lineWidth=ho(s.lineWidth,t.lineWidth,g),p.lineDash=Y(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Lc(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(zf),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=Y(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(jf),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=Y(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=ho(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return Xf(e)&&(t=[e.fontStyle,e.fontWeight,Jf(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&yo(t)||e.textFont||e.font},t}(gd),Gf={left:!0,right:1,center:1},Kf={top:1,bottom:1,middle:1},qf=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Jf(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Yf(e,t){for(var n=0;n0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var yp=bp;function bp(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return xp(e,t,n)}function xp(e,t,n){return q(e)?Cp(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Sp(e){return q(e)&&Cp(e)}function Cp(e){return!!op(e).match(/%$/)}function wp(e,t,n){return isNaN(t)?n?``+e:+e:(t=sp(cp(0,t),ap),e=(+e).toFixed(t),n?e:+e)}function Tp(e){return e.sort(function(e,t){return e-t}),e}function Ep(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(up(e*t)/t===e)return n}return Dp(e)}function Dp(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return cp(0,(a<0?0:i-1-a)-r)}function Op(e,t,n){var r=lp(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=mp(2*lp(n||1)*lp(r))/hp,a=mp(lp(t))/hp,o=cp(0,fp(-i+a));return isFinite(o)||(o=NaN),o}function kp(e,t){var n=cp(Ep(e),Ep(t)),r=e+t;return n>ap?r:wp(r,n)}var Ap=pp(2,53)-1;function jp(e){var t=gp*2;return(e%t+t)%t}function Mp(e){return e>-ip&&e=10&&t++,t}function Lp(e,t){var n=Ip(e),r=pp(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,wp(e,-n)}function Rp(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Mm(){return[1/0,-1/0]}function Nm(e,t){Lm(t)&&(te[1]&&(e[1]=t))}function Pm(e,t){Lm(t)&&te[1]&&(e[1]=t)}function Im(e,t){Rm(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Lm(e){return e!=null&&isFinite(e)}function Rm(e,t){return Lm(e)&&Lm(t)&&e<=t}function zm(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Bm(e){Rm(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Vm(){var e=`__ec_once_`+Hm++;return function(t,n){ko(t,e)||(t[e]=1,n())}}var Hm=Vp();function Um(e,t,n){var r=X(),i=0;H(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Wm(e){return e.value+``}function Gm(e){return e+``}function Km(e,t){return Y(t,!0)?e.seriesIndex+2:0}function qm(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Jm(e,t){return{seriesType:e,overallReset:t}}function Ym(e){return{overallReset:e}}var Xm=xm(),Zm=function(e,t,n,r){if(r){var i=Xm(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Xm(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},Qm=`series`,$m=X([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),eh=`original`,th=`arrayRows`,nh=`objectRows`,rh=`keyedColumns`,ih=`typedArray`,ah=`unknown`,oh=`column`,sh=`Roam`,ch=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],lh=function(){function e(e){H(ch,function(t){this[t]=W(e[t],e)},this)}return e}();function uh(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var dh=1,fh={},ph=xm(),mh=xm(),hh=[`emphasis`,`blur`,`select`],gh=[`normal`,`emphasis`,`blur`,`select`],_h=`highlight`,vh=`downplay`,yh=`select`,bh=`unselect`,xh=`toggleSelect`,Sh=`selectchanged`;function Ch(e){return e!=null&&e!==`none`}function wh(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Th(e){wh(e,`emphasis`,2)}function Eh(e){e.hoverState===2&&wh(e,`normal`,0)}function Dh(e){wh(e,`blur`,1)}function Oh(e){e.hoverState===1&&wh(e,`normal`,0)}function kh(e){e.selected=!0}function Ah(e){e.selected=!1}function jh(e,t,n){t(e,n)}function Mh(e,t,n){jh(e,t,n),e.isGroup&&e.traverse(function(e){jh(e,t,n)})}function Nh(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Ph(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof Tf){var o=ph(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Ch(s)||Ch(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=V({},r),l=V({},l),l.fill=s):!Ch(l.fill)&&Ch(s)?(a=!0,r=V({},r),l=V({},l),l.fill=Xl(s)):!Ch(l.stroke)&&Ch(c)&&(a||(r=V({},r),l=V({},l)),l.stroke=Xl(c)),r.style=l}}if(r&&r.z2==null){a||(r=V({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Ih(e,t,n){if(n&&n.z2==null){n=V({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Lh(e,t,n){var r=Xa(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Ph(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=V({},n),o=V({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Rh(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Fh(this,e,t,n);if(e===`blur`)return Lh(this,e,n);if(e===`select`)return Ih(this,e,n)}return n}function zh(e){e.stateProxy=Rh;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Rh),n&&(n.stateProxy=Rh)}function Bh(e,t){!Jh(e,t)&&!e.__highByOuter&&Mh(e,Th)}function Vh(e,t){!Jh(e,t)&&!e.__highByOuter&&Mh(e,Eh)}function Hh(e,t){e.__highByOuter|=1<<(t||0),Mh(e,Th)}function Uh(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Mh(e,Eh)}function Wh(e){Mh(e,Dh)}function Gh(e){Mh(e,Oh)}function Kh(e){Mh(e,kh)}function qh(e){Mh(e,Ah)}function Jh(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Yh(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=mh(i),o=uh(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Oh(e)}),s&&n.push(i)),a.isBlured=!1}),H(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Xh(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function ag(e,t,n){fg(e,!0),Mh(e,zh),cg(e,t,n)}function og(e){fg(e,!1)}function sg(e,t,n,r){r?og(e):ag(e,t,n)}function cg(e,t,n){var r=Xm(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var lg=[`emphasis`,`blur`,`select`],ug={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function dg(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=Cg(m),s*=Cg(m));var h=(i===a?-1:1)*Cg((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Tg(d)*g-wg(d)*_,y=(t+r)/2+wg(d)*g+Tg(d)*_,b=kg([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=kg(x,S);if(Og(x,S)<=-1&&(C=Eg),Og(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Eg*1e6)/1e6;C=Eg*2+w%2*Eg}u.addData(l,v,y,o,s,b,C,d,a)}var jg=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Mg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ng(e){var t=new $d;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=$d.CMD,c=e.match(jg);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=Xa(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=Xa(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function i_(e){var t;if(G(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function a_(e,t){var n,r=$g(t.r,0),i=$g(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Zg(c-s),p=f>Kg&&f%Kg;if(p>t_&&(f=p),!(r>t_))e.moveTo(l,u);else if(f>Kg-t_)e.moveTo(l+r*Jg(s),u+r*qg(s)),e.arc(l,u,r,s,c,!d),i>t_&&(e.moveTo(l+i*Jg(c),u+i*qg(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Jg(s),j=r*qg(s),M=i*Jg(c),N=i*qg(c),P=f>t_;if(P){var ee=t.cornerRadius;ee&&(n=i_(ee),m=n[0],h=n[1],g=n[2],_=n[3]);var te=Zg(r-i)/2;if(v=e_(te,g),y=e_(te,_),b=e_(te,m),x=e_(te,h),w=S=$g(v,y),T=C=$g(b,x),(S>t_||C>t_)&&(E=r*Jg(c),D=r*qg(c),O=i*Jg(s),k=i*qg(s),ft_){var le=e_(g,w),ue=e_(_,w),F=r_(O,k,A,j,r,le,d),I=r_(E,D,M,N,r,ue,d);e.moveTo(l+F.cx+F.x0,u+F.cy+F.y0),w0&&e.arc(l+F.cx,u+F.cy,le,Xg(F.y0,F.x0),Xg(F.y1,F.x1),!d),e.arc(l,u,r,Xg(F.cy+F.y1,F.cx+F.x1),Xg(I.cy+I.y1,I.cx+I.x1),!d),ue>0&&e.arc(l+I.cx,u+I.cy,ue,Xg(I.y1,I.x1),Xg(I.y0,I.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>t_)||!P)e.lineTo(l+M,u+N);else if(T>t_){var le=e_(m,T),ue=e_(h,T),F=r_(M,N,E,D,i,-ue,d),I=r_(A,j,O,k,i,-le,d);e.lineTo(l+F.cx+F.x0,u+F.cy+F.y0),T0&&e.arc(l+F.cx,u+F.cy,ue,Xg(F.y0,F.x0),Xg(F.y1,F.x1),!d),e.arc(l,u,i,Xg(F.cy+F.y1,F.cx+F.x1),Xg(I.cy+I.y1,I.cx+I.x1),d),le>0&&e.arc(l+I.cx,u+I.cy,le,Xg(I.y1,I.x1),Xg(I.y0,I.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var o_=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),s_=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new o_},t.prototype.buildPath=function(e,t){a_(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Tf);s_.prototype.type=`sector`;var c_=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),l_=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new c_},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Tf);l_.prototype.type=`ring`;function u_(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=u_(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sN_[1]){if(i=!1,P_.negativeSize||n)return i;var s=j_(N_[0]-M_[1]),c=j_(M_[0]-N_[1]);k_(s,c)>I_.len()&&(s=c||!P_.bidirectional)&&(Ms.scale(F_,o,-c*r),P_.useDir&&P_.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function U_(e,t,n,r,i,a){H_(`update`,e,t,n,r,i,a)}function W_(e,t,n,r,i,a){H_(`enter`,e,t,n,r,i,a)}function G_(e){if(!e.__zr)return!0;for(var t=0;tw_,BezierCurve:()=>S_,BoundingRect:()=>Z,Circle:()=>Hg,CompoundPath:()=>T_,Ellipse:()=>Wg,Group:()=>Bg,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>jf,IncrementalDisplayable:()=>z_,Line:()=>v_,LinearGradient:()=>D_,OrientedBoundingRect:()=>L_,Path:()=>Tf,Point:()=>Ms,Polygon:()=>p_,Polyline:()=>h_,RadialGradient:()=>O_,Rect:()=>zf,Ring:()=>l_,Sector:()=>s_,Text:()=>Wf,WH:()=>$_,XY:()=>Q_,applyTransform:()=>mv,calcZ2Range:()=>Lv,clipPointsByRect:()=>yv,clipRectByRect:()=>bv,createIcon:()=>xv,decomposeTransform:()=>Vv,ensureCopyRect:()=>Pv,ensureCopyTransform:()=>Fv,expandOrShrinkRect:()=>Ev,extendPath:()=>nv,extendShape:()=>ev,getCurrentCanvasPainter:()=>Uv,getShapeClass:()=>iv,getTransform:()=>pv,groupTransition:()=>vv,initProps:()=>W_,isBoundingRectAxisAligned:()=>Mv,isElementRemoved:()=>G_,lineLineIntersect:()=>Cv,linePolygonIntersect:()=>Sv,makeImage:()=>ov,makePath:()=>av,mergePath:()=>cv,payloadDisableAnimation:()=>Bv,registerShape:()=>rv,removeElement:()=>K_,removeElementWithFadeOut:()=>J_,resizePath:()=>lv,retrieveZInfo:()=>Iv,setTooltipConfig:()=>kv,subPixelOptimize:()=>fv,subPixelOptimizeLine:()=>uv,subPixelOptimizeRect:()=>dv,transformDirection:()=>hv,traverseElements:()=>jv,traverseUpdateZ:()=>Rv,updateProps:()=>U_}),Z_={},Q_=[`x`,`y`],$_=[`width`,`height`];function ev(e){return Tf.extend(e)}var tv=Rg;function nv(e,t){return tv(e,t)}function rv(e,t){Z_[e]=t}function iv(e){if(Z_.hasOwnProperty(e))return Z_[e]}function av(e,t,n,r){var i=Lg(e,t);return n&&(r===`center`&&(n=sv(n,i.getBoundingRect())),lv(i,n)),i}function ov(e,t,n){var r=new jf({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(sv(t,i))}}});return r}function sv(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var cv=zg;function lv(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function uv(e,t){return Pf(e,e,{lineWidth:t}),e}function dv(e,t){return Ff(e,e,t),e}var fv=If;function pv(e,t){for(var n=ss([]);e&&e!==t;)ls(n,e.getLocalTransform(),n),e=e.parent;return n}function mv(e,t,n){return t&&!$a(t)&&(t=Kc.getLocalTransform(t)),n&&(t=ps([],t)),ks([],e,t)}function hv(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:lp(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:lp(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=mv(a,t,n),lp(a[0])>lp(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function gv(e){return!e.isGroup}function _v(e){return e.shape!=null}function vv(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){gv(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return _v(e)&&(t.shape=B(e.shape)),t}var a=r(e);t.traverse(function(e){if(gv(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),U_(e,r,n,Xm(e).dataIndex)}}})}function yv(e,t){return U(e,function(e){var n=e[0];n=cp(n,t.x),n=sp(n,t.x+t.width);var r=e[1];return r=cp(r,t.y),r=sp(r,t.y+t.height),[n,r]})}function bv(e,t){var n=cp(e.x,t.x),r=sp(e.x+e.width,t.x+t.width),i=cp(e.y,t.y),a=sp(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function xv(e,t,n){var r=V({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),Ya(i,n),new jf(r)):av(e.replace(`path://`,``),r,n,`center`)}function Sv(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=wv(p,m,u,d)/f;return!(g<0||g>1)}function wv(e,t,n,r){return e*r-n*t}function Tv(e){return e<=1e-6&&e>=-1e-6}function Ev(e,t,n,r,i){return t==null?e:(so(t)?Dv[0]=Dv[1]=Dv[2]=Dv[3]=t:(Dv[0]=t[0],Dv[1]=t[1],Dv[2]=t[2],Dv[3]=t[3]),r&&(Dv[0]=cp(0,Dv[0]),Dv[1]=cp(0,Dv[1]),Dv[2]=cp(0,Dv[2]),Dv[3]=cp(0,Dv[3])),n&&(Dv[0]=-Dv[0],Dv[1]=-Dv[1],Dv[2]=-Dv[2],Dv[3]=-Dv[3]),Ov(e,Dv,`x`,`width`,3,1,i&&i[0]||0),Ov(e,Dv,`y`,`height`,0,2,i&&i[1]||0),e)}var Dv=[0,0,0,0];function Ov(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=cp(0,sp(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:lp(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function kv(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=q(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&H(ro(c),function(e){ko(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Xm(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:Ya({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Av(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function jv(e,t){if(e){if(G(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Rv(e,t,n){zv(e,t,n,-1/0)}function zv(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Wy=(e={},e[th+`_`+oh]={pure:!0,appendData:i},e[th+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[nh]={pure:!0,appendData:i},e[rh]={pure:!0,appendData:function(e){var t=this._data;H(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[eh]={appendData:i},e[ih]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){so(t)||Xp(``),this._opFn=fb[e],this._rvalFloat=zp(t)}return e.prototype.evaluate=function(e){return so(e)?this._opFn(e,this._rvalFloat):this._opFn(zp(e),this._rvalFloat)},e})();var pb=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=so(e)?e:zp(e),r=so(t)?t:zp(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=q(e),s=q(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=zp(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=zp(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function mb(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function hb(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,_b=typeof Uint16Array>`u`?Array:Uint16Array,vb=typeof Int32Array>`u`?Array:Int32Array,yb=typeof Float64Array>`u`?Array:Float64Array,bb={float:yb,int:vb,ordinal:Array,number:Array,time:yb},xb;function Sb(e){return e>65535?gb:_b}function Cb(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function wb(e,t,n,r,i){var a=bb[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=U(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(Sb(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return db(e[r],this._dimensions[r])}xb={arrayRows:e,objectRows:function(e,t,n,r){return db(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return db(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Eb=xm(),Db={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Ob=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=jb(this.source))},e.prototype.getSourceDimensionIndex=function(e){return Y(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=zy(this.source),n=!Mb(e),r=``,i=[],a=0,o=0;a30}var Nb=J,Pb=U,Fb=typeof Int32Array>`u`?Array:Int32Array,Ib=`e\0\0`,Lb=-1,Rb=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],zb=[`_approximateExtent`],Bb,Vb,Hb,Ub,Wb,Gb,Kb,qb=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;kb(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),G(i)?i=i.slice():Nb(i)&&(i=V({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Nb(t)?V(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Nb(e)?V(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?V(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Zm(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){H(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Pb(this.dimensions,this._getDimInfo,this),this.hostModel),Wb(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];K(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(go(arguments)))})},e.internalField=function(){Bb=function(e){var t=e._invertedIndicesMap;H(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Fb(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Jb(e,t){Ay(e)||(e=My(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=X(),a=[],o=Yb(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Mb(o),c=r===e.dimensionsDefine,l=c?jb(e):Ab(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=X(u),f=new vb(o),p=0;p0&&(e.name+=t-1)}),new Ob({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Yb(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return H(t,function(e){var t;J(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Xb(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Zb={},Qb={},$b=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Zb,!0),this._normalMasterList=n(Qb,!1);function n(n,r){var i=[];return H(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){H(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Zb[e]=t;return}Qb[e]=t},e.get=function(e){return Qb[e]||Zb[e]},e}();function ex(e){return!!Zb[e]}var tx=X();function nx(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=tx.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function rx(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!ex(n)&&(i=0))}return{coordSysType:n,kind:i}}function ix(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=rx(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var ax=function(){function e(e){this.coordSysDims=[],this.axisMap=X(),this.categoryAxisMap=X(),this.coordSysName=e}return e}();function ox(e){var t=e.get(`coordinateSystem`),n=new ax(t),r=sx[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var sx={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Tm).models[0],a=e.getReferringComponents(`yAxis`,Tm).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),cx(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),cx(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Tm).models[0];t.coordSysDims=[`single`],n.set(`single`,i),cx(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Tm).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),cx(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),cx(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();H(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),cx(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Tm).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function cx(e){return e.get(`type`)===`category`}function lx(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;ux(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(H(a,function(e,t){q(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),H(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;H(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function ux(e){return!kb(e.schema)}function dx(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function fx(e,t){return dx(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function px(e,t){var n=e.get(`coordinateSystem`),r=$b.get(n),i;return t&&t.coordSysDims&&(i=U(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=cb(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function mx(e,t,n){var r,i;return n&&H(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function hx(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=My(e)):(i=r.getSource(),a=i.sourceFormat===eh);var o=ox(t),s=px(t,o),c=n.useEncodeDefaulter,l=K(c)?c:c?ao(wy,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Jb(i,u),f=mx(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=lx(t,{schema:d,store:p}),h=new qb(d,t);h.setCalculationInfo(m);var g=f!=null&&gx(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function gx(e){if(e.sourceFormat===`original`)return!G(rm(_x(e.data||[])))}function _x(e){for(var t=0;t=0&&n.push(e)}),n}}function Sx(e,t){return qa(qa({},e,!0),t,!0)}var Cx=Math.log(2);function Tx(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){H(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Nx(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Ex(s,o):Ex(o,s))}function Px(e){return e.nodeName.toUpperCase()===`CANVAS`}var Fx=/([&<>"'])/g,Ix={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Lx(e){return e==null?``:(e+``).replace(Fx,function(e,t){return Ix[t]})}var Rx={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},zx={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Bx=`ZH`,Vx=`EN`,Hx=Vx,Ux={},Wx={},Gx=No.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Hx).toUpperCase().indexOf(Bx)>-1?Bx:Hx}():Hx;function Kx(e,t){e=e.toUpperCase(),Wx[e]=new _y(t),Ux[e]=t}function qx(e){if(q(e)){var t=Ux[e.toUpperCase()]||{};return e===Bx||e===Vx?B(t):qa(B(t),B(Ux[Hx]),!1)}return qa(B(e),B(Ux[Hx]),!1)}function Jx(e){return Wx[e]}function Yx(){return Wx[Hx]}Kx(Vx,Rx),Kx(Bx,zx);var Xx=null;function Zx(){return Xx}function Qx(e,t){var n=Zx(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function $x(e){var t=e.brk;return t?t.breaks:[]}function eS(e){var t=e.brk;return t?t.hasBreaks():!1}var tS=1e3,nS=tS*60,rS=nS*60,iS=rS*24,aS=iS*365,oS={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},sS={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},cS=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,lS=`{yyyy}-{MM}-{dd}`,uS={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:lS,hour:lS+` `+sS.hour,minute:lS+` `+sS.minute,second:lS+` `+sS.second,millisecond:cS},dS=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],fS=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function pS(e){return!q(e)&&!K(e)?mS(e):e}function mS(e){e||={};var t={},n=!0;return H(dS,function(t){n&&=e[t]==null}),H(dS,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=dS[s],l=J(a)&&!G(a)?a[c]:a,u=void 0;G(l)?(u=l.slice(),o=u[0]||``):q(l)?(o=l,u=[o]):(o==null?o=sS[r]:oS[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function hS(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function gS(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function _S(e){return e===gS(e)}function vS(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function yS(e,t,n,r){var i=Pp(e),a=i[CS(n)](),o=i[wS(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[TS(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[ES(n)](),d=(u-1)%12+1,f=i[DS(n)](),p=i[OS(n)](),m=i[kS(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof _y?r:Jx(r||Gx)||Yx()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,hS(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,hS(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,hS(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,hS(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,hS(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,hS(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,hS(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,hS(m,3)).replace(/{S}/g,m+``)}function bS(e,t,n,r,i){var a=null;if(q(n))a=n;else if(K(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Zx();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=xS(e.value,i);a=n[u][u][0]}}return yS(new Date(e.value),a,i,r)}function xS(e,t){var n=Pp(e),r=n[wS(t)]()+1,i=n[TS(t)](),a=n[ES(t)](),o=n[DS(t)](),s=n[OS(t)](),c=n[kS(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function SS(e,t,n){switch(t){case`year`:e[jS(n)](0);case`month`:e[MS(n)](1);case`day`:e[NS(n)](0);case`hour`:e[PS(n)](0);case`minute`:e[FS(n)](0);case`second`:e[IS(n)](0)}return e}function CS(e){return e?`getUTCFullYear`:`getFullYear`}function wS(e){return e?`getUTCMonth`:`getMonth`}function TS(e){return e?`getUTCDate`:`getDate`}function ES(e){return e?`getUTCHours`:`getHours`}function DS(e){return e?`getUTCMinutes`:`getMinutes`}function OS(e){return e?`getUTCSeconds`:`getSeconds`}function kS(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function AS(e){return e?`setUTCFullYear`:`setFullYear`}function jS(e){return e?`setUTCMonth`:`setMonth`}function MS(e){return e?`setUTCDate`:`setDate`}function NS(e){return e?`setUTCHours`:`setHours`}function PS(e){return e?`setUTCMinutes`:`setMinutes`}function FS(e){return e?`setUTCSeconds`:`setSeconds`}function IS(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function LS(e){if(!Bp(e))return q(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function RS(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var zS=_o;function BS(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&yo(e)?e:`-`}function a(e){return Wp(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Pp(e):e;if(!isNaN(+c))return yS(c,r,n);if(s)return`-`}if(t===`ordinal`)return oo(e)?i(e):so(e)&&a(e)?e+``:`-`;var l=zp(e);return a(l)?LS(l):oo(e)?i(e):typeof e==`boolean`?e+``:`-`}var VS=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],HS=function(e,t){return`{`+e+(t??``)+`}`};function US(e,t,n){G(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function GS(e,t){return t||=`transparent`,q(e)?e:J(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var KS=H,qS=[`left`,`right`,`top`,`bottom`,`width`,`height`],JS=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function YS(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var XS=YS;ao(YS,`vertical`),ao(YS,`horizontal`);function ZS(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function QS(e,t,n){n=zS(n||0);var r=t.width,i=t.height,a=yp(e.left,r),o=yp(e.top,i),s=yp(e.right,r),c=yp(e.bottom,i),l=yp(e.width,r),u=yp(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new Z((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function $S(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i=u)return a;for(var d=0;d=0;o--)a=qa(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Em(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return ZS(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(_y);Uo(cC,_y),Jo(cC),bx(cC),xx(cC,lC);function lC(e){var t=[];return H(cC.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=U(t,function(e){return Ro(e).main}),e!==`dataset`&&Xa(t,`dataset`)<=0&&t.unshift(`dataset`),t}var uC=xm(),dC=xm(),fC=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=em(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return hC(this,uC,r,i,e,t,n)},e.prototype.clearColorPalette=function(){gC(this,uC)},e}();function pC(e,t,n,r){return hC(e,dC,em(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function mC(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function hC(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:mC(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function gC(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var _C=/\{@(.+?)\}/g,vC=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&G(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),K(i))return s.status=t,s.dimensionIndex=r,i(s);if(q(i))return US(i,s).replace(_C,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=ib(o,e,i);if(a&&G(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return ib(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function yC(e){var t,n;return J(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function bC(e){return new xC(e)}var xC=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(FC(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=lo(o)?ih:eh,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=Y(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=Y(u.sourceHeader,d.sourceHeader),m=Y(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[jy(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[jy(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&IC(``);var i,a=[],o=[];return H(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&IC(``),a.push(t),o.push(e._getVersionSign())}),n?i=jC(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Ny(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return H(e.blocks,function(e){var n=JC(e);n>=t&&(t=n+ +(r&&(!n||KC(e)&&!e.noHeader)))}),t}return 0}function YC(e,t,n,r){var i=t.noHeader,a=QC(JC(t)),o=[],s=t.blocks||[];vo(!s||G(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(ko(l,c)){var u=new pb(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}H(s,function(n,i){var s=t.valueFormatter,c=qC(n)(s?V(V({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):$C(r,o.join(``),i?n:a.html);if(i)return d;var f=BS(t.header,`ordinal`,e.useUTC),p=HC(r,e.renderMode).nameStyle,m=VC(r);return e.renderMode===`richText`?nw(e,f,p)+a.richText+d:$C(r,`
`+Lx(f)+`
`+d,n)}function XC(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=G(e)?e:[e],U(e,function(e,t){return BS(e,G(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:BS(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=HC(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:nw(e,f,v))+(o?``:rw(e,m,h,g,y)):$C(r,(s?``:d)+(a?``:ew(f,!s,v))+(o?``:tw(m,h,g,y)),n)}}function ZC(e,t,n,r,i,a){if(e)return qC(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function QC(e){return{html:UC[e],richText:WC[e]}}function $C(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=VC(e);return`
`+t+r+`
`}function ew(e,t,n){var r=t?`margin-left:2px`:``;return``+Lx(e)+``}function tw(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=G(e)?e:[e],``+U(e,function(e){return Lx(e)}).join(`  `)+``}function nw(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function rw(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(G(t)?t.join(` `):t,a)}function iw(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return GS(n)}function aw(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var ow=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Vp()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=WS({color:t,type:e,renderMode:n,markerId:r});return q(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};G(t)?H(t,function(e){return V(n,e)}):V(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function sw(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=G(s),l=iw(t,n),u,d,f,p;if(o>1||c&&!o){var m=cw(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=ib(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=hm(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return GC(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[GC(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!yo(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function cw(e,t,n,r,i){var a=t.getData(),o=eo(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?H(r,function(e){u(ib(a,n,e),e)}):H(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(GC(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var lw=xm();function uw(e,t){return e.getName(t)||e.getId(t)}var dw=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=bC({count:mw,reset:hw}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(lw(this).sourceManager=new PC(this)).prepareSource();var r=this.getInitialData(e,n);_w(r,this),this.dataTask.context.data=r,lw(this).dataBeforeProcessed=r,fw(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=rC(this),r=n?aC(e):{},i=this.subType;cC.hasClass(i)&&(i+=`Series`),qa(e,t.getTheme().get(this.subType)),qa(e,this.getDefaultOption()),tm(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&iC(e,r,n)},t.prototype.mergeOption=function(e,t){e=qa(this.option,e,!0),this.fillDataTextStyle(e.data);var n=rC(this);n&&iC(this.option,e,n);var r=lw(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);_w(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,lw(this).dataBeforeProcessed=i,fw(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!lo(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return sw({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(No.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=fC.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[uw(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){J(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return cC.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(cC);Qa(dw,vC),Qa(dw,fC),Uo(dw,cC);function fw(e){var t=e.name;hm(e)||(e.name=pw(e)||t)}function pw(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return H(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function mw(e){return e.model.getRawData().count()}function hw(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),gw}function gw(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function _w(e,t){H(Do(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,ao(vw,t))})}function vw(e,t){var n=yw(e);return n&&n.setOutputEnd((t||this).count()),t}function yw(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var bw=Tf.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),xw={line:v_,rect:zf,roundRect:zf,square:zf,circle:Hg,diamond:Tf.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Tf.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Tf.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:bw},Sw={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Cw={};H(xw,function(e,t){Cw[t]=new e});var ww=Tf.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=gc(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Cw[r];i||=(r=`rect`,Cw[r]),Sw[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Tw(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function Ew(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?ov(e.slice(8),new Z(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?av(e.slice(7),{},new Z(t,n,r,i),o?`center`:`cover`):new ww({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Tw,a&&c.setColor(a),c}function Dw(e){return G(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Ow(e,t){if(e!=null)return G(e)||(e=[e,e]),[yp(e[0],t[0])||0,yp(Y(e[1],e[0]),t[1])||0]}var kw=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return hx(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Bg,n=Ew(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=Ew(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(dw);function Aw(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=ib(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var Mw=function(e){z(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=Ew(e,-1,-1,2,2,null,a);o.attr({z2:Y(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Nw,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Hh(this.childAt(0))},t.prototype.downplay=function(){Uh(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):U_(f,p,o,n),Y_(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,W_(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Jv(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=Ow(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof jf){var S=a.style;a.useStyle(V({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(V({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;qv(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Aw(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),sg(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Xm(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&K_(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();K_(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Dw(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Bg);function Nw(e,t){this.parent.drift(e,t)}function Pw(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Fw(e){return e!=null&&!J(e)&&(e={isIgnore:e}),e||{}}function Iw(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Jv(t),cursorStyle:t.get(`cursor`)}}function Lw(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Rw=function(){function e(e){this.group=new Bg,this._SymbolCtor=e||Mw}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Fw(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Iw(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);Pw(e,i,r,t)&&Lw(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Pw(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):U_(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function Vw(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Hw(e,t){return!isFinite(e)||!isFinite(t)}var Uw=typeof Float32Array<`u`?Float32Array:void 0,Ww=typeof Float64Array<`u`?Float64Array:void 0;function Gw(e){return Kw({ctor:Uw},e).arr}function Kw(e,t){var n=e.arr,r=e.ctor;if(t>Ap&&(t=Ap),!n||e.typed&&n.length=i||h<0)break;if(Hw(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||Hw(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,ee=void 0;if(s===`x`){P=Math.abs(A),ee=Math.abs(j);var te=E>0?1:-1;p=_-te*P*o,m=v,O=_+te*ee*o,k=v}else if(s===`y`){P=Math.abs(M),ee=Math.abs(N);var ne=D>0?1:-1;p=_,m=v-ne*P*o,O=_,k=v+ne*ee*o}else P=Math.sqrt(A*A+M*M),ee=Math.sqrt(j*j+N*N),T=ee/(ee+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=Yw(O,Xw(S,_)),k=Yw(k,Xw(C,v)),O=Xw(O,Yw(S,_)),k=Xw(k,Yw(C,v)),E=O-_,D=k-v,p=_-E*P/ee,m=v-D*P/ee,p=Yw(p,Xw(l,_)),m=Yw(m,Xw(u,v)),p=Xw(p,Yw(l,_)),m=Xw(m,Yw(u,v)),E=_-p,D=v-m,O=_+E*ee/P,k=v+D*ee/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var Qw=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),$w=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Qw},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Hw(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?dl(i,u,f,m,e,s):dl(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?ll(a,d,p,h,b):ll(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(Tf),eT=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Qw),tT=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new eT},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Hw(n[a*2-2],n[a*2-1]);a--);for(;i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){kT(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),kT(r,e,t,n)},freeze:function(){}};function kT(e,t,n,r){Rm(n,r)&&(e[t][0]=n,e[t][1]=r)}function AT(e){return jT(e)||NT(e)}function jT(e){return e.type===`interval`}function MT(e){return e.type===`time`}function NT(e){return e.type===`log`}function PT(e){return e.type===`ordinal`}function FT(e){var t=Ip(e),n=pp(10,t),r=up(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,wp(r*n,-t)}function IT(e){return Ep(e)+2}function LT(e,t){return mp(e)/mp(t)}function RT(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var UT=function(e){z(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,xT(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new _T({}),G(i)&&(i=new _T({categories:U(i,function(e){return J(e)?e.value:e})})),r._ordinalMeta=i;var a=bT(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,ST(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:q(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=up(e),e},t.prototype.getTicks=function(){var e=[];return HT(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=sp(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=sp(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=wp(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=wp(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?wp(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return WT(this,e,$x(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Ep(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),LS(wp(e.value,n,!0))},t.type=`interval`,t}(hT);hT.registerClass(GT);var KT=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ZT(e){var t=30*iS;return e/=t,e>6?6:e>3?3:e>2?2:1}function QT(e){return e/=rS,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function $T(e,t){return e/=t?nS:tS,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function eE(e){return cp(Lp(e,!0),1)}function tE(e,t,n){var r=Math.max(0,Xa(dS,t)-1);return SS(new Date(e),dS[r],n).getTime()}function nE(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function rE(e,t,n,r,i,a){var o=fS,s=0;function c(e,t,n,i,o,c,l){for(var u=nE(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!YT(gS(e),r[0],r[1],n)){s&&(i=[{value:tE(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=to(U(u,function(e){return to(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=JT.length,l=Math.min(KT(JT,a,0,c),c-1),u=JT[l][1],d=JT[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};hT.registerClass(qT);var aE=0,oE=1,sE=2,cE=function(e){z(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=GT.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[aE]=i[oE]=a[aE]=a[oE]=NaN,xT(r,t.mapperMethods);var s=Zx(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},sE,l),r.powStub=new GT({breakParsed:l.original}),r.intervalStub=new GT({breakParsed:l.transformed}),ST(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Zx(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return U(i.getTicks(e||{}),function(e){var i=e.value,o=RT(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,$x(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return WT(this,e,$x(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(LT(e,this.base))},scale:function(e){return RT(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=LT(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return lE.depth=n,uE.lookup=this._lookup,RT(n===2?e:this.intervalStub.transformOut(e,lE),this.base,uE)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Rm(t,n)||t<=0||n<=0)){var r=dE,i=dE;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[aE]=t,r[oE]=n);var o=this.base;this.intervalStub.setExtent2(e,i[aE]=LT(t,o),i[oE]=LT(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Rm(t[0],t[1])&&Wp(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(hT);hT.registerClass(cE);var lE={},uE={},dE=[],fE={value:1,category:1,time:1,log:1},pE=xm();function mE(e){var t=e.get(`type`);return(t==null||!ko(fE,t)&&!hT.getClass(t))&&(t=`value`),t}function hE(e,t,n){var r=Zx(),i;switch(r&&(i=EE(e,t,n)),t){case`category`:return new UT({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Mm()});case`time`:return new qT({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new cE({logBase:e.get(`logBase`),breakOption:i});case`value`:return new GT({breakOption:i});default:return new((hT.getClass(t))||GT)({})}}function gE(e,t,n){var r=n?wT(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Rm(i,a)?i===t||a===t?2:it?1:3:3}function _E(e){pE(e).noOnMyZero=!0}function vE(e){return pE(e).noOnMyZero}function yE(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=pS(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(q(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(K(t)){if(e.type===`category`)return function(n,r){return t(bE(e,n),n.value-e.scale.getExtent()[0],null)};var r=Zx();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(bE(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function bE(e,t){var n=e.scale;return PT(n)?n.getLabel(t):t.value}function xE(e){return e.get(`interval`)??`auto`}function SE(e){return e.type===`category`&&xE(e.getLabelModel())===0}function CE(e,t){var n={};return H(e.mapDimensionsAll(t),function(t){n[fx(e,t)]=!0}),ro(n)}function wE(e){return e===`middle`||e===`center`}function TE(e){return e.getShallow(`show`)}function EE(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Zx()||!n||!DE(t)?void 0:r}function DE(e){return e!==`category`}function OE(e,t,n,r,i,a){var o=NT(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=BT(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function kE(e,t){return PT(e)?e.getRawOrdinalNumber(t.value):t.value}function AE(e,t){return PT(e)&&!!t.get(`boundaryGap`)}function jE(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function RE(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=U(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=LE(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;H(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new D_(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function zE(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&BE(a,t))){var o=t.mapDimension(a.dim),s={};return H(a.getViewLabels(),function(e){e.tick.offInterval||(s[kE(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function BE(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function VE(e){for(var t=e.length/2;t>0&&Hw(e[t*2-2],e[t*2-1]);t--);return t-1}function HE(e,t){return[e[t*2],e[t*2+1]]}function UE(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function WE(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}Xm(f).seriesIndex=e.seriesIndex,sg(f,k,A,j);var N=PE(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var ee=a.getCalculationInfo(`stackedOnSeries`),te=0;p.useStyle(Ya(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),ee&&(te=PE(ee.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:te,smoothMonotone:P,connectNulls:x}),dg(p,e,`areaStyle`),Xm(p).seriesIndex=e.seriesIndex,sg(p,k,A,j)}var ne=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ne)}),this._polyline.onHoverStateChange=ne,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var re=e.get(`triggerEvent`),ie=e.get(`triggerLineEvent`),ae=ie===!0||re===!0||re===`line`,oe=ie===!0||re===!0||re===`area`;this.packEventData(e,f,ae),p&&this.packEventData(e,p,oe)},t.prototype.packEventData=function(e,t,n){Xm(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=bm(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Hw(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Mw(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else aT.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=bm(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else aT.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Nh(this._polyline,e),t&&Nh(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new $w({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new tT({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);K(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=K(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=K(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(WE(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Wf({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=VE(o);c>=0&&(qv(a,Jv(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Aw(i,e):jw(i,n)},enableTextSetter:!0},KE(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=UE(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=HE(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=jm(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=HE(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=iy(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=Jw(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=IE(u.stackedOnCurrent,u.current,n,i,o),d=IE(u.current,null,n,i,o),m=IE(u.stackedOnNext,u.next,n,i,o),p=IE(u.next,null,n,i,o)),NE(d,p)>3e3||c&&NE(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),U_(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),U_(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;q(i)?p=YE[i]:K(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,XE))}}}}}function QE(e){e.registerChartView(qE),e.registerSeriesModel(kw),e.registerLayout(JE(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,ZE(`line`))}var $E=xm(),eD=xm(),tD={estimate:1,determine:2};function nD(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function rD(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:U(aD(n,r),function(t,n){return{formattedLabel:yE(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?oD(e,t):lD(e)}function iD(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:aD(i,r)}:e.type===`category`?cD(e,t):{ticks:r.getTicks(n)}}function aD(e,t){var n=t.getExtent(),r=[];return H(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Um(r,Gm,null),Tp(r),U(r,function(e){return{value:e}})}function oD(e,t){var n=e.getLabelModel(),r=sD(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function sD(e,t,n){var r=dD(e),i=xE(t),a=n.kind===tD.estimate;if(!a){var o=pD(r,i);if(o)return o}var s,c;K(i)?s=bD(e,i,!1):(c=i===`auto`?hD(e,n):i,s=bD(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return mD(r,i,l),!0}):mD(r,i,l),l}function cD(e,t){var n=uD(e),r=xE(t),i=pD(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),K(r))a=bD(e,r,!0);else if(r===`auto`){var s=sD(e,e.getLabelModel(),nD(tD.determine));o=s.labelCategoryInterval,a=U(s.labels,function(e){return e.tick})}else o=r,a=bD(e,o,!0);return mD(n,r,{ticks:a,tickCategoryInterval:o})}function lD(e){var t=e.scale.getTicks(),n=yE(e);return{labels:U(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var uD=fD(`axisTick`),dD=fD(`axisLabel`);function fD(e){return function(t){return eD(t)[e]||(eD(t)[e]={list:[]})}}function pD(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=dc(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===tD.estimate?(t.out.noPxChangeTryDetermine.push(W(_D,null,e,S,c)),S):vD(e,S,c)??S}function _D(e,t,n){return vD(e,t,n)==null}function vD(e,t,n){var r=$E(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function yD(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function bD(e,t,n){var r=yE(e),i=e.scale,a=[],o=K(t);return HT(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var xD=xm();function SD(e){xD(e).prepare={}}function CD(e){xD(e).fullUpdate={}}function wD(e){return xD(e).prepare}function TD(e){return xD(e).fullUpdate}var ED=Vm(),DD=xm(),OD=xm();function kD(e,t){var n=e.model,r=DD(TD(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function AD(e,t){return ND(kD(e,t))}function jD(e,t){var n=[];return MD(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Wp(n)&&n>0&&Wp(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*KD,e.w2=e.w*n/r)}var XD=[0,1],ZD=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),vp(e,XD,QD(this),t)},e.prototype.coordToData=function(e,t){var n=vp(e,QD(this),XD,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=U(iD(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(kE(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=$D(this,n,r);return U(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(PT(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),U(this.scale.getMinorTicks(e),function(e){return U(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=nD(tD.determine),rD(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return qD(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=nD(tD.determine),gD(this,e)},e}();function QD(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function $D(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=qD(e).w;if(!i)return!1;H(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var eO=function(e){z(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(ZD),tO=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],nO=1,rO=2,iO=nO|rO;function aO(e,t,n){n||=iO,t?e.dirty|=n:e.dirty&=~n}function oO(e,t){return t||=iO,e.dirty==null||!!(e.dirty&t)}function sO(e){if(e)return oO(e)&&cO(e,e.label,e),e}function cO(e,t,n){var r=t.getComputedTransform();e.transform=Fv(e.transform,r);var i=e.localRect=Pv(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=oy.textMargin);for(var d=0;d<4;d++)lO[d]=u===oy.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===oy.textMargin&&Ev(i,lO,!1,!1);var f=e.rect=Pv(e.rect,i);return r&&f.applyTransform(r),u===oy.minMargin&&Ev(f,lO,!1,!1),e.axisAligned=Mv(r),(e.label=e.label||{}).ignore=t.ignore,aO(e,!1),aO(e,!0,rO),e}var lO=[0,0,0,0];function uO(e,t,n){return e.transform=Fv(e.transform,n),e.localRect=Pv(e.localRect,t),e.rect=Pv(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Mv(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function dO(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function fO(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Z(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var EO=os(),DO=new Z(0,0,0,0),OO=function(e,t,n,r,i,a){if(wE(e.nameLocation)){var o=a.stOccupiedRect;o&&kO(uO({},o,a.transGroup.transform),r,i)}else AO(a.labelInfoList,a.dirVec,r,i)};function kO(e,t,n){var r=new Ms;hO(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&dO(t,r)}function AO(e,t,n,r){for(var i=Ms.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Mp(r-yO)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),MO=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],NO={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(ks(u,u,l),ks(d,d,l));var p=V({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&eS(r.axis.scale))_O().buildAxisBreakLine(r,i,a,m);else{var h=new v_(V({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));uv(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);q(g)&&(g=[g,g]),(q(_)||so(_))&&(_=[_,_]);var v=Ow(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];H([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=Ew(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){HO(t,i,s)&&PO(e,t,n,r,i,a,o,tD.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){HO(t,i,s)&&PO(e,t,n,r,i,a,o,tD.determine);var c=BO(e,i,a,r);LO(e,t.labelLayoutList,c),VO(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(YO(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Ms(0,0),_=new Ms(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=os();_.transform(ds(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*yO/180);var b,x;wE(u)?b=jO.innerTextLayout(e.rotation,y??e.rotation,d):(b=FO(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=mo(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Wf({x:g.x,y:g.y,rotation:b.rotation,silent:jO.isLabelSilent(r),style:Yv(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(kv({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=jO.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Xm(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=sO({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:wE(u)?bO[E]:xO[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function PO(e,t,n,r,i,a,o,s){WO(t)||UO(e,t,i,s,r,o);var c=t.labelLayoutList;KO(e,r,c,a),ZO(r,e.rotation,c);var l=e.optionHideOverlap;IO(r,c,l),l&&mO(to(c,function(e){return e&&!e.label.ignore})),TO(e,n,r,c)}function FO(e,t,n,r){var i=jp(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Mp(i-yO/2)?(o=c?`bottom`:`top`,a=`center`):Mp(i-yO*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=iyO/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function IO(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(SE(r))return;function a(e,a,o){var s=sO(t[a]),c=sO(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=SO(s.label).labelInfo.tick;if(MT(l)&&u.notNice||PT(l)&&u.offInterval){RO(s.label);return}}if(e===!1||s.suggestIgnore){RO(s.label);return}if(c.suggestIgnore){RO(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=fO({marginForce:f},s),c=fO({marginForce:f},c)}hO(s,c,null,{touchThreshold:d})&&RO(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function LO(e,t,n){e.showMinorTicks||H(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=sk(e,t.get(`startValue`,!0)),x=b!=null;!Wp(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Wp(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),ok(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),ok(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function ok(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Bm(t))}function sk(e,t){return t==null?null:po(t)?NaN:e.parse(t)}function ck(e,t){var n;if(PT(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=G(r)?r:[r,r]}return[lk(n[0]),lk(n[1])]}function lk(e){return hc(typeof e==`boolean`?0:e,1)||0}function uk(e){var t=rk(e.scale);return t.extent||=Mm(),t}function dk(e,t){uk(e).dimIdxInCoord=t.get(e.dim)}function fk(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||pk(n,e,i,r,t)}function pk(e,t,n,r,i){var a=uk(t),o=a.extent,s=!1;PD(t,function(r){if(r.boxCoordinateSystem){var i=nx(r).coord,c=a.dimIdxInCoord;if(c>=0&&G(i)){var l=i[c];l!=null&&!G(l)&&Nm(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;H(CE(u,n),function(e){Im(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=yk(e,t,r);hk(e,new ak(e,r,o,s,c),i),a.extent=null}function mk(e,t){var n=e.scale;hk(n,new ak(n,e.model,t,!1,!1),ik)}function hk(e,t,n){e.rawExtentInfo=t,t.from=n}function gk(e,t){_k.set(e,t)}var _k=X();function vk(e,t,n,r,i){e.rawExtentInfo||mk({scale:e,model:t},i||Mm());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function yk(e,t,n){var r=AE(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return RD(t,function(e){a=!!_k.get(e)||a}),a}function bk(e,t,n,r){if(n.ctnShp){var i;if(RD(e,function(t){var n=_k.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Pm(i,a[0]),Fm(i,a[1]),_E(e))}}),i){var a=t.getExtent();if(PT(t))e.onBand||t.setExtent2(1,sp(a[0],a[0]+i[0]),cp(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=sp(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=cp(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function xk(){BD(`liPosMinGap`,Sk)}function Sk(e,t,n){var r=X(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=mb(u);function f(n){ID(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Kw(Ck,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var Ck=Kw({ctor:Ww},50);function wk(e){return function(t,n){var r=qD(t,{fromStat:{key:e}});if(Wp(r.w2))return[-r.w2/2,r.w2/2]}}function Tk(e,t){return e+`|&`+t}function Ek(e){return xk(),{liPosMinGap:!PT(e.scale)}}function Dk(e,t,n,r){WD(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Ek})}function Ok(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var kk={left:0,right:0,top:0,bottom:0},Ak=[`25%`,`25%`],jk=`cartesian2d`,Mk=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=aC(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&iC(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&iC(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:kk,outerBoundsContain:`all`,outerBoundsClampWidth:Ak[0],outerBoundsClampHeight:Ak[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(cC),Nk=Vm(),Pk=`__ec_stack_`;function Fk(e){return e.get(`stack`)||Pk+e.seriesIndex}function Ik(e,t){var n=Lk(e,t);return n.columnMap=Rk(n),n}function Lk(e,t){var n=Tk(t,jk),r=[],i=qD(e,{fromStat:{key:n},min:1});return FD(e,n,function(e){r.push({barWidth:yp(e.get(`barWidth`),i.w),barMaxWidth:yp(e.get(`barMaxWidth`),i.w),barMinWidth:yp(e.get(`barMinWidth`)||(Vk(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Fk(e)})}),{bandWidthResult:i,seriesInfo:r}}function Rk(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};H(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;ko(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=sp(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=cp(35-o.length*4,15)+`%`;var c=yp(i,t),l=yp(a,1),u=(n-c)/(r+(r-1)*l);u=cp(u,0),H(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=sp(o,i)),a&&(o=cp(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&io&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=cp(u,0);var d=0,f;H(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return H(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function zk(e){return{seriesType:e,overallReset:function(t){var n=Tk(e,jk);LD(t,n,function(t){var r=Ik(t,e);FD(t,n,function(e){var t=r.columnMap[Fk(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function Bk(e){return{seriesType:e,plan:nT(),reset:function(e){if($O(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=dx(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Ok(i))),p=Vk(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&Gw(r*3),c=p&&s&&Gw(r*3),l=p&&Gw(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,lp(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(dw);dw.registerClass(Wk);var Gk=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return hx(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=qm(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Sx(Wk.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Wk),Kk=`\0__throttleOriginMethod`,qk=`\0__throttleRate`,Jk=`\0__throttleType`;function Yk(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Xk(e,t,n,r){var i=e[t];if(i){var a=i[Kk]||i,o=i[Jk];if(i[qk]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Yk(a,n,r===`debounce`),i[Kk]=a,i[Jk]=r,i[qk]=n}return i}}function Zk(e,t){var n=e[t];n&&n[Kk]&&(n.clear&&n.clear(),e[t]=n[Kk])}var Qk=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),$k=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new Qk},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){J_(t,e,Xm(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(aT),cA={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=aA(t.x,e.x),s=oA(t.x+t.width,i),c=aA(t.y,e.y),l=oA(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=oA(t.r,e.r),a=aA(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},lA={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new zf({shape:V({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?$k:s_,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=eA(vA(i),{isRoundCap:l===$k}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?U_:W_)(u,{shape:p},a)}return u}};function uA(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function dA(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?U_:W_)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?U_:W_)(n,{shape:l},u,i)}function fA(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function _A(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function vA(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function yA(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;V(u,iA(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?OA(i,a.coordinateSystem):kA(i,a.coordinateSystem),p=Jv(r);qv(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Aw(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,tA(e,h===`outside`?f:h,vA(o),r.get([`label`,`rotate`]))}ay(m,p,a.getRawValue(n),function(e){return jw(t,e)});var g=r.getModel([`emphasis`]);sg(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),dg(e,r),_A(i)&&(e.style.fill=`none`,e.style.stroke=`none`,H(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function bA(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var xA=function(){function e(){}return e}(),SA=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new xA},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function TA(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function EA(e,t,n){if(mT(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function DA(e,t,n){return new(e.type===`polar`?s_:zf)({shape:EA(t,n,e),silent:!0,z2:0})}function OA(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function kA(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function AA(e){e.registerChartView(sA),e.registerSeriesModel(Gk),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,zk(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Bk(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,ZE(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),Uk(e)}function jA(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),PA=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),FA=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new PA(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new PA(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new PA(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new PA(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new PA(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new PA(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),IA=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,LA=[],RA=No.browser.firefox&&+No.browser.version.split(`.`)[0]<39;function zA(e,t,n,r){return n||={},r?BA(e,t,n):RA&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?BA(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function BA(e,t,n){if(No.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Px(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(jx(LA,e,r,i)){n.zrX=LA[0],n.zrY=LA[1];return}}n.zrX=n.zrY=0}function VA(e){return e||window.event}function HA(e,t,n){if(t=VA(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&zA(e,i,t,n)}else{zA(e,t,t,n);var a=UA(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&IA.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function UA(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function WA(e,t,n,r){e.addEventListener(t,n,r)}function GA(e,t,n,r){e.removeEventListener(t,n,r)}var KA=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function qA(e){return e.which===2||e.which===3}var JA=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=YA(r)/YA(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=XA(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},QA=`silent`;function $A(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ej}}function ej(){KA(this.event)}var tj=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Vu),nj=function(){function e(e,t){this.x=e,this.y=t}return e}(),rj=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],ij=new Z(0,0,0,0),aj=function(e){z(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new nj(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new tj,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new FA(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(H(rj,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=cj(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new nj(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new nj(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=$A(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new nj(e,t);if(sj(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Z(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(ij.copy(u.getBoundingRect()),u.transform&&ij.applyTransform(u.transform),ij.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function oj(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||QA}return!1}function sj(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=oj(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==QA)){t.target=o;break}}}function cj(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var lj=32,uj=7;function dj(e){for(var t=0;e>=lj;)t|=e&1,e>>=1;return e+t}function fj(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function pj(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function hj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function gj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function _j(e,t){var n=uj,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=uj||m>=uj);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-hj(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=uj||g>=uj);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),mj(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var yj=!1;function bj(){yj||(yj=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function xj(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Sj=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=xj}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Cj=No.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function wj(){return new Date().getTime()}var Tj=function(e){z(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=wj()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Cj(t),!e._paused&&e.update())}Cj(t)},t.prototype.start=function(){this._running||(this._time=wj(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=wj(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=wj()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Bu(e,t.loop);return this.addAnimator(n),n},t}(Vu),Ej=300,Dj=No.domSupported,Oj=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:U(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),kj={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Aj=!1;function jj(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Mj(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Nj(e){e&&(e.zrByTouch=!0)}function Pj(e,t){return HA(e.dom,new Ij(e,t),!0)}function Fj(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Ij=function(){function e(e,t){this.stopPropagation=Ao,this.stopImmediatePropagation=Ao,this.preventDefault=Ao,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Lj={mousedown:function(e){e=HA(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=HA(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=HA(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=HA(this.dom,e);var t=e.toElement||e.relatedTarget;Fj(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Aj=!0,e=HA(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Aj||(e=HA(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=HA(this.dom,e),Nj(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Lj.mousemove.call(this,e),Lj.mousedown.call(this,e)},touchmove:function(e){e=HA(this.dom,e),Nj(e),this.handler.processGesture(e,`change`),Lj.mousemove.call(this,e)},touchend:function(e){e=HA(this.dom,e),Nj(e),this.handler.processGesture(e,`end`),Lj.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!gm(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[dM],e},t.prototype.setTheme=function(e){this._theme=new _y(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function wM(e,t){return e.join(`,`)===t.join(`,`)}var TM=H,EM=J,DM=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function OM(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=DM.length;n0?e[n-1].seriesModel:null)}),ZM(e))})}function ZM(e){H(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=kp(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var QM=function(){function e(){this.group=new Bg,this.uid=yx(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Vo(QM),Jo(QM);var $M=xm(),eN={itemStyle:Yo(my,!0),lineStyle:Yo(dy,!0)},tN={lineStyle:`stroke`,itemStyle:`fill`};function nN(e,t){return e.visualStyleMapper||eN[t]||(console.warn(`Unknown style type '`+t+`'.`),eN.itemStyle)}function rN(e,t){return e.visualDrawType||tN[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var iN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=nN(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=rN(e,r),c=a[s],l=K(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||K(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||K(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=V({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},aN=new _y,oN={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=nN(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){aN.option=n[r];var o=i(aN);V(e.ensureUniqueItemVisual(t,`style`),o),aN.option.decal&&(e.setItemVisual(t,`decal`,aN.option.decal),aN.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},sN={performRawSeries:!0,overallReset:function(e){var t=X();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();$M(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=$M(e).scope,a=rN(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},cN=Math.PI;function lN(e,t){t||={},Ya(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Bg,r=new zf({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Wf({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new zf({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new w_({shape:{startAngle:-cN/2,endAngle:-cN/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:cN*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:cN*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var uN=function(){function e(e,t,n,r){this._stageTaskMap=X(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):qm(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=X();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;H(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});vo(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;H(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=X(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||bC({plan:hN,reset:gN,count:yN}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||bC({reset:dN});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=X(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;vo(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):H(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,bC({reset:fN,onDirty:mN})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return K(e)&&(e={overallReset:e,seriesType:bN(e)}),e.uid=yx(`stageHandler`),t&&(e.visualType=t),e},e}();function dN(e){e.overallReset(e.ecModel,e.api,e.payload)}function fN(e){return e.dirtyOnOverallProgress&&pN}function pN(){this.agent.dirty(),this.getDownstream().dirty()}function mN(){this.agent&&this.agent.dirty()}function hN(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function gN(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=em(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?U(t,function(e,t){return vN(t)}):_N}var _N=vN(0);function vN(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),AN=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],jN=AN.concat([`symbolKeepAspect`]),MN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&qN(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function XN(e,t,n){for(var r=t.type===`radial`?YN(e,t,n):JN(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:so(e)?[e]:G(e)?e:null}function tP(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&eP(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=U(n,function(e){return e/i}),r/=i)}return[n,r]}var nP=new $d(!0);function rP(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function iP(e){return typeof e==`string`&&e!==`none`}function aP(e){var t=e.fill;return t!=null&&t!==`none`}function oP(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function sP(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function cP(e,t,n){var r=rs(t.image,t.__image,n);if(as(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*jo),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function lP(e,t,n,r,i){var a,o=rP(n),s=aP(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||nP,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?XN(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?XN(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?cP(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?cP(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=tP(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&sP(e,n),s&&oP(e,n)):(s&&oP(e,n),o&&sP(e,n)),T&&e.setLineDash([])}function uP(e,t,n){var r=t.__image=rs(n.image,t.__image,t,t.onload);if(r&&as(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function dP(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=tP(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(rP(n)&&e.strokeText(i,n.x,n.y),aP(n)&&e.fillText(i,n.x,n.y)):(aP(n)&&e.fillText(i,n.x,n.y),rP(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var fP=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],pP=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function mP(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){TP(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?fd.opacity:o}(r||t.blend!==n.blend)&&(a||=(TP(e,i),!0),e.globalCompositeOperation=t.blend||fd.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[aF]){if(this._disposed){this.id;return}var r,i,a;if(J(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[aF]=!0,LF(this),!this._model||t){var o=new bM(this._api),s=this._theme,c=this._model=new pM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},GF);var l={seriesTransition:a,optionChanged:!0};if(n)this[sF]={silent:r,updateParams:l},this[aF]=!1,this.getZr().wakeUp();else{try{yF(this),SF.update.call(this,null,l)}catch(e){throw this[sF]=null,this[aF]=!1,e}this._ssr||this._zr.flush(),this[sF]=null,this[aF]=!1,EF.call(this,r),DF.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[aF]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[sF]&&(r??=this[sF].silent,i=this[sF].updateParams,this[sF]=null),this[aF]=!0,LF(this);try{this._updateTheme(e),n.setTheme(this._theme),yF(this),SF.update.call(this,{type:`setTheme`},i)}catch(e){throw this[aF]=!1,e}this[aF]=!1,EF.call(this,r),DF.call(this,r)}}},t.prototype._updateTheme=function(e){q(e)&&(e=qF[e]),e&&(e=B(e),e&&JM(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||No.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return H(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;H(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return H(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(XF[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();H(YF,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(B(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=ja.createCanvas(),h=Xj(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return H(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new zf({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),H(u,function(e){var t=new jf({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return CF(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return CF(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return CF(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return H(Cm(n,e),function(e,n){n.indexOf(`Models`)>=0&&H(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Cm(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?FN(i,t):PN(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;H(BF,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&LN(i,function(e){var t=Xm(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=V({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;H(UF,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),MA(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Om(this.getDom(),QF,``);var e=this,t=e._api,n=e._model;H(e._componentsViews,function(e){e.dispose(n,t)}),H(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete YF[e.id]},t.prototype.resize=function(e){if(!this[aF]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[sF]&&(r??=this[sF].silent,n=!0,this[sF]=null),this[aF]=!0,LF(this);try{n&&yF(this),SF.update.call(this,{type:`resize`,animation:V({duration:0},e&&e.animation)})}catch(e){throw this[aF]=!1,e}this[aF]=!1,EF.call(this,r),DF.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(J(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),JF[e]){var n=JF[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=V({},e);return t.type=HF[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(J(t)||(t={silent:!!t}),VF[e.type]&&this._model){if(this[aF]){this._pendingActions.push(e);return}var n=t.silent;TF.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&No.browser.weChat&&this._throttledZrFlush(),EF.call(this,n),DF.call(this,n)}},t.prototype.updateLabelLayout=function(){RN.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){yF=function(e){SD(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),bF(e,!0),bF(e,!1),t.plan()},bF=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cY(t.get(`hoverLayerThreshold`),aM.hoverLayerThreshold)&&!No.node&&!No.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Iv(e);t.eachRendered(function(e){return Rv(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!G_(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(G_(e))return;if(e instanceof Tf&&_g(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}NF=function(e){return new(function(t){z(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Hh(t,n),FF(e)},n.prototype.leaveEmphasis=function(t,n){Uh(t,n),FF(e)},n.prototype.enterBlur=function(t){Wh(t),FF(e)},n.prototype.leaveBlur=function(t){Gh(t),FF(e)},n.prototype.enterSelect=function(t){Kh(t),FF(e)},n.prototype.leaveSelect=function(t){qh(t),FF(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[oF]},n.prototype.usingTHL=function(){return e._usingTHL},n}(lh))(e)},PF=function(e){function t(e,t){for(var n=0;n=0)){dI.push(n);var o=uN.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function pI(e,t){JF[e]=t}function mI(e,t,n){var r=VN(`registerMap`);r&&r(e,t,n)}var hI=AC;uI(XP,iN),uI($P,oN),uI($P,sN),uI(XP,MN),uI($P,NN),uI(rF,zP),nI(JM),rI(UP,YM),pI(`default`,lN),sI({type:_h,event:_h,update:_h},Ao),sI({type:vh,event:vh,update:vh},Ao),sI({type:yh,event:Sh,update:yh,action:Ao,refineEvent:gI,publishNonRefinedEvent:!0}),sI({type:bh,event:Sh,update:bh,action:Ao,refineEvent:gI,publishNonRefinedEvent:!0}),sI({type:xh,event:Sh,update:xh,action:Ao,refineEvent:gI,publishNonRefinedEvent:!0});function gI(e,t,n,r){return{eventContent:{selected:ig(n),isFromClick:t.isFromClick||!1}}}tI(`default`,{}),tI(`dark`,ON);var _I=[],vI={registerPreprocessor:nI,registerProcessor:rI,registerPostInit:iI,registerPostUpdate:aI,registerUpdateLifecycle:oI,registerAction:sI,registerCoordinateSystem:cI,registerLayout:lI,registerVisual:uI,registerTransform:hI,registerLoading:pI,registerMap:mI,registerImpl:BN,PRIORITY:iF,ComponentModel:cC,ComponentView:QM,SeriesModel:dw,ChartView:aT,registerComponentModel:function(e){cC.registerClass(e)},registerComponentView:function(e){QM.registerClass(e)},registerSeriesModel:function(e){dw.registerClass(e)},registerChartView:function(e){aT.registerClass(e)},registerCustomSeries:function(e,t){UN(e,t)},registerSubTypeDefaulter:function(e,t){cC.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Zj(e,t)}};function yI(e){if(G(e)){H(e,function(e){yI(e)});return}Xa(_I,e)>=0||(_I.push(e),K(e)&&(e={install:e}),e.install(vI))}var bI=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),xI=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Tm).models[0]},t.type=`cartesian2dAxis`,t}(cC);Qa(xI,bI);var SI={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},CI=qa({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},SI),wI=qa({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},SI),TI={category:CI,value:wI,time:qa({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},wI),log:Ya({logBase:10},wI)};function EI(e,t,n,r){H(fE,function(i,a){var o=qa(qa({},TI[a],!0),r,!0),s=function(e){z(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=rC(this),r=n?aC(e):{};qa(e,t.getTheme().get(a+`Axis`)),qa(e,this.getDefaultOption()),e.type=DI(e),n&&iC(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=_T.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=_O();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,DI)}function DI(e){return e.type||(e.data?`category`:`value`)}var OI=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return U(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),to(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),kI=[`x`,`y`];function AI(e){return(e.type===`interval`||e.type===`time`)&&!eS(e)}var jI=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=jk,t.dimensions=kI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(AI(e)&&AI(t)){var n=wT(e,null),r=wT(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=ps([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Z(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return ks(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return ks(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Z(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(OI);function MI(e,t){var n=e.scale,r=e.model,i=vk(n,r,r.ecModel,e,null),a=NT(n),o=NT(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=lp(l[0].value-l[1].value),g=lp(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(P(),k=wp(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=wp(fp(C[0]/E)*E,D),O=wp(dp(C[1]/E)*E,D);var e=up((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=dp(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}OE(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function NI(e,t){var n=NT(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=zT(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?FI(r,t):PI(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=IT(d)),i[0]||(s[0]=wp(dp(s[0]/u)*u,l)),i[1]||(s[1]=wp(fp(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),OE(e,i,o,s,a,c)}function PI(e,t){var n=VT(t.splitNumber,5),r=ET(e),i=t.minInterval,a=t.maxInterval,o=Lp(r/n,!0);i!=null&&oa&&(o=a);var s=IT(o),c=e.getExtent(),l=[wp(fp(c[0]/o)*o,s),wp(dp(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function FI(e,t){var n=VT(t.splitNumber,10),r=e.getExtent(),i=ET(e),a=cp(Fp(i),1);n/i*a<=.5&&(a*=10);var o=IT(a),s=[wp(fp(r[0]/a)*a,o),wp(dp(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function II(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;LI(t,n,r,i,null)}function LI(e,t,n,r,i){var a=vk(e,t,r,n,i),o=jT(e)||MT(e);RI(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&bk(n,e,a,r)}function RI(e,t){zI[e.type](e,t)}var zI={interval:NI,log:NI,time:iE,ordinal:Ao},BI=[[3,1],[0,2]],VI=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=kI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;H(this._axesList,function(e){fk(e,1);var t=e.scale;PT(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=ro(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):II(i)}H(n,function(e){KI(e,e.__alignTo)?II(e):MI(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};H(n.x,function(e){UI(n,`y`,e,i)}),H(n.y,function(e){UI(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=tC(e,t),i=this._rect=QS(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(JI(a,i),!n){var c=QI(i,o,a,s,t),l=void 0;if(s)XI?(XI(this._axesList,i),JI(a,i)):l=ZI(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=eL(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=ZI(d,f,p,i,a,c,r))}$I(i,a,tD.determine,null,l,r),H(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}J(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];AT(a.scale)&&EE(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&H(r,function(e){e.__alignTo=n})}function KI(e,t){return eS(e.scale)||eS(t.scale)||t.scale.getTicks().length<2}function qI(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function JI(e,t){H(e.x,function(e){return YI(e,t.x,t.width)}),H(e.y,function(e){return YI(e,t.y,t.height)})}function YI(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),qI(e,t)}var XI;function ZI(e,t,n,r,i,a,o){$I(r,i,tD.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=no(s,function(e){return e>0})==null;return Ev(r,s,!0,!0,n),JI(i,r),c;function l(e){H(i[Q_[e]],function(t){if(TE(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!po(t)&&t>1e-4&&(e/=t),e}}function QI(e,t,n,r,i){var a=new wO(tL);return H(n,function(n){return H(n,function(n){if(TE(n.model)){var o=!r;n.axisBuilder=tk(e,t,n.model,i,a,o)}})}),a}function $I(e,t,n,r,i,a){var o=n===tD.determine;H(t,function(t){return H(t,function(t){TE(t.model)&&(nk(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Q_[1-t]]=e[$_[t]]<=a.refContainer[$_[t]]*.5?0:1-t==1?2:1}H(t,function(e,t){return H(e,function(e){TE(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function eL(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=QS(e.get(`outerBounds`,!0)||kk,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||Xa([`all`,`axisLabel`],a)<0?`all`:a,s=[xp(Y(e.get(`outerBoundsClampWidth`,!0),Ak[0]),t.width),xp(Y(e.get(`outerBoundsClampHeight`,!0),Ak[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var tL=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;OO(e,t,n,r,i,a),wE(e.nameLocation)||H(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&AO(e.labelInfoList,e.dirVec,r,i)})};function nL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return rL(n,e,t),n.seriesInvolved&&aL(n,e),n}function rL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];H(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=fL(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(H(n.getAxes(),ao(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&H(f.baseAxes,ao(p,!d||`cross`,u)),d&&H(f.otherAxes,ao(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||dL(d))){s??=d.get(`triggerTooltip`),d=r?iL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=fL(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:dL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=oL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function iL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};H(s,function(e){c[e]=B(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&Ya(l,u.textStyle)}return e.model.getModel(`axisPointer`,new _y(c,n,r))}function aL(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&H(e.coordSysAxesInfo[fL(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function oL(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function cL(e){var t=lL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=dL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(DL(this._zr,`globalPan`)||jL(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(KA(r.event),r.__ecRoamConsumed=!0,RL(e,t,n,r,i))},t}(Vu);function jL(e){return e.__ecRoamConsumed}var ML=xm();function NL(e){var t=ML(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function PL(e,t,n,r){for(var i=NL(e).roam,a=i[t]=i[t]||[],o=0;o1e-6;AR[0]=o?(i[0]-r.x)/a:i[0],AR[1]=o?(i[1]-r.y)/a:i[1],ks(AR,AR,e.mtRawInv);var s=ER(e,AR);jR(t,s,a),H(n,function(e){e!==t&&jR(e,s.slice(),a)})}var AR=[];function jR(e,t,n){var r=e.option;r.center=t,r.zoom=n}function MR(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function NR(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=BL(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function PR(e,t,n,r,i,a,o,s){if(!xR(e)){n.disable();return}n.enable(Y(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Bv(Ya({type:IR(r,e.subType,sh)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}new Z(0,0,0,0);function FR(e,t,n){var r=IR(t,n,sh);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Dm(e,t,n),function(t){bR(e,t),SR(e,t,r,i)})})}function IR(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function LR(e){return e.zoom!=null}function RR(e,t,n,r,i,a,o){var s=new HL(null,OR(e.ecModel,t));return $L(s,n,r,i,a),o?eR(s,o.x,o.y,o.width,o.height):eR(s,n,r,i,a),QL(s,e),s}var zR=xm();function BR(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,qR(t,n,e),H(n,function(n){H(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,ao(VR,e))})}),t.wrapMethod(`cloneShallow`,ao(UR,e)),H(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,ao(HR,e))}),vo(n[t.dataType]===t)}function VR(e,t){if(KR(this)){var n=V({},zR(this).datas);n[this.dataType]=t,qR(t,n,e)}else JR(t,this.dataType,zR(this).mainData,e);return t}function HR(e,t){return e.struct&&e.struct.update(),t}function UR(e,t){return H(zR(t).datas,function(n,r){n!==t&&JR(n.cloneShallow(),r,t,e)}),t}function WR(e){var t=zR(this).mainData;return e==null||t==null?t:zR(t).datas[e]}function GR(){var e=zR(this).mainData;return e==null?[{data:e}]:U(ro(zR(e).datas),function(t){return{type:t,data:zR(e).datas[t]}})}function KR(e){return zR(e).mainData===e}function qR(e,t,n){zR(e).datas={},H(t,function(t,r){JR(t,r,e,n)})}function JR(e,t,n,r){zR(n).datas[t]=e,zR(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=WR,e.getLinkedDataAll=GR}var YR=H,XR=J,ZR=-1,QR=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=B(t);this.type=r,this.mappingMethod=n,this._normalizeData=uz[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(tz(i),$R(i)):n===`category`?i.categories?ez(i):tz(i,!0):(vo(n!==`linear`||i.dataExtent),tz(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return W(this._normalizeData,this)},e.listVisualTypes=function(){return ro(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){J(e)?H(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=G(t)?[]:J(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&YR(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(G(e))e=e.slice();else if(XR(e)){var t=[];YR(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function tz(e,t){var n=e.visual,r=[];J(n)?YR(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),lz(e,r)}function nz(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:sz([0,1])}}function rz(e){var t=this.option.visual;return t[Math.round(vp(e,[0,1],[0,t.length-1],!0))]||{}}function iz(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function az(e){var t=this.option.visual;return t[this.option.loop&&e!==ZR?e%t.length:e]}function oz(){return this.option.visual[0]}function sz(e){return{linear:function(t){return vp(t,e,this.option.visual,!0)},category:az,piecewise:function(t,n){var r=cz.call(this,n);return r??=vp(t,e,this.option.visual,!0),r},fixed:oz}}function cz(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[QR.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function lz(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=U(t,function(e){return zl(e)||[0,0,0,1]})),t}var uz={linear:function(e){return vp(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=QR.findPieceIndex(e,t,!0);if(n!=null)return vp(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??ZR},fixed:Ao};function dz(e,t,n){return e?t<=n:t=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof mz||(t=this._nodesMap[fz(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),hz=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=X(),t=X();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function gz(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Qa(mz,gz(`hostGraph`,`data`)),Qa(hz,gz(`hostGraph`,`edgeData`));function _z(e,t,n,r,i){for(var a=new pz(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=hx(e,n);else{var h=$b.get(p),g=h&&h.dimensions||[];Xa(g,`value`)<0&&g.concat([`value`]);var _=Jb(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new qb(_,n),m.initData(e)}var v=new qb([`value`],n);return v.initData(c,s),i&&i(m,v),BR({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var vz=`-->`,yz=function(e){return e.get(`autoCurveness`)||null},bz=function(e,t){var n=yz(e),r=20,i=[];if(so(n))r=n;else if(G(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return sw({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=U(this.option.categories||[],function(e){return e.value==null?V({value:0},e):e}),t=new qb([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return hR(e)&&e},t.type=`series.`+kz,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Q.color.primary}}},t}(dw);function jz(e){return e instanceof Array||(e=[e,e]),e}var Mz=Jm(kz,Nz);function Nz(e){e.eachSeriesByType(kz,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=jz(e.get(`edgeSymbol`)),i=jz(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=jz(r.getShallow(`symbol`,!0)),o=jz(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(V(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function Pz(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),Fz(n,e)}}function Fz(e,t){e.eachEdge(function(e,n){var r=ho(e.getModel().get([`lineStyle`,`curveness`]),-Oz(e,t,n,!0),0),i=gs(e.node1.getLayout()),a=gs(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var Iz=Jm(kz,Lz);function Lz(e,t){e.eachSeriesByType(kz,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];H(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Bg),dB=function(){function e(e){this.group=new Bg,this._LineCtor=e||uB}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=pB(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=pB(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!fB(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function pB(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Jv(t)}}function mB(e){return isNaN(e[0])||isNaN(e[1])}function hB(e){return e&&!mB(e[0])&&!mB(e[1])}var gB=[],_B=[],vB=[],yB=gl,bB=Os,xB=Math.abs;function SB(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){gB[0]=yB(r[0],i[0],a[0],u),gB[1]=yB(r[1],i[1],a[1],u);var d=xB(bB(gB,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function CB(e,t){var n=[],r=bl,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[gs(c[0]),gs(c[1])],c[2]&&c.__original.push(gs(c[2])));var d=c.__original;if(c[2]!=null){if(hs(i[0],d[0]),hs(i[1],d[2]),hs(i[2],d[1]),l&&l!==`none`){var f=zz(e.node1),p=SB(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=zz(e.node2),p=SB(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}hs(c[0],i[0]),hs(c[1],i[2]),hs(c[2],i[1])}else{if(hs(a[0],d[0]),hs(a[1],d[1]),bs(o,a[1],a[0]),ws(o,o),l&&l!==`none`){var f=zz(e.node1);ys(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=zz(e.node2);ys(a[1],a[1],o,-f*t)}hs(c[0],a[0]),hs(c[1],a[1])}})}var wB=xm();function TB(e){if(e)return wB(e).bridge}var EB=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=kz,t}return t.prototype.init=function(e,t){var n=new Rw,r=new dB,i=this.group,a=new Bg;this._controller=new AL(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=xR(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&gR(o,2,i,this._firstRender?null:e),CB(e.getGraph(),Rz(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&PR(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),Hz(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),Fz(e.getGraph(),e),r.updateLayout(e)}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(Xm(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(Xm(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){Wz(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=xR(t);this._active&&r&&(gR(this._mainGroup,2,r,null),LR(e)&&(this._updateNodeAndLinkScale(),CB(t.getGraph(),Rz(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=Rz(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(CB(e.getGraph(),Rz(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=TB(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(WL(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new Bg,o=n.group.children(),s=r.group.children(),c=new Bg,l=new Bg;a.add(l),a.add(c);for(var u=0;ua&&(t[1-r]=kp(t[r],d.sign*a)),t}function NB(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function PB(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var FB=xm(),IB=B,LB=W,RB=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Bg,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=ao(zB,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}UB(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&qD(r).w>o)return!0;if(a){var s=lL(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=FB(e).pointerEl=new X_[i.type](IB(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=FB(e).labelEl=new Wf(IB(t.label));e.add(i),VB(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=FB(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=FB(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),VB(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=xv(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){KA(e.event)},onmousedown:LB(this._onHandleDragMove,this,0,0),drift:LB(this._onHandleDragMove,this),ondragend:LB(this._onHandleDragEnd,this)}),n.add(r)),UB(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);G(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Xk(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){zB(this._axisPointerModel,!t&&this._moveAnimation,this._handle,HB(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(HB(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(HB(r)),FB(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Zk(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function zB(e,t,n,r){BB(FB(n).lastProp,r)||(FB(n).lastProp=r,t?U_(n,r,e):(n.stopAnimation(),n.attr(r)))}function BB(e,t){if(J(e)&&J(t)){var n=!0;return H(t,function(t,r){n&&=BB(e[r],t)}),!!n}return e===t}function VB(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function HB(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function UB(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function WB(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function GB(e,t,n,r,i){var a=qB(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=zS(o.get(`padding`)||0),c=o.getFont(),l=dc(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),KB(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Yv(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function KB(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function qB(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:bE(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};H(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),q(o)?a=o.replace(`{value}`,a):K(o)&&(a=o(s))}return a}function JB(e,t,n){var r=os();return ds(r,r,n.rotation),us(r,r,n.position),mv([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function YB(e,t,n,r,i,a){var o=jO.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),GB(t,r,i,a,{position:JB(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function XB(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function ZB(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function QB(e,t,n){return qD(e,{fromStat:{sers:U(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function $B(e,t,n){return[cp(sp(t[0],t[1]),e-n/2),sp(e+n/2,cp(t[0],t[1]))]}var eV=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=tV(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=WB(r),f=nV[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}YB(t,e,QO(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=QO(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=JB(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=tV(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=sp(o[1],l[c]),l[c]=cp(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(RB);function tV(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var nV={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:XB([t,r[0]],[t,r[1]],rV(e))}},shadow:function(e,t,n,r,i,a){var o=QB(e,i,a),s=r[1]-r[0],c=$B(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ZB([l,r[0]],[u-l,s],rV(e))}}};function rV(e){return e.dim===`x`?0:1}var iV=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Q.color.accent40,throttle:40}},t}(cC),aV=xm(),oV=H;function sV(e,t,n){if(!No.node){var r=t.getZr();aV(r).records||(aV(r).records={}),cV(r,t);var i=aV(r).records[e]||(aV(r).records[e]={});i.handler=n}}function cV(e,t){if(aV(e).initialized)return;aV(e).initialized=!0,n(`click`,ao(dV,`click`)),n(`mousemove`,ao(dV,`mousemove`)),n(`mousewheel`,ao(dV,`mousewheel`)),n(`globalout`,uV);function n(n,r){e.on(n,function(n){var i=fV(t);oV(aV(e).records,function(e){e&&r(e,n,i.dispatchAction)}),lV(i.pendings,t)})}}function lV(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function uV(e,t,n){e.handler(`leave`,null,n)}function dV(e,t,n,r){t.handler(e,n,r)}function fV(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function pV(e,t){if(!No.node){var n=t.getZr();(aV(n).records||{})[e]&&(aV(n).records[e]=null)}}var mV=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;sV(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){pV(`axisPointer`,t)},t.prototype.dispose=function(e,t){pV(`axisPointer`,t)},t.type=`axisPointer`,t}(QM);function hV(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=bm(a,e);if(o==null||o<0||G(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(U(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var gV=xm();function _V(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||W(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){DV(i)&&(i=hV({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=DV(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||DV(i),f={},p={},m={list:[],map:{}},h={showPointer:ao(bV,p),showTooltip:ao(xV,m)};H(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);H(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=TV(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&vV(e,o,h,!1,f)}})});var g={};return H(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&H(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,EV(t),EV(e)))),g[e.key]=a}})}),H(g,function(e,t){vV(u[t],e,h,!0,f)}),SV(p,u,f),CV(m,i,e,o),wV(u,o,n),f}}function vV(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=yV(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&V(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function yV(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return H(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Wp(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),H(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function bV(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function xV(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=fL(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function SV(e,t,n){var r=n.axesInfo=[];H(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function CV(e,t,n,r){if(DV(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function wV(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=gV(r)[i]||{},o=gV(r)[i]={};H(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&H(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}H(a,function(e,t){!o[t]&&c.push(l(e))}),H(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function TV(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function EV(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function DV(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function OV(e){mL.registerAxisPointerClass(`CartesianAxisPointer`,eV),e.registerComponentModel(iV),e.registerComponentView(mV),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!G(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=nL(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},_V)}function kV(e){yI(TL),yI(OV)}function AV(e,t){var n=zS(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new zf({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var jV=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(cC);function MV(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function NV(e){if(No.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function UV(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(No.transformSupported?``+zV+i:`,left`+i+`,top`+i)),RV+`:`+a}function WV(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!No.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=No.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+zV+`:`+o+`;`:[[`top`,0],[`left`,0],[PV,o]]}function GV(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=Y(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),H([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function KV(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=aw(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(UV(a,n,r)),o&&i.push(`background-color:`+o),H([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=RS(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(GV(d)),f!=null&&i.push(`padding:`+zS(f).join(`px `)+`px`),i.join(`;`)+`;`}function qV(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&kx(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var JV=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,No.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(q(i)?document.querySelector(i):uo(i)?i:K(i)&&i(e.getDom()));qV(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;HA(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=LV(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=BV+KV(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+WV(i[0],i[1],!0)+(`border-color:`+GS(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(q(i)&&n.get(`trigger`)===`item`&&!MV(n)&&(o=HV(n,r,i)),q(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,G(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!No.node&&n.getDom()){var i=nH(r,n);this._ticket=``;var a=r.dataByCoordSys,o=sH(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=$V;c.x=r.x,c.y=r.y,c.update(),Xm(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=hV(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(nH(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&tH([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Xm(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;LN(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Xm(e).dataIndex==null?Xm(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=W(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=tH([t.tooltipOption],r),o=this._renderMode,s=[],c=GC(`section`,{blocks:[],noHeader:!0}),l=[],u=new ow;H(e,function(e){H(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=qB(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=GC(`section`,{header:f,noHeader:!yo(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),H(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=bE(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,GS(m.color),o);var h=yC(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=tH([a],r).get(`valueFormatter`);p.blocks.push(_?V({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=ZC(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` - -`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Xm(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=tH([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new ow;h.marker=g.makeTooltipMarker(`item`,GS(h.color),d);var _=yC(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?ZC(y?V({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Xm(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(q(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=B(a),a.content=Lx(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=tH(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new ow;this._showOrMove(d,function(){var n=B(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(q(u)){var p=e.ecModel.get(`useUTC`),m=G(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=yS(m.axisValue,d,p)),d=US(d,n,!0)}else if(K(u)){var g=W(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||G(t))return{color:r||i};if(!G(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),K(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),G(t))n=yp(t[0],s),r=yp(t[1],c);else if(J(t)){var p=t;p.width=l[0],p.height=l[1];var m=QS(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(q(t)&&o){var h=aH(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=rH(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=oH(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=oH(d)?l[1]/2:d===`bottom`?l[1]:0),MV(e)){var h=iH(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&H(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&H(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&H(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&H(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!No.node&&t.getDom()&&(Zk(this,`_updatePosition`),this._tooltipContent.dispose(),pV(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(QM);function tH(e,t,n){var r=t.ecModel,i;n?(i=new _y(n,r,r),i=new _y(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof _y&&(o=o.get(`tooltip`,!0)),q(o)&&(o={formatter:o}),o&&(i=new _y(o,i,r)))}return i}function nH(e,t){return e.dispatchAction||W(t.dispatchAction,t)}function rH(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function iH(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function aH(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function oH(e){return e===`center`||e===`middle`}function sH(e,t,n){var r=wm(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=Em(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Xm(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function cH(e){yI(OV),e.registerComponentModel(jV),e.registerComponentView(eH),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ao),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ao)}var lH=H;function uH(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function dH(e,t,n){var r={};return lH(t,function(t){var a=r[t]=i();lH(e[t],function(e,r){if(QR.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new QR(i),r===`opacity`&&(i=B(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new QR(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function fH(e,t,n){var r;H(n,function(e){t.hasOwnProperty(e)&&uH(t[e])&&(r=!0)}),r&&H(n,function(n){t.hasOwnProperty(n)&&uH(t[n])?e[n]=B(t[n]):delete e[n]})}function pH(e,t,n,r){var i={};return H(e,function(e){i[e]=QR.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return PN(a,l,e)}function c(e,t){IN(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var mH=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},hH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),G(t)&&H(t,function(e,r){q(e)&&(e={type:e}),t[r]=qa(e,mH(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(cC),gH=ao,_H=H,vH=Bg,yH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new vH),this.group.add(this._selectorGroup=new vH),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=tC(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=QS(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=QS(Ya({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=AV(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=X(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),_H(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` -`)){var p=new vH;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,gH(SH,f,null,r,d)).on(`mouseover`,gH(CH,m.name,null,r,d)).on(`mouseout`,gH(wH,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Xm(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=zl(h.fill);_&&_[3]===0&&(_[3]=.2,h=V(V({},h),{fill:ql(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,gH(SH,null,f,r,d)).on(`mouseover`,gH(CH,null,f,r,d)).on(`mouseout`,gH(wH,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Xm(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Xm(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();_H(e,function(e){var r=e.type,i=new Wf({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),qv(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),ag(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=bH(c,r,o,s,d,m,u),y=new vH,b=r.getModel(`textStyle`);if(K(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(xH({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;q(w)&&w?T=w.replace(`{name}`,t??``):K(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Wf({style:Yv(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new zf({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&kv({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),ag(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();XS(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){XS(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(QM);function bH(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),_H(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:NP(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function xH(e){var t=e.icon||`roundRect`,n=Ew(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function SH(e,t,n,r){wH(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),CH(e,t,n,r)}function CH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function wH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function TH(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),EH(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){H(i,function(t,n){e[t?`select`:`unSelect`](n)}),EH(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function EH(e,t){var n=t||{};return H(e.getData(),function(t){var r=t.get(`name`);if(r!==` -`&&r!==``){var i=e.isSelected(r);n[r]=ko(n,r)?n[r]&&i:i}}),n}function DH(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,ao(TH,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,ao(TH,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,ao(TH,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,ao(TH,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,ao(TH,`unSelect`))}var OH=Ym(kH);function kH(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=Y(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new zf({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&U_(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;H([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,q(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=PH[i],o=FH[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(yH);function LH(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function RH(e){yI(AH),e.registerComponentModel(jH),e.registerComponentView(IH),LH(e)}function zH(e){yI(AH),yI(RH)}var BH={get:function(e,t,n){var r=B((VH[e]||{})[t]);return n&&G(r)?r[r.length-1]:r}},VH={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},HH=QR.mapVisual,UH=QR.eachVisual,WH=G,GH=H,KH=Tp,qH=vp,JH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&fH(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=W(e,this),this.controllerVisuals=dH(this.option.controller,t,e),this.targetVisuals=dH(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return GH(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Em(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return U(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){H(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],G(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(q(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(K(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=KH([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=no(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};qa(r,n),qa(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){WH(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},GH(r,function(e,t){if(QR.isValidType(t)){var n=BH.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;GH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&B(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&B(n)||(a?s[0]:[s[0],s[0]])),c.symbol=HH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;UH(l,function(e){e>u&&(u=e)}),c.symbolSize=HH(l,function(e){return qH(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}},t}(cC),YH=[20,140],XH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=YH[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=YH[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):G(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),H(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Tp((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=ZH(this,`outOfRange`,this.getExtent()),n=ZH(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Bg(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);rU([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=nU(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=mv(n.handleLabelPoints[l],pv(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=nU(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=mv(c.indicatorLabelPoint,pv(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||dU(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=ym(u,d);this._dispatchHighDown(`downplay`,tU(f[0],n)),this._dispatchHighDown(`highlight`,tU(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(LN(e.target,function(e){var n=Xm(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function gU(e,t,n,r){for(var i=t.targetVisuals[r],a=QR.prepareVisualTypes(i),o={color:FN(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(pU,mU),H(hU,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(vU))}function SU(e){e.registerComponentModel(XH),e.registerComponentView(cU),xU(e)}var CU=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],wU[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=B(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=U(this._pieceList,function(e){return e=B(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=QR.listVisualTypes(),i=this.isCategory();H(t.pieces,function(e){H(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),H(n,function(e,n){var r=!1;H(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&H(this.stateList,function(e){(t[e]||(t[e]={}))[n]=BH.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,H(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;H(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=B(e)},t.prototype.getValueState=function(e){var t=QR.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){QR.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return H(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Sx(JH.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(JH),wU={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function TU(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var EU=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=mo(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),H(o.viewPieceList,function(o){var s=o.piece,u=new Bg;u.onclick=W(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Wf({style:Yv(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:Y(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),XS(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:tU(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return eU(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Bg,o=this.visualMapModel.textStyleModel;a.add(new Wf({style:Yv(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=U(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=Ew(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=B(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,H(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(QH);function DU(e){e.registerComponentModel(CU),e.registerComponentView(EU),xU(e)}function OU(e){yI(SU),yI(DU)}var kU={label:{enabled:!0},decal:{show:!1}},AU=xm(),jU=xm(),MU=Ym(NU);function NU(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=jU(e).scope||(jU(e).scope={}),i=B(kU);qa(i.label,e.getLocaleModel().get(`aria`),!1),qa(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=X();e.eachSeries(function(e){e.isColorBySeries()||(AU(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(K(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=pC(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=AU(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=pC(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?V(V({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=Ya(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=zU:-c>=zU),f=c>0?c%zU:c%zU+zU,p=!1;p=d?!0:!eu(u)&&f>=RU==!!l;var m=e+n*LU(a),h=t+r*IU(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*BU);if(d){var _=1/this._p,v=(l?1:-1)*(zU-_);this._add(`A`,n,r,g,1,+l,e+n*LU(a+v),t+r*IU(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*LU(o),b=t+r*IU(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function rW(e){return``}function iW(e,t){t||={};var n=t.newline?` -`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return nW(i,a)+(i===`style`?o||``:Lx(o))+(t?``+n+U(t,function(e){return r(e)}).join(n)+n:``)+rW(i)}return r(e)}function aW(e,t,n){n||={};var r=n.newline?` -`:``,i=` {`+r,a=r+`}`,o=U(ro(e),function(t){return t+i+U(ro(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=U(ro(t),function(e){return`@keyframes `+e+i+U(ro(t[e]),function(n){return n+i+U(ro(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function oW(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function sW(e,t,n,r){return tW(`svg`,`root`,{width:e,height:t,xmlns:YU,"xmlns:xlink":XU,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var cW=0;function lW(){return cW++}var uW={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},dW=`transform-origin`;function fW(e,t,n){var r=V({},e.shape);V(r,t),e.buildPath(n,r);var i=new VU;return i.reset(hu(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function pW(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[dW]=n+`px `+r+`px`)}var mW={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function hW(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function gW(e,t,n){var r=e.shape.paths,i={},a,o;if(H(r,function(e){var t=oW(n.zrId);t.animation=!0,vW(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=ro(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=hW(i,n);return a.replace(o,s)}}function _W(e){return q(e)?uW[e]?`cubic-bezier(`+uW[e]+`)`:wl(e)?e:``:``}function vW(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof T_){var s=gW(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return hW(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+lW();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function yW(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};bW(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Xl(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),bW(r,t,n,!0)}}}function bW(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+lW(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var xW=Math.round;function SW(e){return e&&q(e.src)}function CW(e){return e&&K(e.toDataURL)}function wW(e,t,n,r){JU(function(i,a){var o=i===`fill`||i===`stroke`;o&&pu(a)?zW(t,e,i,r):o&&uu(a)?BW(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),RW(n,e,r)}function TW(e,t){var n=$j(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[$U+`silent`]=`true`))}function EW(e){return eu(e[0]-1)&&eu(e[1])&&eu(e[2])&&eu(e[3]-1)}function DW(e){return eu(e[4])&&eu(e[5])}function OW(e,t,n){if(t&&!(DW(t)&&EW(t))){var r=n?10:1e4;e.transform=EW(t)?`translate(`+xW(t[4]*r)/r+` `+xW(t[5]*r)/r+`)`:ru(t)}}function kW(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;vo(f,g),vo(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=rs(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=tW(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=B(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=gu(i);x&&(o.patternTransform=x);var S=tW(`pattern`,``,o,[d]),C=iW(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=tW(`pattern`,T,o,[d])),t[n]=mu(T)}}function VW(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=tW(`clipPath`,a,o,[PW(e,n)])}t[`clip-path`]=mu(a)}function HW(e){return document.createTextNode(e)}function UW(e,t,n){e.insertBefore(t,n)}function WW(e,t){e.removeChild(t)}function GW(e,t){e.appendChild(t)}function KW(e){return e.parentNode}function qW(e){return e.nextSibling}function JW(e,t){e.textContent=t}var YW=58,XW=120,ZW=tW(``,``);function QW(e){return e===void 0}function $W(e){return e!==void 0}function eG(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function tG(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function nG(e){var t,n=e.children,r=e.tag;if($W(r)){var i=e.elm=eW(r);if(aG(ZW,e),G(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,rG(e,m,n,i,c)):iG(e,t,r,a))}function sG(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(aG(e,t),QW(t.text)?$W(r)&&$W(i)?r!==i&&oG(n,r,i):$W(i)?($W(e.text)&&JW(n,``),rG(n,null,i,0,i.length-1)):$W(r)?iG(n,r,0,r.length-1):$W(e.text)&&JW(n,``):e.text!==t.text&&($W(r)&&iG(n,r,0,r.length-1),JW(n,t.text)))}function cG(e,t){if(tG(e,t))sG(e,t);else{var n=e.elm,r=KW(n);nG(t),r!==null&&(UW(r,t.elm,qW(n)),iG(r,[e],0,0))}return t}var lG=0,uG=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=dG(`configLayer`),this.storage=t,this._opts=n=V({},n),this.root=e,this._id=`zr`+lG++,this._oldVNode=sW(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=eW(`svg`);aG(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,cG(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return LW(e,oW(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=oW(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=fG(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=tW(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=U(ro(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(tW(`defs`,`defs`,{},c)),e.animation){var l=aW(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=tW(`style`,`stl`,{},[],l);a.push(u)}}return sW(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},iW(this.renderToVNode({animation:Y(e.cssAnimation,!0),emphasis:Y(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Y(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!a.current)return;let e=$F(a.current,void 0,{renderer:`svg`});o.current=e,e.on(`click`,e=>s.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(a.current),()=>{t.disconnect(),e.dispose(),o.current=null}},[]),(0,L.useEffect)(()=>{o.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,R.jsx)(`div`,{ref:a,className:i?`echart ${i}`:`echart`,style:{height:t,width:`100%`,minWidth:0},role:`img`,"aria-label":n})}function hG(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}function gG(e){return we[e?`dark`:`light`]}function _G(e){let t=e?5:7;return{ok:je[t],warn:Me[t],bad:Oe[t],info:ke[t]}}function vG(e,t){let n=be[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}function yG(e){return e===`unhealthy`?`diamond`:e===`degraded`?`roundRect`:`circle`}function bG(e){return e===`unknown`?`dashed`:`solid`}function xG(e){return e===`unhealthy`?1.25:e===`degraded`?.91:1}function SG(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}function CG(e,t){let n=_G(t),r=String(e).toUpperCase();return r===`ERROR`||r===`FATAL`?n.bad:r===`WARN`||r===`WARNING`?n.warn:r===`INFO`?n.info:gG(t).muted}function wG({label:e,value:t,color:n,hint:r,children:i}){return(0,R.jsxs)(ce,{withBorder:!0,radius:`md`,p:`sm`,bg:`var(--mantine-color-default)`,miw:0,h:`100%`,children:[(0,R.jsx)(y,{c:`dimmed`,size:`xs`,truncate:!0,children:e}),(0,R.jsx)(y,{fw:600,fz:`xl`,c:n,mt:2,lh:1.2,truncate:!0,children:t}),r&&(0,R.jsx)(y,{c:`dimmed`,size:`xs`,mt:2,truncate:!0,children:r}),i&&(0,R.jsx)(se,{mt:4,children:i})]})}var TG={unhealthy:`◆`,degraded:`■`,healthy:`●`,unknown:`○`},EG={unhealthy:`unhealthy`,degraded:`degraded`,healthy:`healthy`,unknown:`health unknown`};function DG({health:e,label:t}){return(0,R.jsxs)(_e,{color:hG(e),variant:`light`,tt:`none`,style:{minWidth:`max-content`},leftSection:(0,R.jsx)(se,{component:`span`,"aria-hidden":!0,style:{fontSize:Ee.micro,lineHeight:1},children:TG[e]??TG.unknown}),children:[t,(0,R.jsxs)(Ge,{children:[` — `,EG[e]??EG.unknown]})]})}function OG({text:e}){return(0,R.jsxs)(A,{py:`xl`,children:[(0,R.jsx)(Fn,{size:20}),(0,R.jsx)(y,{c:`dimmed`,size:`sm`,ml:`xs`,children:e})]})}function kG({retry:e}){return(0,R.jsxs)(A,{py:`xl`,style:{flexDirection:`column`,gap:8},children:[(0,R.jsxs)(se,{display:`flex`,style:{alignItems:`center`,gap:8},children:[(0,R.jsx)(ot,{size:20,weight:`fill`,color:`var(--mantine-color-bad-filled)`}),(0,R.jsx)(y,{c:`bad`,fw:500,size:`sm`,children:`Couldn't load this view`})]}),(0,R.jsx)(ae,{size:`compact-xs`,variant:`light`,color:`bad`,onClick:e,children:`Retry now`}),(0,R.jsx)(y,{c:`dimmed`,size:`xs`,children:`Retrying automatically`})]})}yI([QE]);function AG({values:e,color:t,label:n,format:r}){let i=e.length?Math.max(...e):0,a=(0,L.useMemo)(()=>({animation:!1,grid:{left:0,right:0,top:2,bottom:2},xAxis:{type:`category`,show:!1,data:e.map((e,t)=>t)},yAxis:{type:`value`,show:!1,min:0},tooltip:{show:!1},aria:{enabled:!0,decal:{show:!1},description:n},series:[{type:`line`,data:e,showSymbol:!1,smooth:.3,lineStyle:{width:1.5,color:t},areaStyle:{opacity:.12,color:t}}]}),[e,t,n]);return(0,R.jsxs)(se,{children:[(0,R.jsx)(mG,{option:a,height:28,label:n}),i>0&&r&&(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,ta:`right`,mt:2,children:[`peak `,r(i)]})]})}var jG={unhealthy:0,degraded:1,healthy:2};function MG({widget:e,filters:t,agentAvailable:n,onOpenChat:r}){let i=Se(`overview`,ve(t,e.config,[`service`]));if(i.isError)return(0,R.jsx)(kG,{retry:()=>void i.refetch()});let a=[...i.data?.data.services??[]].sort((e,t)=>(jG[e.health]??3)-(jG[t.health]??3)||t.error_rate-e.error_rate);if(i.data&&a.length===0)return(0,R.jsx)(OG,{text:`No recent activity`});let o=e=>r(`Investigate the ${e} service. Explain its errors and latency.`);return(0,R.jsx)(ze,{type:`auto`,offsetScrollbars:!0,h:`100%`,children:(0,R.jsxs)(Qe,{verticalSpacing:`xs`,fz:`sm`,highlightOnHover:n,children:[(0,R.jsx)(Qe.Thead,{children:(0,R.jsxs)(Qe.Tr,{children:[(0,R.jsx)(Qe.Th,{children:`Service`}),(0,R.jsx)(Qe.Th,{ta:`right`,children:`P95`}),(0,R.jsx)(Qe.Th,{ta:`right`,children:`Errors`})]})}),(0,R.jsx)(Qe.Tbody,{children:a.map(e=>(0,R.jsxs)(Qe.Tr,{...n&&{onClick:()=>o(e.service),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),o(e.service))},tabIndex:0,role:`button`,"aria-label":`Investigate ${e.service}`,style:{cursor:`pointer`}},children:[(0,R.jsx)(Qe.Td,{children:(0,R.jsx)(DG,{health:e.health,label:e.service})}),(0,R.jsx)(Qe.Td,{ta:`right`,children:(0,R.jsx)(y,{component:`span`,size:`sm`,ff:`monospace`,c:Sa(e.p95_ms),children:it(e.p95_ms)})}),(0,R.jsx)(Qe.Td,{ta:`right`,children:(0,R.jsx)(y,{component:`span`,size:`sm`,c:Ca(e.error_rate),children:$e(e.error_rate)})})]},e.service))})]})})}function NG({filters:e,agentAvailable:t,onOpenChat:n}){if(!t)return(0,R.jsx)(y,{c:`dimmed`,size:`sm`,children:`Configure an AI provider to enable this view. The rest of this dashboard remains available.`});let r=Ne(e.window),i=[`Summarize the last ${r}`,`What changed in the last ${r}?`,`Which service needs attention right now?`];return(0,R.jsx)(re,{gap:`xs`,align:`flex-start`,children:i.map(e=>(0,R.jsx)(ae,{variant:`default`,size:`xs`,radius:`xl`,leftSection:(0,R.jsx)(Fe,{size:13,weight:`fill`}),onClick:()=>n(e),children:e},e))})}var PG={overview:[`service`],topology:[`service`],performance:[`service`],logs:[`service`,`severity`,`search`],trace:[`trace_id`,`service`]};function FG(e){return Object.hasOwn(PG,e)?PG[e]:void 0}function IG(e){return(FG(e)?.length??0)>0}function LG({opened:e,widget:t,services:n,onClose:r,onSave:i}){let[a,o]=(0,L.useState)({service:``,severity:``,search:``,trace_id:``});(0,L.useEffect)(()=>{e&&o({service:xe(t.config,`service`),severity:xe(t.config,`severity`),search:xe(t.config,`search`),trace_id:xe(t.config,`trace_id`)})},[e,t.config]);let s=FG(t.type)??[],c=[...new Set([...n,a.service].filter(Boolean))];function l(){let e={...t.config??{}};for(let t of s){let n=a[t].trim();n?e[t]=n:delete e[t]}i(e),r()}return(0,R.jsx)(qe,{opened:e,onClose:r,title:`Configure ${t.title}`,centered:!0,children:(0,R.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),l()},children:(0,R.jsxs)(re,{children:[s.includes(`service`)&&(0,R.jsx)(gn,{label:`Service`,placeholder:`All services`,data:c,value:a.service||null,onChange:e=>o({...a,service:e??``}),clearable:!0,searchable:!0,"aria-label":`Service`}),s.includes(`severity`)&&(0,R.jsx)(gn,{label:`Severity`,placeholder:`All severities`,data:[`ERROR`,`WARN`,`INFO`,`DEBUG`],value:a.severity||null,onChange:e=>o({...a,severity:e??``}),clearable:!0,"aria-label":`Severity`}),s.includes(`search`)&&(0,R.jsx)(I,{label:`Search`,placeholder:`Text the log body must contain`,value:a.search,onChange:e=>o({...a,search:e.currentTarget.value}),"aria-label":`Search`}),s.includes(`trace_id`)&&(0,R.jsx)(I,{label:`Trace id`,placeholder:`Leave empty for the most relevant recent trace`,value:a.trace_id,onChange:e=>o({...a,trace_id:e.currentTarget.value}),ff:`monospace`,"aria-label":`Trace id`}),(0,R.jsxs)(w,{justify:`flex-end`,children:[(0,R.jsx)(ae,{variant:`default`,onClick:r,children:`Cancel`}),(0,R.jsx)(ae,{type:`submit`,children:`Save`})]})]})})})}yI([AA]);function RG({widget:e,filters:t,dark:n}){let r=Se(`logs`,ve(t,e.config,[`service`,`severity`,`search`])),i=r.data,a=(0,L.useMemo)(()=>{if(!i||i.data.buckets.length===0)return null;let e=gG(n),t=i.provenance.window,r=[...new Set(i.data.buckets.map(e=>e.time))],a=[...new Set(i.data.buckets.map(e=>e.severity))],o=new Map(i.data.buckets.map(e=>[`${e.time} ${e.severity}`,e.count]));return{color:a.map(e=>CG(e,n)),grid:{left:28,right:8,top:8,bottom:20},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Ee.micro}},xAxis:{type:`category`,data:r.map(e=>tt(e,t)),axisLabel:{color:e.muted,fontSize:Ee.micro,hideOverlap:!0},axisLine:{lineStyle:{color:e.border}}},yAxis:{type:`value`,minInterval:1,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:Ee.micro}},series:a.map(e=>({name:e,type:`bar`,stack:`logs`,barMaxWidth:14,data:r.map(t=>o.get(`${t} ${e}`)??0),itemStyle:{borderRadius:[2,2,0,0]}}))}},[n,i]);if(r.isError)return(0,R.jsx)(kG,{retry:()=>void r.refetch()});let o=(i?.data.entries??[]).slice(0,5);return i&&o.length===0?(0,R.jsx)(OG,{text:`No matching logs in this window`}):(0,R.jsxs)(re,{gap:`xs`,h:`100%`,children:[a&&(0,R.jsx)(se,{h:72,children:(0,R.jsx)(mG,{option:a,height:72,label:`Log volume by severity`})}),(0,R.jsx)(ze,{type:`auto`,offsetScrollbars:!0,style:{flex:1},children:(0,R.jsx)(Qe,{verticalSpacing:4,fz:`sm`,children:(0,R.jsx)(Qe.Tbody,{children:o.map((e,t)=>(0,R.jsxs)(Qe.Tr,{children:[(0,R.jsx)(Qe.Td,{style:{whiteSpace:`nowrap`},children:(0,R.jsx)(y,{component:`span`,size:`xs`,ff:`monospace`,c:`dimmed`,title:et(e.time),children:i?tt(e.time,i.provenance.window,!0):e.time})}),(0,R.jsx)(Qe.Td,{style:{whiteSpace:`nowrap`},children:(0,R.jsx)(_e,{size:`xs`,color:SG(e.severity),variant:`light`,style:{minWidth:`max-content`},children:e.severity||`LOG`})}),(0,R.jsx)(Qe.Td,{style:{whiteSpace:`nowrap`},children:(0,R.jsx)(y,{component:`span`,size:`sm`,fw:600,children:e.service})}),(0,R.jsx)(Qe.Td,{style:{width:`100%`},children:(0,R.jsx)(y,{size:`sm`,lineClamp:1,title:e.body,children:e.body})})]},`${e.time}-${t}`))})})})]})}function zG({widget:e,filters:t,dark:n}){let r=ve(t,e.config,[`service`]),i=Se(`overview`,r),a=Se(`performance`,r);if(i.isError)return(0,R.jsx)(kG,{retry:()=>void i.refetch()});let o=i.data?.data,s=(a.data?.data.points??[]).map(e=>e.error_rate*100),c=Math.max(o?.service_count??0,1),l=_G(n),u=o?.health===`unknown`,d=o?u?`No data`:o.health.charAt(0).toUpperCase()+o.health.slice(1):`—`;return(0,R.jsxs)(re,{gap:`sm`,children:[(0,R.jsxs)(Tn,{cols:2,spacing:`sm`,children:[(0,R.jsx)(wG,{label:`Health`,value:d,color:o?hG(o.health):void 0,hint:o?u?`No telemetry in this window`:`${nt.format(o.service_count)} services`:void 0}),(0,R.jsx)(wG,{label:`Error rate`,value:o&&!u?$e(o.error_rate):`—`,color:o&&o.error_rate>=.01?`bad`:void 0,hint:o&&!u?`${nt.format(o.total_spans)} operations`:void 0,children:s.length>1&&(0,R.jsx)(AG,{values:s,color:l.bad,label:`Error rate trend`,format:e=>`${e.toFixed(2)}%`})})]}),o&&!u&&(0,R.jsxs)(se,{children:[(0,R.jsxs)(mn.Root,{size:`md`,"aria-label":`Service health distribution`,children:[(0,R.jsx)(mn.Section,{value:o.counts.healthy/c*100,color:`ok`}),(0,R.jsx)(mn.Section,{value:o.counts.degraded/c*100,color:`warn`}),(0,R.jsx)(mn.Section,{value:o.counts.unhealthy/c*100,color:`bad`})]}),(0,R.jsxs)(w,{mt:6,gap:`md`,children:[(0,R.jsx)(BG,{color:`ok`,text:`${o.counts.healthy} healthy`}),(0,R.jsx)(BG,{color:`warn`,text:`${o.counts.degraded} degraded`}),(0,R.jsx)(BG,{color:`bad`,text:`${o.counts.unhealthy} unhealthy`})]})]})]})}function BG({color:e,text:t}){return(0,R.jsxs)(w,{gap:6,children:[(0,R.jsx)(se,{w:8,h:8,bg:e,style:{borderRadius:`50%`}}),(0,R.jsx)(y,{c:`dimmed`,size:`xs`,children:t})]})}yI([QE]);function VG({widget:e,filters:t,dark:n}){let r=Se(`performance`,ve(t,e.config,[`service`])),i=r.data,a=(0,L.useMemo)(()=>{if(!i||i.data.points.length===0)return null;let e=gG(n),t=i.provenance.window;return{color:[vG(`operations`,n),_G(n).warn],grid:{left:36,right:40,top:24,bottom:22},legend:{top:0,left:0,textStyle:{color:e.muted,fontSize:Ee.micro},icon:`circle`,itemWidth:7,itemHeight:7},tooltip:{trigger:`axis`,backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Ee.micro}},xAxis:{type:`category`,data:i.data.points.map(e=>tt(e.time,t)),boundaryGap:!1,axisLine:{lineStyle:{color:e.border}},axisTick:{show:!1},axisLabel:{color:e.muted,fontSize:Ee.micro,hideOverlap:!0}},yAxis:[{type:`value`,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:Ee.micro}},{type:`value`,splitLine:{show:!1},axisLabel:{color:e.muted,fontSize:Ee.micro,formatter:e=>it(e)}}],series:[{name:`Operations`,type:`line`,data:i.data.points.map(e=>e.spans),smooth:.22,showSymbol:!1,lineStyle:{width:2},areaStyle:{opacity:.05}},{name:`P95`,type:`line`,yAxisIndex:1,data:i.data.points.map(e=>e.p95_ms),smooth:.22,showSymbol:!1,lineStyle:{width:2}}]}},[n,i]);if(r.isError)return(0,R.jsx)(kG,{retry:()=>void r.refetch()});if(i&&i.data.points.length===0)return(0,R.jsx)(OG,{text:`No endpoint activity in this window`});let o=(i?.data.endpoints??[]).slice(0,3);return(0,R.jsxs)(re,{gap:`xs`,h:`100%`,children:[a&&(0,R.jsx)(se,{style:{flex:1,minHeight:120},children:(0,R.jsx)(mG,{option:a,height:`100%`,label:`Operations and P95 latency`})}),o.length>0&&(0,R.jsx)(Qe,{verticalSpacing:4,fz:`sm`,children:(0,R.jsx)(Qe.Tbody,{children:o.map(e=>(0,R.jsxs)(Qe.Tr,{children:[(0,R.jsxs)(Qe.Td,{children:[(0,R.jsx)(_e,{variant:`light`,size:`xs`,mr:6,style:{minWidth:`max-content`},children:e.method}),(0,R.jsx)(y,{component:`span`,size:`sm`,ff:`monospace`,children:e.path})]}),(0,R.jsx)(Qe.Td,{ta:`right`,children:(0,R.jsxs)(y,{component:`span`,size:`sm`,c:`dimmed`,children:[nt.format(e.calls),` calls`]})}),(0,R.jsx)(Qe.Td,{ta:`right`,children:(0,R.jsx)(y,{component:`span`,size:`sm`,ff:`monospace`,children:it(e.p95_ms)})})]},`${e.method}-${e.path}`))})})]})}yI([jB]);function HG({widget:e,filters:t,dark:n,onOpenChat:r}){let i=ve(t,e.config,[`service`]),a=Se(`topology`,i),o=a.data?.data,s=(0,L.useMemo)(()=>{if(!o)return null;let e=gG(n),t=_G(n),r=n=>n===`unhealthy`?t.bad:n===`degraded`?t.warn:n===`unknown`?e.muted:t.ok,i=[...o.nodes].sort((e,t)=>e.service.localeCompare(t.service));return{tooltip:{backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Ee.micro}},series:[{type:`graph`,layout:`circular`,circular:{rotateLabel:!1},roam:!1,draggable:!1,label:{show:!0,position:`bottom`,color:e.text,fontSize:Ee.micro},edgeSymbol:[`none`,`arrow`],edgeSymbolSize:6,data:i.map(t=>({id:t.service,name:t.service,value:t.spans,symbol:yG(t.health),symbolSize:xG(t.health)*Math.min(34,18+Math.log10(Math.max(t.spans,1))*4),itemStyle:{color:e.surface,borderColor:r(t.health),borderWidth:3,borderType:bG(t.health)}})),links:o.edges.map(n=>{let r=n.error_rate>=.05;return{source:n.caller,target:n.callee,value:n.calls,lineStyle:{width:r?3.5:Math.min(3,1+Math.log10(Math.max(n.calls,1))),color:r?t.bad:e.muted,opacity:r?.95:.35,curveness:.08}}}),emphasis:{focus:`adjacency`}}]}},[n,o]);return a.isError?(0,R.jsx)(kG,{retry:()=>void a.refetch()}):o&&o.nodes.length===0?(0,R.jsx)(OG,{text:`No service relationships in this window`}):(0,R.jsxs)(re,{gap:4,h:`100%`,children:[s&&(0,R.jsx)(mG,{option:s,height:`100%`,className:`widget-chart`,label:`Service dependency graph`,onClick:e=>{let t=e;t.dataType===`node`&&t.data?.id&&r(`Investigate the ${t.data.id} service. Explain its errors and latency.`)}}),o&&(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,children:[o.nodes.length,` services · `,o.edges.length,` `,o.edges.length===1?`route`:`routes`]})]})}function UG(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function WG({widget:e,filters:t,dark:n}){let r=Se(`trace`,ve(t,e.config,[`trace_id`,`service`]));if(r.isError)return(0,R.jsx)(kG,{retry:()=>void r.refetch()});let i=r.data?.data;if(i&&i.spans.length===0)return(0,R.jsx)(OG,{text:`No traces in this window`});let a=[...i?.spans??[]].sort((e,t)=>t.duration_ms-e.duration_ms).slice(0,6);return(0,R.jsxs)(re,{gap:`sm`,children:[(0,R.jsxs)(Tn,{cols:{base:2,sm:4},spacing:`sm`,children:[(0,R.jsx)(wG,{label:`Duration`,value:i?it(i.duration_ms):`—`}),(0,R.jsx)(wG,{label:`Spans`,value:i?nt.format(i.spans.length):`—`}),(0,R.jsx)(wG,{label:`Services`,value:i?nt.format(i.services.length):`—`}),(0,R.jsx)(wG,{label:`Status`,value:i?i.has_error?`Error`:`OK`:`—`,color:i?i.has_error?`bad`:`ok`:void 0})]}),a.length>0&&(0,R.jsx)(GG,{spans:a,dark:n}),i&&(0,R.jsxs)(w,{gap:4,children:[(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,ff:`monospace`,children:[`Trace `,UG(i.trace_id)]}),(0,R.jsx)(KG,{value:i.trace_id})]})]})}function GG({spans:e,dark:t}){let n=Math.min(...e.map(e=>new Date(e.start).valueOf())),r=Math.max(...e.map(e=>new Date(e.start).valueOf()+e.duration_ms)),i=Math.max(r-n,1);return(0,R.jsx)(re,{gap:4,children:e.map(e=>{let r=(new Date(e.start).valueOf()-n)/i*100,a=Math.max(e.duration_ms/i*100,.6),o=e.status.toUpperCase().includes(`ERROR`);return(0,R.jsxs)(w,{gap:`sm`,wrap:`nowrap`,children:[(0,R.jsxs)(se,{w:170,miw:0,children:[(0,R.jsx)(y,{size:`xs`,fw:600,truncate:!0,children:e.operation}),(0,R.jsx)(y,{c:`dimmed`,size:`xs`,truncate:!0,children:e.service})]}),(0,R.jsx)(Be,{label:`${e.service} · ${e.operation} · ${it(e.duration_ms)}`,withArrow:!0,children:(0,R.jsx)(se,{pos:`relative`,h:10,flex:1,bg:`var(--mantine-color-default-hover)`,style:{borderRadius:`var(--mantine-radius-sm)`},children:(0,R.jsx)(se,{pos:`absolute`,left:`${r}%`,w:`${Math.min(a,100-r)}%`,h:`100%`,bg:o?`bad`:vG(e.service,t),style:{borderRadius:`var(--mantine-radius-sm)`,minWidth:3}})})}),(0,R.jsx)(y,{size:`xs`,ff:`monospace`,w:56,ta:`right`,children:it(e.duration_ms)})]},e.span_id)})})}function KG({value:e}){let{state:t,copy:n}=rt();return(0,R.jsx)(Be,{label:t===`failed`?`Could not copy`:t===`copied`?`Copied`:`Copy trace id`,children:(0,R.jsx)(Xe,{variant:`subtle`,color:`gray`,size:`xs`,"aria-label":`Copy trace id`,"data-state":t===`idle`?void 0:t,onClick:()=>n(e),children:t===`copied`?(0,R.jsx)(E,{size:12,weight:`bold`}):(0,R.jsx)(ne,{size:12})})})}var qG={overview:`System health`,topology:`Service map`,activity:`Recent activity`,assistant:`Ask Fanout`,performance:`Performance`,trace:`Trace focus`,logs:`Logs`},JG={overview:zG,topology:HG,activity:MG,assistant:NG,performance:VG,trace:WG,logs:RG};function YG(){return(0,R.jsx)(OG,{text:`This view type is not supported by this version`})}function XG(e){return Object.hasOwn(JG,e)?JG[e]:YG}function ZG(e){let{widget:t,services:n,onRemove:r,onConfigure:i}=e,[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(!1),[l,u]=(0,L.useState)(!1),d=XG(t.type);return(0,R.jsxs)(ce,{withBorder:!0,radius:`lg`,p:`md`,h:`100%`,className:`widget-card`,style:{overflow:`hidden`},children:[(0,R.jsxs)(re,{h:`100%`,gap:`sm`,children:[(0,R.jsxs)(w,{justify:`space-between`,align:`center`,wrap:`nowrap`,className:`widget-drag`,style:{cursor:`grab`},children:[(0,R.jsx)(P,{order:2,fz:`md`,fw:500,lineClamp:1,miw:0,children:t.title}),(0,R.jsxs)(Pe,{position:`bottom-end`,withinPortal:!0,opened:a,onChange:o,children:[(0,R.jsx)(Pe.Target,{children:(0,R.jsx)(Xe,{className:`widget-actions`,"data-open":a||void 0,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Actions for ${t.title}`,children:(0,R.jsx)(de,{size:18,weight:`bold`})})}),(0,R.jsxs)(Pe.Dropdown,{children:[IG(t.type)&&(0,R.jsx)(Pe.Item,{leftSection:(0,R.jsx)(Ln,{size:15}),onClick:()=>c(!0),children:`Configure`}),(0,R.jsx)(Pe.Item,{color:`bad`,leftSection:(0,R.jsx)(ye,{size:15}),onClick:()=>u(!0),children:`Remove`})]})]})]}),(0,R.jsx)(`div`,{className:`widget-body`,children:(0,R.jsx)(d,{...e})})]}),(0,R.jsx)(LG,{opened:s,widget:t,services:n,onClose:()=>c(!1),onSave:i}),(0,R.jsx)(qe,{opened:l,onClose:()=>u(!1),title:`Remove ${t.title}?`,centered:!0,radius:`md`,children:(0,R.jsxs)(re,{gap:`md`,children:[(0,R.jsx)(y,{size:`sm`,c:`dimmed`,children:`This takes the card off the dashboard for everyone who opens it. You can add it again from Add view, but its size and settings are not kept.`}),(0,R.jsxs)(w,{justify:`flex-end`,gap:`sm`,children:[(0,R.jsx)(ae,{variant:`default`,size:`sm`,onClick:()=>u(!1),children:`Cancel`}),(0,R.jsx)(ae,{color:`bad`,size:`sm`,onClick:()=>{u(!1),r()},children:`Remove`})]})]})})]})}var QG=ha(pa),$G=`fanout.dashboard-id`,eK={layout:[],widgets:[],filters:{window:`1h`,namespace:``}};function tK(e){return Object.hasOwn(ya,e)?ya[e]:void 0}function nK({dashboardID:e=``,agentAvailable:t,onOpenChat:n,onDashboardChange:r,urlFilters:i,onFiltersChange:a}){let o=We(),s=Ue(`light`)===`dark`,c=Ke({queryKey:Ye,queryFn:()=>Je(`/api/dashboards`),refetchInterval:3e4,staleTime:De}),[l,u]=(0,L.useState)(()=>e||localStorage.getItem($G)||``),d=at({mutationFn:async e=>{if(!f.data)throw Error(`No dashboard selected`);let t=await F(`/api/dashboards/${encodeURIComponent(f.data.id)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({name:f.data.name,description:f.data.description,state:e})});if(!t.ok)throw Error(`Unable to save dashboard`);return t.json()},scope:{id:`dashboard-${l}`},onSuccess:e=>{o.setQueryData([`dashboard`,e.id],e),o.invalidateQueries({queryKey:Ye})},onError:e=>console.error(`Dashboard save failed`,e)}),f=Ke({queryKey:[`dashboard`,l],queryFn:()=>Je(`/api/dashboards/${encodeURIComponent(l)}`),enabled:!!l,refetchInterval:d.isPending||d.isError?!1:3e4,staleTime:De}),[p,m]=(0,L.useState)(eK),[h,g]=(0,L.useState)(`lg`),[_,v]=(0,L.useState)(null),b=(0,L.useMemo)(()=>({window:Ae.some(e=>e.value===i?.window)?i.window:p.filters.window,namespace:i?.namespace??p.filters.namespace}),[i?.window,i?.namespace,p.filters.window,p.filters.namespace]),x=Se(`overview`,ve(b),!!f.data),C=(0,L.useMemo)(()=>(x.data?.data.services??[]).map(e=>e.service),[x.data]),T=Ce();(0,L.useEffect)(()=>{e&&e!==l&&(u(e),localStorage.setItem($G,e))},[e,l]),(0,L.useEffect)(()=>{let t=c.data?.dashboards;if(t?.length&&!(e&&t.some(t=>t.id===e))&&!e){if(l&&t.some(e=>e.id===l)){r?.(l,!0);return}D((t.find(e=>e.is_default)??t[0]).id,!0)}},[e,c.data,l]),(0,L.useEffect)(()=>{d.isPending||d.isError||f.data?.state&&m(f.data.state)},[f.data?.updated_at,d.isPending,d.isError]),(0,L.useEffect)(()=>{d.reset()},[l]);let E=(0,L.useMemo)(()=>{let e=new Map(p.widgets.map(e=>[e.id,e.type])),t=p.layout.map(t=>{let n=tK(e.get(t.i)??`overview`)??ya.overview;return{...t,h:Math.max(t.h,n.minH),minW:Math.max(t.minW??0,n.minW),minH:Math.max(t.minH??0,n.minH)}});return{lg:t,md:t,sm:_a(t,6),xs:_a(t,2),xxs:_a(t,1)}},[p.layout,p.widgets]);function D(e,t=!1){u(e),localStorage.setItem($G,e),r?.(e,t)}function O(e){m(e),d.mutate(e)}function k(e){let t=Ie(),n=ya[e],r=xa(p.layout,n.w,n.h,12,n.minW);O({...p,widgets:[...p.widgets,{id:t,type:e,title:qG[e],enabled:!0}],layout:[...p.layout,{i:t,x:r.x,y:r.y,w:r.w,h:n.h,minW:n.minW,minH:n.minH}]})}function A(e){O({...p,filters:e}),a?.(e)}function j(e){O({...p,widgets:p.widgets.filter(t=>t.id!==e),layout:p.layout.filter(t=>t.i!==e)})}function M(e,t){O({...p,widgets:p.widgets.map(n=>n.id===e?{...n,config:t}:n)})}if(c.isLoading||l&&f.isLoading)return(0,R.jsx)(rK,{label:`Loading your dashboard…`});let N=c.data?.dashboards??[];if(e&&N.length>0&&!N.some(t=>t.id===e))return(0,R.jsx)(iK,{onOpenDefault:()=>D((N.find(e=>e.is_default)??N[0]).id,!0)});if(c.isError||f.isError)return(0,R.jsx)(rK,{label:`Your dashboard is unavailable. Try refreshing.`});let ee=f.data;return ee?(0,R.jsxs)(se,{component:`main`,maw:1440,mx:`auto`,px:{base:`md`,sm:`xl`},pt:{base:`lg`,sm:`xl`},pb:`xl`,children:[(0,R.jsxs)(re,{gap:`md`,mb:`lg`,children:[(0,R.jsxs)(se,{children:[(0,R.jsx)(P,{order:1,fz:32,lts:`-0.03em`,children:ee.name}),(0,R.jsx)(y,{c:`dimmed`,mt:2,children:ee.description||`A focused view of the signals that matter now.`})]}),(0,R.jsxs)(ht,{align:{base:`stretch`,md:`center`},justify:`space-between`,direction:{base:`column`,md:`row`},gap:`sm`,role:`group`,"aria-label":`Dashboard controls`,children:[(0,R.jsxs)(w,{gap:`sm`,wrap:`wrap`,children:[(0,R.jsx)(gn,{"aria-label":`Window`,value:b.window,onChange:e=>e&&A({...b,window:e}),data:Ae,w:{base:`100%`,xs:150},size:`sm`}),(0,R.jsx)(I,{"aria-label":`Namespace`,value:_??b.namespace,onChange:e=>v(e.currentTarget.value),onBlur:e=>{v(null),A({...b,namespace:e.currentTarget.value.trim()})},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},placeholder:`All namespaces`,w:{base:`100%`,xs:200},size:`sm`})]}),(0,R.jsxs)(w,{gap:`sm`,wrap:`wrap`,justify:`flex-end`,children:[T&&(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,title:et(T),children:[`Updated `,new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(T)),` `,Ze(T)]}),(0,R.jsxs)(Pe,{shadow:`md`,position:`bottom-end`,withinPortal:!0,children:[(0,R.jsx)(Pe.Target,{children:(0,R.jsx)(ae,{variant:`default`,size:`sm`,leftSection:(0,R.jsx)(ge,{size:15,weight:`bold`}),rightSection:(0,R.jsx)(Nn,{size:13,weight:`bold`}),children:`Add view`})}),(0,R.jsx)(Pe.Dropdown,{children:va.filter(e=>t||e!==`assistant`).map(e=>(0,R.jsx)(Pe.Item,{onClick:()=>k(e),children:qG[e]},e))})]}),t&&(0,R.jsx)(ae,{variant:`subtle`,color:`gray`,size:`sm`,rightSection:(0,R.jsx)(jn,{size:15,weight:`bold`}),onClick:()=>n(),children:`Ask Fanout`})]})]})]}),d.isError&&(0,R.jsx)(S,{color:`bad`,radius:`lg`,mb:`lg`,icon:(0,R.jsx)(ot,{size:18,weight:`fill`}),title:`Dashboard changes not saved`,children:(0,R.jsxs)(w,{justify:`space-between`,gap:`sm`,children:[(0,R.jsx)(y,{size:`sm`,children:`Your latest edits are kept on this screen but Fanout could not store them.`}),(0,R.jsx)(ae,{size:`compact-sm`,color:`bad`,variant:`light`,onClick:()=>d.mutate(p),children:`Retry save`})]})}),(0,R.jsx)(QG,{className:`dashboard-grid`,layouts:E,breakpoints:{lg:1100,md:800,sm:600,xs:420,xxs:0},cols:{lg:12,md:10,sm:6,xs:2,xxs:1},rowHeight:76,margin:[16,16],containerPadding:[0,0],compactType:`vertical`,draggableHandle:`.widget-drag`,draggableCancel:`button,input,select,textarea,a,label,[role=menu],[role=dialog],.widget-actions`,onBreakpointChange:g,onDragStop:e=>{h===`lg`&&O({...p,layout:[...e]})},onResizeStop:e=>{h===`lg`&&O({...p,layout:[...e]})},children:p.widgets.map(e=>(0,R.jsx)(`div`,{children:(0,R.jsx)(ZG,{widget:e,filters:b,dark:s,services:C,agentAvailable:t,onOpenChat:n,onRemove:()=>j(e.id),onConfigure:t=>M(e.id,t)})},e.id))})]}):(0,R.jsx)(rK,{label:`Preparing your dashboard…`})}function rK({label:e}){return(0,R.jsxs)(A,{mih:`50vh`,children:[(0,R.jsx)(m,{size:`sm`}),(0,R.jsx)(y,{c:`dimmed`,size:`sm`,ml:`sm`,children:e})]})}function iK({onOpenDefault:e}){return(0,R.jsx)(A,{mih:`50vh`,children:(0,R.jsxs)(re,{align:`center`,gap:`xs`,children:[(0,R.jsx)(P,{order:1,fz:24,lts:`-0.02em`,children:`This dashboard isn't here`}),(0,R.jsx)(y,{c:`dimmed`,size:`sm`,ta:`center`,children:`The link may be out of date, or the dashboard may have been renamed or deleted.`}),(0,R.jsx)(ae,{mt:`sm`,variant:`default`,size:`sm`,onClick:e,children:`Open your default dashboard`})]})})}export{nK as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboard-hW_vS0TR.js b/internal/ui/dist/assets/dashboard-hW_vS0TR.js new file mode 100644 index 00000000..6b14c4d5 --- /dev/null +++ b/internal/ui/dist/assets/dashboard-hW_vS0TR.js @@ -0,0 +1,24 @@ +import{$ as e,A as t,C as n,D as r,E as i,K as a,N as o,O as s,R as c,S as l,T as u,X as d,Y as f,_ as p,_t as m,a as h,at as g,ct as _,d as v,dt as y,et as b,f as x,gt as S,h as C,ht as w,i as T,it as E,j as D,k as O,l as k,lt as A,m as j,mt as M,o as N,p as P,pt as ee,r as te,s as F,st as ne,u as re,vt as ie,w as ae,x as oe,y as se,yt as ce}from"./brand-CnsMBQCm.js";import{c as le,i as I,o as L}from"./auth-DmDDao4N.js";import{C as ue,D as de,E as fe,N as pe,O as me,S as he,T as ge,_ as _e,b as ve,c as ye,f as be,g as xe,h as Se,i as Ce,j as we,l as Te,m as Ee,n as De,o as Oe,p as ke,s as Ae,u as je,v as Me,w as Ne,x as Pe,y as Fe}from"./tokens-BZZ0emRD.js";import{S as Ie,T as Le,o as Re,t as ze,w as Be,x as Ve}from"./Tooltip-DTTsbr27.js";import{t as He}from"./use-computed-color-scheme-B3cychmA.js";import{O as Ue,V as We,i as Ge,k as Ke,n as qe,t as Je}from"./api-R4Y_TvpM.js";import{s as Ye}from"./preload-helper-CT-UWP0u.js";import{a as Xe,c as Ze,i as Qe,n as $e,o as et,r as tt,s as nt,t as rt}from"./format-C4WhhFye.js";import{n as it,t as at}from"./WarningCircle.es-BNrNGQli.js";var R=ce(S(),1),z=M();function ot(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function st(e){let t=(0,R.useRef)(void 0);return(0,R.useEffect)(()=>{t.current=e},[e]),t.current}function ct(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t{let t=D(`Flex`,null,e),{classNames:n,className:a,style:l,styles:d,unstyled:f,vars:p,gap:m,rowGap:h,columnGap:g,align:_,justify:v,wrap:y,direction:b,attributes:x,...S}=t,C=O({name:`Flex`,classes:pt,props:t,className:a,style:l,classNames:n,styles:d,unstyled:f,attributes:x,vars:p}),w=o(),T=u(),E=i({styleProps:{gap:m,rowGap:h,columnGap:g,align:_,justify:v,wrap:y,direction:b},theme:w,data:ft}),k=c(),j=k&&E.hasResponsiveStyles?r(E.styles,E.media):T;return(0,z.jsxs)(z.Fragment,{children:[E.hasResponsiveStyles&&(0,z.jsx)(s,{selector:`.${j}`,styles:E.styles,media:E.media,deduplicate:k}),(0,z.jsx)(oe,{...C(`root`,{className:j,style:A(E.inlineStyles)}),...S})]})});mt.classes=pt,mt.displayName=`@mantine/core/Flex`;function ht(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>ht(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function gt(e){return e?e.map(e=>ht(e)):[]}function _t(e){return e.reduce((e,t)=>`group`in t?{...e,..._t(t.items)}:(e[`${t.value}`]=t,e),{})}var vt={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},yt={error:null},bt=d((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":ne(t,`combobox-chevron-size`),"--combobox-chevron-color":n?a(n,e):void 0}})),xt=n(e=>{let t=D(`ComboboxChevron`,yt,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=O({name:`ComboboxChevron`,classes:vt,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:bt,attributes:u,rootSelector:`chevron`});return(0,z.jsx)(oe,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,z.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});xt.classes=vt,xt.varsResolver=bt,xt.displayName=`@mantine/core/ComboboxChevron`;var[St,Ct]=Be(`Combobox component was not found in tree`);function wt({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,z.jsx)(j.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}wt.displayName=`@mantine/core/ComboboxClearButton`;var Tt=n(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=D(`ComboboxDropdown`,null,e),s=Ct();return(0,z.jsx)(de.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});Tt.classes=vt,Tt.displayName=`@mantine/core/ComboboxDropdown`;var Et={refProp:`ref`},Dt=n(e=>{let{children:t,refProp:n,ref:r}=D(`ComboboxDropdownTarget`,Et,e);if(Ct(),!Le(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,z.jsx)(de.Target,{ref:r,refProp:n,children:t})});Dt.displayName=`@mantine/core/ComboboxDropdownTarget`;var Ot=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ComboboxEmpty`,null,e),s=Ct();return(0,z.jsx)(oe,{...s.getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});Ot.classes=vt,Ot.displayName=`@mantine/core/ComboboxEmpty`;function kt({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=Ct(),[c,l]=(0,R.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var At={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},jt=n(t=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,ref:l,...u}=D(`ComboboxEventsTarget`,At,t),d=Ve(n);if(!d)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=Ct(),p=kt({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:c});return(0,R.cloneElement)(d,{...p,...u,[r]:e(l,f.store.targetRef,Ie(d))})});jt.displayName=`@mantine/core/ComboboxEventsTarget`;var Mt=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ComboboxFooter`,null,e),s=Ct();return(0,z.jsx)(oe,{...s.getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Mt.classes=vt,Mt.displayName=`@mantine/core/ComboboxFooter`;var Nt=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=D(`ComboboxGroup`,null,e),u=Ct(),d=b(c),f=s!=null&&s!==!1&&s!==``;return(0,z.jsxs)(oe,{role:`group`,"aria-labelledby":f?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[f&&(0,z.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});Nt.classes=vt,Nt.displayName=`@mantine/core/ComboboxGroup`;var Pt=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ComboboxHeader`,null,e),s=Ct();return(0,z.jsx)(oe,{...s.getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Pt.classes=vt,Pt.displayName=`@mantine/core/ComboboxHeader`;function Ft({value:e,valuesDivider:t=`,`,...n}){return(0,z.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}Ft.displayName=`@mantine/core/ComboboxHiddenInput`;var It=n(e=>{let t=D(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=Ct(),_=(0,R.useId)(),v=c||_;return(0,z.jsx)(oe,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});It.classes=vt,It.displayName=`@mantine/core/ComboboxOption`;var Lt=n(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=D(`ComboboxOptions`,null,e),l=Ct(),u=b(a);return(0,R.useEffect)(()=>{l.store.setListId(u)},[u]),(0,z.jsx)(oe,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});Lt.classes=vt,Lt.displayName=`@mantine/core/ComboboxOptions`;var Rt={withAriaAttributes:!0,withKeyboardNavigation:!0},zt=n(t=>{let{classNames:n,styles:r,unstyled:i,vars:a,withAriaAttributes:o,onKeyDown:s,onClick:c,withKeyboardNavigation:l,size:u,ref:d,...f}=D(`ComboboxSearch`,Rt,t),p=Ct(),m=p.getStyles(`search`),h=kt({targetType:`input`,withAriaAttributes:o,withKeyboardNavigation:l,withExpandedAttribute:!1,onKeyDown:s,onClick:c,autoComplete:`off`});return(0,z.jsx)(j,{ref:e(d,p.store.searchRef),classNames:[{input:m.className},n],styles:[{input:m.style},r],size:u||p.size,...h,...f,__staticSelector:`Combobox`})});zt.classes=vt,zt.displayName=`@mantine/core/ComboboxSearch`;var Bt={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Vt=n(t=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,ref:l,...u}=D(`ComboboxTarget`,Bt,t),d=Ve(n);if(!d)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=Ct(),p=kt({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:c}),m=(0,R.cloneElement)(d,{...p,...u});return(0,z.jsx)(de.Target,{refProp:r,ref:e(l,f.store.targetRef),children:m})});Vt.displayName=`@mantine/core/ComboboxTarget`;function Ht(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Ut(e,t,n){for(let n=e+1;n{s||(c(!0),i?.(e))},[c,i,s]),_=(0,R.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,R.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,R.useCallback)(()=>{let e=ut(f.current);ct(`#${l.current} [data-combobox-selected]`,e)?.removeAttribute(`data-combobox-selected`)},[]),b=(0,R.useCallback)(e=>{let t=ut(f.current),n=ct(`#${l.current}`,t),r=n?lt(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,R.useCallback)(()=>{let e=ut(f.current),t=ct(`#${l.current} [data-combobox-active]`,e);if(t){let n=lt(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,R.useCallback)(()=>{let e=ut(f.current),t=lt(`#${l.current} [data-combobox-option]`,e);return b(Ut(u.current,t,a))},[b,a]),C=(0,R.useCallback)(()=>{let e=ut(f.current),t=lt(`#${l.current} [data-combobox-option]`,e);return b(Ht(u.current,t,a))},[b,a]),w=(0,R.useCallback)(()=>{let e=ut(f.current),t=lt(`#${l.current} [data-combobox-option]`,e);return b(Wt(t))},[b]),T=(0,R.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=ut(f.current),r=lt(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=ut(f.current),r=lt(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),E=(0,R.useCallback)(()=>{u.current=-1,y()},[y]),D=(0,R.useCallback)(()=>{let e=ut(f.current);(lt(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),O=(0,R.useCallback)(e=>{l.current=e},[]),k=(0,R.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),A=(0,R.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),j=(0,R.useCallback)(()=>u.current,[]);return(0,R.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:j,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:O,clickSelectedOption:D,searchRef:d,focusSearchInput:k,targetRef:f,focusTarget:A}}var Kt={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},qt=d((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":E(t),"--combobox-option-padding":ne(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:y(n),"--combobox-option-fz":E(t),"--combobox-option-padding":ne(t,`combobox-option-padding`)}})),Jt=e=>{let t=D(`Combobox`,Kt,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,floatingHeight:g,middlewares:_,...v}=t,y=g===`viewport`?{..._,flip:!1,size:{...typeof _?.size==`object`?_.size:{},padding:typeof _?.size==`object`&&_.size.padding!==void 0?_.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=_?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:_,b=Gt(),x=o||b,S=O({name:p||`Combobox`,classes:vt,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:qt}),C=()=>{l?.(),x.closeDropdown()};return(0,z.jsx)(St,{value:{getStyles:S,store:x,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m,floatingHeight:g},children:(0,z.jsx)(de,{opened:x.dropdownOpened,...v,middlewares:y,onChange:e=>!e&&C(),withRoles:!1,unstyled:i,children:a})})};Jt.extend=e=>e,Jt.classes=vt,Jt.varsResolver=qt,Jt.displayName=`@mantine/core/Combobox`,Jt.Target=Vt,Jt.Dropdown=Tt,Jt.Options=Lt,Jt.Option=It,Jt.Search=zt,Jt.Empty=Ot,Jt.Chevron=xt,Jt.Footer=Mt,Jt.Header=Pt,Jt.EventsTarget=jt,Jt.DropdownTarget=Dt,Jt.Group=Nt,Jt.ClearButton=wt,Jt.HiddenInput=Ft;function Yt(e){return`group`in e}function Xt({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a0)return!1;return!0}function Qt(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Yt(n))Qt(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function $t(e,t){return Array.isArray(e)?e.includes(t):e===t}function en({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Yt(e)){let s=$t(r,e.value),c=t&&(s?(0,z.jsx)(fe,{className:vt.optionsDropdownCheckIcon}):n?(0,z.jsx)(`div`,{className:vt.optionsDropdownCheckPlaceholder}):null),l=(0,z.jsxs)(z.Fragment,{children:[i===`left`&&c,(0,z.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,z.jsx)(Jt.Option,{value:e.value,disabled:e.disabled,className:f({[vt.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,z.jsx)(en,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,z.jsx)(Jt.Group,{label:e.group,children:s})}function tn({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=Ct();Qt(e);let x=typeof i==`string`?(r||Xt)({options:e,search:l?i:``,limit:a??1/0}):e,S=Zt(x),C=x.map((e,t)=>(0,z.jsx)(en,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},Yt(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,z.jsx)(Jt.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,z.jsxs)(Jt.Options,{labelledBy:g,"aria-label":y,children:[c?(0,z.jsx)(Re.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,z.jsx)(Jt.Empty,{children:m})]})})}function nn(e){let t=e.currentTarget;return ut(t).activeElement!==t}function rn(e,t){let n=t.trim().toLowerCase();if(n===``)return;let r=Object.values(e).filter(e=>!e.disabled&&e.label.trim().toLowerCase()===n);return r.length===1?r[0]:void 0}var[an,on]=Be(`Progress.Root component was not found in tree`),sn={root:`m_db6d6462`,section:`m_2242eb65`,"stripes-animation":`m_81a374bd`,"stripes-animation-vertical":`m_e0fb7a86`,label:`m_91e40b74`},cn=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ProgressLabel`,null,e),s=on();return(0,z.jsx)(oe,{...s.getStyles(`label`,{className:n,style:r,classNames:t,styles:i}),...o})});cn.classes=sn,cn.displayName=`@mantine/core/ProgressLabel`;var ln=d((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":ne(t,`progress-size`),"--progress-radius":n===void 0?void 0:g(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),un=n(e=>{let t=D(`ProgressRoot`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,transitionDuration:l,orientation:u,attributes:d,mod:f,...p}=t,m=O({name:`Progress`,classes:sn,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:ln});return(0,z.jsx)(an,{value:{getStyles:m,autoContrast:c},children:(0,z.jsx)(oe,{mod:[{orientation:u},f],...m(`root`),...p})})});un.classes=sn,un.varsResolver=ln,un.displayName=`@mantine/core/ProgressRoot`;var dn={withAria:!0},fn=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:s,value:c,withAria:l,color:u,striped:d,animated:f,mod:p,...m}=D(`ProgressSection`,dn,e),h=on(),g=o(),_=l?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c,"aria-valuetext":`${c}%`}:{};return(0,z.jsx)(oe,{...h.getStyles(`section`,{className:n,classNames:t,styles:i,style:r}),...m,..._,mod:[{striped:d||f,animated:f},p],__vars:{"--progress-section-size":`${c}%`,"--progress-section-color":a(u,g),"--progress-label-color":dt(h.autoContrast,g)?me({color:u,theme:g,autoContrast:h.autoContrast}):void 0}})});fn.classes=sn,fn.displayName=`@mantine/core/ProgressSection`;var pn=n(e=>{let n=D(`Progress`,null,e),{value:r,classNames:i,styles:a,vars:o,color:s,striped:c,animated:l,"aria-label":u,...d}=n,{resolvedClassNames:f,resolvedStyles:p}=t({classNames:i,styles:a,props:n});return(0,z.jsx)(un,{classNames:f,styles:p,vars:o,...d,children:(0,z.jsx)(fn,{value:r,color:s,striped:c,animated:l,"aria-label":u})})});pn.classes=sn,pn.displayName=`@mantine/core/Progress`,pn.Section=fn,pn.Root=un,pn.Label=cn;var mn={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},hn=ae(e=>{let n=D([`Input`,`InputWrapper`,`Select`],mn,e),{classNames:r,styles:i,unstyled:a,vars:o,dropdownOpened:s,defaultDropdownOpened:c,onDropdownClose:l,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:p,onChange:m,data:h,value:g,defaultValue:_,selectFirstOptionOnChange:v,selectFirstOptionOnDropdownOpen:y,onOptionSubmit:x,comboboxProps:S,readOnly:C,disabled:w,filter:T,limit:E,withScrollArea:O,maxDropdownHeight:k,floatingHeight:A,size:j,searchable:M,rightSection:N,checkIconPosition:ee,withCheckIcon:te,withAlignedLabels:F,nothingFoundMessage:ne,name:re,form:ie,searchValue:ae,defaultSearchValue:oe,onSearchChange:se,allowDeselect:ce,error:I,rightSectionPointerEvents:L,id:ue,clearable:de,clearSectionMode:fe,clearButtonProps:pe,hiddenInputProps:me,renderOption:he,onClear:ge,autoComplete:_e,scrollAreaProps:ve,__defaultRightSection:ye,__clearSection:be,__clearable:xe,chevronColor:Se,autoSelectOnBlur:Ce,openOnFocus:we,attributes:Te,...Ee}=n,De=(0,R.useMemo)(()=>gt(h),[h]),Oe=(0,R.useRef)({}),ke=(0,R.useMemo)(()=>_t(De),[De]),Ae=b(ue),[je,Me,Ne]=le({value:g,defaultValue:_,finalValue:null,onChange:m}),Pe=je==null?void 0:`${je}`in ke?ke[`${je}`]:Oe.current[`${je}`],Fe=st(Pe),[Ie,Le,Re]=le({value:ae,defaultValue:oe,finalValue:Pe?Pe.label:``,onChange:se}),ze=Gt({opened:s,defaultOpened:c,onDropdownOpen:()=>{u?.(),y?ze.selectFirstOption():ze.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{l?.(),setTimeout(ze.resetSelectedOption,0)}}),Be=e=>{Le(e),ze.resetSelectedOption()},{resolvedClassNames:Ve,resolvedStyles:He}=t({props:n,styles:i,classNames:r});(0,R.useEffect)(()=>{v&&ze.selectFirstOption()},[v,Ie]),(0,R.useEffect)(()=>{g===null&&Be(``),g!=null&&Pe&&(Fe?.value!==Pe.value||Fe?.label!==Pe.label)&&Be(Pe.label)},[g,Pe]),(0,R.useEffect)(()=>{!Ne&&!Re&&Be(je==null?``:`${je}`in ke?ke[`${je}`]?.label:Oe.current[`${je}`]?.label||``)},[ke,je]),(0,R.useEffect)(()=>{je&&`${je}`in ke&&(Oe.current[`${je}`]=ke[`${je}`])},[ke,je]);let Ue=(0,z.jsx)(Jt.ClearButton,{...pe,onClear:()=>{Me(null,null),Be(``),ge?.()}}),We=de&&je!=null&&!w&&!C;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(Jt,{store:ze,__staticSelector:`Select`,classNames:Ve,styles:He,unstyled:a,readOnly:C,size:j,attributes:Te,floatingHeight:A,keepMounted:Ce,onOptionSubmit:e=>{x?.(e);let t=ce&&`${ke[e].value}`==`${je}`?null:ke[e],n=t?t.value:null;n!==je&&Me(n,t),!Ne&&Be(n==null?``:t?.label||``),ze.closeDropdown()},...S,children:[(0,z.jsx)(Jt.Target,{targetType:M?`input`:`button`,autoComplete:_e,withExpandedAttribute:!0,children:(0,z.jsx)(P,{id:Ae,__defaultRightSection:(0,z.jsx)(Jt.Chevron,{size:j,error:I,unstyled:a,color:Se}),__clearSection:Ue,__clearable:We,__clearSectionMode:fe,rightSection:N,rightSectionPointerEvents:L||`none`,...Ee,size:j,__staticSelector:`Select`,disabled:w,readOnly:C||!M,value:Ie,onChange:e=>{if(nn(e)){if(!C){let t=rn(ke,e.currentTarget.value);t&&`${t.value}`!=`${je}`&&(Me(t.value,t),!Ne&&Be(t.label))}return}Be(e.currentTarget.value),ze.openDropdown(),v&&ze.selectFirstOption()},onFocus:e=>{we&&M&&ze.openDropdown(),d?.(e)},onBlur:e=>{Ce&&ze.clickSelectedOption(),ze.closeDropdown();let t=je!=null&&(`${je}`in ke?ke[`${je}`]:Oe.current[`${je}`]);Be(t&&t.label||``),f?.(e)},onClick:e=>{M?ze.openDropdown():ze.toggleDropdown(),p?.(e)},classNames:Ve,styles:He,unstyled:a,pointer:!M,error:I,attributes:Te})}),(0,z.jsx)(tn,{data:De,hidden:C||w,filter:T,search:Ie,limit:E,hiddenWhenEmpty:!ne,withScrollArea:O,maxDropdownHeight:k,filterOptions:!!M&&Pe?.label!==Ie,value:je,checkIconPosition:ee,withCheckIcon:te,withAlignedLabels:F,nothingFoundMessage:ne,unstyled:a,labelId:Ee.label?`${Ae}-label`:void 0,"aria-label":Ee.label?void 0:Ee[`aria-label`],renderOption:he,scrollAreaProps:ve})]}),(0,z.jsx)(Jt.HiddenInput,{value:je,name:re,form:ie,disabled:w,...me})]})});hn.classes={...P.classes,...Jt.classes},hn.displayName=`@mantine/core/Select`;function gn(e){if(e!==void 0)return typeof e==`number`?y(e):e}function _n({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let c=o(),l=t===void 0?e:t,u=r!==void 0,d=A({"--sg-spacing-x":_(ot(e)),"--sg-spacing-y":_(ot(l)),"--sg-auto-rows":i,...u?{"--sg-min-col-width":gn(r)}:{"--sg-cols":ot(n)?.toString()}}),f=ee(c.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=_(e[r])),typeof l==`object`&&l[r]!==void 0&&(t[r][`--sg-spacing-y`]=_(l[r])),!u&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{}),p=we(ee(f),c.breakpoints).filter(e=>ee(f[e.value]).length>0).map(e=>({query:`(min-width: ${c.breakpoints[e.value]})`,styles:f[e.value]}));return(0,z.jsx)(s,{styles:d,media:p,selector:a})}function vn(e){return typeof e==`object`&&e?ee(e):[]}function yn(e){return e.sort((e,t)=>pe(e)-pe(t))}function bn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return yn(Array.from(new Set([...vn(e),...vn(t),...r===void 0?vn(n):[]])))}function xn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,c=r!==void 0,l=A({"--sg-spacing-x":_(ot(e)),"--sg-spacing-y":_(ot(o)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":gn(r)}:{"--sg-cols":ot(n)?.toString()}}),u=bn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),d=u.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=_(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=_(o[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{}),f=u.map(e=>({query:`simple-grid (min-width: ${e})`,styles:d[e]}));return(0,z.jsx)(s,{styles:l,container:f,selector:a})}var Sn={container:`m_925c2d2c`,root:`m_2415a157`},Cn={cols:1,spacing:`md`,type:`media`},wn=n(e=>{let t=D(`SimpleGrid`,Cn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:d,type:f,minColWidth:p,autoFlow:m,autoRows:h,attributes:g,..._}=t,v=O({name:`SimpleGrid`,classes:Sn,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s}),y=u(),b=p===void 0?void 0:m||`auto-fill`;return f===`container`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(xn,{...t,selector:`.${y}`}),(0,z.jsx)(`div`,{...v(`container`),children:(0,z.jsx)(oe,{...v(`root`,{className:y}),..._,"data-auto-cols":b})})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(_n,{...t,selector:`.${y}`}),(0,z.jsx)(oe,{...v(`root`,{className:y}),..._,"data-auto-cols":b})]})});wn.classes=Sn,wn.displayName=`@mantine/core/SimpleGrid`;var Tn=new Map([[`bold`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),R.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),En=new Map([[`bold`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),R.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),Dn=new Map([[`bold`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M28,64A12,12,0,0,1,40,52H216a12,12,0,0,1,0,24H40A12,12,0,0,1,28,64Zm12,76h64a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm80,40H40a12,12,0,0,0,0,24h80a12,12,0,0,0,0-24Zm120.49,20.49a12,12,0,0,1-17,0l-18.08-18.08a44,44,0,1,1,17-17l18.08,18.07A12,12,0,0,1,240.49,200.49ZM184,164a20,20,0,1,0-20-20A20,20,0,0,0,184,164Z`}))],[`duotone`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M216,144a32,32,0,1,1-32-32A32,32,0,0,1,216,144Z`,opacity:`0.2`}),R.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`fill`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,2.34L217.36,166A40,40,0,1,0,206,177.36l20.3,20.3a8,8,0,0,0,11.32-11.32Z`}))],[`light`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M34,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H40A6,6,0,0,1,34,64Zm6,70h72a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12Zm88,52H40a6,6,0,0,0,0,12h88a6,6,0,0,0,0-12Zm108.24,10.24a6,6,0,0,1-8.48,0l-21.49-21.48a38.06,38.06,0,1,1,8.49-8.49l21.48,21.49A6,6,0,0,1,236.24,196.24ZM184,170a26,26,0,1,0-26-26A26,26,0,0,0,184,170Z`}))],[`regular`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`thin`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M36,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H40A4,4,0,0,1,36,64Zm4,68h72a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8Zm88,56H40a4,4,0,0,0,0,8h88a4,4,0,0,0,0-8Zm106.83,6.83a4,4,0,0,1-5.66,0l-22.72-22.72a36.06,36.06,0,1,1,5.66-5.66l22.72,22.72A4,4,0,0,1,234.83,194.83ZM184,172a28,28,0,1,0-28-28A28,28,0,0,0,184,172Z`}))]]),On=new Map([[`bold`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M40,92H70.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24H137.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24Zm64-24A12,12,0,1,1,92,80,12,12,0,0,1,104,68Zm112,96H201.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24h94.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24Zm-48,24a12,12,0,1,1,12-12A12,12,0,0,1,168,188Z`}))],[`duotone`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M128,80a24,24,0,1,1-24-24A24,24,0,0,1,128,80Zm40,72a24,24,0,1,0,24,24A24,24,0,0,0,168,152Z`,opacity:`0.2`}),R.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`fill`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z`}))],[`light`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M40,86H74.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12H133.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12Zm64-24A18,18,0,1,1,86,80,18,18,0,0,1,104,62ZM216,170H197.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12h98.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12Zm-48,24a18,18,0,1,1,18-18A18,18,0,0,1,168,194Z`}))],[`regular`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`thin`,R.createElement(R.Fragment,null,R.createElement(`path`,{d:`M40,84H76.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8H131.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8Zm64-24A20,20,0,1,1,84,80,20,20,0,0,1,104,60ZM216,172H195.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8H140.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8Zm-48,24a20,20,0,1,1,20-20A20,20,0,0,1,168,196Z`}))]]),kn=R.forwardRef((e,t)=>R.createElement(h,{ref:t,...e,weights:Tn}));kn.displayName=`ArrowUpRightIcon`;var An=kn,jn=R.forwardRef((e,t)=>R.createElement(h,{ref:t,...e,weights:En}));jn.displayName=`CaretDownIcon`;var Mn=jn,Nn=R.forwardRef((e,t)=>R.createElement(h,{ref:t,...e,weights:Dn}));Nn.displayName=`ListMagnifyingGlassIcon`;var Pn=Nn,Fn=R.forwardRef((e,t)=>R.createElement(h,{ref:t,...e,weights:On}));Fn.displayName=`SlidersHorizontalIcon`;var In=Fn;function Ln(e){let{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function Rn(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function zn(e,t,n,r,i,a,o){let{margin:s,containerPadding:c,rowHeight:l}=e,u=Ln(e),d,f,p,m;if(o?(d=Math.round(o.width),f=Math.round(o.height)):(d=Rn(r,u,s[0]),f=Rn(i,l,s[1])),a?(p=Math.round(a.top),m=Math.round(a.left)):o?(p=Math.round(o.top),m=Math.round(o.left)):(p=Math.round((l+s[1])*n+c[1]),m=Math.round((u+s[0])*t+c[0])),!a&&!o){if(Number.isFinite(r)){let e=Math.round((u+s[0])*(t+r)+c[0])-m-d;e!==s[0]&&(d+=e-s[0])}if(Number.isFinite(i)){let e=Math.round((l+s[1])*(n+i)+c[1])-p-f;e!==s[1]&&(f+=e-s[1])}}return{top:p,left:m,width:d,height:f}}function Bn(e,t,n,r,i){let{margin:a,containerPadding:o,cols:s,rowHeight:c,maxRows:l}=e,u=Ln(e),d=Math.round((n-o[0])/(u+a[0])),f=Math.round((t-o[1])/(c+a[1]));return d=Un(d,0,s-r),f=Un(f,0,l-i),{x:d,y:f}}function Vn(e,t,n){let{margin:r,containerPadding:i,rowHeight:a}=e,o=Ln(e);return{x:Math.round((n-i[0])/(o+r[0])),y:Math.round((t-i[1])/(a+r[1]))}}function Hn(e,t,n){let{margin:r,rowHeight:i}=e,a=Ln(e);return{w:Math.max(1,Math.round((t+r[0])/(a+r[0]))),h:Math.max(1,Math.round((n+r[1])/(i+r[1])))}}function Un(e,t,n){return Math.max(Math.min(e,n),t)}function Wn(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function Gn(e,t){for(let n=0;nWn(e,t))}function qn(e,t){return t===`horizontal`?Yn(e):t===`vertical`||t===`wrap`?Jn(e):[...e]}function Jn(e){return[...e].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y)}function Yn(e){return[...e].sort((e,t)=>e.x===t.x?e.y-t.y:e.x-t.x)}function Xn(e){let t=0;for(let n=0;nt&&(t=e)}}return t}function Zn(e,t){for(let n=0;ne.static===!0)}function $n(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function er(e){let t=Array(e.length);for(let n=0;nt.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;Gn(n,i);)i.y++}}return e}function ir(e,t,n,r,i,a,o,s,c){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return[...e];let l=t.x,u=t.y;typeof n==`number`&&(t.x=n),typeof r==`number`&&(t.y=r),t.moved=!0;let d=qn(e,o);(o===`vertical`&&typeof r==`number`?u>=r:o===`horizontal`&&typeof n==`number`&&l>=n)&&(d=d.reverse());let f=Kn(d,t),p=f.length>0;if(p&&c)return er(e);if(p&&a)return t.x=l,t.y=u,t.moved=!1,e;let m=[...e];for(let e=0;et.y,d=l!==void 0&&t.x+t.w>l.x;if(!l)return ir(e,n,o?a.x:void 0,s?a.y:void 0,r,c,i);if(u&&s)return ir(e,n,void 0,n.y+1,r,c,i);if(u&&i===null)return t.y=n.y,n.y+=n.h,[...e];if(d&&o)return ir(e,t,n.x,void 0,r,c,i)}let l=o?n.x+1:void 0,u=s?n.y+1:void 0;return l===void 0&&u===void 0?[...e]:ir(e,n,l,u,r,c,i)}function or(e,t,n){return Math.max(t,Math.min(n,e))}var sr=[{name:`gridBounds`,constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:or(t,0,Math.max(0,r-e.w)),y:or(n,0,Math.max(0,i-e.h))}},constrainSize(e,t,n,r,{cols:i,maxRows:a}){let o=r===`w`||r===`nw`||r===`sw`?e.x+e.w:i-e.x,s=r===`n`||r===`nw`||r===`ne`?e.y+e.h:a-e.y;return{w:or(t,1,Math.max(1,o)),h:or(n,1,Math.max(1,s))}}},{name:`minMaxSize`,constrainSize(e,t,n){return{w:or(t,e.minW??1,e.maxW??1/0),h:or(n,e.minH??1,e.maxH??1/0)}}}];function cr(e,t,n,r,i){let a={x:n,y:r};for(let n of e)n.constrainPosition&&(a=n.constrainPosition(t,a.x,a.y,i));if(t.constraints)for(let e of t.constraints)e.constrainPosition&&(a=e.constrainPosition(t,a.x,a.y,i));return a}function lr(e,t,n,r,i,a){let o={w:n,h:r};for(let n of e)n.constrainSize&&(o=n.constrainSize(t,o.w,o.h,i,a));if(t.constraints)for(let e of t.constraints)e.constrainSize&&(o=e.constrainSize(t,o.w,o.h,i,a));return o}function ur({top:e,left:t,width:n,height:r}){let i=`translate(${t}px,${e}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${n}px`,height:`${r}px`,position:`absolute`}}function dr({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:`absolute`}}function fr(e){return e*100+`%`}function pr(e,t,n,r){return e+n>r?t:n}function mr(e,t,n){return e<0?t:n}function hr(e){return Math.max(0,e)}function gr(e){return Math.max(0,e)}var _r=(e,t,n)=>{let{left:r,height:i,width:a}=t,o=e.top-(i-e.height);return{left:r,width:a,height:mr(o,e.height,i),top:gr(o)}},vr=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{top:r,height:a,width:pr(e.left,e.width,o,n),left:hr(i)}},yr=(e,t,n)=>{let{top:r,height:i,width:a}=t,o=e.left+e.width-a;return o<0?{height:i,width:e.left+e.width,top:gr(r),left:0}:{height:i,width:a,top:gr(r),left:o}},br=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{width:o,left:i,height:mr(r,e.height,a),top:gr(r)}},xr={n:_r,ne:(e,t,n)=>_r(e,vr(e,t,n)),e:vr,se:(e,t,n)=>br(e,vr(e,t,n)),s:br,sw:(e,t,n)=>br(e,yr(e,t)),w:yr,nw:(e,t,n)=>_r(e,yr(e,t))};function Sr(e,t,n,r){let i=xr[e];return i?i(t,{...t,...n},r):n}var Cr={type:`transform`,scale:1,calcStyle(e){return ur(e)}},wr={type:`absolute`,scale:1,calcStyle(e){return dr(e)}};function Tr(e){return{type:`transform`,scale:e,calcStyle(e){return ur(e)},calcDragPosition(t,n,r,i){return{left:(t-r)/e,top:(n-i)/e}}}}var Er=Cr,Dr={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},Or={enabled:!0,bounded:!1,threshold:3},kr={enabled:!0,handles:[`se`]},Ar={enabled:!1,defaultItem:{w:1,h:1}};function jr(e,t,n,r,i){let a=r===`x`?`w`:`h`;t[r]+=1;let o=e.findIndex(e=>e.i===t.i),s=i??Qn(e).length>0;for(let i=o+1;it.y+t.h)break;Wn(t,o)&&jr(e,o,n+t[a],r,s)}}t[r]=n}function Mr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!Gn(e,t);)t.y--;let i;for(;(i=Gn(e,t))!==void 0;)jr(n,t,i.y+i.h,`y`);return t.y=Math.max(t.y,0),t}function Nr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!Gn(e,t);)t.x--;let i;for(;(i=Gn(e,t))!==void 0;)if(jr(r,t,i.x+i.w,`x`),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!Gn(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var Pr={type:`vertical`,allowOverlap:!1,compact(e,t){let n=Qn(e),r=Xn(n),i=Jn(e),a=Array(e.length);for(let t=0;te[t]-e[n])}function Hr(e,t){let n=Vr(e),r=n[0];if(r===void 0)throw Error(`No breakpoints defined`);for(let i=1;ie[a]&&(r=a)}return r}function Ur(e,t){let n=t[e];if(n===void 0)throw Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function Wr(e,t,n,r,i,a){let o=e[n];if(o)return er(o);let s=e[r],c=Vr(t),l=c.slice(c.indexOf(n));for(let t=0;t{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),qr=m(((e,t)=>{var n=Kr();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Jr=m(((e,t)=>{t.exports=qr()()})),Yr=ce(Jr(),1),Xr=ce(w(),1);function Zr(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&Zr(e.changedTouches,e=>t===e.identifier)}function xi(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function Si(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function Ci(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??Si();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} +`,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} +`,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&Ei(e.body,`react-draggable-transparent-selection`)}function wi(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{Ti(e)}):Ti(e)}function Ti(e){if(e)try{e.body&&Di(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function Ei(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function Di(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function Oi(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:Fi(r);let i=Ii(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+ei(s.paddingLeft)+ei(o.marginLeft),top:-i.offsetTop+ei(s.paddingTop)+ei(o.marginTop),right:hi(a)-pi(i)-i.offsetLeft+ei(s.paddingRight)-ei(o.marginRight),bottom:mi(a)-fi(i)-i.offsetTop+ei(s.paddingBottom)-ei(o.marginBottom)}}return $r(r.right)&&(t=Math.min(t,r.right)),$r(r.bottom)&&(n=Math.min(n,r.bottom)),$r(r.left)&&(t=Math.max(t,r.left)),$r(r.top)&&(n=Math.max(n,r.top)),[t,n]}function ki(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function Ai(e){return e.props.axis===`both`||e.props.axis===`x`}function ji(e){return e.props.axis===`both`||e.props.axis===`y`}function Mi(e,t,n){let r=typeof t==`number`?bi(e,t):null;if(typeof t==`number`&&!r)return null;let i=Ii(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return gi(r||e,a,n.props.scale)}function Ni(e,t,n){let r=!$r(e.lastX),i=Ii(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function Pi(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function Fi(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function Ii(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var Li=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},Ri={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},zi=Ri.mouse,Bi=class extends R.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!li(e.target,this.props.handle,t)||this.props.cancel&&li(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=xi(e);this.touchIdentifier=r;let i=Mi(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=Ni(this,a,o);Li(`DraggableCore: handleDragStart: %j`,s),Li(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&Ci(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,ui(n,zi.move,this.handleDrag),ui(n,zi.stop,this.handleDragStop))},this.handleDrag=e=>{let t=Mi(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=ki(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=Ni(this,n,r);if(Li(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=Mi(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=ki(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=Ni(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&wi(a.ownerDocument),Li(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(Li(`DraggableCore: Removing handlers`),di(a.ownerDocument,zi.move,this.handleDrag),di(a.ownerDocument,zi.stop,this.handleDragStop))},this.onMouseDown=e=>(zi=Ri.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(zi=Ri.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(zi=Ri.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(zi=Ri.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&ui(e,Ri.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;di(t,Ri.mouse.move,this.handleDrag),di(t,Ri.touch.move,this.handleDrag),di(t,Ri.mouse.stop,this.handleDragStop),di(t,Ri.touch.stop,this.handleDragStop),di(e,Ri.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&wi(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Xr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(Li(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return R.cloneElement(R.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Bi.displayName=`DraggableCore`,Bi.propTypes={allowAnyClick:Yr.default.bool,allowMobileScroll:Yr.default.bool,children:Yr.default.node.isRequired,disabled:Yr.default.bool,enableUserSelectHack:Yr.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Yr.default.arrayOf(Yr.default.number),handle:Yr.default.string,cancel:Yr.default.string,nodeRef:Yr.default.object,nonce:Yr.default.string,onStart:Yr.default.func,onDrag:Yr.default.func,onStop:Yr.default.func,onMouseDown:Yr.default.func,scale:Yr.default.number,className:ti,style:ti,transform:ti},Bi.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Vi=class extends R.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(Li(`Draggable: onDragStart: %j`,t),this.props.onStart(e,Pi(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;Li(`Draggable: onDrag: %j`,t);let n=Pi(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=Oi(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,Pi(this,t))===!1)return!1;Li(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(Li(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Xr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},p=null,m=!s||this.state.dragging,h=s||r,g={x:Ai(this)&&m?this.state.x:h.x,y:ji(this)&&m?this.state.y:h.y};this.state.isElementSVG?p=vi(g,c):d=_i(g,c);let _=R.Children.only(n),v=f(_.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return R.createElement(Bi,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},R.cloneElement(_,{className:v,style:{..._.props.style,...d},transform:p}))}};Vi.displayName=`Draggable`,Vi.propTypes={...Bi.propTypes,axis:Yr.default.oneOf([`both`,`x`,`y`,`none`]),bounds:Yr.default.oneOfType([Yr.default.shape({left:Yr.default.number,right:Yr.default.number,top:Yr.default.number,bottom:Yr.default.number}),Yr.default.string,Yr.default.oneOf([!1])]),defaultClassName:Yr.default.string,defaultClassNameDragging:Yr.default.string,defaultClassNameDragged:Yr.default.string,defaultPosition:Yr.default.shape({x:Yr.default.number,y:Yr.default.number}),positionOffset:Yr.default.shape({x:Yr.default.oneOfType([Yr.default.number,Yr.default.string]),y:Yr.default.oneOfType([Yr.default.number,Yr.default.string])}),position:Yr.default.shape({x:Yr.default.number,y:Yr.default.number}),className:ti,style:ti,transform:ti},Vi.defaultProps={...Bi.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1};var Hi=m(((e,t)=>{function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},u=(e,t,i)=>(i=e==null?{}:n(o(e)),l(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),d=e=>l(r({},`__esModule`,{value:!0}),e),f={};c(f,{DraggableCore:()=>De,default:()=>Oe}),t.exports=d(f);var p=u(S()),m=u(Jr()),h=u(w()),g=Hi();function _(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&_(e.changedTouches,e=>t===e.identifier)}function se(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function ce(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function le(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??ce();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} +`,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} +`,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&ue(e.body,`react-draggable-transparent-selection`)}function I(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{L(e)}):L(e)}function L(e){if(e)try{e.body&&de(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function ue(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function de(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function fe(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:ye(r);let i=be(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+b(s.paddingLeft)+b(o.marginLeft),top:-i.offsetTop+b(s.paddingTop)+b(o.marginTop),right:F(a)-ee(i)-i.offsetLeft+b(s.paddingRight)-b(o.marginRight),bottom:te(a)-P(i)-i.offsetTop+b(s.paddingBottom)-b(o.marginBottom)}}return y(r.right)&&(t=Math.min(t,r.right)),y(r.bottom)&&(n=Math.min(n,r.bottom)),y(r.left)&&(t=Math.max(t,r.left)),y(r.top)&&(n=Math.max(n,r.top)),[t,n]}function pe(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function me(e){return e.props.axis===`both`||e.props.axis===`x`}function he(e){return e.props.axis===`both`||e.props.axis===`y`}function ge(e,t,n){let r=typeof t==`number`?oe(e,t):null;if(typeof t==`number`&&!r)return null;let i=be(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return ne(r||e,a,n.props.scale)}function _e(e,t,n){let r=!y(e.lastX),i=be(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function ve(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function ye(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function be(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var xe=u(S()),Se=u(Jr()),Ce=u(w()),we=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},Te={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},Ee=Te.mouse,De=class extends xe.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!j(e.target,this.props.handle,t)||this.props.cancel&&j(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=se(e);this.touchIdentifier=r;let i=ge(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=_e(this,a,o);we(`DraggableCore: handleDragStart: %j`,s),we(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&le(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,M(n,Ee.move,this.handleDrag),M(n,Ee.stop,this.handleDragStop))},this.handleDrag=e=>{let t=ge(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=pe(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=_e(this,n,r);if(we(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=ge(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=pe(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=_e(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&I(a.ownerDocument),we(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(we(`DraggableCore: Removing handlers`),N(a.ownerDocument,Ee.move,this.handleDrag),N(a.ownerDocument,Ee.stop,this.handleDragStop))},this.onMouseDown=e=>(Ee=Te.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(Ee=Te.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(Ee=Te.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(Ee=Te.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&M(e,Te.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;N(t,Te.mouse.move,this.handleDrag),N(t,Te.touch.move,this.handleDrag),N(t,Te.mouse.stop,this.handleDragStop),N(t,Te.touch.stop,this.handleDragStop),N(e,Te.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&I(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Ce.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(we(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return xe.cloneElement(xe.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};De.displayName=`DraggableCore`,De.propTypes={allowAnyClick:Se.default.bool,allowMobileScroll:Se.default.bool,children:Se.default.node.isRequired,disabled:Se.default.bool,enableUserSelectHack:Se.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Se.default.arrayOf(Se.default.number),handle:Se.default.string,cancel:Se.default.string,nodeRef:Se.default.object,nonce:Se.default.string,onStart:Se.default.func,onDrag:Se.default.func,onStop:Se.default.func,onMouseDown:Se.default.func,scale:Se.default.number,className:x,style:x,transform:x},De.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Oe=class extends p.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(we(`Draggable: onDragStart: %j`,t),this.props.onStart(e,ve(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;we(`Draggable: onDrag: %j`,t);let n=ve(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=fe(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,ve(this,t))===!1)return!1;we(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(we(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=h.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,m=!s||this.state.dragging,h=s||r,_={x:me(this)&&m?this.state.x:h.x,y:he(this)&&m?this.state.y:h.y};this.state.isElementSVG?f=ie(_,c):d=re(_,c);let v=p.Children.only(n),y=(0,g.clsx)(v.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return p.createElement(De,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},p.cloneElement(v,{className:y,style:{...v.props.style,...d},transform:f}))}};Oe.displayName=`Draggable`,Oe.propTypes={...De.propTypes,axis:m.default.oneOf([`both`,`x`,`y`,`none`]),bounds:m.default.oneOfType([m.default.shape({left:m.default.number,right:m.default.number,top:m.default.number,bottom:m.default.number}),m.default.string,m.default.oneOf([!1])]),defaultClassName:m.default.string,defaultClassNameDragging:m.default.string,defaultClassNameDragged:m.default.string,defaultPosition:m.default.shape({x:m.default.number,y:m.default.number}),positionOffset:m.default.shape({x:m.default.oneOfType([m.default.number,m.default.string]),y:m.default.oneOfType([m.default.number,m.default.string])}),position:m.default.shape({x:m.default.number,y:m.default.number}),className:x,style:x,transform:x},Oe.defaultProps={...De.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1},0&&(t.exports={DraggableCore:De})})),Wi=m(((e,t)=>{var n=Ui(),r=n.DraggableCore,i=n.default||n;t.exports=i,t.exports.default=i,t.exports.DraggableCore=r})),Gi=m((e=>{e.__esModule=!0,e.cloneElement=c;var t=n(S());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{e.__esModule=!0,e.resizableProps=void 0;var t=n(Jr());Wi();function n(e){return e&&e.__esModule?e:{default:e}}e.resizableProps={axis:t.default.oneOf([`both`,`x`,`y`,`none`]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:typeof Element<`u`?t.default.instanceOf(Element):t.default.any,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`y`?t.default.number.isRequired(...e):t.default.number(...e)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),transformScale:t.default.number,width:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`x`?t.default.number.isRequired(...e):t.default.number(...e)}}})),qi=m((e=>{e.__esModule=!0,e.default=void 0;var t=o(S()),n=Wi(),r=Gi(),i=Ki(),a=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];function o(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;tMath.abs(i*n)?t=e/n:e=t*n}let o=e,s=t,c=this.slack||[0,0],l=c[0],u=c[1];return e+=l,t+=u,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[l+(o-e),u+(s-t)],[e,t]}resizeHandler(e,t){return(n,r)=>{let i=r.node,a=r.deltaX,o=r.deltaY;e===`onResizeStart`&&this.resetData();let s=(this.props.axis===`both`||this.props.axis===`x`)&&t!==`n`&&t!==`s`,c=(this.props.axis===`both`||this.props.axis===`y`)&&t!==`e`&&t!==`w`;if(!s&&!c)return;let l=t[0],u=t[t.length-1],d=i.getBoundingClientRect();if(this.lastHandleRect!=null){if(u===`w`){let e=d.left-this.lastHandleRect.left;a+=e}if(l===`n`){let e=d.top-this.lastHandleRect.top;o+=e}}this.lastHandleRect=d,u===`w`&&(a=-a),l===`n`&&(o=-o);let f=this.lastSize?.width??this.props.width,p=this.lastSize?.height??this.props.height,m=f+(s?a/this.props.transformScale:0),h=p+(c?o/this.props.transformScale:0);var g=this.runConstraints(m,h);if(m=g[0],h=g[1],e===`onResizeStop`&&this.lastSize){var _=this.lastSize;m=_.width,h=_.height}let v=m!==f||h!==p;e!==`onResizeStop`&&(this.lastSize={width:m,height:h});let y=typeof this.props[e]==`function`?this.props[e]:null;y&&(e!==`onResize`||v)&&(n.persist==null||n.persist(),y(n,{node:i,size:{width:m,height:h},handle:t})),e===`onResizeStop`&&this.resetData()}}renderResizeHandle(e,n){let r=this.props.handle;if(!r)return t.createElement(`span`,{className:`react-resizable-handle react-resizable-handle-`+e,ref:n});if(typeof r==`function`)return r(e,n);let i=typeof r.type==`string`,a=u({ref:n},i?{}:{handleAxis:e});return t.cloneElement(r,a)}render(){let e=this.props,i=e.children,o=e.className,l=e.draggableOpts;e.width,e.height,e.handle,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart;let d=e.resizeHandles;e.transformScale;let f=c(e,a);return(0,r.cloneElement)(i,u(u({},f),{},{className:(o?o+` `:``)+`react-resizable`,children:[...t.Children.toArray(i.props.children),...d.map(e=>{let r=this.handleRefs[e]??(this.handleRefs[e]=t.createRef());return t.createElement(n.DraggableCore,s({},l,{nodeRef:r,key:`resizableHandle-`+e,onStop:this.resizeHandler(`onResizeStop`,e),onStart:this.resizeHandler(`onResizeStart`,e),onDrag:this.resizeHandler(`onResize`,e)}),this.renderResizeHandle(e,r))})]}))}};e.default=m,m.propTypes=i.resizableProps,m.defaultProps={axis:`both`,handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:[`se`],transformScale:1}})),Ji=m((e=>{e.__esModule=!0,e.default=void 0;var t=s(S()),n=o(Jr()),r=o(qi()),i=Ki(),a=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n=t.size;this.props.onResize?(e.persist==null||e.persist(),this.setState(n,()=>this.props.onResize&&this.props.onResize(e,t))):this.setState(n)}}static getDerivedStateFromProps(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null}render(){let e=this.props,n=e.handle,i=e.handleSize;e.onResize;let o=e.onResizeStart,s=e.onResizeStop,l=e.draggableOpts,d=e.minConstraints,f=e.maxConstraints,p=e.lockAspectRatio,h=e.axis;e.width,e.height;let g=e.resizeHandles,_=e.style,v=e.transformScale,y=m(e,a);return t.createElement(r.default,{axis:h,draggableOpts:l,handle:n,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:f,minConstraints:d,onResizeStart:o,onResize:this.onResize,onResizeStop:s,resizeHandles:g,transformScale:v,width:this.state.width},t.createElement(`div`,c({},y,{style:u(u({},_),{},{width:this.state.width+`px`,height:this.state.height+`px`})})))}};e.default=h,h.propTypes=u(u({},i.resizableProps),{},{children:n.default.element})})),Yi=m(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=qi().default,t.exports.ResizableBox=Ji().default})),Xi=m(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`fast-equals`]={}))})(e,(function(e){function t(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function n(e){return function(t,n,r,i){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r,i);var a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);var s=e(t,n,r,i);return i.delete(t),i.delete(n),s}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function i(e){return e.constructor===Object||e.constructor==null}function a(e){return typeof e.then==`function`}function o(e,t){return e===t||e!==e&&t!==t}var s=Object.prototype.toString;function c(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,c=e.areObjectsEqual,l=e.areRegExpsEqual,u=e.areSetsEqual,d=e.createIsNestedEqual,f=d(p);function p(e,d,p){if(e===d)return!0;if(!e||!d||typeof e!=`object`||typeof d!=`object`)return e!==e&&d!==d;if(i(e)&&i(d))return c(e,d,f,p);var m=Array.isArray(e),h=Array.isArray(d);if(m||h)return m===h&&t(e,d,f,p);var g=s.call(e);return g===s.call(d)?g===`[object Date]`?n(e,d,f,p):g===`[object RegExp]`?l(e,d,f,p):g===`[object Map]`?r(e,d,f,p):g===`[object Set]`?u(e,d,f,p):g===`[object Object]`||g===`[object Arguments]`?a(e)||a(d)?!1:c(e,d,f,p):g===`[object Boolean]`||g===`[object Number]`||g===`[object String]`?o(e.valueOf(),d.valueOf()):!1:!1}return p}function l(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-->0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var u=n(l);function d(e,t){return o(e.valueOf(),t.valueOf())}function f(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},o=0;return e.forEach(function(s,c){if(i){var l=!1,u=0;t.forEach(function(i,d){!l&&!a[u]&&(l=n(c,d,o,u,e,t,r)&&n(s,i,c,d,e,t,r))&&(a[u]=!0),u++}),o++,i=l}}),i}var p=n(f),m=`_owner`,h=Object.prototype.hasOwnProperty;function g(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var o;a-->0;){if(o=i[a],o===m){var s=!!e.$$typeof,c=!!t.$$typeof;if((s||c)&&s!==c)return!1}if(!h.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var _=n(g);function v(e,t){return e.source===t.source&&e.flags===t.flags}function y(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(o,s){if(i){var c=!1,l=0;t.forEach(function(i,u){!c&&!a[l]&&(c=n(o,i,s,u,e,t,r))&&(a[l]=!0),l++}),i=c}}),i}var b=n(y),x=Object.freeze({areArraysEqual:l,areDatesEqual:d,areMapsEqual:f,areObjectsEqual:g,areRegExpsEqual:v,areSetsEqual:y,createIsNestedEqual:t}),S=Object.freeze({areArraysEqual:u,areDatesEqual:d,areMapsEqual:p,areObjectsEqual:_,areRegExpsEqual:v,areSetsEqual:b,createIsNestedEqual:t}),C=c(x);function w(e,t){return C(e,t,void 0)}var T=c(r(x,{createIsNestedEqual:function(){return o}}));function E(e,t){return T(e,t,void 0)}var D=c(S);function O(e,t){return D(e,t,new WeakMap)}var k=c(r(S,{createIsNestedEqual:function(){return o}}));function A(e,t){return k(e,t,new WeakMap)}function j(e){return c(r(x,e(x)))}function M(e){var t=c(r(S,e(S)));return(function(e,n,r){return r===void 0&&(r=new WeakMap),t(e,n,r)})}e.circularDeepEqual=O,e.circularShallowEqual=A,e.createCustomCircularEqual=M,e.createCustomEqual=j,e.deepEqual=w,e.sameValueZeroEqual=o,e.shallowEqual=E,Object.defineProperty(e,"__esModule",{value:!0})}))})),Zi=Yi(),Qi=Xi();function $i(e){let{children:t,cols:n,containerWidth:r,margin:i,containerPadding:a,rowHeight:o,maxRows:s,isDraggable:c,isResizable:l,isBounded:u,static:d,useCSSTransforms:p=!0,usePercentages:m=!1,transformScale:h=1,positionStrategy:g,dragThreshold:_=0,droppingPosition:v,className:y=``,style:b,handle:x=``,cancel:S=``,x:C,y:w,w:T,h:E,minW:D=1,maxW:O=1/0,minH:k=1,maxH:A=1/0,i:j,resizeHandles:M,resizeHandle:N,constraints:P=sr,layoutItem:ee,layout:te=[],onDragStart:F,onDrag:ne,onDragStop:re,onResizeStart:ie,onResize:ae,onResizeStop:oe}=e,[se,ce]=(0,R.useState)(!1),[le,I]=(0,R.useState)(!1),L=(0,R.useRef)(null),ue=(0,R.useRef)({left:0,top:0}),de=(0,R.useRef)({top:0,left:0,width:0,height:0}),fe=(0,R.useRef)(void 0),pe=(0,R.useRef)(te);pe.current=te;let me=(0,R.useRef)(null),he=(0,R.useRef)(null),ge=(0,R.useRef)(!1),_e=(0,R.useRef)({x:0,y:0}),ve=(0,R.useRef)(!1),ye=(0,R.useMemo)(()=>({cols:n,containerPadding:a,containerWidth:r,margin:i,maxRows:s,rowHeight:o}),[n,a,r,i,s,o]),be=(0,R.useMemo)(()=>({cols:n,maxRows:s,containerWidth:r,containerHeight:0,rowHeight:o,margin:i,layout:[]}),[n,s,r,o,i]),xe=(0,R.useCallback)(()=>({...be,layout:pe.current}),[be]),Se=(0,R.useMemo)(()=>ee??{i:j,x:C,y:w,w:T,h:E,minW:D,maxW:O,minH:k,maxH:A},[ee,j,C,w,T,E,D,O,k,A]),Ce=(0,R.useCallback)(e=>{if(g?.calcStyle)return g.calcStyle(e);if(p)return ur(e);let t=dr(e);return m?{...t,left:fr(e.left/r),width:fr(e.width/r)}:t},[g,p,m,r]),we=(0,R.useCallback)((e,{node:t})=>{if(!F)return;let{offsetParent:n}=t;if(!n)return;let r=n.getBoundingClientRect(),i=t.getBoundingClientRect(),a=i.left/h,o=r.left/h,s=i.top/h,c=r.top/h,l;if(g?.calcDragPosition){let t=e;l=g.calcDragPosition(t.clientX,t.clientY,t.clientX-i.left,t.clientY-i.top)}else l={left:a-o+n.scrollLeft,top:s-c+n.scrollTop};if(ue.current=l,_>0){let t=e;_e.current={x:t.clientX,y:t.clientY},ge.current=!0,ve.current=!1,ce(!0);return}ce(!0);let u=Vn(ye,l.top,l.left),{x:d,y:f}=cr(P,Se,u.x,u.y,xe());F(j,d,f,{e,node:t,newPosition:l})},[F,h,ye,g,_,P,Se,xe,j]),Te=(0,R.useCallback)((e,{node:t,deltaX:n,deltaY:a})=>{if(!ne||!se)return;let s=e;if(ge.current&&!ve.current){let n=s.clientX-_e.current.x,r=s.clientY-_e.current.y;if(Math.hypot(n,r)<_)return;if(ve.current=!0,ge.current=!1,F){let n=Vn(ye,ue.current.top,ue.current.left),{x:r,y:i}=cr(P,Se,n.x,n.y,xe());F(j,r,i,{e,node:t,newPosition:ue.current})}}let c=ue.current.top+a,l=ue.current.left+n;if(u){let{offsetParent:e}=t;if(e){let t=e.clientHeight-Rn(E,o,i[1]);c=Un(c,0,t);let n=Ln(ye),a=r-Rn(T,n,i[0]);l=Un(l,0,a)}}let d={top:c,left:l};ue.current=d;let f=Vn(ye,c,l),{x:p,y:m}=cr(P,Se,f.x,f.y,xe());ne(j,p,m,{e,node:t,newPosition:d})},[ne,F,se,_,u,E,o,i,ye,r,T,j,P,Se,xe]),Ee=(0,R.useCallback)((e,{node:t})=>{if(!re||!se)return;let n=ge.current;if(ge.current=!1,ve.current=!1,_e.current={x:0,y:0},n){ce(!1),ue.current={left:0,top:0};return}let{left:r,top:i}=ue.current,a={top:i,left:r};ce(!1),ue.current={left:0,top:0};let o=Vn(ye,i,r),{x:s,y:c}=cr(P,Se,o.x,o.y,xe());re(j,s,c,{e,node:t,newPosition:a})},[re,se,ye,P,Se,xe,j]);me.current=we,he.current=Te;let De=(0,R.useCallback)((e,{node:t,size:n,handle:i},a,o)=>{let s=o===`onResizeStart`?ie:o===`onResize`?ae:oe;if(!s)return;let c;c=t?Sr(i,a,n,r):{...n,top:a.top,left:a.left},de.current=c;let l=Hn(ye,c.width,c.height),{w:u,h:d}=lr(P,Se,l.w,l.h,i,xe());s(j,u,d,{e:e.nativeEvent??e,node:t,size:c,handle:i})},[ie,ae,oe,r,ye,j,P,Se,xe]),Oe=(0,R.useCallback)((e,t)=>{I(!0);let n=zn(ye,C,w,T,E),r={...t,handle:t.handle};De(e,r,n,`onResizeStart`)},[De,ye,C,w,T,E]),ke=(0,R.useCallback)((e,t)=>{let n=zn(ye,C,w,T,E),r={...t,handle:t.handle};De(e,r,n,`onResize`)},[De,ye,C,w,T,E]),Ae=(0,R.useCallback)((e,t)=>{I(!1),de.current={top:0,left:0,width:0,height:0};let n=zn(ye,C,w,T,E),r={...t,handle:t.handle};De(e,r,n,`onResizeStop`)},[De,ye,C,w,T,E]);(0,R.useEffect)(()=>{if(!v)return;let e=L.current;if(!e)return;let t=fe.current||{left:0,top:0},n=se&&(v.left!==t.left||v.top!==t.top);if(!se){let t={node:e,deltaX:v.left,deltaY:v.top,lastX:0,lastY:0,x:v.left,y:v.top};me.current?.(v.e,t)}else if(n){let t={node:e,deltaX:v.left-ue.current.left,deltaY:v.top-ue.current.top,lastX:ue.current.left,lastY:ue.current.top,x:v.left,y:v.top};he.current?.(v.e,t)}fe.current=v},[v,se,j]);let je=zn(ye,C,w,T,E,se?ue.current:null,le?de.current:null),Me=R.Children.only(t),Ne=Ln(ye),Pe=[Rn(D,Ne,i[0]),Rn(k,o,i[1])],Fe=[Rn(O,Ne,i[0]),Rn(A,o,i[1])],Ie=Me.props,Le=Ie.className,Re=Ie.style,ze=R.cloneElement(Me,{ref:L,className:f(`react-grid-item`,Le,y,{static:d,resizing:le,"react-draggable":c,"react-draggable-dragging":se,dropping:!!v,cssTransforms:p}),style:{...b,...Re,...Ce(je)}}),Be=N;return ze=(0,z.jsx)(Zi.Resizable,{draggableOpts:{disabled:!l},className:l?void 0:`react-resizable-hide`,width:je.width,height:je.height,minConstraints:Pe,maxConstraints:Fe,onResizeStart:Oe,onResize:ke,onResizeStop:Ae,transformScale:h,resizeHandles:M,handle:Be,children:ze}),ze=(0,z.jsx)(Bi,{disabled:!c,onStart:we,onDrag:Te,onStop:Ee,handle:x,cancel:`.react-resizable-handle`+(S?`,`+S:``),scale:h,nodeRef:L,children:ze}),ze}var ea=()=>{},ta=`react-grid-layout`,na=!1;try{na=/firefox/i.test(navigator.userAgent)}catch{}function ra(e,t){let n=R.Children.toArray(e),r=R.Children.toArray(t);if(n.length!==r.length)return!1;for(let e=0;e{if(!R.isValidElement(t)||t.key===null)return;let n=String(t.key);a.add(n);let r=e.find(e=>e.i===n);if(r)i.push($n(r));else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Xn(i),w:1,h:1})}});let o=rr(i,{cols:n});return r.compact(o,n)}function aa(e){let{children:t,width:n,gridConfig:r,dragConfig:i,resizeConfig:a,dropConfig:o,positionStrategy:s=Er,compactor:c,constraints:l=sr,layout:u=[],droppingItem:d,autoSize:p=!0,className:m=``,style:h={},innerRef:g,onLayoutChange:_=ea,onDragStart:v=ea,onDrag:y=ea,onDragStop:b=ea,onResizeStart:x=ea,onResize:S=ea,onResizeStop:C=ea,onDrop:w=ea,onDropDragOver:T=ea}=e,E=(0,R.useMemo)(()=>({...Dr,...r}),[r]),D=(0,R.useMemo)(()=>({...Or,...i}),[i]),O=(0,R.useMemo)(()=>({...kr,...a}),[a]),k=(0,R.useMemo)(()=>({...Ar,...o}),[o]),{cols:A,rowHeight:j,maxRows:M,margin:N,containerPadding:P}=E,{enabled:ee,bounded:te,handle:F,cancel:ne,threshold:re}=D,{enabled:ie,handles:ae,handleComponent:oe}=O,{enabled:se,defaultItem:ce,onDragOver:le}=k,I=c??Br(`vertical`),L=I.type,ue=I.allowOverlap,de=I.preventCollision??!1,fe=(0,R.useMemo)(()=>d??{i:`__dropping-elem__`,...ce},[d,ce]),pe=s.type===`transform`,me=s.scale,he=P??N,[ge,_e]=(0,R.useState)(!1),[ve,ye]=(0,R.useState)(()=>ia(u,t,A,I)),[be,xe]=(0,R.useState)(null),[Se,Ce]=(0,R.useState)(!1),[we,Te]=(0,R.useState)(null),[Ee,De]=(0,R.useState)(),Oe=(0,R.useRef)(null),ke=(0,R.useRef)(null),Ae=(0,R.useRef)(null),je=(0,R.useRef)(0),Me=(0,R.useRef)(ve),Ne=(0,R.useRef)(u),Pe=(0,R.useRef)(t),Fe=(0,R.useRef)(L),Ie=(0,R.useRef)(ve);Ie.current=ve,(0,R.useEffect)(()=>{_e(!0),(0,Qi.deepEqual)(ve,u)||_(ve)},[]),(0,R.useEffect)(()=>{if(be||we)return;let e=!(0,Qi.deepEqual)(u,Ne.current),n=!ra(t,Pe.current),r=L!==Fe.current;if(e||n||r){let n=ia(e?u:ve,t,A,I);(0,Qi.deepEqual)(n,ve)||ye(n)}Ne.current=u,Pe.current=t,Fe.current=L},[u,t,A,L,I,be,we,ve]),(0,R.useEffect)(()=>{if(!be&&!(0,Qi.deepEqual)(ve,Me.current)){Me.current=ve;let e=ve.filter(e=>e.i!==fe.i);_(e)}},[ve,be,_,fe.i]);let Le=(0,R.useMemo)(()=>{if(!p)return;let e=Xn(ve),t=he[1];return e*j+(e-1)*N[1]+t*2+`px`},[p,ve,j,N,he]),Re=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=Zn(i,e);if(!a)return;let o={w:a.w,h:a.h,x:a.x,y:a.y,i:e};Oe.current=$n(a),Ae.current=i,xe(o),v(i,a,a,null,r.e,r.node)},[v]),ze=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=Oe.current,o=Zn(i,e);if(!o)return;let s={w:o.w,h:o.h,x:o.x,y:o.y,i:e},c=ir(i,o,t,n,!0,de,L,A,ue);y(c,a,o,s,r.e,r.node),ye(I.compact(c,A)),xe(s)},[de,L,A,ue,I,y]),Be=(0,R.useCallback)((e,t,n,r)=>{if(!be)return;let i=Ie.current,a=Oe.current,o=Zn(i,e);if(!o)return;let s=ir(i,o,t,n,!0,de,L,A,ue),c=I.compact(s,A);b(c,a,o,null,r.e,r.node);let l=Ae.current;Oe.current=null,Ae.current=null,xe(null),ye(c),l&&!(0,Qi.deepEqual)(l,c)&&_(c)},[be,de,L,A,ue,I,b,_]),Ve=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=Zn(i,e);a&&(ke.current=$n(a),Ae.current=i,Ce(!0),x(i,a,a,null,r.e,r.node))},[x]),He=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=ke.current,{handle:o}=r,s=!1,c,l,[u,d]=nr(i,e,e=>(c=e.x,l=e.y,[`sw`,`w`,`nw`,`n`,`ne`].includes(o)&&([`sw`,`nw`,`w`].includes(o)&&(c=e.x+(e.w-t),t=e.x!==c&&c<0?e.w:t,c=c<0?0:c),[`ne`,`n`,`nw`].includes(o)&&(l=e.y+(e.h-n),n=e.y!==l&&l<0?e.h:n,l=l<0?0:l),s=!0),de&&!ue&&Kn(i,{...e,w:t,h:n,x:c??e.x,y:l??e.y}).filter(t=>t.i!==e.i).length>0&&(l=e.y,n=e.h,c=e.x,t=e.w,s=!1),e.w=t,e.h=n,e));if(!d)return;let f=u;s&&c!==void 0&&l!==void 0&&(f=ir(u,d,c,l,!0,de,L,A,ue));let p={w:d.w,h:d.h,x:d.x,y:d.y,i:e,static:!0};S(f,a,d,p,r.e,r.node),ye(I.compact(f,A)),xe(p)},[de,L,A,ue,I,S]),Ue=(0,R.useCallback)((e,t,n,r)=>{let i=Ie.current,a=ke.current,o=Zn(i,e),s=I.compact(i,A);C(s,a,o??null,null,r.e,r.node);let c=Ae.current;ke.current=null,Ae.current=null,xe(null),Ce(!1),ye(s),c&&!(0,Qi.deepEqual)(c,s)&&_(s)},[A,I,C,_]),We=(0,R.useCallback)(()=>{let e=Ie.current;if(!e.some(e=>e.i===fe.i)){Te(null),xe(null),De(void 0);return}let t=I.compact(e.filter(e=>e.i!==fe.i),A);ye(t),Te(null),xe(null),De(void 0)},[fe.i,A,I]),Ge=(0,R.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),na&&!e.nativeEvent.target?.classList.contains(ta))return!1;let t=le?le(e.nativeEvent):T(e);if(t===!1)return we&&We(),!1;let{dragOffsetX:r=0,dragOffsetY:i=0,...a}=t??{},o={...fe,...a},s=e.currentTarget.getBoundingClientRect(),c={cols:A,margin:N,maxRows:M,rowHeight:j,containerWidth:n,containerPadding:he},l=Ln(c),u=Rn(o.w,l,N[0]),d=Rn(o.h,j,N[1]),f=u/2,p=d/2,m=e.clientX-s.left+r-f,h=e.clientY-s.top+i-p,g=Math.max(0,m),_=Math.max(0,h),v={left:g/me,top:_/me,e:e.nativeEvent};if(we)Ee&&(Ee.left!==v.left||Ee.top!==v.top)&&De(v);else{let e=Bn(c,_,g,o.w,o.h);Te((0,z.jsx)(`div`,{},o.i)),De(v);let t=Ie.current.filter(e=>e.i!==o.i);ye([...t,{...o,x:e.x,y:e.y,static:!1,isDraggable:!0}])}},[we,Ee,fe,le,T,We,me,A,N,M,j,n,he]),Ke=(0,R.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),je.current--,je.current<0&&(je.current=0),je.current===0&&We()},[We]),qe=(0,R.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),je.current++},[]),Je=(0,R.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=Ie.current,n=t.find(e=>e.i===fe.i);je.current=0,We(),w(t,n,e.nativeEvent)},[fe.i,We,w]),Ye=(0,R.useCallback)((e,t)=>{if(!e||!e.key)return null;let r=Zn(ve,String(e.key));if(!r)return null;let i=typeof r.isDraggable==`boolean`?r.isDraggable:!r.static&&ee,a=typeof r.isResizable==`boolean`?r.isResizable:!r.static&&ie,o=r.resizeHandles||[...ae],c=i&&te&&r.isBounded!==!1,u=oe;return(0,z.jsx)($i,{containerWidth:n,cols:A,margin:N,containerPadding:he,maxRows:M,rowHeight:j,cancel:ne,handle:F,onDragStart:Re,onDrag:ze,onDragStop:Be,onResizeStart:Ve,onResize:He,onResizeStop:Ue,isDraggable:i,isResizable:a,isBounded:c,useCSSTransforms:pe&&ge,usePercentages:!ge,transformScale:me,positionStrategy:s,dragThreshold:re,w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minH:r.minH,minW:r.minW,maxH:r.maxH,maxW:r.maxW,static:r.static,droppingPosition:t?Ee:void 0,resizeHandles:o,resizeHandle:u,constraints:l,layoutItem:r,layout:ve,children:e},r.i)},[ve,n,A,N,he,M,j,ne,F,Re,ze,Be,Ve,He,Ue,ee,ie,te,pe,ge,me,s,re,Ee,ae,oe,l]),Xe=()=>be?(0,z.jsx)($i,{w:be.w,h:be.h,x:be.x,y:be.y,i:be.i,className:`react-grid-placeholder ${Se?`placeholder-resizing`:``}`,containerWidth:n,cols:A,margin:N,containerPadding:he,maxRows:M,rowHeight:j,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:pe,transformScale:me,constraints:l,layout:ve,children:(0,z.jsx)(`div`,{})}):null,Ze=f(ta,m),Qe={height:Le,...h};return(0,z.jsxs)(`div`,{ref:g,className:Ze,style:Qe,onDrop:se?Je:void 0,onDragLeave:se?Ke:void 0,onDragEnter:se?qe:void 0,onDragOver:se?Ge:void 0,children:[R.Children.map(t,e=>R.isValidElement(e)?Ye(e):null),se&&we&&Ye(we,!0),Xe()]})}var oa={lg:1200,md:996,sm:768,xs:480,xxs:0},sa={lg:12,md:10,sm:6,xs:4,xxs:2},ca=()=>{};function la(e,t,n,r){let i=[];R.Children.forEach(t,t=>{if(!R.isValidElement(t)||t.key===null)return;let n=String(t.key),r=e.find(e=>e.i===n);if(r)i.push({...r,i:n});else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Xn(i),w:1,h:1})}});let a=rr(i,{cols:n});return r.compact(a,n)}function ua(e){let{children:t,width:n,breakpoint:r,breakpoints:i=oa,cols:a=sa,layouts:o={},rowHeight:s=150,maxRows:c=1/0,margin:l=[10,10],containerPadding:u=null,compactor:d,onBreakpointChange:f=ca,onLayoutChange:p=ca,onWidthChange:m=ca,...h}=e,g=d??Br(`vertical`),_=g.type,v=g.allowOverlap,y=(0,R.useMemo)(()=>r??Hr(i,n),[]),b=(0,R.useMemo)(()=>Ur(y,a),[y,a]),x=(0,R.useMemo)(()=>Wr(o,i,y,y,b,_),[]),[S,C]=(0,R.useState)(y),[w,T]=(0,R.useState)(b),[E,D]=(0,R.useState)(x),[O,k]=(0,R.useState)(o),A=(0,R.useRef)(n),j=(0,R.useRef)(r),M=(0,R.useRef)(i),N=(0,R.useRef)(a),P=(0,R.useRef)(o),ee=(0,R.useRef)(_),te=(0,R.useRef)(O);(0,R.useEffect)(()=>{te.current=O},[O]);let F=(0,R.useMemo)(()=>(0,Qi.deepEqual)(o,P.current)?null:Wr(o,i,S,S,w,g),[o,i,S,w,g]),ne=F??E;(0,R.useEffect)(()=>{F!==null&&(D(F),k(o),te.current=o,P.current=o)},[F,o]),(0,R.useEffect)(()=>{if(_!==ee.current){let e=g.compact(er(ne),w),t={...te.current,[S]:e};D(e),k(t),te.current=t,p(e,t),ee.current=_}},[_,g,ne,w,v,S,p]),(0,R.useEffect)(()=>{let e=n!==A.current,o=r!==j.current,s=!(0,Qi.deepEqual)(i,M.current),c=!(0,Qi.deepEqual)(a,N.current);if(e||o||s||c){let e=r??Hr(i,n),o=Ur(e,a),d=S;if(d!==e||s||c){let n={...te.current};n[d]||(n[d]=er(E));let r=Wr(n,i,e,d,o,g);r=la(r,t,o,g),n[e]=r,C(e),T(o),D(r),k(n),te.current=n,f(e,o),p(r,n)}let h=Gr(l,e),_=u?Gr(u,e):null;m(n,h,o,_),A.current=n,j.current=r,M.current=i,N.current=a}},[n,r,i,a,S,w,E,t,g,_,v,l,u,f,p,m]);let re=(0,R.useCallback)(e=>{let t={...te.current,[S]:e};D(e),k(t),te.current=t,p(e,t)},[S,p]),ie=(0,R.useMemo)(()=>Gr(l,S),[l,S]),ae=(0,R.useMemo)(()=>u===null?null:Gr(u,S),[u,S]),oe=(0,R.useMemo)(()=>({cols:w,rowHeight:s,maxRows:c,margin:ie,containerPadding:ae}),[w,s,c,ie,ae]);return(0,z.jsx)(aa,{...h,width:n,gridConfig:oe,compactor:g,onLayoutChange:re,layout:ne,children:t})}function da(e){let{children:t,width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,rowHeight:u,maxRows:d,margin:f,containerPadding:p,droppingItem:m,compactType:h,preventCollision:g=!1,allowOverlap:_=!1,verticalCompact:v,isDraggable:y=!0,isBounded:b=!1,draggableHandle:x,draggableCancel:S,isResizable:C=!0,resizeHandles:w=[`se`],resizeHandle:T,isDroppable:E=!1,useCSSTransforms:D=!0,transformScale:O=1,autoSize:k,className:A,style:j,innerRef:M,onDragStart:N,onDrag:P,onDragStop:ee,onResizeStart:te,onResize:F,onResizeStop:ne,onDrop:re,onDropDragOver:ie}=e,ae=h===void 0?`vertical`:h;v===!1&&(ae=null);let oe={enabled:y,bounded:b,handle:x,cancel:S},se={enabled:C,handles:w,handleComponent:T},ce={enabled:E},le;le=D?O===1?Cr:Tr(O):wr;let I=Br(ae,_,g);return(0,z.jsx)(ua,{width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,rowHeight:u,maxRows:d,margin:f,containerPadding:p,compactor:I,dragConfig:oe,resizeConfig:se,dropConfig:ce,positionStrategy:le,droppingItem:m,autoSize:k,className:A,style:j,innerRef:M,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,onDragStart:N,onDrag:P,onDragStop:ee,onResizeStart:te,onResize:F,onResizeStop:ne,onDrop:re,onDropDragOver:ie,children:t})}da.displayName=`ResponsiveReactGridLayout`;var fa=da,pa=`react-grid-layout`;function ma(e){function t(t){let{measureBeforeMount:n=!1,className:r,style:i,...a}=t,[o,s]=(0,R.useState)(1280),[c,l]=(0,R.useState)(!1),u=(0,R.useRef)(null),d=(0,R.useRef)(null);return(0,R.useEffect)(()=>{l(!0)},[]),(0,R.useEffect)(()=>{let e=u.current;if(!(e instanceof HTMLElement))return;let t=null,n=new ResizeObserver(e=>{if(e[0]){let n=Math.round(e[0].contentRect.width);t!==null&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{s(e=>e===n?e:n),t=null})}});return n.observe(e),d.current=n,()=>{t!==null&&cancelAnimationFrame(t),n.unobserve(e),n.disconnect()}},[c]),n&&!c?(0,z.jsx)(`div`,{className:f(r,pa),style:i,ref:u}):(0,z.jsx)(e,{innerRef:u,className:r,style:i,...a,width:o})}return t.displayName=`WidthProvider(${e.displayName||e.name||`Component`})`,t}function ha(e){return e.reduce((e,t)=>Math.max(e,t.y+t.h),0)}function ga(e,t){return e.map(e=>({...e,x:0,w:t,minW:Math.min(e.minW??1,t)}))}var _a=[`overview`,`topology`,`activity`,`assistant`,`performance`,`trace`,`logs`],va={overview:{w:4,h:3,minW:3,minH:3},activity:{w:4,h:5,minW:3,minH:4},assistant:{w:4,h:3,minW:3,minH:3},topology:{w:8,h:5,minW:4,minH:4},performance:{w:8,h:5,minW:4,minH:4},logs:{w:8,h:5,minW:4,minH:4},trace:{w:8,h:4,minW:4,minH:4}};function ya(e,t){return e.xe.y)),o=(t,r)=>!e.some(e=>ya(e,{x:t,y:a,w:r,h:n}));for(let e=0;e+t<=r;e+=1)if(o(e,t))return{x:e,y:a,w:t};let s=e.reduce((e,t)=>ya(t,{x:0,y:a,w:r,h:n})?Math.max(e,t.x+t.w):e,0),c={x:s,w:0};for(let e=Math.min(s,r);ec.w&&(c={x:e,w:t-e}),e=t}return c.w>=i?{x:c.x,y:a,w:c.w}:{x:0,y:ha(e),w:t}}function xa(e){if(e>=2e3)return`bad`;if(e>=750)return`warn`}function Sa(e){return e>=.05?`bad`:e>=.01?`warn`:`dimmed`}var Ca=function(e,t){return Ca=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ca(e,t)};function B(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Ca(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var wa=`12px sans-serif`,Ta=20,Ea=100,Da=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function Oa(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;c=Ua&&(Ha=0),Ha++}function Ga(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function V(e){if(typeof e!=`object`||!e)return e;var t=e,n=Na.call(e);if(n===`[object Array]`){if(!So(e)){t=[];for(var r=0,i=e.length;r`u`&&typeof self<`u`?No.worker=!0:!No.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(No.node=!0,No.svgSupported=!0):Po(navigator.userAgent,No);function Po(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Fo=`.`,Io=`___EC__COMPONENT__CONTAINER___`,Lo=`___EC__EXTENDED_CLASS___`;function Ro(e){var t={main:``,sub:``};if(e){var n=e.split(Fo);t.main=n[0]||``,t.sub=n[1]||``}return t}function zo(e){vo(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Bo(e){return!!(e&&e[Lo])}function Vo(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Ho(t)?n=function(e){B(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Xa(n,this)),H(n.prototype,e),n[Lo]=!0,n.extend=this.extend,n.superCall=Ko,n.superApply=qo,n.superClass=t,n}}function Ho(e){return K(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Uo(e,t){e.extend=t.extend}var Wo=Math.round(Math.random()*10);function Go(e){var t=[`__\0is_clz`,Wo++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Ko(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function qo(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Jo(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){zo(r),e.prototype.type=r;var i=Ro(r);if(!i.sub)t[i.main]=e;else if(i.sub!==Io){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Io]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Ro(e),r=[],i=t[n.main];return i&&i[Io]?U(i,function(e,t){t!==Io&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Ro(e).main]},e.getAllClassMainTypes=function(){var e=[];return U(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Ro(e).main];return n&&n[Io]};function n(e){var n=t[e.main];return(!n||!n[Io])&&(n=t[e.main]={},n[Io]=!0),n}}function Yo(e,t){for(var n=0;n=0||i&&Ya(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Xo=Yo([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Zo=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Xo(this,e,t)},e}(),Qo=function(){function e(e){this.value=e}return e}(),$o=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Qo(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),es=function(){function e(e){this._list=new $o,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Qo(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),ts=new es(50);function ns(e){if(typeof e==`string`){var t=ts.get(e);return t&&t.image}return e}function rs(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=ts.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!as(t)&&a.pending.push(o)):(t=Aa.loadImage(e,is,is),t.__zrImageSrc=e,ts.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function is(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;tu||d>f||p>m||h>g)return!1;var _=!(u=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){Js(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&Js(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Rs.x=Bs.x=t.x,Rs.y=Vs.y=t.y,zs.x=Vs.x=t.x+t.width,zs.y=Bs.y=t.y+t.height,Rs.transform(n),Vs.transform(n),zs.transform(n),Bs.transform(n),e.x=Ns(Rs.x,zs.x,Bs.x,Vs.x),e.y=Ns(Rs.y,zs.y,Bs.y,Vs.y);var s=Ps(Rs.x,zs.x,Bs.x,Vs.x),c=Ps(Rs.y,zs.y,Bs.y,Vs.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=ss(e||[]),us(e,e,_s(ec,-t.x,-t.y)),fs(e,e,_s(ec,r,i)),us(e,e,_s(ec,n.x,n.y)),e},e}(),Ks=Z.create,qs=Z.set,Js=Z.copy,Ys=Z.calculateTransform,Xs=Z.applyTransform,Zs=Z.contain,Qs=new Z(0,0,0,0),$s=new Z(0,0,0,0),ec=[];function tc(e,t,n,r,i,a,o,s){var c=Fs(t-n),l=Fs(r-e),u=Ns(c,l),d=Is[i],f=Is[1-i],p=Ls[i];t=l||!Hs.bidirectional)&&(Us[d]=-l,Us[f]=0,Hs.useDir&&Hs.calcDirMTV())))}function nc(){var e=0,t=new Ms,n=new Ms,r={minTv:new Ms,maxTv:new Ms,useDir:!1,dirMinTv:new Ms,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Ps(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=sc)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Aa.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?oc=sc:i>2&&oc++,t}}var oc=0,sc=5;function cc(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=ac(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function lc(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Aa.measureText(t,e.font).width,n.put(t,r)),r}function uc(e,t,n,r){var i=lc(rc(t),e),a=mc(t);return new Z(fc(0,i,n),pc(0,a,r),i,a)}function dc(e,t,n,r){var i=((e||``)+``).split(` +`);if(i.length===1)return uc(i[0],t,n,r);for(var a=new Z(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function gc(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=hc(r[0],n.width),l+=hc(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var _c=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function vc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(` +`);a=yc(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l=s;l++)c-=s;var u=lc(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function bc(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=lc(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?xc(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=lc(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function xc(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=yc(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)bc(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=rc(l),S=0;S<_.length;S++)w=Math.max(lc(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Cc=function(){function e(){}return e}(),wc=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Tc=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Ec(e,t,n,r,i){var a=new Tc,o=Fc(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=_c.lastIndex=0,h;(h=_c.exec(o))!=null;){var g=h.index;g>m&&Dc(a,o.substring(m,g),t,p),Dc(a,h[2],t,p,h[1]),m=_c.lastIndex}md){var ee=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` +`),l=!0),r.accumWidth=m}else{var h=jc(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` +`);for(var g=rc(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var kc=$a(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Ac(e){return!Oc(e)||!!kc[e]}function jc(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=rc(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Mc(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;Z.set(Nc,fc(n,o,i),pc(r,s,a),o,s),Z.intersect(t,Nc,null,Pc);var c=Pc.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=fc(c.x,c.width,i,!0),e.baseY=pc(c.y,c.height,a,!0)}}var Nc=new Z(0,0,0,0),Pc={outIntersectRect:{},clamp:!0};function Fc(e){return e==null?e=``:e+=``}function Ic(e){var t=Fc(e.text),n=e.font;return Lc(e,lc(rc(n),t),mc(n),null)}function Lc(e,t,n,r){var i=new Z(fc(e.x||0,t,e.textAlign),pc(e.y||0,n,e.textBaseline),t,n),a=r??(Rc(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Rc(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var zc=ss,Bc=5e-5;function Vc(e){return e>Bc||e<-Bc}var Hc=[],Uc=[],Wc=os(),Gc=Math.abs,Kc=function(){function e(){}return e.prototype.getLocalTransform=function(e){return qc(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Vc(this.rotation)||Vc(this.x)||Vc(this.y)||Vc(this.scaleX-1)||Vc(this.scaleY-1)||Vc(this.skewX)||Vc(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(zc(n),this.invTransform=null);return}n||=os(),t?this.getLocalTransform(n):zc(n),e&&(t?ls(n,e,n):cs(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||os(),ps(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Hc);var n=Hc[0]<0?-1:1,r=Hc[1]<0?-1:1,i=((Hc[0]-n)*t+n)/Hc[0]||0,a=((Hc[1]-r)*t+r)/Hc[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||os(),ls(Uc,e.invTransform,t),t=Uc);var n=this.originX,r=this.originY;(n||r)&&(Wc[4]=n,Wc[5]=r,ls(Uc,t,Wc),Uc[4]-=n,Uc[5]-=r,t=Uc),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&ks(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&ks(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Gc(e[0]-1)>1e-10&&Gc(e[3]-1)>1e-10?Math.sqrt(Gc(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Xc(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&ds(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),qc=Kc.getLocalTransform;function Jc(){return new Kc}var Yc=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Xc(e,t){return qa(e,t,Yc)}var Zc={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Zc.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Zc.bounceIn(e*2)*.5:Zc.bounceOut(e*2-1)*.5+.5}},Qc=Math.pow,$c=Math.sqrt,el=1e-8,tl=1e-4,nl=$c(3),rl=1/3,il=ms(),al=ms(),ol=ms();function sl(e){return e>-el&&eel||e<-el}function ll(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function ul(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function dl(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(sl(u)&&sl(d)){if(sl(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(sl(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=$c(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Qc(-y,rl):Qc(y,rl),b=b<0?-Qc(-b,rl):Qc(b,rl);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*$c(u*u*u)),S=Math.acos(x)/3,C=$c(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+nl*Math.sin(S)))/(3*o),T=(-s+C*(w-nl*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function fl(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(sl(o)){if(cl(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(sl(u))i[0]=-a/(2*o);else if(u>0){var d=$c(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function pl(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function ml(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;il[0]=c,il[1]=l;for(var v=0;v<1;v+=.05)al[0]=ll(e,n,i,o,v),al[1]=ll(t,r,a,s,v),g=Os(il,al),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(sl(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=$c(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function yl(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function bl(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function xl(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;il[0]=o,il[1]=s;for(var f=0;f<1;f+=.05){al[0]=gl(e,n,i,f),al[1]=gl(t,r,a,f);var p=Os(il,al);p=0&&p=1?1:dl(0,r,a,1,e,s)&&ll(0,i,o,1,s[0])}}}var Tl=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ao,this.ondestroy=e.ondestroy||Ao,this.onrestart=e.onrestart||Ao,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=K(e)?e:Zc[e]||wl(e)},e}(),El={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Dl(e){return e=Math.round(e),e<0?0:e>255?255:e}function Ol(e){return e=Math.round(e),e<0?0:e>360?360:e}function kl(e){return e<0?0:e>1?1:e}function Al(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Dl(parseFloat(t)/100*255):Dl(parseInt(t,10))}function jl(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?kl(parseFloat(t)/100):kl(parseFloat(t))}function Ml(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Nl(e,t,n){return e+(t-e)*n}function Pl(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Fl(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Il=new es(20),Ll=null;function Rl(e,t){Ll&&Fl(Ll,t),Ll=Il.put(e,Ll||t.slice())}function zl(e,t){if(e){t||=[];var n=Il.get(e);if(n)return Fl(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in El)return Fl(t,El[r]),Rl(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Pl(t,0,0,0,1);return}return Pl(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Rl(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Pl(t,0,0,0,1);return}return Pl(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Rl(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Pl(t,+l[0],+l[1],+l[2],1):Pl(t,0,0,0,1);u=jl(l.pop());case`rgb`:if(l.length>=3)return Pl(t,Al(l[0]),Al(l[1]),Al(l[2]),l.length===3?u:jl(l[3])),Rl(e,t),t;Pl(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Pl(t,0,0,0,1);return}return l[3]=jl(l[3]),Bl(l,t),Rl(e,t),t;case`hsl`:if(l.length!==3){Pl(t,0,0,0,1);return}return Bl(l,t),Rl(e,t),t;default:return}}Pl(t,0,0,0,1)}}function Bl(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=jl(e[1]),i=jl(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Pl(t,Dl(Ml(o,a,n+1/3)*255),Dl(Ml(o,a,n)*255),Dl(Ml(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Vl(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Hl(e,t){var n=zl(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return ql(n,n.length===4?`rgba`:`rgb`)}}function Ul(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Dl(Nl(o[0],s[0],c)),n[1]=Dl(Nl(o[1],s[1],c)),n[2]=Dl(Nl(o[2],s[2],c)),n[3]=kl(Nl(o[3],s[3],c)),n}}function Wl(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=zl(t[i]),s=zl(t[a]),c=r-i,l=ql([Dl(Nl(o[0],s[0],c)),Dl(Nl(o[1],s[1],c)),Dl(Nl(o[2],s[2],c)),kl(Nl(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Gl(e,t,n,r){var i=zl(e);if(e)return i=Vl(i),t!=null&&(i[0]=Ol(K(t)?t(i[0]):t)),n!=null&&(i[1]=jl(K(n)?n(i[1]):n)),r!=null&&(i[2]=jl(K(r)?r(i[2]):r)),ql(Bl(i),`rgba`)}function Kl(e,t){var n=zl(e);if(n&&t!=null)return n[3]=kl(t),ql(n,`rgba`)}function ql(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Jl(e,t){var n=zl(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Yl=new es(100);function Xl(e){if(q(e)){var t=Yl.get(e);return t||(t=Hl(e,-.1),Yl.put(e,t)),t}if(fo(e)){var n=H({},e);return n.colorStops=W(e.colorStops,function(e){return{offset:e.offset,color:Hl(e.color,-.1)}}),n}return e}var Zl=Math.round;function Ql(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=zl(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var $l=1e-4;function eu(e){return e<$l&&e>-$l}function tu(e){return Zl(e*1e3)/1e3}function nu(e){return Zl(e*1e4)/1e4}function ru(e){return`matrix(`+tu(e[0])+`,`+tu(e[1])+`,`+tu(e[2])+`,`+tu(e[3])+`,`+nu(e[4])+`,`+nu(e[5])+`)`}var iu={left:`start`,right:`end`,center:`middle`,middle:`middle`};function au(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function ou(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function su(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function cu(e){return e&&!!e.image}function lu(e){return e&&!!e.svgElement}function uu(e){return cu(e)||lu(e)}function du(e){return e.type===`linear`}function fu(e){return e.type===`radial`}function pu(e){return e&&(e.type===`linear`||e.type===`radial`)}function mu(e){return`url(#`+e+`)`}function hu(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function gu(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*jo,i=Y(e.scaleX,1),a=Y(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Zl(o*jo)+`deg, `+Zl(s*jo)+`deg)`),c.join(` `)}var _u=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),vu=Array.prototype.slice;function yu(e,t,n){return(t-e)*n+e}function bu(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Fu,s=t;if(Qa(t)){var c=Ou(t);o=c,(c===1&&!so(t[0])||c===2&&!so(t[0][0]))&&(a=!0)}else if(so(t)&&!po(t))o=ku;else if(q(t)){if(!isNaN(+t))o=ku;else{var l=zl(t);l&&(s=l,o=Mu)}}else if(fo(t)){var u=H({},s);u.colorStops=W(t.colorStops,function(e){return{offset:e.offset,color:zl(e.color)}}),du(t)?o=Nu:fu(t)&&(o=Pu),s=u}i===0?this.valType=o:(o!==this.valType||o===Fu)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=K(n)?n:Zc[n]||wl(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Lu(r),c=Iu(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Ru:e[s];if((Lu(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Lu(i))i===Au?bu(g,f[r],p[r],h):xu(g,f[r],p[r],h);else if(Iu(i)){var _=f[r],v=p[r],y=i===Nu;e[s]={type:y?`linear`:`radial`,x:yu(_.x,v.x,h),y:yu(_.y,v.y,h),colorStops:W(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:yu(e.offset,n.offset,h),color:Du(bu([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=yu(_.x2,v.x2,h),e[s].y2=yu(_.y2,v.y2,h)):e[s].r=yu(_.r,v.r,h)}else if(c)bu(g,f[r],p[r],h),n||(e[s]=Du(g));else{var b=yu(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ku?e[n]=e[n]+r:t===Mu?(zl(e[n],Ru),Su(Ru,Ru,r,1),e[n]=Du(Ru)):t===Au?Su(e[n],e[n],r,1):t===ju&&Cu(e[n],e[n],r,1)},e}(),Bu=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Ga(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,no(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,Eu(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Eu(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Vu=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ku:Gu},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&zl(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,ql(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},H(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(J(e))for(var n=no(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Ju,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Ju;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(Ya(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Ga(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=cd(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,ud(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=Ya(r,e),a=Ya(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var dd=`__zr_style_`+Math.round(Math.random()*10),fd={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},pd={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};fd[dd]=!0;var md=[`z`,`z2`,`invisible`],hd=[`invisible`],gd=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=no(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Td[0]=Cd(i)*n+e,Td[1]=Sd(i)*r+t,Ed[0]=Cd(a)*n+e,Ed[1]=Sd(a)*r+t,l(s,Td,Ed),u(c,Td,Ed),i%=wd,i<0&&(i+=wd),a%=wd,a<0&&(a+=wd),i>a&&!o?a+=wd:ii&&(Dd[0]=Cd(p)*n+e,Dd[1]=Sd(p)*r+t,l(s,Dd,s),u(c,Dd,c))}var Fd={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Id=[],Ld=[],Rd=[],zd=[],Bd=[],Vd=[],Hd=Math.min,Ud=Math.max,Wd=Math.cos,Gd=Math.sin,Kd=Math.abs,qd=Math.PI,Jd=qd*2,Yd=typeof Float32Array<`u`,Xd=[];function Zd(e){return Math.round(e/qd*1e8)/1e8%2*qd}function Qd(e,t){var n=Zd(e[0]);n<0&&(n+=Jd);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Jd?i=n+Jd:t&&n-i>=Jd?i=n-Jd:!t&&n>i?i=n+(Jd-Zd(n-i)):t&&n0&&(this._ux=Kd(n/Uu/e)||0,this._uy=Kd(n/Uu/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Fd.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Kd(e-this._xi),r=Kd(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Fd.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Fd.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Fd.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Xd[0]=r,Xd[1]=i,Qd(Xd,a),r=Xd[0],i=Xd[1];var o=i-r;return this.addData(Fd.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Wd(i)*n+e,this._yi=Gd(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Fd.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Fd.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Yd&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Rd[0]=Rd[1]=Bd[0]=Bd[1]=Number.MAX_VALUE,zd[0]=zd[1]=Vd[0]=Vd[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Kd(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Fd.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=hl(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Fd.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Sl(i,a,y,b,h,g,10),i=h,a=g;break;case Fd.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Wd(D)*T+C,s=Gd(D)*E+w),m=Ud(T,E)*Hd(Jd,Math.abs(O)),i=Wd(k)*T+C,a=Gd(k)*E+w;break;case Fd.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Fd.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Fd.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Fd.L:u=n[x++],d=n[x++];var w=Kd(u-c),T=Kd(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Fd.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],P=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;pl(c,k,j,N,D,Id),pl(l,A,M,P,D,Ld),e.bezierCurveTo(Id[1],Ld[1],Id[2],Ld[2],Id[3],Ld[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case Fd.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;bl(c,k,j,D,Id),bl(l,A,M,D,Ld),e.quadraticCurveTo(Id[1],Ld[1],Id[2],Ld[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Fd.A:var ee=n[x++],te=n[x++],F=n[x++],ne=n[x++],re=n[x++],ie=n[x++],ae=n[x++],oe=!n[x++],se=F>ne?F:ne,ce=Kd(F-ne)>.001,le=re+ie,I=!1;if(f){var E=p[g++];h+E>_&&(le=re+ie*(_-h)/E,I=!0),h+=E}if(ce&&e.ellipse?e.ellipse(ee,te,F,ne,ae,re,le,oe):e.arc(ee,te,se,re,le,oe),I)break lo;C&&(o=Wd(re)*F+ee,s=Gd(re)*ne+te),c=Wd(le)*F+ee,l=Gd(le)*ne+te;break;case Fd.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var L=n[x++],ue=n[x++];if(f){var E=p[g++];if(h+E>_){var de=_-h;e.moveTo(u,d),e.lineTo(u+Hd(de,L),d),de-=L,de>0&&e.lineTo(u+L,d+Hd(de,ue)),de-=ue,de>0&&e.lineTo(u+Ud(L-de,0),d+ue),de-=L,de>0&&e.lineTo(u,d+Ud(ue-de,0));break lo}h+=E}e.rect(u,d,L,ue);break;case Fd.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Fd,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function ef(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=of);var f=Math.atan2(c,s);return f<0&&(f+=of),f>=r&&f<=i||f+of>=r&&f+of<=i}function cf(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var lf=$d.CMD,uf=Math.PI*2,df=1e-4;function ff(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&hf(),p=ll(t,r,a,s,mf[0]),f>1&&(m=ll(t,r,a,s,mf[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=gl(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);pf[0]=-c,pf[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=uf-1e-4){r=0,i=uf;var u=a?1:-1;return o>=pf[0]+e&&o<=pf[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=uf,i+=uf);for(var f=0,p=0;p<2;p++){var m=pf[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=uf+h),(h>=r&&h<=i||h+uf>=r&&h+uf<=i)&&(h>Math.PI/2&&h1&&(n||(s+=cf(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case lf.M:u=a[m++],d=a[m++],c=u,l=d;break;case lf.L:if(n){if(ef(c,l,a[m],a[m+1],t,r,i))return!0}else s+=cf(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lf.C:if(n){if(tf(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=gf(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lf.Q:if(n){if(nf(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=_f(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lf.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=cf(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(sf(_,v,b,x,x+S,C,t,w,i))return!0}else s+=vf(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case lf.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(ef(u,d,f,d,t,r,i)||ef(f,d,f,p,t,r,i)||ef(f,p,u,p,t,r,i)||ef(u,p,u,d,t,r,i))return!0}else s+=cf(f,d,f,p,r,i),s+=cf(u,p,u,d,r,i);break;case lf.Z:if(n){if(ef(c,l,u,d,t,r,i))return!0}else s+=cf(c,l,u,d,r,i);c=u,l=d}}return!n&&!ff(l,d)&&(s+=cf(c,l,u,d,r,i)||0),s!==0}function bf(e,t,n){return yf(e,0,!1,t,n)}function xf(e,t,n,r){return yf(e,t,!0,n,r)}var Sf=Ja({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},fd),Cf={style:Ja({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},pd.style)},wf=Yc.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Tf=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Gu:t>.2?qu:Ku}if(e)return Ku}return Gu},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(q(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Jl(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new $d(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),xf(a,o/s,e,t)))return!0}if(this.hasFill())return bf(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:H(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Oo(Sf,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=H({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=H({},r.shape),H(c,n.shape)):(c=H({},i?this.shape:r.shape),H(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=H({},this.shape);for(var l={},u=no(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Nf=Math.round;function Pf(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Nf(r*2)===Nf(i*2)&&(e.x1=e.x2=If(r,s,!0)),Nf(a*2)===Nf(o*2)&&(e.y1=e.y2=If(a,s,!0)),e):e}}function Ff(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=If(r,s,!0),e.y=If(i,s,!0),e.width=Math.max(If(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(If(i+o,s,!1)-e.y,o===0?0:1),e):e}}function If(e,t,n){if(!t)return e;var r=Nf(e*2);return(r+Nf(t))%2==0?r/2:(r+(n?1:-1))/2}var Lf=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Rf={},zf=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Lf},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Ff(Rf,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Mf(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Tf);zf.prototype.type=`rect`;var Bf={fill:`#000`},Vf=2,Hf={},Uf={style:Ja({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},pd.style)},Wf=function(e){B(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Bf,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&rp(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=tp(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Df),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=ep(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=$f(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Vf,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=ho(s.opacity,t.opacity,1),Yf(p,s),y&&(p.lineWidth=ho(s.lineWidth,t.lineWidth,g),p.lineDash=Y(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Lc(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(zf),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=Y(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(jf),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=Y(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=ho(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return Xf(e)&&(t=[e.fontStyle,e.fontWeight,Jf(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&yo(t)||e.textFont||e.font},t}(gd),Gf={left:!0,right:1,center:1},Kf={top:1,bottom:1,middle:1},qf=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Jf(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Yf(e,t){for(var n=0;n0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var yp=bp;function bp(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return xp(e,t,n)}function xp(e,t,n){return q(e)?Cp(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Sp(e){return q(e)&&Cp(e)}function Cp(e){return!!op(e).match(/%$/)}function wp(e,t,n){return isNaN(t)?n?``+e:+e:(t=sp(cp(0,t),ap),e=(+e).toFixed(t),n?e:+e)}function Tp(e){return e.sort(function(e,t){return e-t}),e}function Ep(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(up(e*t)/t===e)return n}return Dp(e)}function Dp(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return cp(0,(a<0?0:i-1-a)-r)}function Op(e,t,n){var r=lp(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=mp(2*lp(n||1)*lp(r))/hp,a=mp(lp(t))/hp,o=cp(0,fp(-i+a));return isFinite(o)||(o=NaN),o}function kp(e,t){var n=cp(Ep(e),Ep(t)),r=e+t;return n>ap?r:wp(r,n)}var Ap=pp(2,53)-1;function jp(e){var t=gp*2;return(e%t+t)%t}function Mp(e){return e>-ip&&e=10&&t++,t}function Lp(e,t){var n=Ip(e),r=pp(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,wp(e,-n)}function Rp(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Mm(){return[1/0,-1/0]}function Nm(e,t){Lm(t)&&(te[1]&&(e[1]=t))}function Pm(e,t){Lm(t)&&te[1]&&(e[1]=t)}function Im(e,t){Rm(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Lm(e){return e!=null&&isFinite(e)}function Rm(e,t){return Lm(e)&&Lm(t)&&e<=t}function zm(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Bm(e){Rm(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Vm(){var e=`__ec_once_`+Hm++;return function(t,n){ko(t,e)||(t[e]=1,n())}}var Hm=Vp();function Um(e,t,n){var r=X(),i=0;U(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Wm(e){return e.value+``}function Gm(e){return e+``}function Km(e,t){return Y(t,!0)?e.seriesIndex+2:0}function qm(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Jm(e,t){return{seriesType:e,overallReset:t}}function Ym(e){return{overallReset:e}}var Xm=xm(),Zm=function(e,t,n,r){if(r){var i=Xm(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Xm(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},Qm=`series`,$m=X([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),eh=`original`,th=`arrayRows`,nh=`objectRows`,rh=`keyedColumns`,ih=`typedArray`,ah=`unknown`,oh=`column`,sh=`Roam`,ch=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],lh=function(){function e(e){U(ch,function(t){this[t]=io(e[t],e)},this)}return e}();function uh(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var dh=1,fh={},ph=xm(),mh=xm(),hh=[`emphasis`,`blur`,`select`],gh=[`normal`,`emphasis`,`blur`,`select`],_h=`highlight`,vh=`downplay`,yh=`select`,bh=`unselect`,xh=`toggleSelect`,Sh=`selectchanged`;function Ch(e){return e!=null&&e!==`none`}function wh(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Th(e){wh(e,`emphasis`,2)}function Eh(e){e.hoverState===2&&wh(e,`normal`,0)}function Dh(e){wh(e,`blur`,1)}function Oh(e){e.hoverState===1&&wh(e,`normal`,0)}function kh(e){e.selected=!0}function Ah(e){e.selected=!1}function jh(e,t,n){t(e,n)}function Mh(e,t,n){jh(e,t,n),e.isGroup&&e.traverse(function(e){jh(e,t,n)})}function Nh(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Ph(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof Tf){var o=ph(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Ch(s)||Ch(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=H({},r),l=H({},l),l.fill=s):!Ch(l.fill)&&Ch(s)?(a=!0,r=H({},r),l=H({},l),l.fill=Xl(s)):!Ch(l.stroke)&&Ch(c)&&(a||(r=H({},r),l=H({},l)),l.stroke=Xl(c)),r.style=l}}if(r&&r.z2==null){a||(r=H({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Ih(e,t,n){if(n&&n.z2==null){n=H({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Lh(e,t,n){var r=Ya(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Ph(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=H({},n),o=H({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Rh(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Fh(this,e,t,n);if(e===`blur`)return Lh(this,e,n);if(e===`select`)return Ih(this,e,n)}return n}function zh(e){e.stateProxy=Rh;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Rh),n&&(n.stateProxy=Rh)}function Bh(e,t){!Jh(e,t)&&!e.__highByOuter&&Mh(e,Th)}function Vh(e,t){!Jh(e,t)&&!e.__highByOuter&&Mh(e,Eh)}function Hh(e,t){e.__highByOuter|=1<<(t||0),Mh(e,Th)}function Uh(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Mh(e,Eh)}function Wh(e){Mh(e,Dh)}function Gh(e){Mh(e,Oh)}function Kh(e){Mh(e,kh)}function qh(e){Mh(e,Ah)}function Jh(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Yh(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=mh(i),o=uh(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Oh(e)}),s&&n.push(i)),a.isBlured=!1}),U(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Xh(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function ag(e,t,n){fg(e,!0),Mh(e,zh),cg(e,t,n)}function og(e){fg(e,!1)}function sg(e,t,n,r){r?og(e):ag(e,t,n)}function cg(e,t,n){var r=Xm(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var lg=[`emphasis`,`blur`,`select`],ug={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function dg(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=Cg(m),s*=Cg(m));var h=(i===a?-1:1)*Cg((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Tg(d)*g-wg(d)*_,y=(t+r)/2+wg(d)*g+Tg(d)*_,b=kg([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=kg(x,S);if(Og(x,S)<=-1&&(C=Eg),Og(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Eg*1e6)/1e6;C=Eg*2+w%2*Eg}u.addData(l,v,y,o,s,b,C,d,a)}var jg=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Mg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ng(e){var t=new $d;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=$d.CMD,c=e.match(jg);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=Ya(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=Ya(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function i_(e){var t;if(G(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function a_(e,t){var n,r=$g(t.r,0),i=$g(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Zg(c-s),p=f>Kg&&f%Kg;if(p>t_&&(f=p),!(r>t_))e.moveTo(l,u);else if(f>Kg-t_)e.moveTo(l+r*Jg(s),u+r*qg(s)),e.arc(l,u,r,s,c,!d),i>t_&&(e.moveTo(l+i*Jg(c),u+i*qg(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Jg(s),j=r*qg(s),M=i*Jg(c),N=i*qg(c),P=f>t_;if(P){var ee=t.cornerRadius;ee&&(n=i_(ee),m=n[0],h=n[1],g=n[2],_=n[3]);var te=Zg(r-i)/2;if(v=e_(te,g),y=e_(te,_),b=e_(te,m),x=e_(te,h),w=S=$g(v,y),T=C=$g(b,x),(S>t_||C>t_)&&(E=r*Jg(c),D=r*qg(c),O=i*Jg(s),k=i*qg(s),ft_){var ce=e_(g,w),le=e_(_,w),I=r_(O,k,A,j,r,ce,d),L=r_(E,D,M,N,r,le,d);e.moveTo(l+I.cx+I.x0,u+I.cy+I.y0),w0&&e.arc(l+I.cx,u+I.cy,ce,Xg(I.y0,I.x0),Xg(I.y1,I.x1),!d),e.arc(l,u,r,Xg(I.cy+I.y1,I.cx+I.x1),Xg(L.cy+L.y1,L.cx+L.x1),!d),le>0&&e.arc(l+L.cx,u+L.cy,le,Xg(L.y1,L.x1),Xg(L.y0,L.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>t_)||!P)e.lineTo(l+M,u+N);else if(T>t_){var ce=e_(m,T),le=e_(h,T),I=r_(M,N,E,D,i,-le,d),L=r_(A,j,O,k,i,-ce,d);e.lineTo(l+I.cx+I.x0,u+I.cy+I.y0),T0&&e.arc(l+I.cx,u+I.cy,le,Xg(I.y0,I.x0),Xg(I.y1,I.x1),!d),e.arc(l,u,i,Xg(I.cy+I.y1,I.cx+I.x1),Xg(L.cy+L.y1,L.cx+L.x1),d),ce>0&&e.arc(l+L.cx,u+L.cy,ce,Xg(L.y1,L.x1),Xg(L.y0,L.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var o_=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),s_=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new o_},t.prototype.buildPath=function(e,t){a_(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Tf);s_.prototype.type=`sector`;var c_=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),l_=function(e){B(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new c_},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Tf);l_.prototype.type=`ring`;function u_(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=u_(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sN_[1]){if(i=!1,P_.negativeSize||n)return i;var s=j_(N_[0]-M_[1]),c=j_(M_[0]-N_[1]);k_(s,c)>I_.len()&&(s=c||!P_.bidirectional)&&(Ms.scale(F_,o,-c*r),P_.useDir&&P_.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function U_(e,t,n,r,i,a){H_(`update`,e,t,n,r,i,a)}function W_(e,t,n,r,i,a){H_(`enter`,e,t,n,r,i,a)}function G_(e){if(!e.__zr)return!0;for(var t=0;tw_,BezierCurve:()=>S_,BoundingRect:()=>Z,Circle:()=>Hg,CompoundPath:()=>T_,Ellipse:()=>Wg,Group:()=>Bg,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>jf,IncrementalDisplayable:()=>z_,Line:()=>v_,LinearGradient:()=>D_,OrientedBoundingRect:()=>L_,Path:()=>Tf,Point:()=>Ms,Polygon:()=>p_,Polyline:()=>h_,RadialGradient:()=>O_,Rect:()=>zf,Ring:()=>l_,Sector:()=>s_,Text:()=>Wf,WH:()=>$_,XY:()=>Q_,applyTransform:()=>mv,calcZ2Range:()=>Lv,clipPointsByRect:()=>yv,clipRectByRect:()=>bv,createIcon:()=>xv,decomposeTransform:()=>Vv,ensureCopyRect:()=>Pv,ensureCopyTransform:()=>Fv,expandOrShrinkRect:()=>Ev,extendPath:()=>nv,extendShape:()=>ev,getCurrentCanvasPainter:()=>Uv,getShapeClass:()=>iv,getTransform:()=>pv,groupTransition:()=>vv,initProps:()=>W_,isBoundingRectAxisAligned:()=>Mv,isElementRemoved:()=>G_,lineLineIntersect:()=>Cv,linePolygonIntersect:()=>Sv,makeImage:()=>ov,makePath:()=>av,mergePath:()=>cv,payloadDisableAnimation:()=>Bv,registerShape:()=>rv,removeElement:()=>K_,removeElementWithFadeOut:()=>J_,resizePath:()=>lv,retrieveZInfo:()=>Iv,setTooltipConfig:()=>kv,subPixelOptimize:()=>fv,subPixelOptimizeLine:()=>uv,subPixelOptimizeRect:()=>dv,transformDirection:()=>hv,traverseElements:()=>jv,traverseUpdateZ:()=>Rv,updateProps:()=>U_}),Z_={},Q_=[`x`,`y`],$_=[`width`,`height`];function ev(e){return Tf.extend(e)}var tv=Rg;function nv(e,t){return tv(e,t)}function rv(e,t){Z_[e]=t}function iv(e){if(Z_.hasOwnProperty(e))return Z_[e]}function av(e,t,n,r){var i=Lg(e,t);return n&&(r===`center`&&(n=sv(n,i.getBoundingRect())),lv(i,n)),i}function ov(e,t,n){var r=new jf({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(sv(t,i))}}});return r}function sv(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var cv=zg;function lv(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function uv(e,t){return Pf(e,e,{lineWidth:t}),e}function dv(e,t){return Ff(e,e,t),e}var fv=If;function pv(e,t){for(var n=ss([]);e&&e!==t;)ls(n,e.getLocalTransform(),n),e=e.parent;return n}function mv(e,t,n){return t&&!Qa(t)&&(t=Kc.getLocalTransform(t)),n&&(t=ps([],t)),ks([],e,t)}function hv(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:lp(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:lp(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=mv(a,t,n),lp(a[0])>lp(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function gv(e){return!e.isGroup}function _v(e){return e.shape!=null}function vv(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){gv(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return _v(e)&&(t.shape=V(e.shape)),t}var a=r(e);t.traverse(function(e){if(gv(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),U_(e,r,n,Xm(e).dataIndex)}}})}function yv(e,t){return W(e,function(e){var n=e[0];n=cp(n,t.x),n=sp(n,t.x+t.width);var r=e[1];return r=cp(r,t.y),r=sp(r,t.y+t.height),[n,r]})}function bv(e,t){var n=cp(e.x,t.x),r=sp(e.x+e.width,t.x+t.width),i=cp(e.y,t.y),a=sp(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function xv(e,t,n){var r=H({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),Ja(i,n),new jf(r)):av(e.replace(`path://`,``),r,n,`center`)}function Sv(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=wv(p,m,u,d)/f;return!(g<0||g>1)}function wv(e,t,n,r){return e*r-n*t}function Tv(e){return e<=1e-6&&e>=-1e-6}function Ev(e,t,n,r,i){return t==null?e:(so(t)?Dv[0]=Dv[1]=Dv[2]=Dv[3]=t:(Dv[0]=t[0],Dv[1]=t[1],Dv[2]=t[2],Dv[3]=t[3]),r&&(Dv[0]=cp(0,Dv[0]),Dv[1]=cp(0,Dv[1]),Dv[2]=cp(0,Dv[2]),Dv[3]=cp(0,Dv[3])),n&&(Dv[0]=-Dv[0],Dv[1]=-Dv[1],Dv[2]=-Dv[2],Dv[3]=-Dv[3]),Ov(e,Dv,`x`,`width`,3,1,i&&i[0]||0),Ov(e,Dv,`y`,`height`,0,2,i&&i[1]||0),e)}var Dv=[0,0,0,0];function Ov(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=cp(0,sp(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:lp(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function kv(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=q(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&U(no(c),function(e){ko(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Xm(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:Ja({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Av(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function jv(e,t){if(e){if(G(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Rv(e,t,n){zv(e,t,n,-1/0)}function zv(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Wy=(e={},e[th+`_`+oh]={pure:!0,appendData:i},e[th+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[nh]={pure:!0,appendData:i},e[rh]={pure:!0,appendData:function(e){var t=this._data;U(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[eh]={appendData:i},e[ih]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){so(t)||Xp(``),this._opFn=fb[e],this._rvalFloat=zp(t)}return e.prototype.evaluate=function(e){return so(e)?this._opFn(e,this._rvalFloat):this._opFn(zp(e),this._rvalFloat)},e})();var pb=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=so(e)?e:zp(e),r=so(t)?t:zp(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=q(e),s=q(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=zp(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=zp(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function mb(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function hb(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,_b=typeof Uint16Array>`u`?Array:Uint16Array,vb=typeof Int32Array>`u`?Array:Int32Array,yb=typeof Float64Array>`u`?Array:Float64Array,bb={float:yb,int:vb,ordinal:Array,number:Array,time:yb},xb;function Sb(e){return e>65535?gb:_b}function Cb(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function wb(e,t,n,r,i){var a=bb[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=W(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(Sb(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return db(e[r],this._dimensions[r])}xb={arrayRows:e,objectRows:function(e,t,n,r){return db(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return db(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Eb=xm(),Db={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Ob=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=jb(this.source))},e.prototype.getSourceDimensionIndex=function(e){return Y(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=zy(this.source),n=!Mb(e),r=``,i=[],a=0,o=0;a30}var Nb=J,Pb=W,Fb=typeof Int32Array>`u`?Array:Int32Array,Ib=`e\0\0`,Lb=-1,Rb=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],zb=[`_approximateExtent`],Bb,Vb,Hb,Ub,Wb,Gb,Kb,qb=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;kb(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),G(i)?i=i.slice():Nb(i)&&(i=H({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Nb(t)?H(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Nb(e)?H(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?H(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Zm(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){U(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Pb(this.dimensions,this._getDimInfo,this),this.hostModel),Wb(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];K(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(go(arguments)))})},e.internalField=function(){Bb=function(e){var t=e._invertedIndicesMap;U(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Fb(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Jb(e,t){Ay(e)||(e=My(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=X(),a=[],o=Yb(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Mb(o),c=r===e.dimensionsDefine,l=c?jb(e):Ab(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=X(u),f=new vb(o),p=0;p0&&(e.name+=t-1)}),new Ob({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Yb(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return U(t,function(e){var t;J(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Xb(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Zb={},Qb={},$b=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Zb,!0),this._normalMasterList=n(Qb,!1);function n(n,r){var i=[];return U(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){U(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Zb[e]=t;return}Qb[e]=t},e.get=function(e){return Qb[e]||Zb[e]},e}();function ex(e){return!!Zb[e]}var tx=X();function nx(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=tx.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function rx(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!ex(n)&&(i=0))}return{coordSysType:n,kind:i}}function ix(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=rx(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var ax=function(){function e(e){this.coordSysDims=[],this.axisMap=X(),this.categoryAxisMap=X(),this.coordSysName=e}return e}();function ox(e){var t=e.get(`coordinateSystem`),n=new ax(t),r=sx[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var sx={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Tm).models[0],a=e.getReferringComponents(`yAxis`,Tm).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),cx(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),cx(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Tm).models[0];t.coordSysDims=[`single`],n.set(`single`,i),cx(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Tm).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),cx(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),cx(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();U(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),cx(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Tm).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function cx(e){return e.get(`type`)===`category`}function lx(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;ux(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(U(a,function(e,t){q(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),U(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;U(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function ux(e){return!kb(e.schema)}function dx(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function fx(e,t){return dx(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function px(e,t){var n=e.get(`coordinateSystem`),r=$b.get(n),i;return t&&t.coordSysDims&&(i=W(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=cb(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function mx(e,t,n){var r,i;return n&&U(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function hx(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=My(e)):(i=r.getSource(),a=i.sourceFormat===eh);var o=ox(t),s=px(t,o),c=n.useEncodeDefaulter,l=K(c)?c:c?ao(wy,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Jb(i,u),f=mx(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=lx(t,{schema:d,store:p}),h=new qb(d,t);h.setCalculationInfo(m);var g=f!=null&&gx(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function gx(e){if(e.sourceFormat===`original`)return!G(rm(_x(e.data||[])))}function _x(e){for(var t=0;t=0&&n.push(e)}),n}}function Sx(e,t){return Ka(Ka({},e,!0),t,!0)}var Cx=Math.log(2);function Tx(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){U(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Nx(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Ex(s,o):Ex(o,s))}function Px(e){return e.nodeName.toUpperCase()===`CANVAS`}var Fx=/([&<>"'])/g,Ix={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Lx(e){return e==null?``:(e+``).replace(Fx,function(e,t){return Ix[t]})}var Rx={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},zx={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Bx=`ZH`,Vx=`EN`,Hx=Vx,Ux={},Wx={},Gx=No.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Hx).toUpperCase().indexOf(Bx)>-1?Bx:Hx}():Hx;function Kx(e,t){e=e.toUpperCase(),Wx[e]=new _y(t),Ux[e]=t}function qx(e){if(q(e)){var t=Ux[e.toUpperCase()]||{};return e===Bx||e===Vx?V(t):Ka(V(t),V(Ux[Hx]),!1)}return Ka(V(e),V(Ux[Hx]),!1)}function Jx(e){return Wx[e]}function Yx(){return Wx[Hx]}Kx(Vx,Rx),Kx(Bx,zx);var Xx=null;function Zx(){return Xx}function Qx(e,t){var n=Zx(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function $x(e){var t=e.brk;return t?t.breaks:[]}function eS(e){var t=e.brk;return t?t.hasBreaks():!1}var tS=1e3,nS=tS*60,rS=nS*60,iS=rS*24,aS=iS*365,oS={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},sS={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},cS=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,lS=`{yyyy}-{MM}-{dd}`,uS={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:lS,hour:lS+` `+sS.hour,minute:lS+` `+sS.minute,second:lS+` `+sS.second,millisecond:cS},dS=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],fS=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function pS(e){return!q(e)&&!K(e)?mS(e):e}function mS(e){e||={};var t={},n=!0;return U(dS,function(t){n&&=e[t]==null}),U(dS,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=dS[s],l=J(a)&&!G(a)?a[c]:a,u=void 0;G(l)?(u=l.slice(),o=u[0]||``):q(l)?(o=l,u=[o]):(o==null?o=sS[r]:oS[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function hS(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function gS(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function _S(e){return e===gS(e)}function vS(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function yS(e,t,n,r){var i=Pp(e),a=i[CS(n)](),o=i[wS(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[TS(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[ES(n)](),d=(u-1)%12+1,f=i[DS(n)](),p=i[OS(n)](),m=i[kS(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof _y?r:Jx(r||Gx)||Yx()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,hS(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,hS(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,hS(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,hS(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,hS(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,hS(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,hS(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,hS(m,3)).replace(/{S}/g,m+``)}function bS(e,t,n,r,i){var a=null;if(q(n))a=n;else if(K(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Zx();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=xS(e.value,i);a=n[u][u][0]}}return yS(new Date(e.value),a,i,r)}function xS(e,t){var n=Pp(e),r=n[wS(t)]()+1,i=n[TS(t)](),a=n[ES(t)](),o=n[DS(t)](),s=n[OS(t)](),c=n[kS(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function SS(e,t,n){switch(t){case`year`:e[jS(n)](0);case`month`:e[MS(n)](1);case`day`:e[NS(n)](0);case`hour`:e[PS(n)](0);case`minute`:e[FS(n)](0);case`second`:e[IS(n)](0)}return e}function CS(e){return e?`getUTCFullYear`:`getFullYear`}function wS(e){return e?`getUTCMonth`:`getMonth`}function TS(e){return e?`getUTCDate`:`getDate`}function ES(e){return e?`getUTCHours`:`getHours`}function DS(e){return e?`getUTCMinutes`:`getMinutes`}function OS(e){return e?`getUTCSeconds`:`getSeconds`}function kS(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function AS(e){return e?`setUTCFullYear`:`setFullYear`}function jS(e){return e?`setUTCMonth`:`setMonth`}function MS(e){return e?`setUTCDate`:`setDate`}function NS(e){return e?`setUTCHours`:`setHours`}function PS(e){return e?`setUTCMinutes`:`setMinutes`}function FS(e){return e?`setUTCSeconds`:`setSeconds`}function IS(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function LS(e){if(!Bp(e))return q(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function RS(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var zS=_o;function BS(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&yo(e)?e:`-`}function a(e){return Wp(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Pp(e):e;if(!isNaN(+c))return yS(c,r,n);if(s)return`-`}if(t===`ordinal`)return oo(e)?i(e):so(e)&&a(e)?e+``:`-`;var l=zp(e);return a(l)?LS(l):oo(e)?i(e):typeof e==`boolean`?e+``:`-`}var VS=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],HS=function(e,t){return`{`+e+(t??``)+`}`};function US(e,t,n){G(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function GS(e,t){return t||=`transparent`,q(e)?e:J(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var KS=U,qS=[`left`,`right`,`top`,`bottom`,`width`,`height`],JS=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function YS(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var XS=YS;ao(YS,`vertical`),ao(YS,`horizontal`);function ZS(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function QS(e,t,n){n=zS(n||0);var r=t.width,i=t.height,a=yp(e.left,r),o=yp(e.top,i),s=yp(e.right,r),c=yp(e.bottom,i),l=yp(e.width,r),u=yp(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new Z((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function $S(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i=u)return a;for(var d=0;d=0;o--)a=Ka(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Em(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return ZS(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(_y);Uo(cC,_y),Jo(cC),bx(cC),xx(cC,lC);function lC(e){var t=[];return U(cC.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=W(t,function(e){return Ro(e).main}),e!==`dataset`&&Ya(t,`dataset`)<=0&&t.unshift(`dataset`),t}var uC=xm(),dC=xm(),fC=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=em(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return hC(this,uC,r,i,e,t,n)},e.prototype.clearColorPalette=function(){gC(this,uC)},e}();function pC(e,t,n,r){return hC(e,dC,em(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function mC(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function hC(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:mC(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function gC(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var _C=/\{@(.+?)\}/g,vC=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&G(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),K(i))return s.status=t,s.dimensionIndex=r,i(s);if(q(i))return US(i,s).replace(_C,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=ib(o,e,i);if(a&&G(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return ib(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function yC(e){var t,n;return J(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function bC(e){return new xC(e)}var xC=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(FC(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=lo(o)?ih:eh,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=Y(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=Y(u.sourceHeader,d.sourceHeader),m=Y(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[jy(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[jy(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&IC(``);var i,a=[],o=[];return U(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&IC(``),a.push(t),o.push(e._getVersionSign())}),n?i=jC(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Ny(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return U(e.blocks,function(e){var n=JC(e);n>=t&&(t=n+ +(r&&(!n||KC(e)&&!e.noHeader)))}),t}return 0}function YC(e,t,n,r){var i=t.noHeader,a=QC(JC(t)),o=[],s=t.blocks||[];vo(!s||G(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(ko(l,c)){var u=new pb(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}U(s,function(n,i){var s=t.valueFormatter,c=qC(n)(s?H(H({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):$C(r,o.join(``),i?n:a.html);if(i)return d;var f=BS(t.header,`ordinal`,e.useUTC),p=HC(r,e.renderMode).nameStyle,m=VC(r);return e.renderMode===`richText`?nw(e,f,p)+a.richText+d:$C(r,`
`+Lx(f)+`
`+d,n)}function XC(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=G(e)?e:[e],W(e,function(e,t){return BS(e,G(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:BS(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=HC(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:nw(e,f,v))+(o?``:rw(e,m,h,g,y)):$C(r,(s?``:d)+(a?``:ew(f,!s,v))+(o?``:tw(m,h,g,y)),n)}}function ZC(e,t,n,r,i,a){if(e)return qC(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function QC(e){return{html:UC[e],richText:WC[e]}}function $C(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=VC(e);return`
`+t+r+`
`}function ew(e,t,n){var r=t?`margin-left:2px`:``;return``+Lx(e)+``}function tw(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=G(e)?e:[e],``+W(e,function(e){return Lx(e)}).join(`  `)+``}function nw(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function rw(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(G(t)?t.join(` `):t,a)}function iw(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return GS(n)}function aw(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var ow=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Vp()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=WS({color:t,type:e,renderMode:n,markerId:r});return q(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};G(t)?U(t,function(e){return H(n,e)}):H(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function sw(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=G(s),l=iw(t,n),u,d,f,p;if(o>1||c&&!o){var m=cw(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=ib(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=hm(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return GC(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[GC(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!yo(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function cw(e,t,n,r,i){var a=t.getData(),o=$a(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?U(r,function(e){u(ib(a,n,e),e)}):U(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(GC(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var lw=xm();function uw(e,t){return e.getName(t)||e.getId(t)}var dw=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=bC({count:mw,reset:hw}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(lw(this).sourceManager=new PC(this)).prepareSource();var r=this.getInitialData(e,n);_w(r,this),this.dataTask.context.data=r,lw(this).dataBeforeProcessed=r,fw(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=rC(this),r=n?aC(e):{},i=this.subType;cC.hasClass(i)&&(i+=`Series`),Ka(e,t.getTheme().get(this.subType)),Ka(e,this.getDefaultOption()),tm(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&iC(e,r,n)},t.prototype.mergeOption=function(e,t){e=Ka(this.option,e,!0),this.fillDataTextStyle(e.data);var n=rC(this);n&&iC(this.option,e,n);var r=lw(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);_w(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,lw(this).dataBeforeProcessed=i,fw(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!lo(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return sw({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(No.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=fC.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[uw(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){J(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return cC.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(cC);Za(dw,vC),Za(dw,fC),Uo(dw,cC);function fw(e){var t=e.name;hm(e)||(e.name=pw(e)||t)}function pw(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return U(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function mw(e){return e.model.getRawData().count()}function hw(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),gw}function gw(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function _w(e,t){U(Do(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,ao(vw,t))})}function vw(e,t){var n=yw(e);return n&&n.setOutputEnd((t||this).count()),t}function yw(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var bw=Tf.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),xw={line:v_,rect:zf,roundRect:zf,square:zf,circle:Hg,diamond:Tf.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Tf.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Tf.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:bw},Sw={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Cw={};U(xw,function(e,t){Cw[t]=new e});var ww=Tf.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=gc(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Cw[r];i||=(r=`rect`,Cw[r]),Sw[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Tw(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function Ew(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?ov(e.slice(8),new Z(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?av(e.slice(7),{},new Z(t,n,r,i),o?`center`:`cover`):new ww({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Tw,a&&c.setColor(a),c}function Dw(e){return G(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Ow(e,t){if(e!=null)return G(e)||(e=[e,e]),[yp(e[0],t[0])||0,yp(Y(e[1],e[0]),t[1])||0]}var kw=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return hx(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Bg,n=Ew(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=Ew(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(dw);function Aw(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=ib(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var Mw=function(e){B(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=Ew(e,-1,-1,2,2,null,a);o.attr({z2:Y(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Nw,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Hh(this.childAt(0))},t.prototype.downplay=function(){Uh(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):U_(f,p,o,n),Y_(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,W_(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Jv(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=Ow(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof jf){var S=a.style;a.useStyle(H({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(H({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;qv(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Aw(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),sg(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Xm(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&K_(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();K_(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Dw(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Bg);function Nw(e,t){this.parent.drift(e,t)}function Pw(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Fw(e){return e!=null&&!J(e)&&(e={isIgnore:e}),e||{}}function Iw(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Jv(t),cursorStyle:t.get(`cursor`)}}function Lw(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Rw=function(){function e(e){this.group=new Bg,this._SymbolCtor=e||Mw}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Fw(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Iw(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);Pw(e,i,r,t)&&Lw(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Pw(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):U_(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function Vw(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Hw(e,t){return!isFinite(e)||!isFinite(t)}var Uw=typeof Float32Array<`u`?Float32Array:void 0,Ww=typeof Float64Array<`u`?Float64Array:void 0;function Gw(e){return Kw({ctor:Uw},e).arr}function Kw(e,t){var n=e.arr,r=e.ctor;if(t>Ap&&(t=Ap),!n||e.typed&&n.length=i||h<0)break;if(Hw(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||Hw(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,ee=void 0;if(s===`x`){P=Math.abs(A),ee=Math.abs(j);var te=E>0?1:-1;p=_-te*P*o,m=v,O=_+te*ee*o,k=v}else if(s===`y`){P=Math.abs(M),ee=Math.abs(N);var F=D>0?1:-1;p=_,m=v-F*P*o,O=_,k=v+F*ee*o}else P=Math.sqrt(A*A+M*M),ee=Math.sqrt(j*j+N*N),T=ee/(ee+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=Yw(O,Xw(S,_)),k=Yw(k,Xw(C,v)),O=Xw(O,Yw(S,_)),k=Xw(k,Yw(C,v)),E=O-_,D=k-v,p=_-E*P/ee,m=v-D*P/ee,p=Yw(p,Xw(l,_)),m=Yw(m,Xw(u,v)),p=Xw(p,Yw(l,_)),m=Xw(m,Yw(u,v)),E=_-p,D=v-m,O=_+E*ee/P,k=v+D*ee/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var Qw=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),$w=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Qw},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Hw(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?dl(i,u,f,m,e,s):dl(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?ll(a,d,p,h,b):ll(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(Tf),eT=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Qw),tT=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new eT},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Hw(n[a*2-2],n[a*2-1]);a--);for(;i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){kT(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),kT(r,e,t,n)},freeze:function(){}};function kT(e,t,n,r){Rm(n,r)&&(e[t][0]=n,e[t][1]=r)}function AT(e){return jT(e)||NT(e)}function jT(e){return e.type===`interval`}function MT(e){return e.type===`time`}function NT(e){return e.type===`log`}function PT(e){return e.type===`ordinal`}function FT(e){var t=Ip(e),n=pp(10,t),r=up(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,wp(r*n,-t)}function IT(e){return Ep(e)+2}function LT(e,t){return mp(e)/mp(t)}function RT(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var UT=function(e){B(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,xT(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new _T({}),G(i)&&(i=new _T({categories:W(i,function(e){return J(e)?e.value:e})})),r._ordinalMeta=i;var a=bT(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,ST(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:q(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=up(e),e},t.prototype.getTicks=function(){var e=[];return HT(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=sp(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=sp(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=wp(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=wp(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?wp(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return WT(this,e,$x(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Ep(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),LS(wp(e.value,n,!0))},t.type=`interval`,t}(hT);hT.registerClass(GT);var KT=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ZT(e){var t=30*iS;return e/=t,e>6?6:e>3?3:e>2?2:1}function QT(e){return e/=rS,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function $T(e,t){return e/=t?nS:tS,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function eE(e){return cp(Lp(e,!0),1)}function tE(e,t,n){var r=Math.max(0,Ya(dS,t)-1);return SS(new Date(e),dS[r],n).getTime()}function nE(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function rE(e,t,n,r,i,a){var o=fS,s=0;function c(e,t,n,i,o,c,l){for(var u=nE(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!YT(gS(e),r[0],r[1],n)){s&&(i=[{value:tE(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=eo(W(u,function(e){return eo(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=JT.length,l=Math.min(KT(JT,a,0,c),c-1),u=JT[l][1],d=JT[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};hT.registerClass(qT);var aE=0,oE=1,sE=2,cE=function(e){B(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=GT.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[aE]=i[oE]=a[aE]=a[oE]=NaN,xT(r,t.mapperMethods);var s=Zx(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},sE,l),r.powStub=new GT({breakParsed:l.original}),r.intervalStub=new GT({breakParsed:l.transformed}),ST(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Zx(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return W(i.getTicks(e||{}),function(e){var i=e.value,o=RT(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,$x(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return WT(this,e,$x(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(LT(e,this.base))},scale:function(e){return RT(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=LT(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return lE.depth=n,uE.lookup=this._lookup,RT(n===2?e:this.intervalStub.transformOut(e,lE),this.base,uE)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Rm(t,n)||t<=0||n<=0)){var r=dE,i=dE;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[aE]=t,r[oE]=n);var o=this.base;this.intervalStub.setExtent2(e,i[aE]=LT(t,o),i[oE]=LT(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Rm(t[0],t[1])&&Wp(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(hT);hT.registerClass(cE);var lE={},uE={},dE=[],fE={value:1,category:1,time:1,log:1},pE=xm();function mE(e){var t=e.get(`type`);return(t==null||!ko(fE,t)&&!hT.getClass(t))&&(t=`value`),t}function hE(e,t,n){var r=Zx(),i;switch(r&&(i=EE(e,t,n)),t){case`category`:return new UT({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Mm()});case`time`:return new qT({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new cE({logBase:e.get(`logBase`),breakOption:i});case`value`:return new GT({breakOption:i});default:return new((hT.getClass(t))||GT)({})}}function gE(e,t,n){var r=n?wT(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Rm(i,a)?i===t||a===t?2:it?1:3:3}function _E(e){pE(e).noOnMyZero=!0}function vE(e){return pE(e).noOnMyZero}function yE(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=pS(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(q(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(K(t)){if(e.type===`category`)return function(n,r){return t(bE(e,n),n.value-e.scale.getExtent()[0],null)};var r=Zx();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(bE(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function bE(e,t){var n=e.scale;return PT(n)?n.getLabel(t):t.value}function xE(e){return e.get(`interval`)??`auto`}function SE(e){return e.type===`category`&&xE(e.getLabelModel())===0}function CE(e,t){var n={};return U(e.mapDimensionsAll(t),function(t){n[fx(e,t)]=!0}),no(n)}function wE(e){return e===`middle`||e===`center`}function TE(e){return e.getShallow(`show`)}function EE(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Zx()||!n||!DE(t)?void 0:r}function DE(e){return e!==`category`}function OE(e,t,n,r,i,a){var o=NT(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=BT(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function kE(e,t){return PT(e)?e.getRawOrdinalNumber(t.value):t.value}function AE(e,t){return PT(e)&&!!t.get(`boundaryGap`)}function jE(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function RE(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=W(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=LE(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;U(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new D_(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function zE(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&BE(a,t))){var o=t.mapDimension(a.dim),s={};return U(a.getViewLabels(),function(e){e.tick.offInterval||(s[kE(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function BE(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function VE(e){for(var t=e.length/2;t>0&&Hw(e[t*2-2],e[t*2-1]);t--);return t-1}function HE(e,t){return[e[t*2],e[t*2+1]]}function UE(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function WE(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}Xm(f).seriesIndex=e.seriesIndex,sg(f,k,A,j);var N=PE(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var ee=a.getCalculationInfo(`stackedOnSeries`),te=0;p.useStyle(Ja(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),ee&&(te=PE(ee.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:te,smoothMonotone:P,connectNulls:x}),dg(p,e,`areaStyle`),Xm(p).seriesIndex=e.seriesIndex,sg(p,k,A,j)}var F=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var ne=e.get(`triggerEvent`),re=e.get(`triggerLineEvent`),ie=re===!0||ne===!0||ne===`line`,ae=re===!0||ne===!0||ne===`area`;this.packEventData(e,f,ie),p&&this.packEventData(e,p,ae)},t.prototype.packEventData=function(e,t,n){Xm(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=bm(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Hw(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Mw(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else aT.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=bm(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else aT.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Nh(this._polyline,e),t&&Nh(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new $w({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new tT({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);K(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=K(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=K(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(WE(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Wf({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=VE(o);c>=0&&(qv(a,Jv(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Aw(i,e):jw(i,n)},enableTextSetter:!0},KE(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=UE(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=HE(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=jm(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=HE(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=iy(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=Jw(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=IE(u.stackedOnCurrent,u.current,n,i,o),d=IE(u.current,null,n,i,o),m=IE(u.stackedOnNext,u.next,n,i,o),p=IE(u.next,null,n,i,o)),NE(d,p)>3e3||c&&NE(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),U_(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),U_(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;q(i)?p=YE[i]:K(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,XE))}}}}}function QE(e){e.registerChartView(qE),e.registerSeriesModel(kw),e.registerLayout(JE(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,ZE(`line`))}var $E=xm(),eD=xm(),tD={estimate:1,determine:2};function nD(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function rD(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:W(aD(n,r),function(t,n){return{formattedLabel:yE(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?oD(e,t):lD(e)}function iD(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:aD(i,r)}:e.type===`category`?cD(e,t):{ticks:r.getTicks(n)}}function aD(e,t){var n=t.getExtent(),r=[];return U(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Um(r,Gm,null),Tp(r),W(r,function(e){return{value:e}})}function oD(e,t){var n=e.getLabelModel(),r=sD(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function sD(e,t,n){var r=dD(e),i=xE(t),a=n.kind===tD.estimate;if(!a){var o=pD(r,i);if(o)return o}var s,c;K(i)?s=bD(e,i,!1):(c=i===`auto`?hD(e,n):i,s=bD(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return mD(r,i,l),!0}):mD(r,i,l),l}function cD(e,t){var n=uD(e),r=xE(t),i=pD(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),K(r))a=bD(e,r,!0);else if(r===`auto`){var s=sD(e,e.getLabelModel(),nD(tD.determine));o=s.labelCategoryInterval,a=W(s.labels,function(e){return e.tick})}else o=r,a=bD(e,o,!0);return mD(n,r,{ticks:a,tickCategoryInterval:o})}function lD(e){var t=e.scale.getTicks(),n=yE(e);return{labels:W(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var uD=fD(`axisTick`),dD=fD(`axisLabel`);function fD(e){return function(t){return eD(t)[e]||(eD(t)[e]={list:[]})}}function pD(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=dc(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===tD.estimate?(t.out.noPxChangeTryDetermine.push(io(_D,null,e,S,c)),S):vD(e,S,c)??S}function _D(e,t,n){return vD(e,t,n)==null}function vD(e,t,n){var r=$E(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function yD(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function bD(e,t,n){var r=yE(e),i=e.scale,a=[],o=K(t);return HT(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var xD=xm();function SD(e){xD(e).prepare={}}function CD(e){xD(e).fullUpdate={}}function wD(e){return xD(e).prepare}function TD(e){return xD(e).fullUpdate}var ED=Vm(),DD=xm(),OD=xm();function kD(e,t){var n=e.model,r=DD(TD(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function AD(e,t){return ND(kD(e,t))}function jD(e,t){var n=[];return MD(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Wp(n)&&n>0&&Wp(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*KD,e.w2=e.w*n/r)}var XD=[0,1],ZD=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),vp(e,XD,QD(this),t)},e.prototype.coordToData=function(e,t){var n=vp(e,QD(this),XD,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=W(iD(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(kE(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=$D(this,n,r);return W(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(PT(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),W(this.scale.getMinorTicks(e),function(e){return W(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=nD(tD.determine),rD(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return qD(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=nD(tD.determine),gD(this,e)},e}();function QD(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function $D(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=qD(e).w;if(!i)return!1;U(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var eO=function(e){B(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(ZD),tO=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],nO=1,rO=2,iO=nO|rO;function aO(e,t,n){n||=iO,t?e.dirty|=n:e.dirty&=~n}function oO(e,t){return t||=iO,e.dirty==null||!!(e.dirty&t)}function sO(e){if(e)return oO(e)&&cO(e,e.label,e),e}function cO(e,t,n){var r=t.getComputedTransform();e.transform=Fv(e.transform,r);var i=e.localRect=Pv(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=oy.textMargin);for(var d=0;d<4;d++)lO[d]=u===oy.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===oy.textMargin&&Ev(i,lO,!1,!1);var f=e.rect=Pv(e.rect,i);return r&&f.applyTransform(r),u===oy.minMargin&&Ev(f,lO,!1,!1),e.axisAligned=Mv(r),(e.label=e.label||{}).ignore=t.ignore,aO(e,!1),aO(e,!0,rO),e}var lO=[0,0,0,0];function uO(e,t,n){return e.transform=Fv(e.transform,n),e.localRect=Pv(e.localRect,t),e.rect=Pv(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Mv(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function dO(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function fO(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Z(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var EO=os(),DO=new Z(0,0,0,0),OO=function(e,t,n,r,i,a){if(wE(e.nameLocation)){var o=a.stOccupiedRect;o&&kO(uO({},o,a.transGroup.transform),r,i)}else AO(a.labelInfoList,a.dirVec,r,i)};function kO(e,t,n){var r=new Ms;hO(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&dO(t,r)}function AO(e,t,n,r){for(var i=Ms.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Mp(r-yO)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),MO=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],NO={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(ks(u,u,l),ks(d,d,l));var p=H({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&eS(r.axis.scale))_O().buildAxisBreakLine(r,i,a,m);else{var h=new v_(H({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));uv(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);q(g)&&(g=[g,g]),(q(_)||so(_))&&(_=[_,_]);var v=Ow(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];U([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=Ew(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){HO(t,i,s)&&PO(e,t,n,r,i,a,o,tD.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){HO(t,i,s)&&PO(e,t,n,r,i,a,o,tD.determine);var c=BO(e,i,a,r);LO(e,t.labelLayoutList,c),VO(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(YO(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Ms(0,0),_=new Ms(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=os();_.transform(ds(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*yO/180);var b,x;wE(u)?b=jO.innerTextLayout(e.rotation,y??e.rotation,d):(b=FO(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=mo(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Wf({x:g.x,y:g.y,rotation:b.rotation,silent:jO.isLabelSilent(r),style:Yv(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(kv({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=jO.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Xm(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=sO({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:wE(u)?bO[E]:xO[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function PO(e,t,n,r,i,a,o,s){WO(t)||UO(e,t,i,s,r,o);var c=t.labelLayoutList;KO(e,r,c,a),ZO(r,e.rotation,c);var l=e.optionHideOverlap;IO(r,c,l),l&&mO(eo(c,function(e){return e&&!e.label.ignore})),TO(e,n,r,c)}function FO(e,t,n,r){var i=jp(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Mp(i-yO/2)?(o=c?`bottom`:`top`,a=`center`):Mp(i-yO*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=iyO/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function IO(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(SE(r))return;function a(e,a,o){var s=sO(t[a]),c=sO(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=SO(s.label).labelInfo.tick;if(MT(l)&&u.notNice||PT(l)&&u.offInterval){RO(s.label);return}}if(e===!1||s.suggestIgnore){RO(s.label);return}if(c.suggestIgnore){RO(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=fO({marginForce:f},s),c=fO({marginForce:f},c)}hO(s,c,null,{touchThreshold:d})&&RO(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function LO(e,t,n){e.showMinorTicks||U(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=sk(e,t.get(`startValue`,!0)),x=b!=null;!Wp(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Wp(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),ok(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),ok(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function ok(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Bm(t))}function sk(e,t){return t==null?null:po(t)?NaN:e.parse(t)}function ck(e,t){var n;if(PT(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=G(r)?r:[r,r]}return[lk(n[0]),lk(n[1])]}function lk(e){return hc(typeof e==`boolean`?0:e,1)||0}function uk(e){var t=rk(e.scale);return t.extent||=Mm(),t}function dk(e,t){uk(e).dimIdxInCoord=t.get(e.dim)}function fk(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||pk(n,e,i,r,t)}function pk(e,t,n,r,i){var a=uk(t),o=a.extent,s=!1;PD(t,function(r){if(r.boxCoordinateSystem){var i=nx(r).coord,c=a.dimIdxInCoord;if(c>=0&&G(i)){var l=i[c];l!=null&&!G(l)&&Nm(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;U(CE(u,n),function(e){Im(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=yk(e,t,r);hk(e,new ak(e,r,o,s,c),i),a.extent=null}function mk(e,t){var n=e.scale;hk(n,new ak(n,e.model,t,!1,!1),ik)}function hk(e,t,n){e.rawExtentInfo=t,t.from=n}function gk(e,t){_k.set(e,t)}var _k=X();function vk(e,t,n,r,i){e.rawExtentInfo||mk({scale:e,model:t},i||Mm());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function yk(e,t,n){var r=AE(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return RD(t,function(e){a=!!_k.get(e)||a}),a}function bk(e,t,n,r){if(n.ctnShp){var i;if(RD(e,function(t){var n=_k.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Pm(i,a[0]),Fm(i,a[1]),_E(e))}}),i){var a=t.getExtent();if(PT(t))e.onBand||t.setExtent2(1,sp(a[0],a[0]+i[0]),cp(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=sp(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=cp(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function xk(){BD(`liPosMinGap`,Sk)}function Sk(e,t,n){var r=X(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=mb(u);function f(n){ID(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Kw(Ck,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var Ck=Kw({ctor:Ww},50);function wk(e){return function(t,n){var r=qD(t,{fromStat:{key:e}});if(Wp(r.w2))return[-r.w2/2,r.w2/2]}}function Tk(e,t){return e+`|&`+t}function Ek(e){return xk(),{liPosMinGap:!PT(e.scale)}}function Dk(e,t,n,r){WD(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Ek})}function Ok(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var kk={left:0,right:0,top:0,bottom:0},Ak=[`25%`,`25%`],jk=`cartesian2d`,Mk=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=aC(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&iC(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&iC(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:kk,outerBoundsContain:`all`,outerBoundsClampWidth:Ak[0],outerBoundsClampHeight:Ak[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(cC),Nk=Vm(),Pk=`__ec_stack_`;function Fk(e){return e.get(`stack`)||Pk+e.seriesIndex}function Ik(e,t){var n=Lk(e,t);return n.columnMap=Rk(n),n}function Lk(e,t){var n=Tk(t,jk),r=[],i=qD(e,{fromStat:{key:n},min:1});return FD(e,n,function(e){r.push({barWidth:yp(e.get(`barWidth`),i.w),barMaxWidth:yp(e.get(`barMaxWidth`),i.w),barMinWidth:yp(e.get(`barMinWidth`)||(Vk(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Fk(e)})}),{bandWidthResult:i,seriesInfo:r}}function Rk(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};U(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;ko(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=sp(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=cp(35-o.length*4,15)+`%`;var c=yp(i,t),l=yp(a,1),u=(n-c)/(r+(r-1)*l);u=cp(u,0),U(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=sp(o,i)),a&&(o=cp(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&io&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=cp(u,0);var d=0,f;U(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return U(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function zk(e){return{seriesType:e,overallReset:function(t){var n=Tk(e,jk);LD(t,n,function(t){var r=Ik(t,e);FD(t,n,function(e){var t=r.columnMap[Fk(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function Bk(e){return{seriesType:e,plan:nT(),reset:function(e){if($O(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=dx(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Ok(i))),p=Vk(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&Gw(r*3),c=p&&s&&Gw(r*3),l=p&&Gw(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,lp(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(dw);dw.registerClass(Wk);var Gk=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return hx(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=qm(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Sx(Wk.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Wk),Kk=`\0__throttleOriginMethod`,qk=`\0__throttleRate`,Jk=`\0__throttleType`;function Yk(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Xk(e,t,n,r){var i=e[t];if(i){var a=i[Kk]||i,o=i[Jk];if(i[qk]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Yk(a,n,r===`debounce`),i[Kk]=a,i[Jk]=r,i[qk]=n}return i}}function Zk(e,t){var n=e[t];n&&n[Kk]&&(n.clear&&n.clear(),e[t]=n[Kk])}var Qk=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),$k=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new Qk},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){J_(t,e,Xm(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(aT),cA={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=aA(t.x,e.x),s=oA(t.x+t.width,i),c=aA(t.y,e.y),l=oA(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=oA(t.r,e.r),a=aA(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},lA={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new zf({shape:H({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?$k:s_,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=eA(vA(i),{isRoundCap:l===$k}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?U_:W_)(u,{shape:p},a)}return u}};function uA(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function dA(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?U_:W_)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?U_:W_)(n,{shape:l},u,i)}function fA(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function _A(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function vA(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function yA(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;H(u,iA(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?OA(i,a.coordinateSystem):kA(i,a.coordinateSystem),p=Jv(r);qv(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Aw(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,tA(e,h===`outside`?f:h,vA(o),r.get([`label`,`rotate`]))}ay(m,p,a.getRawValue(n),function(e){return jw(t,e)});var g=r.getModel([`emphasis`]);sg(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),dg(e,r),_A(i)&&(e.style.fill=`none`,e.style.stroke=`none`,U(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function bA(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var xA=function(){function e(){}return e}(),SA=function(e){B(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new xA},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function TA(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function EA(e,t,n){if(mT(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function DA(e,t,n){return new(e.type===`polar`?s_:zf)({shape:EA(t,n,e),silent:!0,z2:0})}function OA(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function kA(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function AA(e){e.registerChartView(sA),e.registerSeriesModel(Gk),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,zk(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Bk(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,ZE(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),Uk(e)}function jA(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),PA=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),FA=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new PA(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new PA(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new PA(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new PA(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new PA(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new PA(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),IA=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,LA=[],RA=No.browser.firefox&&+No.browser.version.split(`.`)[0]<39;function zA(e,t,n,r){return n||={},r?BA(e,t,n):RA&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?BA(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function BA(e,t,n){if(No.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Px(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(jx(LA,e,r,i)){n.zrX=LA[0],n.zrY=LA[1];return}}n.zrX=n.zrY=0}function VA(e){return e||window.event}function HA(e,t,n){if(t=VA(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&zA(e,i,t,n)}else{zA(e,t,t,n);var a=UA(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&IA.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function UA(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function WA(e,t,n,r){e.addEventListener(t,n,r)}function GA(e,t,n,r){e.removeEventListener(t,n,r)}var KA=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function qA(e){return e.which===2||e.which===3}var JA=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=YA(r)/YA(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=XA(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},QA=`silent`;function $A(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ej}}function ej(){KA(this.event)}var tj=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Vu),nj=function(){function e(e,t){this.x=e,this.y=t}return e}(),rj=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],ij=new Z(0,0,0,0),aj=function(e){B(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new nj(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new tj,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new FA(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(U(rj,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=cj(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new nj(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new nj(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=$A(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new nj(e,t);if(sj(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Z(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(ij.copy(u.getBoundingRect()),u.transform&&ij.applyTransform(u.transform),ij.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function oj(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||QA}return!1}function sj(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=oj(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==QA)){t.target=o;break}}}function cj(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var lj=32,uj=7;function dj(e){for(var t=0;e>=lj;)t|=e&1,e>>=1;return e+t}function fj(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function pj(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function hj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function gj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function _j(e,t){var n=uj,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=uj||m>=uj);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-hj(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=uj||g>=uj);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),mj(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var yj=!1;function bj(){yj||(yj=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function xj(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Sj=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=xj}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Cj=No.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function wj(){return new Date().getTime()}var Tj=function(e){B(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=wj()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Cj(t),!e._paused&&e.update())}Cj(t)},t.prototype.start=function(){this._running||(this._time=wj(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=wj(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=wj()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Bu(e,t.loop);return this.addAnimator(n),n},t}(Vu),Ej=300,Dj=No.domSupported,Oj=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:W(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),kj={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Aj=!1;function jj(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Mj(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Nj(e){e&&(e.zrByTouch=!0)}function Pj(e,t){return HA(e.dom,new Ij(e,t),!0)}function Fj(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Ij=function(){function e(e,t){this.stopPropagation=Ao,this.stopImmediatePropagation=Ao,this.preventDefault=Ao,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Lj={mousedown:function(e){e=HA(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=HA(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=HA(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=HA(this.dom,e);var t=e.toElement||e.relatedTarget;Fj(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Aj=!0,e=HA(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Aj||(e=HA(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=HA(this.dom,e),Nj(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Lj.mousemove.call(this,e),Lj.mousedown.call(this,e)},touchmove:function(e){e=HA(this.dom,e),Nj(e),this.handler.processGesture(e,`change`),Lj.mousemove.call(this,e)},touchend:function(e){e=HA(this.dom,e),Nj(e),this.handler.processGesture(e,`end`),Lj.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!gm(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[dM],e},t.prototype.setTheme=function(e){this._theme=new _y(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function wM(e,t){return e.join(`,`)===t.join(`,`)}var TM=U,EM=J,DM=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function OM(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=DM.length;n0?e[n-1].seriesModel:null)}),ZM(e))})}function ZM(e){U(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=kp(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var QM=function(){function e(){this.group=new Bg,this.uid=yx(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Vo(QM),Jo(QM);var $M=xm(),eN={itemStyle:Yo(my,!0),lineStyle:Yo(dy,!0)},tN={lineStyle:`stroke`,itemStyle:`fill`};function nN(e,t){return e.visualStyleMapper||eN[t]||(console.warn(`Unknown style type '`+t+`'.`),eN.itemStyle)}function rN(e,t){return e.visualDrawType||tN[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var iN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=nN(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=rN(e,r),c=a[s],l=K(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||K(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||K(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=H({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},aN=new _y,oN={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=nN(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){aN.option=n[r];var o=i(aN);H(e.ensureUniqueItemVisual(t,`style`),o),aN.option.decal&&(e.setItemVisual(t,`decal`,aN.option.decal),aN.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},sN={performRawSeries:!0,overallReset:function(e){var t=X();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();$M(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=$M(e).scope,a=rN(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},cN=Math.PI;function lN(e,t){t||={},Ja(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Bg,r=new zf({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Wf({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new zf({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new w_({shape:{startAngle:-cN/2,endAngle:-cN/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:cN*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:cN*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var uN=function(){function e(e,t,n,r){this._stageTaskMap=X(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):qm(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=X();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;U(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});vo(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;U(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=X(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||bC({plan:hN,reset:gN,count:yN}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||bC({reset:dN});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=X(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;vo(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):U(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,bC({reset:fN,onDirty:mN})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return K(e)&&(e={overallReset:e,seriesType:bN(e)}),e.uid=yx(`stageHandler`),t&&(e.visualType=t),e},e}();function dN(e){e.overallReset(e.ecModel,e.api,e.payload)}function fN(e){return e.dirtyOnOverallProgress&&pN}function pN(){this.agent.dirty(),this.getDownstream().dirty()}function mN(){this.agent&&this.agent.dirty()}function hN(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function gN(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=em(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?W(t,function(e,t){return vN(t)}):_N}var _N=vN(0);function vN(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),AN=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],jN=AN.concat([`symbolKeepAspect`]),MN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&qN(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function XN(e,t,n){for(var r=t.type===`radial`?YN(e,t,n):JN(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:so(e)?[e]:G(e)?e:null}function tP(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&eP(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=W(n,function(e){return e/i}),r/=i)}return[n,r]}var nP=new $d(!0);function rP(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function iP(e){return typeof e==`string`&&e!==`none`}function aP(e){var t=e.fill;return t!=null&&t!==`none`}function oP(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function sP(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function cP(e,t,n){var r=rs(t.image,t.__image,n);if(as(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*jo),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function lP(e,t,n,r,i){var a,o=rP(n),s=aP(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||nP,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?XN(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?XN(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?cP(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?cP(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=tP(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&sP(e,n),s&&oP(e,n)):(s&&oP(e,n),o&&sP(e,n)),T&&e.setLineDash([])}function uP(e,t,n){var r=t.__image=rs(n.image,t.__image,t,t.onload);if(r&&as(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function dP(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=tP(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(rP(n)&&e.strokeText(i,n.x,n.y),aP(n)&&e.fillText(i,n.x,n.y)):(aP(n)&&e.fillText(i,n.x,n.y),rP(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var fP=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],pP=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function mP(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){TP(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?fd.opacity:o}(r||t.blend!==n.blend)&&(a||=(TP(e,i),!0),e.globalCompositeOperation=t.blend||fd.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[aF]){if(this._disposed){this.id;return}var r,i,a;if(J(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[aF]=!0,LF(this),!this._model||t){var o=new bM(this._api),s=this._theme,c=this._model=new pM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},GF);var l={seriesTransition:a,optionChanged:!0};if(n)this[sF]={silent:r,updateParams:l},this[aF]=!1,this.getZr().wakeUp();else{try{yF(this),SF.update.call(this,null,l)}catch(e){throw this[sF]=null,this[aF]=!1,e}this._ssr||this._zr.flush(),this[sF]=null,this[aF]=!1,EF.call(this,r),DF.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[aF]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[sF]&&(r??=this[sF].silent,i=this[sF].updateParams,this[sF]=null),this[aF]=!0,LF(this);try{this._updateTheme(e),n.setTheme(this._theme),yF(this),SF.update.call(this,{type:`setTheme`},i)}catch(e){throw this[aF]=!1,e}this[aF]=!1,EF.call(this,r),DF.call(this,r)}}},t.prototype._updateTheme=function(e){q(e)&&(e=qF[e]),e&&(e=V(e),e&&JM(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||No.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return U(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;U(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return U(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(XF[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();U(YF,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(V(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=Aa.createCanvas(),h=Xj(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return U(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new zf({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),U(u,function(e){var t=new jf({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return CF(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return CF(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return CF(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return U(Cm(n,e),function(e,n){n.indexOf(`Models`)>=0&&U(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Cm(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?FN(i,t):PN(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;U(BF,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&LN(i,function(e){var t=Xm(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=H({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;U(UF,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),MA(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Om(this.getDom(),QF,``);var e=this,t=e._api,n=e._model;U(e._componentsViews,function(e){e.dispose(n,t)}),U(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete YF[e.id]},t.prototype.resize=function(e){if(!this[aF]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[sF]&&(r??=this[sF].silent,n=!0,this[sF]=null),this[aF]=!0,LF(this);try{n&&yF(this),SF.update.call(this,{type:`resize`,animation:H({duration:0},e&&e.animation)})}catch(e){throw this[aF]=!1,e}this[aF]=!1,EF.call(this,r),DF.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(J(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),JF[e]){var n=JF[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=H({},e);return t.type=HF[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(J(t)||(t={silent:!!t}),VF[e.type]&&this._model){if(this[aF]){this._pendingActions.push(e);return}var n=t.silent;TF.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&No.browser.weChat&&this._throttledZrFlush(),EF.call(this,n),DF.call(this,n)}},t.prototype.updateLabelLayout=function(){RN.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){yF=function(e){SD(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),bF(e,!0),bF(e,!1),t.plan()},bF=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cY(t.get(`hoverLayerThreshold`),aM.hoverLayerThreshold)&&!No.node&&!No.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Iv(e);t.eachRendered(function(e){return Rv(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!G_(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(G_(e))return;if(e instanceof Tf&&_g(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}NF=function(e){return new(function(t){B(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Hh(t,n),FF(e)},n.prototype.leaveEmphasis=function(t,n){Uh(t,n),FF(e)},n.prototype.enterBlur=function(t){Wh(t),FF(e)},n.prototype.leaveBlur=function(t){Gh(t),FF(e)},n.prototype.enterSelect=function(t){Kh(t),FF(e)},n.prototype.leaveSelect=function(t){qh(t),FF(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[oF]},n.prototype.usingTHL=function(){return e._usingTHL},n}(lh))(e)},PF=function(e){function t(e,t){for(var n=0;n=0)){dI.push(n);var o=uN.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function pI(e,t){JF[e]=t}function mI(e,t,n){var r=VN(`registerMap`);r&&r(e,t,n)}var hI=AC;uI(XP,iN),uI($P,oN),uI($P,sN),uI(XP,MN),uI($P,NN),uI(rF,zP),nI(JM),rI(UP,YM),pI(`default`,lN),sI({type:_h,event:_h,update:_h},Ao),sI({type:vh,event:vh,update:vh},Ao),sI({type:yh,event:Sh,update:yh,action:Ao,refineEvent:gI,publishNonRefinedEvent:!0}),sI({type:bh,event:Sh,update:bh,action:Ao,refineEvent:gI,publishNonRefinedEvent:!0}),sI({type:xh,event:Sh,update:xh,action:Ao,refineEvent:gI,publishNonRefinedEvent:!0});function gI(e,t,n,r){return{eventContent:{selected:ig(n),isFromClick:t.isFromClick||!1}}}tI(`default`,{}),tI(`dark`,ON);var _I=[],vI={registerPreprocessor:nI,registerProcessor:rI,registerPostInit:iI,registerPostUpdate:aI,registerUpdateLifecycle:oI,registerAction:sI,registerCoordinateSystem:cI,registerLayout:lI,registerVisual:uI,registerTransform:hI,registerLoading:pI,registerMap:mI,registerImpl:BN,PRIORITY:iF,ComponentModel:cC,ComponentView:QM,SeriesModel:dw,ChartView:aT,registerComponentModel:function(e){cC.registerClass(e)},registerComponentView:function(e){QM.registerClass(e)},registerSeriesModel:function(e){dw.registerClass(e)},registerChartView:function(e){aT.registerClass(e)},registerCustomSeries:function(e,t){UN(e,t)},registerSubTypeDefaulter:function(e,t){cC.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Zj(e,t)}};function yI(e){if(G(e)){U(e,function(e){yI(e)});return}Ya(_I,e)>=0||(_I.push(e),K(e)&&(e={install:e}),e.install(vI))}var bI=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),xI=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Tm).models[0]},t.type=`cartesian2dAxis`,t}(cC);Za(xI,bI);var SI={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},CI=Ka({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},SI),wI=Ka({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},SI),TI={category:CI,value:wI,time:Ka({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},wI),log:Ja({logBase:10},wI)};function EI(e,t,n,r){U(fE,function(i,a){var o=Ka(Ka({},TI[a],!0),r,!0),s=function(e){B(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=rC(this),r=n?aC(e):{};Ka(e,t.getTheme().get(a+`Axis`)),Ka(e,this.getDefaultOption()),e.type=DI(e),n&&iC(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=_T.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=_O();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,DI)}function DI(e){return e.type||(e.data?`category`:`value`)}var OI=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return W(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),eo(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),kI=[`x`,`y`];function AI(e){return(e.type===`interval`||e.type===`time`)&&!eS(e)}var jI=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=jk,t.dimensions=kI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(AI(e)&&AI(t)){var n=wT(e,null),r=wT(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=ps([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Z(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return ks(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return ks(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Z(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(OI);function MI(e,t){var n=e.scale,r=e.model,i=vk(n,r,r.ecModel,e,null),a=NT(n),o=NT(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=lp(l[0].value-l[1].value),g=lp(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(P(),k=wp(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=wp(fp(C[0]/E)*E,D),O=wp(dp(C[1]/E)*E,D);var e=up((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=dp(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}OE(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function NI(e,t){var n=NT(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=zT(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?FI(r,t):PI(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=IT(d)),i[0]||(s[0]=wp(dp(s[0]/u)*u,l)),i[1]||(s[1]=wp(fp(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),OE(e,i,o,s,a,c)}function PI(e,t){var n=VT(t.splitNumber,5),r=ET(e),i=t.minInterval,a=t.maxInterval,o=Lp(r/n,!0);i!=null&&oa&&(o=a);var s=IT(o),c=e.getExtent(),l=[wp(fp(c[0]/o)*o,s),wp(dp(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function FI(e,t){var n=VT(t.splitNumber,10),r=e.getExtent(),i=ET(e),a=cp(Fp(i),1);n/i*a<=.5&&(a*=10);var o=IT(a),s=[wp(fp(r[0]/a)*a,o),wp(dp(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function II(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;LI(t,n,r,i,null)}function LI(e,t,n,r,i){var a=vk(e,t,r,n,i),o=jT(e)||MT(e);RI(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&bk(n,e,a,r)}function RI(e,t){zI[e.type](e,t)}var zI={interval:NI,log:NI,time:iE,ordinal:Ao},BI=[[3,1],[0,2]],VI=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=kI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;U(this._axesList,function(e){fk(e,1);var t=e.scale;PT(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=no(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):II(i)}U(n,function(e){KI(e,e.__alignTo)?II(e):MI(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};U(n.x,function(e){UI(n,`y`,e,i)}),U(n.y,function(e){UI(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=tC(e,t),i=this._rect=QS(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(JI(a,i),!n){var c=QI(i,o,a,s,t),l=void 0;if(s)XI?(XI(this._axesList,i),JI(a,i)):l=ZI(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=eL(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=ZI(d,f,p,i,a,c,r))}$I(i,a,tD.determine,null,l,r),U(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}J(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];AT(a.scale)&&EE(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&U(r,function(e){e.__alignTo=n})}function KI(e,t){return eS(e.scale)||eS(t.scale)||t.scale.getTicks().length<2}function qI(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function JI(e,t){U(e.x,function(e){return YI(e,t.x,t.width)}),U(e.y,function(e){return YI(e,t.y,t.height)})}function YI(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),qI(e,t)}var XI;function ZI(e,t,n,r,i,a,o){$I(r,i,tD.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=to(s,function(e){return e>0})==null;return Ev(r,s,!0,!0,n),JI(i,r),c;function l(e){U(i[Q_[e]],function(t){if(TE(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!po(t)&&t>1e-4&&(e/=t),e}}function QI(e,t,n,r,i){var a=new wO(tL);return U(n,function(n){return U(n,function(n){if(TE(n.model)){var o=!r;n.axisBuilder=tk(e,t,n.model,i,a,o)}})}),a}function $I(e,t,n,r,i,a){var o=n===tD.determine;U(t,function(t){return U(t,function(t){TE(t.model)&&(nk(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Q_[1-t]]=e[$_[t]]<=a.refContainer[$_[t]]*.5?0:1-t==1?2:1}U(t,function(e,t){return U(e,function(e){TE(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function eL(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=QS(e.get(`outerBounds`,!0)||kk,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||Ya([`all`,`axisLabel`],a)<0?`all`:a,s=[xp(Y(e.get(`outerBoundsClampWidth`,!0),Ak[0]),t.width),xp(Y(e.get(`outerBoundsClampHeight`,!0),Ak[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var tL=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;OO(e,t,n,r,i,a),wE(e.nameLocation)||U(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&AO(e.labelInfoList,e.dirVec,r,i)})};function nL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return rL(n,e,t),n.seriesInvolved&&aL(n,e),n}function rL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];U(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=fL(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(U(n.getAxes(),ao(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&U(f.baseAxes,ao(p,!d||`cross`,u)),d&&U(f.otherAxes,ao(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||dL(d))){s??=d.get(`triggerTooltip`),d=r?iL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=fL(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:dL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=oL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function iL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};U(s,function(e){c[e]=V(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&Ja(l,u.textStyle)}return e.model.getModel(`axisPointer`,new _y(c,n,r))}function aL(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&U(e.coordSysAxesInfo[fL(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function oL(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function cL(e){var t=lL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=dL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(DL(this._zr,`globalPan`)||jL(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(KA(r.event),r.__ecRoamConsumed=!0,RL(e,t,n,r,i))},t}(Vu);function jL(e){return e.__ecRoamConsumed}var ML=xm();function NL(e){var t=ML(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function PL(e,t,n,r){for(var i=NL(e).roam,a=i[t]=i[t]||[],o=0;o1e-6;AR[0]=o?(i[0]-r.x)/a:i[0],AR[1]=o?(i[1]-r.y)/a:i[1],ks(AR,AR,e.mtRawInv);var s=ER(e,AR);jR(t,s,a),U(n,function(e){e!==t&&jR(e,s.slice(),a)})}var AR=[];function jR(e,t,n){var r=e.option;r.center=t,r.zoom=n}function MR(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function NR(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=BL(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function PR(e,t,n,r,i,a,o,s){if(!xR(e)){n.disable();return}n.enable(Y(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Bv(Ja({type:IR(r,e.subType,sh)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}new Z(0,0,0,0);function FR(e,t,n){var r=IR(t,n,sh);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Dm(e,t,n),function(t){bR(e,t),SR(e,t,r,i)})})}function IR(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function LR(e){return e.zoom!=null}function RR(e,t,n,r,i,a,o){var s=new HL(null,OR(e.ecModel,t));return $L(s,n,r,i,a),o?eR(s,o.x,o.y,o.width,o.height):eR(s,n,r,i,a),QL(s,e),s}var zR=xm();function BR(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,qR(t,n,e),U(n,function(n){U(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,ao(VR,e))})}),t.wrapMethod(`cloneShallow`,ao(UR,e)),U(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,ao(HR,e))}),vo(n[t.dataType]===t)}function VR(e,t){if(KR(this)){var n=H({},zR(this).datas);n[this.dataType]=t,qR(t,n,e)}else JR(t,this.dataType,zR(this).mainData,e);return t}function HR(e,t){return e.struct&&e.struct.update(),t}function UR(e,t){return U(zR(t).datas,function(n,r){n!==t&&JR(n.cloneShallow(),r,t,e)}),t}function WR(e){var t=zR(this).mainData;return e==null||t==null?t:zR(t).datas[e]}function GR(){var e=zR(this).mainData;return e==null?[{data:e}]:W(no(zR(e).datas),function(t){return{type:t,data:zR(e).datas[t]}})}function KR(e){return zR(e).mainData===e}function qR(e,t,n){zR(e).datas={},U(t,function(t,r){JR(t,r,e,n)})}function JR(e,t,n,r){zR(n).datas[t]=e,zR(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=WR,e.getLinkedDataAll=GR}var YR=U,XR=J,ZR=-1,QR=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=V(t);this.type=r,this.mappingMethod=n,this._normalizeData=uz[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(tz(i),$R(i)):n===`category`?i.categories?ez(i):tz(i,!0):(vo(n!==`linear`||i.dataExtent),tz(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return io(this._normalizeData,this)},e.listVisualTypes=function(){return no(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){J(e)?U(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=G(t)?[]:J(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&YR(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(G(e))e=e.slice();else if(XR(e)){var t=[];YR(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function tz(e,t){var n=e.visual,r=[];J(n)?YR(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),lz(e,r)}function nz(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:sz([0,1])}}function rz(e){var t=this.option.visual;return t[Math.round(vp(e,[0,1],[0,t.length-1],!0))]||{}}function iz(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function az(e){var t=this.option.visual;return t[this.option.loop&&e!==ZR?e%t.length:e]}function oz(){return this.option.visual[0]}function sz(e){return{linear:function(t){return vp(t,e,this.option.visual,!0)},category:az,piecewise:function(t,n){var r=cz.call(this,n);return r??=vp(t,e,this.option.visual,!0),r},fixed:oz}}function cz(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[QR.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function lz(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=W(t,function(e){return zl(e)||[0,0,0,1]})),t}var uz={linear:function(e){return vp(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=QR.findPieceIndex(e,t,!0);if(n!=null)return vp(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??ZR},fixed:Ao};function dz(e,t,n){return e?t<=n:t=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof mz||(t=this._nodesMap[fz(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),hz=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=X(),t=X();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function gz(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Za(mz,gz(`hostGraph`,`data`)),Za(hz,gz(`hostGraph`,`edgeData`));function _z(e,t,n,r,i){for(var a=new pz(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=hx(e,n);else{var h=$b.get(p),g=h&&h.dimensions||[];Ya(g,`value`)<0&&g.concat([`value`]);var _=Jb(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new qb(_,n),m.initData(e)}var v=new qb([`value`],n);return v.initData(c,s),i&&i(m,v),BR({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var vz=`-->`,yz=function(e){return e.get(`autoCurveness`)||null},bz=function(e,t){var n=yz(e),r=20,i=[];if(so(n))r=n;else if(G(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return sw({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=W(this.option.categories||[],function(e){return e.value==null?H({value:0},e):e}),t=new qb([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return hR(e)&&e},t.type=`series.`+kz,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Q.color.primary}}},t}(dw);function jz(e){return e instanceof Array||(e=[e,e]),e}var Mz=Jm(kz,Nz);function Nz(e){e.eachSeriesByType(kz,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=jz(e.get(`edgeSymbol`)),i=jz(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=jz(r.getShallow(`symbol`,!0)),o=jz(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(H(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function Pz(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),Fz(n,e)}}function Fz(e,t){e.eachEdge(function(e,n){var r=ho(e.getModel().get([`lineStyle`,`curveness`]),-Oz(e,t,n,!0),0),i=gs(e.node1.getLayout()),a=gs(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var Iz=Jm(kz,Lz);function Lz(e,t){e.eachSeriesByType(kz,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];U(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Bg),dB=function(){function e(e){this.group=new Bg,this._LineCtor=e||uB}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=pB(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=pB(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!fB(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function pB(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Jv(t)}}function mB(e){return isNaN(e[0])||isNaN(e[1])}function hB(e){return e&&!mB(e[0])&&!mB(e[1])}var gB=[],_B=[],vB=[],yB=gl,bB=Os,xB=Math.abs;function SB(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){gB[0]=yB(r[0],i[0],a[0],u),gB[1]=yB(r[1],i[1],a[1],u);var d=xB(bB(gB,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function CB(e,t){var n=[],r=bl,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[gs(c[0]),gs(c[1])],c[2]&&c.__original.push(gs(c[2])));var d=c.__original;if(c[2]!=null){if(hs(i[0],d[0]),hs(i[1],d[2]),hs(i[2],d[1]),l&&l!==`none`){var f=zz(e.node1),p=SB(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=zz(e.node2),p=SB(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}hs(c[0],i[0]),hs(c[1],i[2]),hs(c[2],i[1])}else{if(hs(a[0],d[0]),hs(a[1],d[1]),bs(o,a[1],a[0]),ws(o,o),l&&l!==`none`){var f=zz(e.node1);ys(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=zz(e.node2);ys(a[1],a[1],o,-f*t)}hs(c[0],a[0]),hs(c[1],a[1])}})}var wB=xm();function TB(e){if(e)return wB(e).bridge}var EB=function(e){B(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=kz,t}return t.prototype.init=function(e,t){var n=new Rw,r=new dB,i=this.group,a=new Bg;this._controller=new AL(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=xR(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&gR(o,2,i,this._firstRender?null:e),CB(e.getGraph(),Rz(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&PR(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),Hz(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),Fz(e.getGraph(),e),r.updateLayout(e)}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(Xm(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(Xm(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){Wz(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=xR(t);this._active&&r&&(gR(this._mainGroup,2,r,null),LR(e)&&(this._updateNodeAndLinkScale(),CB(t.getGraph(),Rz(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=Rz(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(CB(e.getGraph(),Rz(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=TB(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(WL(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new Bg,o=n.group.children(),s=r.group.children(),c=new Bg,l=new Bg;a.add(l),a.add(c);for(var u=0;ua&&(t[1-r]=kp(t[r],d.sign*a)),t}function NB(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function PB(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var FB=xm(),IB=V,LB=io,RB=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Bg,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=ao(zB,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}UB(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&qD(r).w>o)return!0;if(a){var s=lL(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=FB(e).pointerEl=new X_[i.type](IB(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=FB(e).labelEl=new Wf(IB(t.label));e.add(i),VB(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=FB(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=FB(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),VB(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=xv(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){KA(e.event)},onmousedown:LB(this._onHandleDragMove,this,0,0),drift:LB(this._onHandleDragMove,this),ondragend:LB(this._onHandleDragEnd,this)}),n.add(r)),UB(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);G(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Xk(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){zB(this._axisPointerModel,!t&&this._moveAnimation,this._handle,HB(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(HB(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(HB(r)),FB(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Zk(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function zB(e,t,n,r){BB(FB(n).lastProp,r)||(FB(n).lastProp=r,t?U_(n,r,e):(n.stopAnimation(),n.attr(r)))}function BB(e,t){if(J(e)&&J(t)){var n=!0;return U(t,function(t,r){n&&=BB(e[r],t)}),!!n}return e===t}function VB(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function HB(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function UB(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function WB(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function GB(e,t,n,r,i){var a=qB(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=zS(o.get(`padding`)||0),c=o.getFont(),l=dc(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),KB(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Yv(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function KB(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function qB(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:bE(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};U(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),q(o)?a=o.replace(`{value}`,a):K(o)&&(a=o(s))}return a}function JB(e,t,n){var r=os();return ds(r,r,n.rotation),us(r,r,n.position),mv([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function YB(e,t,n,r,i,a){var o=jO.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),GB(t,r,i,a,{position:JB(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function XB(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function ZB(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function QB(e,t,n){return qD(e,{fromStat:{sers:W(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function $B(e,t,n){return[cp(sp(t[0],t[1]),e-n/2),sp(e+n/2,cp(t[0],t[1]))]}var eV=function(e){B(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=tV(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=WB(r),f=nV[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}YB(t,e,QO(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=QO(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=JB(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=tV(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=sp(o[1],l[c]),l[c]=cp(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(RB);function tV(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var nV={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:XB([t,r[0]],[t,r[1]],rV(e))}},shadow:function(e,t,n,r,i,a){var o=QB(e,i,a),s=r[1]-r[0],c=$B(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ZB([l,r[0]],[u-l,s],rV(e))}}};function rV(e){return e.dim===`x`?0:1}var iV=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Q.color.accent40,throttle:40}},t}(cC),aV=xm(),oV=U;function sV(e,t,n){if(!No.node){var r=t.getZr();aV(r).records||(aV(r).records={}),cV(r,t);var i=aV(r).records[e]||(aV(r).records[e]={});i.handler=n}}function cV(e,t){if(aV(e).initialized)return;aV(e).initialized=!0,n(`click`,ao(dV,`click`)),n(`mousemove`,ao(dV,`mousemove`)),n(`mousewheel`,ao(dV,`mousewheel`)),n(`globalout`,uV);function n(n,r){e.on(n,function(n){var i=fV(t);oV(aV(e).records,function(e){e&&r(e,n,i.dispatchAction)}),lV(i.pendings,t)})}}function lV(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function uV(e,t,n){e.handler(`leave`,null,n)}function dV(e,t,n,r){t.handler(e,n,r)}function fV(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function pV(e,t){if(!No.node){var n=t.getZr();(aV(n).records||{})[e]&&(aV(n).records[e]=null)}}var mV=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;sV(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){pV(`axisPointer`,t)},t.prototype.dispose=function(e,t){pV(`axisPointer`,t)},t.type=`axisPointer`,t}(QM);function hV(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=bm(a,e);if(o==null||o<0||G(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(W(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var gV=xm();function _V(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||io(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){DV(i)&&(i=hV({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=DV(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||DV(i),f={},p={},m={list:[],map:{}},h={showPointer:ao(bV,p),showTooltip:ao(xV,m)};U(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);U(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=TV(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&vV(e,o,h,!1,f)}})});var g={};return U(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&U(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,EV(t),EV(e)))),g[e.key]=a}})}),U(g,function(e,t){vV(u[t],e,h,!0,f)}),SV(p,u,f),CV(m,i,e,o),wV(u,o,n),f}}function vV(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=yV(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&H(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function yV(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return U(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Wp(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),U(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function bV(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function xV(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=fL(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function SV(e,t,n){var r=n.axesInfo=[];U(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function CV(e,t,n,r){if(DV(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function wV(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=gV(r)[i]||{},o=gV(r)[i]={};U(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&U(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}U(a,function(e,t){!o[t]&&c.push(l(e))}),U(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function TV(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function EV(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function DV(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function OV(e){mL.registerAxisPointerClass(`CartesianAxisPointer`,eV),e.registerComponentModel(iV),e.registerComponentView(mV),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!G(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=nL(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},_V)}function kV(e){yI(TL),yI(OV)}function AV(e,t){var n=zS(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new zf({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var jV=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(cC);function MV(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function NV(e){if(No.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function UV(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(No.transformSupported?``+zV+i:`,left`+i+`,top`+i)),RV+`:`+a}function WV(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!No.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=No.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+zV+`:`+o+`;`:[[`top`,0],[`left`,0],[PV,o]]}function GV(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=Y(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),U([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function KV(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=aw(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(UV(a,n,r)),o&&i.push(`background-color:`+o),U([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=RS(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(GV(d)),f!=null&&i.push(`padding:`+zS(f).join(`px `)+`px`),i.join(`;`)+`;`}function qV(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&kx(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var JV=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,No.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(q(i)?document.querySelector(i):uo(i)?i:K(i)&&i(e.getDom()));qV(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;HA(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=LV(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=BV+KV(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+WV(i[0],i[1],!0)+(`border-color:`+GS(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(q(i)&&n.get(`trigger`)===`item`&&!MV(n)&&(o=HV(n,r,i)),q(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,G(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!No.node&&n.getDom()){var i=nH(r,n);this._ticket=``;var a=r.dataByCoordSys,o=sH(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=$V;c.x=r.x,c.y=r.y,c.update(),Xm(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=hV(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(nH(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&tH([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Xm(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;LN(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Xm(e).dataIndex==null?Xm(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=io(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=tH([t.tooltipOption],r),o=this._renderMode,s=[],c=GC(`section`,{blocks:[],noHeader:!0}),l=[],u=new ow;U(e,function(e){U(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=qB(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=GC(`section`,{header:f,noHeader:!yo(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),U(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=bE(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,GS(m.color),o);var h=yC(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=tH([a],r).get(`valueFormatter`);p.blocks.push(_?H({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=ZC(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` + +`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Xm(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=tH([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new ow;h.marker=g.makeTooltipMarker(`item`,GS(h.color),d);var _=yC(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?ZC(y?H({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Xm(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(q(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=V(a),a.content=Lx(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=tH(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new ow;this._showOrMove(d,function(){var n=V(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(q(u)){var p=e.ecModel.get(`useUTC`),m=G(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=yS(m.axisValue,d,p)),d=US(d,n,!0)}else if(K(u)){var g=io(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||G(t))return{color:r||i};if(!G(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),K(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),G(t))n=yp(t[0],s),r=yp(t[1],c);else if(J(t)){var p=t;p.width=l[0],p.height=l[1];var m=QS(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(q(t)&&o){var h=aH(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=rH(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=oH(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=oH(d)?l[1]/2:d===`bottom`?l[1]:0),MV(e)){var h=iH(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&U(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&U(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&U(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&U(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!No.node&&t.getDom()&&(Zk(this,`_updatePosition`),this._tooltipContent.dispose(),pV(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(QM);function tH(e,t,n){var r=t.ecModel,i;n?(i=new _y(n,r,r),i=new _y(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof _y&&(o=o.get(`tooltip`,!0)),q(o)&&(o={formatter:o}),o&&(i=new _y(o,i,r)))}return i}function nH(e,t){return e.dispatchAction||io(t.dispatchAction,t)}function rH(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function iH(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function aH(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function oH(e){return e===`center`||e===`middle`}function sH(e,t,n){var r=wm(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=Em(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Xm(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function cH(e){yI(OV),e.registerComponentModel(jV),e.registerComponentView(eH),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ao),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ao)}var lH=U;function uH(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function dH(e,t,n){var r={};return lH(t,function(t){var a=r[t]=i();lH(e[t],function(e,r){if(QR.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new QR(i),r===`opacity`&&(i=V(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new QR(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function fH(e,t,n){var r;U(n,function(e){t.hasOwnProperty(e)&&uH(t[e])&&(r=!0)}),r&&U(n,function(n){t.hasOwnProperty(n)&&uH(t[n])?e[n]=V(t[n]):delete e[n]})}function pH(e,t,n,r){var i={};return U(e,function(e){i[e]=QR.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return PN(a,l,e)}function c(e,t){IN(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var mH=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},hH=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),G(t)&&U(t,function(e,r){q(e)&&(e={type:e}),t[r]=Ka(e,mH(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(cC),gH=ao,_H=U,vH=Bg,yH=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new vH),this.group.add(this._selectorGroup=new vH),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=tC(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=QS(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=QS(Ja({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=AV(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=X(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),_H(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` +`)){var p=new vH;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,gH(SH,f,null,r,d)).on(`mouseover`,gH(CH,m.name,null,r,d)).on(`mouseout`,gH(wH,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Xm(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=zl(h.fill);_&&_[3]===0&&(_[3]=.2,h=H(H({},h),{fill:ql(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,gH(SH,null,f,r,d)).on(`mouseover`,gH(CH,null,f,r,d)).on(`mouseout`,gH(wH,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Xm(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Xm(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();_H(e,function(e){var r=e.type,i=new Wf({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),qv(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),ag(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=bH(c,r,o,s,d,m,u),y=new vH,b=r.getModel(`textStyle`);if(K(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(xH({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;q(w)&&w?T=w.replace(`{name}`,t??``):K(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Wf({style:Yv(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new zf({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&kv({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),ag(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();XS(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){XS(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(QM);function bH(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),_H(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:NP(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function xH(e){var t=e.icon||`roundRect`,n=Ew(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function SH(e,t,n,r){wH(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),CH(e,t,n,r)}function CH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function wH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function TH(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),EH(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){U(i,function(t,n){e[t?`select`:`unSelect`](n)}),EH(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function EH(e,t){var n=t||{};return U(e.getData(),function(t){var r=t.get(`name`);if(r!==` +`&&r!==``){var i=e.isSelected(r);n[r]=ko(n,r)?n[r]&&i:i}}),n}function DH(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,ao(TH,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,ao(TH,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,ao(TH,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,ao(TH,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,ao(TH,`unSelect`))}var OH=Ym(kH);function kH(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=Y(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new zf({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&U_(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;U([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,q(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=PH[i],o=FH[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(yH);function LH(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function RH(e){yI(AH),e.registerComponentModel(jH),e.registerComponentView(IH),LH(e)}function zH(e){yI(AH),yI(RH)}var BH={get:function(e,t,n){var r=V((VH[e]||{})[t]);return n&&G(r)?r[r.length-1]:r}},VH={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},HH=QR.mapVisual,UH=QR.eachVisual,WH=G,GH=U,KH=Tp,qH=vp,JH=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&fH(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=io(e,this),this.controllerVisuals=dH(this.option.controller,t,e),this.targetVisuals=dH(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return GH(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Em(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return W(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){U(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],G(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);return q(o)?o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c):K(o)?s?o(e[0],e[1]):o(e):s?e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1]:c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=KH([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=to(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};Ka(r,n),Ka(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){WH(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},GH(r,function(e,t){if(QR.isValidType(t)){var n=BH.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;GH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&V(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&V(n)||(a?s[0]:[s[0],s[0]])),c.symbol=HH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;UH(l,function(e){e>u&&(u=e)}),c.symbolSize=HH(l,function(e){return qH(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}},t}(cC),YH=[20,140],XH=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=YH[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=YH[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):G(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),U(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Tp((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=ZH(this,`outOfRange`,this.getExtent()),n=ZH(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Bg(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);rU([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=nU(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=mv(n.handleLabelPoints[l],pv(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=nU(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=mv(c.indicatorLabelPoint,pv(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||dU(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=ym(u,d);this._dispatchHighDown(`downplay`,tU(f[0],n)),this._dispatchHighDown(`highlight`,tU(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(LN(e.target,function(e){var n=Xm(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function gU(e,t,n,r){for(var i=t.targetVisuals[r],a=QR.prepareVisualTypes(i),o={color:FN(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(pU,mU),U(hU,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(vU))}function SU(e){e.registerComponentModel(XH),e.registerComponentView(cU),xU(e)}var CU=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],wU[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=V(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=W(this._pieceList,function(e){return e=V(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=QR.listVisualTypes(),i=this.isCategory();U(t.pieces,function(e){U(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),U(n,function(e,n){var r=!1;U(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&U(this.stateList,function(e){(t[e]||(t[e]={}))[n]=BH.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,U(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;U(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=V(e)},t.prototype.getValueState=function(e){var t=QR.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){QR.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return U(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Sx(JH.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(JH),wU={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function TU(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var EU=function(e){B(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=mo(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),U(o.viewPieceList,function(o){var s=o.piece,u=new Bg;u.onclick=io(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Wf({style:Yv(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:Y(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),XS(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:tU(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return eU(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Bg,o=this.visualMapModel.textStyleModel;a.add(new Wf({style:Yv(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=W(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=Ew(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=V(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,U(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(QH);function DU(e){e.registerComponentModel(CU),e.registerComponentView(EU),xU(e)}function OU(e){yI(SU),yI(DU)}var kU={label:{enabled:!0},decal:{show:!1}},AU=xm(),jU=xm(),MU=Ym(NU);function NU(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=jU(e).scope||(jU(e).scope={}),i=V(kU);Ka(i.label,e.getLocaleModel().get(`aria`),!1),Ka(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=X();e.eachSeries(function(e){e.isColorBySeries()||(AU(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(K(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=pC(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=AU(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=pC(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?H(H({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=Ja(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=zU:-c>=zU),f=c>0?c%zU:c%zU+zU,p=!1;p=d?!0:!eu(u)&&f>=RU==!!l;var m=e+n*LU(a),h=t+r*IU(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*BU);if(d){var _=1/this._p,v=(l?1:-1)*(zU-_);this._add(`A`,n,r,g,1,+l,e+n*LU(a+v),t+r*IU(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*LU(o),b=t+r*IU(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function rW(e){return``}function iW(e,t){t||={};var n=t.newline?` +`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return nW(i,a)+(i===`style`?o||``:Lx(o))+(t?``+n+W(t,function(e){return r(e)}).join(n)+n:``)+rW(i)}return r(e)}function aW(e,t,n){n||={};var r=n.newline?` +`:``,i=` {`+r,a=r+`}`,o=W(no(e),function(t){return t+i+W(no(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=W(no(t),function(e){return`@keyframes `+e+i+W(no(t[e]),function(n){return n+i+W(no(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function oW(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function sW(e,t,n,r){return tW(`svg`,`root`,{width:e,height:t,xmlns:YU,"xmlns:xlink":XU,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var cW=0;function lW(){return cW++}var uW={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},dW=`transform-origin`;function fW(e,t,n){var r=H({},e.shape);H(r,t),e.buildPath(n,r);var i=new VU;return i.reset(hu(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function pW(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[dW]=n+`px `+r+`px`)}var mW={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function hW(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function gW(e,t,n){var r=e.shape.paths,i={},a,o;if(U(r,function(e){var t=oW(n.zrId);t.animation=!0,vW(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=no(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=hW(i,n);return a.replace(o,s)}}function _W(e){return q(e)?uW[e]?`cubic-bezier(`+uW[e]+`)`:wl(e)?e:``:``}function vW(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof T_){var s=gW(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return hW(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+lW();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function yW(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};bW(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Xl(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),bW(r,t,n,!0)}}}function bW(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+lW(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var xW=Math.round;function SW(e){return e&&q(e.src)}function CW(e){return e&&K(e.toDataURL)}function wW(e,t,n,r){JU(function(i,a){var o=i===`fill`||i===`stroke`;o&&pu(a)?zW(t,e,i,r):o&&uu(a)?BW(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),RW(n,e,r)}function TW(e,t){var n=$j(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[$U+`silent`]=`true`))}function EW(e){return eu(e[0]-1)&&eu(e[1])&&eu(e[2])&&eu(e[3]-1)}function DW(e){return eu(e[4])&&eu(e[5])}function OW(e,t,n){if(t&&!(DW(t)&&EW(t))){var r=n?10:1e4;e.transform=EW(t)?`translate(`+xW(t[4]*r)/r+` `+xW(t[5]*r)/r+`)`:ru(t)}}function kW(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;vo(f,g),vo(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=rs(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=tW(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=V(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=gu(i);x&&(o.patternTransform=x);var S=tW(`pattern`,``,o,[d]),C=iW(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=tW(`pattern`,T,o,[d])),t[n]=mu(T)}}function VW(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=tW(`clipPath`,a,o,[PW(e,n)])}t[`clip-path`]=mu(a)}function HW(e){return document.createTextNode(e)}function UW(e,t,n){e.insertBefore(t,n)}function WW(e,t){e.removeChild(t)}function GW(e,t){e.appendChild(t)}function KW(e){return e.parentNode}function qW(e){return e.nextSibling}function JW(e,t){e.textContent=t}var YW=58,XW=120,ZW=tW(``,``);function QW(e){return e===void 0}function $W(e){return e!==void 0}function eG(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function tG(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function nG(e){var t,n=e.children,r=e.tag;if($W(r)){var i=e.elm=eW(r);if(aG(ZW,e),G(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,rG(e,m,n,i,c)):iG(e,t,r,a))}function sG(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(aG(e,t),QW(t.text)?$W(r)&&$W(i)?r!==i&&oG(n,r,i):$W(i)?($W(e.text)&&JW(n,``),rG(n,null,i,0,i.length-1)):$W(r)?iG(n,r,0,r.length-1):$W(e.text)&&JW(n,``):e.text!==t.text&&($W(r)&&iG(n,r,0,r.length-1),JW(n,t.text)))}function cG(e,t){if(tG(e,t))sG(e,t);else{var n=e.elm,r=KW(n);nG(t),r!==null&&(UW(r,t.elm,qW(n)),iG(r,[e],0,0))}return t}var lG=0,uG=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=dG(`configLayer`),this.storage=t,this._opts=n=H({},n),this.root=e,this._id=`zr`+lG++,this._oldVNode=sW(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=eW(`svg`);aG(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,cG(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return LW(e,oW(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=oW(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=fG(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=tW(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=W(no(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(tW(`defs`,`defs`,{},c)),e.animation){var l=aW(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=tW(`style`,`stl`,{},[],l);a.push(u)}}return sW(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},iW(this.renderToVNode({animation:Y(e.cssAnimation,!0),emphasis:Y(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Y(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!a.current)return;let e=$F(a.current,void 0,{renderer:`svg`});o.current=e,e.on(`click`,e=>s.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(a.current),()=>{t.disconnect(),e.dispose(),o.current=null}},[]),(0,R.useEffect)(()=>{o.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,z.jsx)(`div`,{ref:a,className:i?`echart ${i}`:`echart`,style:{height:t,width:`100%`,minWidth:0},role:`img`,"aria-label":n})}function hG(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}function gG(e){return Ce[e?`dark`:`light`]}function _G(e){let t=e?5:7;return{ok:Ae[t],warn:je[t],bad:De[t],info:Oe[t]}}function vG(e,t){let n=ye[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}function yG(e){return e===`unhealthy`?`diamond`:e===`degraded`?`roundRect`:`circle`}function bG(e){return e===`unknown`?`dashed`:`solid`}function xG(e){return e===`unhealthy`?1.25:e===`degraded`?.91:1}function SG(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}function CG(e,t){let n=_G(t),r=String(e).toUpperCase();return r===`ERROR`||r===`FATAL`?n.bad:r===`WARN`||r===`WARNING`?n.warn:r===`INFO`?n.info:gG(t).muted}function wG({label:e,value:t,color:n,hint:r,children:i}){return(0,z.jsxs)(se,{withBorder:!0,radius:`md`,p:`sm`,bg:`var(--mantine-color-default)`,miw:0,h:`100%`,children:[(0,z.jsx)(v,{c:`dimmed`,size:`xs`,truncate:!0,children:e}),(0,z.jsx)(v,{fw:600,fz:`xl`,c:n,mt:2,lh:1.2,truncate:!0,children:t}),r&&(0,z.jsx)(v,{c:`dimmed`,size:`xs`,mt:2,truncate:!0,children:r}),i&&(0,z.jsx)(oe,{mt:4,children:i})]})}var TG={unhealthy:`◆`,degraded:`■`,healthy:`●`,unknown:`○`},EG={unhealthy:`unhealthy`,degraded:`degraded`,healthy:`healthy`,unknown:`health unknown`};function DG({health:e,label:t}){return(0,z.jsxs)(ge,{color:hG(e),variant:`light`,tt:`none`,style:{minWidth:`max-content`},leftSection:(0,z.jsx)(oe,{component:`span`,"aria-hidden":!0,style:{fontSize:Te.micro,lineHeight:1},children:TG[e]??TG.unknown}),children:[t,(0,z.jsxs)(We,{children:[` — `,EG[e]??EG.unknown]})]})}function OG({text:e}){return(0,z.jsxs)(k,{py:`xl`,children:[(0,z.jsx)(Pn,{size:20}),(0,z.jsx)(v,{c:`dimmed`,size:`sm`,ml:`xs`,children:e})]})}function kG({retry:e}){return(0,z.jsxs)(k,{py:`xl`,style:{flexDirection:`column`,gap:8},children:[(0,z.jsxs)(oe,{display:`flex`,style:{alignItems:`center`,gap:8},children:[(0,z.jsx)(at,{size:20,weight:`fill`,color:`var(--mantine-color-bad-filled)`}),(0,z.jsx)(v,{c:`bad`,fw:500,size:`sm`,children:`Couldn't load this view`})]}),(0,z.jsx)(re,{size:`compact-xs`,variant:`light`,color:`bad`,onClick:e,children:`Retry now`}),(0,z.jsx)(v,{c:`dimmed`,size:`xs`,children:`Retrying automatically`})]})}yI([QE]);function AG({values:e,color:t,label:n,format:r}){let i=e.length?Math.max(...e):0,a=(0,R.useMemo)(()=>({animation:!1,grid:{left:0,right:0,top:2,bottom:2},xAxis:{type:`category`,show:!1,data:e.map((e,t)=>t)},yAxis:{type:`value`,show:!1,min:0},tooltip:{show:!1},aria:{enabled:!0,decal:{show:!1},description:n},series:[{type:`line`,data:e,showSymbol:!1,smooth:.3,lineStyle:{width:1.5,color:t},areaStyle:{opacity:.12,color:t}}]}),[e,t,n]);return(0,z.jsxs)(oe,{children:[(0,z.jsx)(mG,{option:a,height:28,label:n}),i>0&&r&&(0,z.jsxs)(v,{c:`dimmed`,size:`xs`,ta:`right`,mt:2,children:[`peak `,r(i)]})]})}var jG={unhealthy:0,degraded:1,healthy:2};function MG({widget:e,filters:t,agentAvailable:n,onOpenChat:r}){let i=xe(`overview`,_e(t,e.config,[`service`]));if(i.isError)return(0,z.jsx)(kG,{retry:()=>void i.refetch()});let a=[...i.data?.data.services??[]].sort((e,t)=>(jG[e.health]??3)-(jG[t.health]??3)||t.error_rate-e.error_rate);if(i.data&&a.length===0)return(0,z.jsx)(OG,{text:`No recent activity`});let o=e=>r(`Investigate the ${e} service. Explain its errors and latency.`);return(0,z.jsx)(Re,{type:`auto`,offsetScrollbars:!0,h:`100%`,children:(0,z.jsxs)(Ze,{verticalSpacing:`xs`,fz:`sm`,highlightOnHover:n,children:[(0,z.jsx)(Ze.Thead,{children:(0,z.jsxs)(Ze.Tr,{children:[(0,z.jsx)(Ze.Th,{children:`Service`}),(0,z.jsx)(Ze.Th,{ta:`right`,children:`P95`}),(0,z.jsx)(Ze.Th,{ta:`right`,children:`Errors`})]})}),(0,z.jsx)(Ze.Tbody,{children:a.map(e=>(0,z.jsxs)(Ze.Tr,{...n&&{onClick:()=>o(e.service),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),o(e.service))},tabIndex:0,role:`button`,"aria-label":`Investigate ${e.service}`,style:{cursor:`pointer`}},children:[(0,z.jsx)(Ze.Td,{children:(0,z.jsx)(DG,{health:e.health,label:e.service})}),(0,z.jsx)(Ze.Td,{ta:`right`,children:(0,z.jsx)(v,{component:`span`,size:`sm`,ff:`monospace`,c:xa(e.p95_ms),children:rt(e.p95_ms)})}),(0,z.jsx)(Ze.Td,{ta:`right`,children:(0,z.jsx)(v,{component:`span`,size:`sm`,c:Sa(e.error_rate),children:Qe(e.error_rate)})})]},e.service))})]})})}function NG({filters:e,agentAvailable:t,onOpenChat:n}){if(!t)return(0,z.jsx)(v,{c:`dimmed`,size:`sm`,children:`Configure an AI provider to enable this view. The rest of this dashboard remains available.`});let r=Me(e.window),i=[`Summarize the last ${r}`,`What changed in the last ${r}?`,`Which service needs attention right now?`];return(0,z.jsx)(F,{gap:`xs`,align:`flex-start`,children:i.map(e=>(0,z.jsx)(re,{variant:`default`,size:`xs`,radius:`xl`,leftSection:(0,z.jsx)(Pe,{size:13,weight:`fill`}),onClick:()=>n(e),children:e},e))})}var PG={overview:[`service`],topology:[`service`],performance:[`service`],logs:[`service`,`severity`,`search`],trace:[`trace_id`,`service`]};function FG(e){return Object.hasOwn(PG,e)?PG[e]:void 0}function IG(e){return(FG(e)?.length??0)>0}function LG({opened:e,widget:t,services:n,onClose:r,onSave:i}){let[a,o]=(0,R.useState)({service:``,severity:``,search:``,trace_id:``});(0,R.useEffect)(()=>{e&&o({service:be(t.config,`service`),severity:be(t.config,`severity`),search:be(t.config,`search`),trace_id:be(t.config,`trace_id`)})},[e,t.config]);let s=FG(t.type)??[],c=[...new Set([...n,a.service].filter(Boolean))];function l(){let e={...t.config??{}};for(let t of s){let n=a[t].trim();n?e[t]=n:delete e[t]}i(e),r()}return(0,z.jsx)(Ke,{opened:e,onClose:r,title:`Configure ${t.title}`,centered:!0,children:(0,z.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),l()},children:(0,z.jsxs)(F,{children:[s.includes(`service`)&&(0,z.jsx)(hn,{label:`Service`,placeholder:`All services`,data:c,value:a.service||null,onChange:e=>o({...a,service:e??``}),clearable:!0,searchable:!0,"aria-label":`Service`}),s.includes(`severity`)&&(0,z.jsx)(hn,{label:`Severity`,placeholder:`All severities`,data:[`ERROR`,`WARN`,`INFO`,`DEBUG`],value:a.severity||null,onChange:e=>o({...a,severity:e??``}),clearable:!0,"aria-label":`Severity`}),s.includes(`search`)&&(0,z.jsx)(L,{label:`Search`,placeholder:`Text the log body must contain`,value:a.search,onChange:e=>o({...a,search:e.currentTarget.value}),"aria-label":`Search`}),s.includes(`trace_id`)&&(0,z.jsx)(L,{label:`Trace id`,placeholder:`Leave empty for the most relevant recent trace`,value:a.trace_id,onChange:e=>o({...a,trace_id:e.currentTarget.value}),ff:`monospace`,"aria-label":`Trace id`}),(0,z.jsxs)(C,{justify:`flex-end`,children:[(0,z.jsx)(re,{variant:`default`,onClick:r,children:`Cancel`}),(0,z.jsx)(re,{type:`submit`,children:`Save`})]})]})})})}yI([AA]);function RG({widget:e,filters:t,dark:n}){let r=xe(`logs`,_e(t,e.config,[`service`,`severity`,`search`])),i=r.data,a=(0,R.useMemo)(()=>{if(!i||i.data.buckets.length===0)return null;let e=gG(n),t=i.provenance.window,r=[...new Set(i.data.buckets.map(e=>e.time))],a=[...new Set(i.data.buckets.map(e=>e.severity))],o=new Map(i.data.buckets.map(e=>[`${e.time} ${e.severity}`,e.count]));return{color:a.map(e=>CG(e,n)),grid:{left:28,right:8,top:8,bottom:20},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Te.micro}},xAxis:{type:`category`,data:r.map(e=>et(e,t)),axisLabel:{color:e.muted,fontSize:Te.micro,hideOverlap:!0},axisLine:{lineStyle:{color:e.border}}},yAxis:{type:`value`,minInterval:1,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:Te.micro}},series:a.map(e=>({name:e,type:`bar`,stack:`logs`,barMaxWidth:14,data:r.map(t=>o.get(`${t} ${e}`)??0),itemStyle:{borderRadius:[2,2,0,0]}}))}},[n,i]);if(r.isError)return(0,z.jsx)(kG,{retry:()=>void r.refetch()});let o=(i?.data.entries??[]).slice(0,5);return i&&o.length===0?(0,z.jsx)(OG,{text:`No matching logs in this window`}):(0,z.jsxs)(F,{gap:`xs`,h:`100%`,children:[a&&(0,z.jsx)(oe,{h:72,children:(0,z.jsx)(mG,{option:a,height:72,label:`Log volume by severity`})}),(0,z.jsx)(Re,{type:`auto`,offsetScrollbars:!0,style:{flex:1},children:(0,z.jsx)(Ze,{verticalSpacing:4,fz:`sm`,children:(0,z.jsx)(Ze.Tbody,{children:o.map((e,t)=>(0,z.jsxs)(Ze.Tr,{children:[(0,z.jsx)(Ze.Td,{style:{whiteSpace:`nowrap`},children:(0,z.jsx)(v,{component:`span`,size:`xs`,ff:`monospace`,c:`dimmed`,title:$e(e.time),children:i?et(e.time,i.provenance.window,!0):e.time})}),(0,z.jsx)(Ze.Td,{style:{whiteSpace:`nowrap`},children:(0,z.jsx)(ge,{size:`xs`,color:SG(e.severity),variant:`light`,style:{minWidth:`max-content`},children:e.severity||`LOG`})}),(0,z.jsx)(Ze.Td,{style:{whiteSpace:`nowrap`},children:(0,z.jsx)(v,{component:`span`,size:`sm`,fw:600,children:e.service})}),(0,z.jsx)(Ze.Td,{style:{width:`100%`},children:(0,z.jsx)(v,{size:`sm`,lineClamp:1,title:e.body,children:e.body})})]},`${e.time}-${t}`))})})})]})}function zG({widget:e,filters:t,dark:n}){let r=_e(t,e.config,[`service`]),i=xe(`overview`,r),a=xe(`performance`,r);if(i.isError)return(0,z.jsx)(kG,{retry:()=>void i.refetch()});let o=i.data?.data,s=(a.data?.data.points??[]).map(e=>e.error_rate*100),c=Math.max(o?.service_count??0,1),l=_G(n),u=o?.health===`unknown`,d=o?u?`No data`:o.health.charAt(0).toUpperCase()+o.health.slice(1):`—`;return(0,z.jsxs)(F,{gap:`sm`,children:[(0,z.jsxs)(wn,{cols:2,spacing:`sm`,children:[(0,z.jsx)(wG,{label:`Health`,value:d,color:o?hG(o.health):void 0,hint:o?u?`No telemetry in this window`:`${tt.format(o.service_count)} services`:void 0}),(0,z.jsx)(wG,{label:`Error rate`,value:o&&!u?Qe(o.error_rate):`—`,color:o&&o.error_rate>=.01?`bad`:void 0,hint:o&&!u?`${tt.format(o.total_spans)} operations`:void 0,children:s.length>1&&(0,z.jsx)(AG,{values:s,color:l.bad,label:`Error rate trend`,format:e=>`${e.toFixed(2)}%`})})]}),o&&!u&&(0,z.jsxs)(oe,{children:[(0,z.jsxs)(pn.Root,{size:`md`,"aria-label":`Service health distribution`,children:[(0,z.jsx)(pn.Section,{value:o.counts.healthy/c*100,color:`ok`}),(0,z.jsx)(pn.Section,{value:o.counts.degraded/c*100,color:`warn`}),(0,z.jsx)(pn.Section,{value:o.counts.unhealthy/c*100,color:`bad`})]}),(0,z.jsxs)(C,{mt:6,gap:`md`,children:[(0,z.jsx)(BG,{color:`ok`,text:`${o.counts.healthy} healthy`}),(0,z.jsx)(BG,{color:`warn`,text:`${o.counts.degraded} degraded`}),(0,z.jsx)(BG,{color:`bad`,text:`${o.counts.unhealthy} unhealthy`})]})]})]})}function BG({color:e,text:t}){return(0,z.jsxs)(C,{gap:6,children:[(0,z.jsx)(oe,{w:8,h:8,bg:e,style:{borderRadius:`50%`}}),(0,z.jsx)(v,{c:`dimmed`,size:`xs`,children:t})]})}yI([QE]);function VG({widget:e,filters:t,dark:n}){let r=xe(`performance`,_e(t,e.config,[`service`])),i=r.data,a=(0,R.useMemo)(()=>{if(!i||i.data.points.length===0)return null;let e=gG(n),t=i.provenance.window;return{color:[vG(`operations`,n),_G(n).warn],grid:{left:36,right:40,top:24,bottom:22},legend:{top:0,left:0,textStyle:{color:e.muted,fontSize:Te.micro},icon:`circle`,itemWidth:7,itemHeight:7},tooltip:{trigger:`axis`,backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Te.micro}},xAxis:{type:`category`,data:i.data.points.map(e=>et(e.time,t)),boundaryGap:!1,axisLine:{lineStyle:{color:e.border}},axisTick:{show:!1},axisLabel:{color:e.muted,fontSize:Te.micro,hideOverlap:!0}},yAxis:[{type:`value`,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:Te.micro}},{type:`value`,splitLine:{show:!1},axisLabel:{color:e.muted,fontSize:Te.micro,formatter:e=>rt(e)}}],series:[{name:`Operations`,type:`line`,data:i.data.points.map(e=>e.spans),smooth:.22,showSymbol:!1,lineStyle:{width:2},areaStyle:{opacity:.05}},{name:`P95`,type:`line`,yAxisIndex:1,data:i.data.points.map(e=>e.p95_ms),smooth:.22,showSymbol:!1,lineStyle:{width:2}}]}},[n,i]);if(r.isError)return(0,z.jsx)(kG,{retry:()=>void r.refetch()});if(i&&i.data.points.length===0)return(0,z.jsx)(OG,{text:`No endpoint activity in this window`});let o=(i?.data.endpoints??[]).slice(0,3);return(0,z.jsxs)(F,{gap:`xs`,h:`100%`,children:[a&&(0,z.jsx)(oe,{style:{flex:1,minHeight:120},children:(0,z.jsx)(mG,{option:a,height:`100%`,label:`Operations and P95 latency`})}),o.length>0&&(0,z.jsx)(Ze,{verticalSpacing:4,fz:`sm`,children:(0,z.jsx)(Ze.Tbody,{children:o.map(e=>(0,z.jsxs)(Ze.Tr,{children:[(0,z.jsxs)(Ze.Td,{children:[(0,z.jsx)(ge,{variant:`light`,size:`xs`,mr:6,style:{minWidth:`max-content`},children:e.method}),(0,z.jsx)(v,{component:`span`,size:`sm`,ff:`monospace`,children:e.path})]}),(0,z.jsx)(Ze.Td,{ta:`right`,children:(0,z.jsxs)(v,{component:`span`,size:`sm`,c:`dimmed`,children:[tt.format(e.calls),` calls`]})}),(0,z.jsx)(Ze.Td,{ta:`right`,children:(0,z.jsx)(v,{component:`span`,size:`sm`,ff:`monospace`,children:rt(e.p95_ms)})})]},`${e.method}-${e.path}`))})})]})}yI([jB]);function HG({widget:e,filters:t,dark:n,onOpenChat:r}){let i=_e(t,e.config,[`service`]),a=xe(`topology`,i),o=a.data?.data,s=(0,R.useMemo)(()=>{if(!o)return null;let e=gG(n),t=_G(n),r=n=>n===`unhealthy`?t.bad:n===`degraded`?t.warn:n===`unknown`?e.muted:t.ok,i=[...o.nodes].sort((e,t)=>e.service.localeCompare(t.service));return{tooltip:{backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Te.micro}},series:[{type:`graph`,layout:`circular`,circular:{rotateLabel:!1},roam:!1,draggable:!1,label:{show:!0,position:`bottom`,color:e.text,fontSize:Te.micro},edgeSymbol:[`none`,`arrow`],edgeSymbolSize:6,data:i.map(t=>({id:t.service,name:t.service,value:t.spans,symbol:yG(t.health),symbolSize:xG(t.health)*Math.min(34,18+Math.log10(Math.max(t.spans,1))*4),itemStyle:{color:e.surface,borderColor:r(t.health),borderWidth:3,borderType:bG(t.health)}})),links:o.edges.map(n=>{let r=n.error_rate>=.05;return{source:n.caller,target:n.callee,value:n.calls,lineStyle:{width:r?3.5:Math.min(3,1+Math.log10(Math.max(n.calls,1))),color:r?t.bad:e.muted,opacity:r?.95:.35,curveness:.08}}}),emphasis:{focus:`adjacency`}}]}},[n,o]);return a.isError?(0,z.jsx)(kG,{retry:()=>void a.refetch()}):o&&o.nodes.length===0?(0,z.jsx)(OG,{text:`No service relationships in this window`}):(0,z.jsxs)(F,{gap:4,h:`100%`,children:[s&&(0,z.jsx)(mG,{option:s,height:`100%`,className:`widget-chart`,label:`Service dependency graph`,onClick:e=>{let t=e;t.dataType===`node`&&t.data?.id&&r(`Investigate the ${t.data.id} service. Explain its errors and latency.`)}}),o&&(0,z.jsxs)(v,{c:`dimmed`,size:`xs`,children:[o.nodes.length,` services · `,o.edges.length,` `,o.edges.length===1?`route`:`routes`]})]})}function UG(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function WG({widget:e,filters:t,dark:n}){let r=xe(`trace`,_e(t,e.config,[`trace_id`,`service`]));if(r.isError)return(0,z.jsx)(kG,{retry:()=>void r.refetch()});let i=r.data?.data;if(i&&i.spans.length===0)return(0,z.jsx)(OG,{text:`No traces in this window`});let a=[...i?.spans??[]].sort((e,t)=>t.duration_ms-e.duration_ms).slice(0,6);return(0,z.jsxs)(F,{gap:`sm`,children:[(0,z.jsxs)(wn,{cols:{base:2,sm:4},spacing:`sm`,children:[(0,z.jsx)(wG,{label:`Duration`,value:i?rt(i.duration_ms):`—`}),(0,z.jsx)(wG,{label:`Spans`,value:i?tt.format(i.spans.length):`—`}),(0,z.jsx)(wG,{label:`Services`,value:i?tt.format(i.services.length):`—`}),(0,z.jsx)(wG,{label:`Status`,value:i?i.has_error?`Error`:`OK`:`—`,color:i?i.has_error?`bad`:`ok`:void 0})]}),a.length>0&&(0,z.jsx)(GG,{spans:a,dark:n}),i&&(0,z.jsxs)(C,{gap:4,children:[(0,z.jsxs)(v,{c:`dimmed`,size:`xs`,ff:`monospace`,children:[`Trace `,UG(i.trace_id)]}),(0,z.jsx)(KG,{value:i.trace_id})]})]})}function GG({spans:e,dark:t}){let n=Math.min(...e.map(e=>new Date(e.start).valueOf())),r=Math.max(...e.map(e=>new Date(e.start).valueOf()+e.duration_ms)),i=Math.max(r-n,1);return(0,z.jsx)(F,{gap:4,children:e.map(e=>{let r=(new Date(e.start).valueOf()-n)/i*100,a=Math.max(e.duration_ms/i*100,.6),o=e.status.toUpperCase().includes(`ERROR`);return(0,z.jsxs)(C,{gap:`sm`,wrap:`nowrap`,children:[(0,z.jsxs)(oe,{w:170,miw:0,children:[(0,z.jsx)(v,{size:`xs`,fw:600,truncate:!0,children:e.operation}),(0,z.jsx)(v,{c:`dimmed`,size:`xs`,truncate:!0,children:e.service})]}),(0,z.jsx)(ze,{label:`${e.service} · ${e.operation} · ${rt(e.duration_ms)}`,withArrow:!0,children:(0,z.jsx)(oe,{pos:`relative`,h:10,flex:1,bg:`var(--mantine-color-default-hover)`,style:{borderRadius:`var(--mantine-radius-sm)`},children:(0,z.jsx)(oe,{pos:`absolute`,left:`${r}%`,w:`${Math.min(a,100-r)}%`,h:`100%`,bg:o?`bad`:vG(e.service,t),style:{borderRadius:`var(--mantine-radius-sm)`,minWidth:3}})})}),(0,z.jsx)(v,{size:`xs`,ff:`monospace`,w:56,ta:`right`,children:rt(e.duration_ms)})]},e.span_id)})})}function KG({value:e}){let{state:t,copy:n}=nt();return(0,z.jsx)(ze,{label:t===`failed`?`Could not copy`:t===`copied`?`Copied`:`Copy trace id`,children:(0,z.jsx)(Ye,{variant:`subtle`,color:`gray`,size:`xs`,"aria-label":`Copy trace id`,"data-state":t===`idle`?void 0:t,onClick:()=>n(e),children:t===`copied`?(0,z.jsx)(T,{size:12,weight:`bold`}):(0,z.jsx)(te,{size:12})})})}var qG={overview:`System health`,topology:`Service map`,activity:`Recent activity`,assistant:`Ask Fanout`,performance:`Performance`,trace:`Trace focus`,logs:`Logs`},JG={overview:zG,topology:HG,activity:MG,assistant:NG,performance:VG,trace:WG,logs:RG};function YG(){return(0,z.jsx)(OG,{text:`This view type is not supported by this version`})}function XG(e){return Object.hasOwn(JG,e)?JG[e]:YG}function ZG(e){let{widget:t,services:n,onRemove:r,onConfigure:i}=e,[a,o]=(0,R.useState)(!1),[s,c]=(0,R.useState)(!1),[l,u]=(0,R.useState)(!1),d=XG(t.type);return(0,z.jsxs)(se,{withBorder:!0,radius:`lg`,p:`md`,h:`100%`,className:`widget-card`,style:{overflow:`hidden`},children:[(0,z.jsxs)(F,{h:`100%`,gap:`sm`,children:[(0,z.jsxs)(C,{justify:`space-between`,align:`center`,wrap:`nowrap`,className:`widget-drag`,style:{cursor:`grab`},children:[(0,z.jsx)(N,{order:2,fz:`md`,fw:500,lineClamp:1,miw:0,children:t.title}),(0,z.jsxs)(Ne,{position:`bottom-end`,withinPortal:!0,opened:a,onChange:o,children:[(0,z.jsx)(Ne.Target,{children:(0,z.jsx)(Ye,{className:`widget-actions`,"data-open":a||void 0,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Actions for ${t.title}`,children:(0,z.jsx)(ue,{size:18,weight:`bold`})})}),(0,z.jsxs)(Ne.Dropdown,{children:[IG(t.type)&&(0,z.jsx)(Ne.Item,{leftSection:(0,z.jsx)(In,{size:15}),onClick:()=>c(!0),children:`Configure`}),(0,z.jsx)(Ne.Item,{color:`bad`,leftSection:(0,z.jsx)(ve,{size:15}),onClick:()=>u(!0),children:`Remove`})]})]})]}),(0,z.jsx)(`div`,{className:`widget-body`,children:(0,z.jsx)(d,{...e})})]}),(0,z.jsx)(LG,{opened:s,widget:t,services:n,onClose:()=>c(!1),onSave:i}),(0,z.jsx)(Ke,{opened:l,onClose:()=>u(!1),title:`Remove ${t.title}?`,centered:!0,radius:`md`,children:(0,z.jsxs)(F,{gap:`md`,children:[(0,z.jsx)(v,{size:`sm`,c:`dimmed`,children:`This takes the card off the dashboard for everyone who opens it. You can add it again from Add view, but its size and settings are not kept.`}),(0,z.jsxs)(C,{justify:`flex-end`,gap:`sm`,children:[(0,z.jsx)(re,{variant:`default`,size:`sm`,onClick:()=>u(!1),children:`Cancel`}),(0,z.jsx)(re,{color:`bad`,size:`sm`,onClick:()=>{u(!1),r()},children:`Remove`})]})]})})]})}var QG=ma(fa),$G=`fanout.dashboard-id`,eK={layout:[],widgets:[],filters:{window:`1h`,namespace:``}};function tK(e){return Object.hasOwn(va,e)?va[e]:void 0}function nK({dashboardID:e=``,agentAvailable:t,onOpenChat:n,onDashboardChange:r,urlFilters:i,onFiltersChange:a}){let o=Ue(),s=He(`light`)===`dark`,c=Ge({queryKey:Je,queryFn:()=>qe(`/api/dashboards`),refetchInterval:3e4,staleTime:Ee}),[l,u]=(0,R.useState)(()=>e||localStorage.getItem($G)||``),d=it({mutationFn:async e=>{if(!f.data)throw Error(`No dashboard selected`);let t=await I(`/api/dashboards/${encodeURIComponent(f.data.id)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({name:f.data.name,description:f.data.description,state:e})});if(!t.ok)throw Error(`Unable to save dashboard`);return t.json()},scope:{id:`dashboard-${l}`},onSuccess:e=>{o.setQueryData([`dashboard`,e.id],e),o.invalidateQueries({queryKey:Je})},onError:e=>console.error(`Dashboard save failed`,e)}),f=Ge({queryKey:[`dashboard`,l],queryFn:()=>qe(`/api/dashboards/${encodeURIComponent(l)}`),enabled:!!l,refetchInterval:d.isPending||d.isError?!1:3e4,staleTime:Ee}),[p,m]=(0,R.useState)(eK),[h,g]=(0,R.useState)(`lg`),[_,y]=(0,R.useState)(null),b=(0,R.useMemo)(()=>({window:ke.some(e=>e.value===i?.window)?i.window:p.filters.window,namespace:i?.namespace??p.filters.namespace}),[i?.window,i?.namespace,p.filters.window,p.filters.namespace]),S=xe(`overview`,_e(b),!!f.data),w=(0,R.useMemo)(()=>(S.data?.data.services??[]).map(e=>e.service),[S.data]),T=Se();(0,R.useEffect)(()=>{e&&e!==l&&(u(e),localStorage.setItem($G,e))},[e,l]),(0,R.useEffect)(()=>{let t=c.data?.dashboards;if(t?.length&&!(e&&t.some(t=>t.id===e))&&!e){if(l&&t.some(e=>e.id===l)){r?.(l,!0);return}D((t.find(e=>e.is_default)??t[0]).id,!0)}},[e,c.data,l]),(0,R.useEffect)(()=>{d.isPending||d.isError||f.data?.state&&m(f.data.state)},[f.data?.updated_at,d.isPending,d.isError]),(0,R.useEffect)(()=>{d.reset()},[l]);let E=(0,R.useMemo)(()=>{let e=new Map(p.widgets.map(e=>[e.id,e.type])),t=p.layout.map(t=>{let n=tK(e.get(t.i)??`overview`)??va.overview;return{...t,h:Math.max(t.h,n.minH),minW:Math.max(t.minW??0,n.minW),minH:Math.max(t.minH??0,n.minH)}});return{lg:t,md:t,sm:ga(t,6),xs:ga(t,2),xxs:ga(t,1)}},[p.layout,p.widgets]);function D(e,t=!1){u(e),localStorage.setItem($G,e),r?.(e,t)}function O(e){m(e),d.mutate(e)}function k(e){let t=Fe(),n=va[e],r=ba(p.layout,n.w,n.h,12,n.minW);O({...p,widgets:[...p.widgets,{id:t,type:e,title:qG[e],enabled:!0}],layout:[...p.layout,{i:t,x:r.x,y:r.y,w:r.w,h:n.h,minW:n.minW,minH:n.minH}]})}function A(e){O({...p,filters:e}),a?.(e)}function j(e){O({...p,widgets:p.widgets.filter(t=>t.id!==e),layout:p.layout.filter(t=>t.i!==e)})}function M(e,t){O({...p,widgets:p.widgets.map(n=>n.id===e?{...n,config:t}:n)})}if(c.isLoading||l&&f.isLoading)return(0,z.jsx)(rK,{label:`Loading your dashboard…`});let P=c.data?.dashboards??[];if(e&&P.length>0&&!P.some(t=>t.id===e))return(0,z.jsx)(iK,{onOpenDefault:()=>D((P.find(e=>e.is_default)??P[0]).id,!0)});if(c.isError||f.isError)return(0,z.jsx)(rK,{label:`Your dashboard is unavailable. Try refreshing.`});let ee=f.data;return ee?(0,z.jsxs)(oe,{component:`main`,maw:1440,mx:`auto`,px:{base:`md`,sm:`xl`},pt:{base:`lg`,sm:`xl`},pb:`xl`,children:[(0,z.jsxs)(F,{gap:`md`,mb:`lg`,children:[(0,z.jsxs)(oe,{children:[(0,z.jsx)(N,{order:1,fz:32,lts:`-0.03em`,children:ee.name}),(0,z.jsx)(v,{c:`dimmed`,mt:2,children:ee.description||`A focused view of the signals that matter now.`})]}),(0,z.jsxs)(mt,{align:{base:`stretch`,md:`center`},justify:`space-between`,direction:{base:`column`,md:`row`},gap:`sm`,role:`group`,"aria-label":`Dashboard controls`,children:[(0,z.jsxs)(C,{gap:`sm`,wrap:`wrap`,children:[(0,z.jsx)(hn,{"aria-label":`Window`,value:b.window,onChange:e=>e&&A({...b,window:e}),data:ke,w:{base:`100%`,xs:150},size:`sm`}),(0,z.jsx)(L,{"aria-label":`Namespace`,value:_??b.namespace,onChange:e=>y(e.currentTarget.value),onBlur:e=>{y(null),A({...b,namespace:e.currentTarget.value.trim()})},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},placeholder:`All namespaces`,w:{base:`100%`,xs:200},size:`sm`})]}),(0,z.jsxs)(C,{gap:`sm`,wrap:`wrap`,justify:`flex-end`,children:[T&&(0,z.jsxs)(v,{c:`dimmed`,size:`xs`,title:$e(T),children:[`Updated `,new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(T)),` `,Xe(T)]}),(0,z.jsxs)(Ne,{shadow:`md`,position:`bottom-end`,withinPortal:!0,children:[(0,z.jsx)(Ne.Target,{children:(0,z.jsx)(re,{variant:`default`,size:`sm`,leftSection:(0,z.jsx)(he,{size:15,weight:`bold`}),rightSection:(0,z.jsx)(Mn,{size:13,weight:`bold`}),children:`Add view`})}),(0,z.jsx)(Ne.Dropdown,{children:_a.filter(e=>t||e!==`assistant`).map(e=>(0,z.jsx)(Ne.Item,{onClick:()=>k(e),children:qG[e]},e))})]}),t&&(0,z.jsx)(re,{variant:`subtle`,color:`gray`,size:`sm`,rightSection:(0,z.jsx)(An,{size:15,weight:`bold`}),onClick:()=>n(),children:`Ask Fanout`})]})]})]}),d.isError&&(0,z.jsx)(x,{color:`bad`,radius:`lg`,mb:`lg`,icon:(0,z.jsx)(at,{size:18,weight:`fill`}),title:`Dashboard changes not saved`,children:(0,z.jsxs)(C,{justify:`space-between`,gap:`sm`,children:[(0,z.jsx)(v,{size:`sm`,children:`Your latest edits are kept on this screen but Fanout could not store them.`}),(0,z.jsx)(re,{size:`compact-sm`,color:`bad`,variant:`light`,onClick:()=>d.mutate(p),children:`Retry save`})]})}),(0,z.jsx)(QG,{className:`dashboard-grid`,layouts:E,breakpoints:{lg:1100,md:800,sm:600,xs:420,xxs:0},cols:{lg:12,md:10,sm:6,xs:2,xxs:1},rowHeight:76,margin:[16,16],containerPadding:[0,0],compactType:`vertical`,draggableHandle:`.widget-drag`,draggableCancel:`button,input,select,textarea,a,label,[role=menu],[role=dialog],.widget-actions`,onBreakpointChange:g,onDragStop:e=>{h===`lg`&&O({...p,layout:[...e]})},onResizeStop:e=>{h===`lg`&&O({...p,layout:[...e]})},children:p.widgets.map(e=>(0,z.jsx)(`div`,{children:(0,z.jsx)(ZG,{widget:e,filters:b,dark:s,services:w,agentAvailable:t,onOpenChat:n,onRemove:()=>j(e.id),onConfigure:t=>M(e.id,t)})},e.id))})]}):(0,z.jsx)(rK,{label:`Preparing your dashboard…`})}function rK({label:e}){return(0,z.jsxs)(k,{mih:`50vh`,children:[(0,z.jsx)(p,{size:`sm`}),(0,z.jsx)(v,{c:`dimmed`,size:`sm`,ml:`sm`,children:e})]})}function iK({onOpenDefault:e}){return(0,z.jsx)(k,{mih:`50vh`,children:(0,z.jsxs)(F,{align:`center`,gap:`xs`,children:[(0,z.jsx)(N,{order:1,fz:24,lts:`-0.02em`,children:`This dashboard isn't here`}),(0,z.jsx)(v,{c:`dimmed`,size:`sm`,ta:`center`,children:`The link may be out of date, or the dashboard may have been renamed or deleted.`}),(0,z.jsx)(re,{mt:`sm`,variant:`default`,size:`sm`,onClick:e,children:`Open your default dashboard`})]})})}export{nK as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboards._dashboardId-BflPchra.js b/internal/ui/dist/assets/dashboards._dashboardId-DTHMtzKv.js similarity index 62% rename from internal/ui/dist/assets/dashboards._dashboardId-BflPchra.js rename to internal/ui/dist/assets/dashboards._dashboardId-DTHMtzKv.js index 8c8592b0..e335c0cc 100644 --- a/internal/ui/dist/assets/dashboards._dashboardId-BflPchra.js +++ b/internal/ui/dist/assets/dashboards._dashboardId-DTHMtzKv.js @@ -1 +1 @@ -import{mt as e}from"./brand-MzZ03bSa.js";import{u as t}from"./auth-Co_9Gxq0.js";import{t as n}from"./dashboard-CGsOX0Hw.js";import{o as r}from"./preload-helper-C6Mr44w1.js";import{t as i}from"./index-DPHpSRp0.js";var a=e();function o(){let{dashboardId:e}=i.useParams(),o=i.useSearch(),s=t(),{agentAvailable:c,openChat:l}=r();return(0,a.jsx)(n,{dashboardID:e,agentAvailable:c,onOpenChat:l,onDashboardChange:(e,t)=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:o,replace:t}),urlFilters:o,onFiltersChange:t=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:{window:t.window,namespace:t.namespace||void 0},replace:!0})})}export{o as component}; \ No newline at end of file +import{mt as e}from"./brand-CnsMBQCm.js";import{u as t}from"./auth-DmDDao4N.js";import{t as n}from"./dashboard-hW_vS0TR.js";import{o as r}from"./preload-helper-CT-UWP0u.js";import{t as i}from"./index-e7JI4Tgx.js";var a=e();function o(){let{dashboardId:e}=i.useParams(),o=i.useSearch(),s=t(),{agentAvailable:c,openChat:l}=r();return(0,a.jsx)(n,{dashboardID:e,agentAvailable:c,onOpenChat:l,onDashboardChange:(e,t)=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:o,replace:t}),urlFilters:o,onFiltersChange:t=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:{window:t.window,namespace:t.namespace||void 0},replace:!0})})}export{o as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboards.index-CsydfhAv.js b/internal/ui/dist/assets/dashboards.index-CsydfhAv.js new file mode 100644 index 00000000..1626a51b --- /dev/null +++ b/internal/ui/dist/assets/dashboards.index-CsydfhAv.js @@ -0,0 +1 @@ +import{mt as e}from"./brand-CnsMBQCm.js";import{u as t}from"./auth-DmDDao4N.js";import{t as n}from"./dashboard-hW_vS0TR.js";import{o as r}from"./preload-helper-CT-UWP0u.js";import{n as i}from"./index-e7JI4Tgx.js";var a=e();function o(){let e=i.useSearch(),o=t(),{agentAvailable:s,openChat:c}=r();return(0,a.jsx)(n,{agentAvailable:s,onOpenChat:c,onDashboardChange:t=>void o({to:`/dashboards/$dashboardId`,params:{dashboardId:t},search:e,replace:!0}),urlFilters:e})}export{o as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboards.index-D0ibKOyV.js b/internal/ui/dist/assets/dashboards.index-D0ibKOyV.js deleted file mode 100644 index c92060a7..00000000 --- a/internal/ui/dist/assets/dashboards.index-D0ibKOyV.js +++ /dev/null @@ -1 +0,0 @@ -import{mt as e}from"./brand-MzZ03bSa.js";import{u as t}from"./auth-Co_9Gxq0.js";import{t as n}from"./dashboard-CGsOX0Hw.js";import{o as r}from"./preload-helper-C6Mr44w1.js";import{n as i}from"./index-DPHpSRp0.js";var a=e();function o(){let e=i.useSearch(),o=t(),{agentAvailable:s,openChat:c}=r();return(0,a.jsx)(n,{agentAvailable:s,onOpenChat:c,onDashboardChange:t=>void o({to:`/dashboards/$dashboardId`,params:{dashboardId:t},search:e,replace:!0}),urlFilters:e})}export{o as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/format-C4WhhFye.js b/internal/ui/dist/assets/format-C4WhhFye.js new file mode 100644 index 00000000..b613e483 --- /dev/null +++ b/internal/ui/dist/assets/format-C4WhhFye.js @@ -0,0 +1 @@ +import{C as e,K as t,X as n,ct as r,dt as i,gt as a,j as o,k as s,mt as c,x as l,yt as u}from"./brand-CnsMBQCm.js";import{o as d,w as f}from"./Tooltip-DTTsbr27.js";var[p,m]=f(`Table component was not found in the tree`),h={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`},g=c();function _(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function v(t,n){let r=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,i=e(e=>{let i=o(r,{},e),{classNames:a,className:s,style:c,styles:u,...d}=i,f=m();return(0,g.jsx)(l,{component:t,..._(f,n),...f.getStyles(t,{className:s,classNames:a,style:c,styles:u,props:i}),...d})});return i.displayName=`@mantine/core/${r}`,i.classes=h,i}var y=v(`th`,{columnBorder:!0}),b=v(`td`,{columnBorder:!0}),x=v(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),S=v(`thead`,{stickyHeader:!0}),C=v(`tbody`),w=v(`tfoot`),T=v(`caption`,{captionSide:!0}),E={type:`scrollarea`},D=n((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":i(t),"--table-max-height":i(n),"--table-overflow":r===`native`?`auto`:void 0}})),O=e(e=>{let t=o(`TableScrollContainer`,E,e),{classNames:n,className:r,style:i,styles:a,unstyled:c,vars:u,children:f,minWidth:p,maxHeight:m,type:_,scrollAreaProps:v,attributes:y,...b}=t,x=s({name:`TableScrollContainer`,classes:h,props:t,className:r,style:i,classNames:n,styles:a,unstyled:c,attributes:y,vars:u,varsResolver:D,rootSelector:`scrollContainer`});return(0,g.jsx)(l,{component:_===`scrollarea`?d:`div`,..._===`scrollarea`?m?{offsetScrollbars:`xy`,...v}:{offsetScrollbars:`x`,...v}:{},...x(`scrollContainer`),...b,children:(0,g.jsx)(`div`,{...x(`scrollContainerInner`),children:f})})});O.classes=h,O.varsResolver=D,O.displayName=`@mantine/core/TableScrollContainer`;function k({data:e}){return(0,g.jsxs)(g.Fragment,{children:[e.caption&&(0,g.jsx)(T,{children:e.caption}),e.head&&(0,g.jsx)(S,{children:(0,g.jsx)(x,{children:e.head.map((e,t)=>(0,g.jsx)(y,{children:e},t))})}),e.body&&(0,g.jsx)(C,{children:e.body.map((e,t)=>(0,g.jsx)(x,{children:e.map((e,t)=>(0,g.jsx)(b,{children:e},t))},t))}),e.foot&&(0,g.jsx)(w,{children:(0,g.jsx)(x,{children:e.foot.map((e,t)=>(0,g.jsx)(y,{children:e},t))})})]})}k.displayName=`@mantine/core/TableDataRenderer`;var A=u(a(),1),j={withRowBorders:!0,verticalSpacing:7},M=n((e,{layout:n,captionSide:a,horizontalSpacing:o,verticalSpacing:s,borderColor:c,stripedColor:l,highlightOnHoverColor:u,striped:d,highlightOnHover:f,stickyHeaderOffset:p,stickyHeader:m})=>({table:{"--table-layout":n,"--table-caption-side":a,"--table-horizontal-spacing":r(o),"--table-vertical-spacing":r(s),"--table-border-color":c?t(c,e):void 0,"--table-striped-color":d&&l?t(l,e):void 0,"--table-highlight-on-hover-color":f&&u?t(u,e):void 0,"--table-sticky-header-offset":m?i(p):void 0}})),N=e(e=>{let t=o(`Table`,j,e),{classNames:n,className:r,style:i,styles:a,unstyled:c,vars:u,horizontalSpacing:d,verticalSpacing:f,captionSide:m,stripedColor:_,highlightOnHoverColor:v,striped:y,highlightOnHover:b,withColumnBorders:x,withRowBorders:S,withTableBorder:C,borderColor:w,layout:T,data:E,children:D,stickyHeader:O,stickyHeaderOffset:N,mod:P,tabularNums:F,attributes:I,...L}=t,R=s({name:`Table`,props:t,className:r,style:i,classes:h,classNames:n,styles:a,unstyled:c,attributes:I,rootSelector:`table`,vars:u,varsResolver:M,stable:!0}),z=y===!0?`odd`:y||void 0,B=m||`bottom`,V=(0,A.useMemo)(()=>({getStyles:R,stickyHeader:O,striped:z,highlightOnHover:b,withColumnBorders:x,withRowBorders:S,captionSide:B}),[R,O,z,b,x,S,B]);return(0,g.jsx)(p,{value:V,children:(0,g.jsx)(l,{component:`table`,mod:[{withTableBorder:C,tabularNums:F},P],...R(`table`),...L,children:D||!!E&&(0,g.jsx)(k,{data:E})})})});N.classes=h,N.varsResolver=M,N.displayName=`@mantine/core/Table`,N.Td=b,N.Th=y,N.Tr=x,N.Thead=S,N.Tbody=C,N.Tfoot=w,N.Caption=T,N.ScrollContainer=O,N.DataRenderer=k;function P(e=1500){let[t,n]=(0,A.useState)(`idle`),r=(0,A.useRef)(null);(0,A.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);function i(t){r.current&&clearTimeout(r.current),n(`idle`),(navigator.clipboard?navigator.clipboard.writeText(t):Promise.reject(Error(`clipboard unavailable`))).then(()=>n(`copied`),()=>n(`failed`)).finally(()=>{r.current=setTimeout(()=>n(`idle`),e)})}return{state:t,copy:i}}var F=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function I(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function L(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${L(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function R(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}function z(e=new Date){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?z(new Date):new Intl.DateTimeFormat([],{timeZoneName:`short`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??``}function B(e){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?String(e):t.toLocaleString([],{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`})}export{z as a,N as c,I as i,B as n,R as o,F as r,P as s,L as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/format-urrStEsn.js b/internal/ui/dist/assets/format-urrStEsn.js deleted file mode 100644 index 4a04307b..00000000 --- a/internal/ui/dist/assets/format-urrStEsn.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,K as t,St as n,X as r,ct as i,dt as a,gt as o,j as s,k as c,mt as l,x as u}from"./brand-MzZ03bSa.js";import{o as d,w as f}from"./Tooltip-BJiO7C_G.js";var[p,m]=f(`Table component was not found in the tree`),h={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`},g=l();function _(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function v(t,n){let r=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,i=e(e=>{let i=s(r,{},e),{classNames:a,className:o,style:c,styles:l,...d}=i,f=m();return(0,g.jsx)(u,{component:t,..._(f,n),...f.getStyles(t,{className:o,classNames:a,style:c,styles:l,props:i}),...d})});return i.displayName=`@mantine/core/${r}`,i.classes=h,i}var y=v(`th`,{columnBorder:!0}),b=v(`td`,{columnBorder:!0}),x=v(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),S=v(`thead`,{stickyHeader:!0}),C=v(`tbody`),w=v(`tfoot`),T=v(`caption`,{captionSide:!0}),E={type:`scrollarea`},D=r((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":a(t),"--table-max-height":a(n),"--table-overflow":r===`native`?`auto`:void 0}})),O=e(e=>{let t=s(`TableScrollContainer`,E,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:l,children:f,minWidth:p,maxHeight:m,type:_,scrollAreaProps:v,attributes:y,...b}=t,x=c({name:`TableScrollContainer`,classes:h,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:l,varsResolver:D,rootSelector:`scrollContainer`});return(0,g.jsx)(u,{component:_===`scrollarea`?d:`div`,..._===`scrollarea`?m?{offsetScrollbars:`xy`,...v}:{offsetScrollbars:`x`,...v}:{},...x(`scrollContainer`),...b,children:(0,g.jsx)(`div`,{...x(`scrollContainerInner`),children:f})})});O.classes=h,O.varsResolver=D,O.displayName=`@mantine/core/TableScrollContainer`;function k({data:e}){return(0,g.jsxs)(g.Fragment,{children:[e.caption&&(0,g.jsx)(T,{children:e.caption}),e.head&&(0,g.jsx)(S,{children:(0,g.jsx)(x,{children:e.head.map((e,t)=>(0,g.jsx)(y,{children:e},t))})}),e.body&&(0,g.jsx)(C,{children:e.body.map((e,t)=>(0,g.jsx)(x,{children:e.map((e,t)=>(0,g.jsx)(b,{children:e},t))},t))}),e.foot&&(0,g.jsx)(w,{children:(0,g.jsx)(x,{children:e.foot.map((e,t)=>(0,g.jsx)(y,{children:e},t))})})]})}k.displayName=`@mantine/core/TableDataRenderer`;var A={withRowBorders:!0,verticalSpacing:7},j=r((e,{layout:n,captionSide:r,horizontalSpacing:o,verticalSpacing:s,borderColor:c,stripedColor:l,highlightOnHoverColor:u,striped:d,highlightOnHover:f,stickyHeaderOffset:p,stickyHeader:m})=>({table:{"--table-layout":n,"--table-caption-side":r,"--table-horizontal-spacing":i(o),"--table-vertical-spacing":i(s),"--table-border-color":c?t(c,e):void 0,"--table-striped-color":d&&l?t(l,e):void 0,"--table-highlight-on-hover-color":f&&u?t(u,e):void 0,"--table-sticky-header-offset":m?a(p):void 0}})),M=e(e=>{let t=s(`Table`,A,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:l,horizontalSpacing:d,verticalSpacing:f,captionSide:m,stripedColor:_,highlightOnHoverColor:v,striped:y,highlightOnHover:b,withColumnBorders:x,withRowBorders:S,withTableBorder:C,borderColor:w,layout:T,data:E,children:D,stickyHeader:O,stickyHeaderOffset:M,mod:N,tabularNums:P,attributes:F,...I}=t,L=c({name:`Table`,props:t,className:r,style:i,classes:h,classNames:n,styles:a,unstyled:o,attributes:F,rootSelector:`table`,vars:l,varsResolver:j});return(0,g.jsx)(p,{value:{getStyles:L,stickyHeader:O,striped:y===!0?`odd`:y||void 0,highlightOnHover:b,withColumnBorders:x,withRowBorders:S,captionSide:m||`bottom`},children:(0,g.jsx)(u,{component:`table`,mod:[{"data-with-table-border":C,"data-tabular-nums":P},N],...L(`table`),...I,children:D||!!E&&(0,g.jsx)(k,{data:E})})})});M.classes=h,M.varsResolver=j,M.displayName=`@mantine/core/Table`,M.Td=b,M.Th=y,M.Tr=x,M.Thead=S,M.Tbody=C,M.Tfoot=w,M.Caption=T,M.ScrollContainer=O,M.DataRenderer=k;var N=n(o(),1);function P(e=1500){let[t,n]=(0,N.useState)(`idle`),r=(0,N.useRef)(null);(0,N.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);function i(t){r.current&&clearTimeout(r.current),n(`idle`),(navigator.clipboard?navigator.clipboard.writeText(t):Promise.reject(Error(`clipboard unavailable`))).then(()=>n(`copied`),()=>n(`failed`)).finally(()=>{r.current=setTimeout(()=>n(`idle`),e)})}return{state:t,copy:i}}var F=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function I(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function L(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${L(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function R(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}function z(e=new Date){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?z(new Date):new Intl.DateTimeFormat([],{timeZoneName:`short`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??``}function B(e){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?String(e):t.toLocaleString([],{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`})}export{z as a,M as c,I as i,B as n,R as o,F as r,P as s,L as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/index-D-3bf9Ad.css b/internal/ui/dist/assets/index-D-3bf9Ad.css new file mode 100644 index 00000000..2d118195 --- /dev/null +++ b/internal/ui/dist/assets/index-D-3bf9Ad.css @@ -0,0 +1 @@ +:root,:host{color-scheme:var(--mantine-color-scheme)}*,:before,:after{box-sizing:border-box}input,button,textarea,select{font:inherit}button,select{text-transform:none}body,:host{font-family:var(--mantine-font-family);font-size:var(--mantine-font-size-md);line-height:var(--mantine-line-height);background-color:var(--mantine-color-body);color:var(--mantine-color-text);-webkit-font-smoothing:var(--mantine-webkit-font-smoothing);-moz-osx-font-smoothing:var(--mantine-moz-font-smoothing);margin:0}@media screen and (device-width<=31.25em){body,:host{-webkit-text-size-adjust:100%}}:root,:host{--mantine-z-index-app:100;--mantine-z-index-modal:200;--mantine-z-index-popover:300;--mantine-z-index-overlay:400;--mantine-z-index-max:9999;--mantine-scale:1;--mantine-cursor-type:default;--mantine-webkit-font-smoothing:antialiased;--mantine-moz-font-smoothing:grayscale;--mantine-color-white:#fff;--mantine-color-black:#000;--mantine-line-height:1.55;--mantine-font-family:-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;--mantine-font-family-monospace:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;--mantine-font-family-headings:-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;--mantine-heading-font-weight:700;--mantine-heading-text-wrap:wrap;--mantine-radius-default:calc(.5rem * var(--mantine-scale));--mantine-primary-color-filled:var(--mantine-color-blue-filled);--mantine-primary-color-filled-hover:var(--mantine-color-blue-filled-hover);--mantine-primary-color-light:var(--mantine-color-blue-light);--mantine-primary-color-light-hover:var(--mantine-color-blue-light-hover);--mantine-primary-color-light-color:var(--mantine-color-blue-light-color);--mantine-breakpoint-xs:36em;--mantine-breakpoint-sm:48em;--mantine-breakpoint-md:62em;--mantine-breakpoint-lg:75em;--mantine-breakpoint-xl:88em;--mantine-spacing-xs:calc(.625rem * var(--mantine-scale));--mantine-spacing-sm:calc(.75rem * var(--mantine-scale));--mantine-spacing-md:calc(1rem * var(--mantine-scale));--mantine-spacing-lg:calc(1.25rem * var(--mantine-scale));--mantine-spacing-xl:calc(2rem * var(--mantine-scale));--mantine-font-size-xs:calc(.75rem * var(--mantine-scale));--mantine-font-size-sm:calc(.875rem * var(--mantine-scale));--mantine-font-size-md:calc(1rem * var(--mantine-scale));--mantine-font-size-lg:calc(1.125rem * var(--mantine-scale));--mantine-font-size-xl:calc(1.25rem * var(--mantine-scale));--mantine-line-height-xs:1.4;--mantine-line-height-sm:1.45;--mantine-line-height-md:1.55;--mantine-line-height-lg:1.6;--mantine-line-height-xl:1.65;--mantine-shadow-xs:0 calc(.0625rem * var(--mantine-scale)) calc(.1875rem * var(--mantine-scale)) #0000000d, 0 calc(.0625rem * var(--mantine-scale)) calc(.125rem * var(--mantine-scale)) #0000001a;--mantine-shadow-sm:0 calc(.0625rem * var(--mantine-scale)) calc(.1875rem * var(--mantine-scale)) #0000000d, #0000000d 0 calc(.625rem * var(--mantine-scale)) calc(.9375rem * var(--mantine-scale)) calc(-.3125rem * var(--mantine-scale)), #0000000a 0 calc(.4375rem * var(--mantine-scale)) calc(.4375rem * var(--mantine-scale)) calc(-.3125rem * var(--mantine-scale));--mantine-shadow-md:0 calc(.0625rem * var(--mantine-scale)) calc(.1875rem * var(--mantine-scale)) #0000000d, #0000000d 0 calc(1.25rem * var(--mantine-scale)) calc(1.5625rem * var(--mantine-scale)) calc(-.3125rem * var(--mantine-scale)), #0000000a 0 calc(.625rem * var(--mantine-scale)) calc(.625rem * var(--mantine-scale)) calc(-.3125rem * var(--mantine-scale));--mantine-shadow-lg:0 calc(.0625rem * var(--mantine-scale)) calc(.1875rem * var(--mantine-scale)) #0000000d, #0000000d 0 calc(1.75rem * var(--mantine-scale)) calc(1.4375rem * var(--mantine-scale)) calc(-.4375rem * var(--mantine-scale)), #0000000a 0 calc(.75rem * var(--mantine-scale)) calc(.75rem * var(--mantine-scale)) calc(-.4375rem * var(--mantine-scale));--mantine-shadow-xl:0 calc(.0625rem * var(--mantine-scale)) calc(.1875rem * var(--mantine-scale)) #0000000d, #0000000d 0 calc(2.25rem * var(--mantine-scale)) calc(1.75rem * var(--mantine-scale)) calc(-.4375rem * var(--mantine-scale)), #0000000a 0 calc(1.0625rem * var(--mantine-scale)) calc(1.0625rem * var(--mantine-scale)) calc(-.4375rem * var(--mantine-scale));--mantine-radius-xs:calc(.125rem * var(--mantine-scale));--mantine-radius-sm:calc(.25rem * var(--mantine-scale));--mantine-radius-md:calc(.5rem * var(--mantine-scale));--mantine-radius-lg:calc(1rem * var(--mantine-scale));--mantine-radius-xl:calc(2rem * var(--mantine-scale));--mantine-font-weight-regular:400;--mantine-font-weight-medium:600;--mantine-font-weight-bold:700;--mantine-primary-color-0:var(--mantine-color-blue-0);--mantine-primary-color-1:var(--mantine-color-blue-1);--mantine-primary-color-2:var(--mantine-color-blue-2);--mantine-primary-color-3:var(--mantine-color-blue-3);--mantine-primary-color-4:var(--mantine-color-blue-4);--mantine-primary-color-5:var(--mantine-color-blue-5);--mantine-primary-color-6:var(--mantine-color-blue-6);--mantine-primary-color-7:var(--mantine-color-blue-7);--mantine-primary-color-8:var(--mantine-color-blue-8);--mantine-primary-color-9:var(--mantine-color-blue-9);--mantine-color-dark-0:#c9c9c9;--mantine-color-dark-1:#b8b8b8;--mantine-color-dark-2:#828282;--mantine-color-dark-3:#696969;--mantine-color-dark-4:#424242;--mantine-color-dark-5:#3b3b3b;--mantine-color-dark-6:#2e2e2e;--mantine-color-dark-7:#242424;--mantine-color-dark-8:#1f1f1f;--mantine-color-dark-9:#141414;--mantine-color-gray-0:#f8f9fa;--mantine-color-gray-1:#f1f3f5;--mantine-color-gray-2:#e9ecef;--mantine-color-gray-3:#dee2e6;--mantine-color-gray-4:#ced4da;--mantine-color-gray-5:#adb5bd;--mantine-color-gray-6:#868e96;--mantine-color-gray-7:#495057;--mantine-color-gray-8:#343a40;--mantine-color-gray-9:#212529;--mantine-color-red-0:#fff5f5;--mantine-color-red-1:#ffe3e3;--mantine-color-red-2:#ffc9c9;--mantine-color-red-3:#ffa8a8;--mantine-color-red-4:#ff8787;--mantine-color-red-5:#ff6b6b;--mantine-color-red-6:#fa5252;--mantine-color-red-7:#f03e3e;--mantine-color-red-8:#e03131;--mantine-color-red-9:#c92a2a;--mantine-color-pink-0:#fff0f6;--mantine-color-pink-1:#ffdeeb;--mantine-color-pink-2:#fcc2d7;--mantine-color-pink-3:#faa2c1;--mantine-color-pink-4:#f783ac;--mantine-color-pink-5:#f06595;--mantine-color-pink-6:#e64980;--mantine-color-pink-7:#d6336c;--mantine-color-pink-8:#c2255c;--mantine-color-pink-9:#a61e4d;--mantine-color-grape-0:#f8f0fc;--mantine-color-grape-1:#f3d9fa;--mantine-color-grape-2:#eebefa;--mantine-color-grape-3:#e599f7;--mantine-color-grape-4:#da77f2;--mantine-color-grape-5:#cc5de8;--mantine-color-grape-6:#be4bdb;--mantine-color-grape-7:#ae3ec9;--mantine-color-grape-8:#9c36b5;--mantine-color-grape-9:#862e9c;--mantine-color-violet-0:#f3f0ff;--mantine-color-violet-1:#e5dbff;--mantine-color-violet-2:#d0bfff;--mantine-color-violet-3:#b197fc;--mantine-color-violet-4:#9775fa;--mantine-color-violet-5:#845ef7;--mantine-color-violet-6:#7950f2;--mantine-color-violet-7:#7048e8;--mantine-color-violet-8:#6741d9;--mantine-color-violet-9:#5f3dc4;--mantine-color-indigo-0:#edf2ff;--mantine-color-indigo-1:#dbe4ff;--mantine-color-indigo-2:#bac8ff;--mantine-color-indigo-3:#91a7ff;--mantine-color-indigo-4:#748ffc;--mantine-color-indigo-5:#5c7cfa;--mantine-color-indigo-6:#4c6ef5;--mantine-color-indigo-7:#4263eb;--mantine-color-indigo-8:#3b5bdb;--mantine-color-indigo-9:#364fc7;--mantine-color-blue-0:#e7f5ff;--mantine-color-blue-1:#d0ebff;--mantine-color-blue-2:#a5d8ff;--mantine-color-blue-3:#74c0fc;--mantine-color-blue-4:#4dabf7;--mantine-color-blue-5:#339af0;--mantine-color-blue-6:#228be6;--mantine-color-blue-7:#1c7ed6;--mantine-color-blue-8:#1971c2;--mantine-color-blue-9:#1864ab;--mantine-color-cyan-0:#e3fafc;--mantine-color-cyan-1:#c5f6fa;--mantine-color-cyan-2:#99e9f2;--mantine-color-cyan-3:#66d9e8;--mantine-color-cyan-4:#3bc9db;--mantine-color-cyan-5:#22b8cf;--mantine-color-cyan-6:#15aabf;--mantine-color-cyan-7:#1098ad;--mantine-color-cyan-8:#0c8599;--mantine-color-cyan-9:#0b7285;--mantine-color-teal-0:#e6fcf5;--mantine-color-teal-1:#c3fae8;--mantine-color-teal-2:#96f2d7;--mantine-color-teal-3:#63e6be;--mantine-color-teal-4:#38d9a9;--mantine-color-teal-5:#20c997;--mantine-color-teal-6:#12b886;--mantine-color-teal-7:#0ca678;--mantine-color-teal-8:#099268;--mantine-color-teal-9:#087f5b;--mantine-color-green-0:#ebfbee;--mantine-color-green-1:#d3f9d8;--mantine-color-green-2:#b2f2bb;--mantine-color-green-3:#8ce99a;--mantine-color-green-4:#69db7c;--mantine-color-green-5:#51cf66;--mantine-color-green-6:#40c057;--mantine-color-green-7:#37b24d;--mantine-color-green-8:#2f9e44;--mantine-color-green-9:#2b8a3e;--mantine-color-lime-0:#f4fce3;--mantine-color-lime-1:#e9fac8;--mantine-color-lime-2:#d8f5a2;--mantine-color-lime-3:#c0eb75;--mantine-color-lime-4:#a9e34b;--mantine-color-lime-5:#94d82d;--mantine-color-lime-6:#82c91e;--mantine-color-lime-7:#74b816;--mantine-color-lime-8:#66a80f;--mantine-color-lime-9:#5c940d;--mantine-color-yellow-0:#fff9db;--mantine-color-yellow-1:#fff3bf;--mantine-color-yellow-2:#ffec99;--mantine-color-yellow-3:#ffe066;--mantine-color-yellow-4:#ffd43b;--mantine-color-yellow-5:#fcc419;--mantine-color-yellow-6:#fab005;--mantine-color-yellow-7:#f59f00;--mantine-color-yellow-8:#f08c00;--mantine-color-yellow-9:#e67700;--mantine-color-orange-0:#fff4e6;--mantine-color-orange-1:#ffe8cc;--mantine-color-orange-2:#ffd8a8;--mantine-color-orange-3:#ffc078;--mantine-color-orange-4:#ffa94d;--mantine-color-orange-5:#ff922b;--mantine-color-orange-6:#fd7e14;--mantine-color-orange-7:#f76707;--mantine-color-orange-8:#e8590c;--mantine-color-orange-9:#d9480f;--mantine-h1-font-size:calc(2.125rem * var(--mantine-scale));--mantine-h1-line-height:1.3;--mantine-h1-font-weight:700;--mantine-h2-font-size:calc(1.625rem * var(--mantine-scale));--mantine-h2-line-height:1.35;--mantine-h2-font-weight:700;--mantine-h3-font-size:calc(1.375rem * var(--mantine-scale));--mantine-h3-line-height:1.4;--mantine-h3-font-weight:700;--mantine-h4-font-size:calc(1.125rem * var(--mantine-scale));--mantine-h4-line-height:1.45;--mantine-h4-font-weight:700;--mantine-h5-font-size:calc(1rem * var(--mantine-scale));--mantine-h5-line-height:1.5;--mantine-h5-font-weight:700;--mantine-h6-font-size:calc(.875rem * var(--mantine-scale));--mantine-h6-line-height:1.5;--mantine-h6-font-weight:700}:root[data-mantine-color-scheme=dark],:host([data-mantine-color-scheme=dark]){--mantine-color-scheme:dark;--mantine-primary-color-contrast:var(--mantine-color-white);--mantine-color-bright:var(--mantine-color-white);--mantine-color-text:var(--mantine-color-dark-0);--mantine-color-body:var(--mantine-color-dark-7);--mantine-color-error:var(--mantine-color-red-8);--mantine-color-success:var(--mantine-color-teal-8);--mantine-color-placeholder:var(--mantine-color-dark-3);--mantine-color-anchor:var(--mantine-color-blue-4);--mantine-color-default:var(--mantine-color-dark-6);--mantine-color-default-hover:var(--mantine-color-dark-5);--mantine-color-default-color:var(--mantine-color-white);--mantine-color-default-border:var(--mantine-color-dark-4);--mantine-color-dimmed:var(--mantine-color-dark-2);--mantine-color-disabled:var(--mantine-color-dark-6);--mantine-color-disabled-color:var(--mantine-color-dark-3);--mantine-color-disabled-border:var(--mantine-color-dark-4);--mantine-color-dark-text:var(--mantine-color-dark-4);--mantine-color-dark-filled:var(--mantine-color-dark-8);--mantine-color-dark-filled-hover:var(--mantine-color-dark-9);--mantine-color-dark-light:#0a0a0a;--mantine-color-dark-light-hover:#0e0e0e;--mantine-color-dark-light-color:var(--mantine-color-dark-0);--mantine-color-dark-outline:var(--mantine-color-dark-4);--mantine-color-dark-outline-hover:#4242420d;--mantine-color-gray-text:var(--mantine-color-gray-4);--mantine-color-gray-filled:var(--mantine-color-gray-8);--mantine-color-gray-filled-hover:var(--mantine-color-gray-9);--mantine-color-gray-light:#111315;--mantine-color-gray-light-hover:#171a1d;--mantine-color-gray-light-color:var(--mantine-color-gray-0);--mantine-color-gray-outline:var(--mantine-color-gray-4);--mantine-color-gray-outline-hover:#ced4da0d;--mantine-color-red-text:var(--mantine-color-red-4);--mantine-color-red-filled:var(--mantine-color-red-8);--mantine-color-red-filled-hover:var(--mantine-color-red-9);--mantine-color-red-light:#651515;--mantine-color-red-light-hover:#8d1d1d;--mantine-color-red-light-color:var(--mantine-color-red-0);--mantine-color-red-outline:var(--mantine-color-red-4);--mantine-color-red-outline-hover:#ff87870d;--mantine-color-pink-text:var(--mantine-color-pink-4);--mantine-color-pink-filled:var(--mantine-color-pink-8);--mantine-color-pink-filled-hover:var(--mantine-color-pink-9);--mantine-color-pink-light:#530f27;--mantine-color-pink-light-hover:#741536;--mantine-color-pink-light-color:var(--mantine-color-pink-0);--mantine-color-pink-outline:var(--mantine-color-pink-4);--mantine-color-pink-outline-hover:#f783ac0d;--mantine-color-grape-text:var(--mantine-color-grape-4);--mantine-color-grape-filled:var(--mantine-color-grape-8);--mantine-color-grape-filled-hover:var(--mantine-color-grape-9);--mantine-color-grape-light:#43174e;--mantine-color-grape-light-hover:#5e206d;--mantine-color-grape-light-color:var(--mantine-color-grape-0);--mantine-color-grape-outline:var(--mantine-color-grape-4);--mantine-color-grape-outline-hover:#da77f20d;--mantine-color-violet-text:var(--mantine-color-violet-4);--mantine-color-violet-filled:var(--mantine-color-violet-8);--mantine-color-violet-filled-hover:var(--mantine-color-violet-9);--mantine-color-violet-light:#301f62;--mantine-color-violet-light-hover:#432b89;--mantine-color-violet-light-color:var(--mantine-color-violet-0);--mantine-color-violet-outline:var(--mantine-color-violet-4);--mantine-color-violet-outline-hover:#9775fa0d;--mantine-color-indigo-text:var(--mantine-color-indigo-4);--mantine-color-indigo-filled:var(--mantine-color-indigo-8);--mantine-color-indigo-filled-hover:var(--mantine-color-indigo-9);--mantine-color-indigo-light:#1b2864;--mantine-color-indigo-light-hover:#26378b;--mantine-color-indigo-light-color:var(--mantine-color-indigo-0);--mantine-color-indigo-outline:var(--mantine-color-indigo-4);--mantine-color-indigo-outline-hover:#748ffc0d;--mantine-color-blue-text:var(--mantine-color-blue-4);--mantine-color-blue-filled:var(--mantine-color-blue-8);--mantine-color-blue-filled-hover:var(--mantine-color-blue-9);--mantine-color-blue-light:#0c3256;--mantine-color-blue-light-hover:#114678;--mantine-color-blue-light-color:var(--mantine-color-blue-0);--mantine-color-blue-outline:var(--mantine-color-blue-4);--mantine-color-blue-outline-hover:#4dabf70d;--mantine-color-cyan-text:var(--mantine-color-cyan-4);--mantine-color-cyan-filled:var(--mantine-color-cyan-8);--mantine-color-cyan-filled-hover:var(--mantine-color-cyan-9);--mantine-color-cyan-light:#063943;--mantine-color-cyan-light-hover:#08505d;--mantine-color-cyan-light-color:var(--mantine-color-cyan-0);--mantine-color-cyan-outline:var(--mantine-color-cyan-4);--mantine-color-cyan-outline-hover:#3bc9db0d;--mantine-color-teal-text:var(--mantine-color-teal-4);--mantine-color-teal-filled:var(--mantine-color-teal-8);--mantine-color-teal-filled-hover:var(--mantine-color-teal-9);--mantine-color-teal-light:#04402e;--mantine-color-teal-light-hover:#065940;--mantine-color-teal-light-color:var(--mantine-color-teal-0);--mantine-color-teal-outline:var(--mantine-color-teal-4);--mantine-color-teal-outline-hover:#38d9a90d;--mantine-color-green-text:var(--mantine-color-green-4);--mantine-color-green-filled:var(--mantine-color-green-8);--mantine-color-green-filled-hover:var(--mantine-color-green-9);--mantine-color-green-light:#16451f;--mantine-color-green-light-hover:#1e612b;--mantine-color-green-light-color:var(--mantine-color-green-0);--mantine-color-green-outline:var(--mantine-color-green-4);--mantine-color-green-outline-hover:#69db7c0d;--mantine-color-lime-text:var(--mantine-color-lime-4);--mantine-color-lime-filled:var(--mantine-color-lime-8);--mantine-color-lime-filled-hover:var(--mantine-color-lime-9);--mantine-color-lime-light:#2e4a07;--mantine-color-lime-light-hover:#406809;--mantine-color-lime-light-color:var(--mantine-color-lime-0);--mantine-color-lime-outline:var(--mantine-color-lime-4);--mantine-color-lime-outline-hover:#a9e34b0d;--mantine-color-yellow-text:var(--mantine-color-yellow-4);--mantine-color-yellow-filled:var(--mantine-color-yellow-8);--mantine-color-yellow-filled-hover:var(--mantine-color-yellow-9);--mantine-color-yellow-light:#733c00;--mantine-color-yellow-light-hover:#a15300;--mantine-color-yellow-light-color:var(--mantine-color-yellow-0);--mantine-color-yellow-outline:var(--mantine-color-yellow-4);--mantine-color-yellow-outline-hover:#ffd43b0d;--mantine-color-orange-text:var(--mantine-color-orange-4);--mantine-color-orange-filled:var(--mantine-color-orange-8);--mantine-color-orange-filled-hover:var(--mantine-color-orange-9);--mantine-color-orange-light:#6d2408;--mantine-color-orange-light-hover:#98320b;--mantine-color-orange-light-color:var(--mantine-color-orange-0);--mantine-color-orange-outline:var(--mantine-color-orange-4);--mantine-color-orange-outline-hover:#ffa94d0d}:root[data-mantine-color-scheme=light],:host([data-mantine-color-scheme=light]){--mantine-color-scheme:light;--mantine-primary-color-contrast:var(--mantine-color-white);--mantine-color-bright:var(--mantine-color-black);--mantine-color-text:#000;--mantine-color-body:#fff;--mantine-color-error:var(--mantine-color-red-6);--mantine-color-success:var(--mantine-color-teal-8);--mantine-color-placeholder:var(--mantine-color-gray-5);--mantine-color-anchor:var(--mantine-color-blue-6);--mantine-color-default:var(--mantine-color-white);--mantine-color-default-hover:var(--mantine-color-gray-0);--mantine-color-default-color:var(--mantine-color-black);--mantine-color-default-border:var(--mantine-color-gray-4);--mantine-color-dimmed:var(--mantine-color-gray-6);--mantine-color-disabled:var(--mantine-color-gray-2);--mantine-color-disabled-color:var(--mantine-color-gray-5);--mantine-color-disabled-border:var(--mantine-color-gray-3);--mantine-color-dark-text:var(--mantine-color-dark-filled);--mantine-color-dark-filled:var(--mantine-color-dark-6);--mantine-color-dark-filled-hover:var(--mantine-color-dark-7);--mantine-color-dark-light:var(--mantine-color-dark-1);--mantine-color-dark-light-hover:var(--mantine-color-dark-2);--mantine-color-dark-light-color:var(--mantine-color-dark-9);--mantine-color-dark-outline:var(--mantine-color-dark-6);--mantine-color-dark-outline-hover:#2e2e2e0d;--mantine-color-gray-text:var(--mantine-color-gray-filled);--mantine-color-gray-filled:var(--mantine-color-gray-6);--mantine-color-gray-filled-hover:var(--mantine-color-gray-7);--mantine-color-gray-light:var(--mantine-color-gray-1);--mantine-color-gray-light-hover:var(--mantine-color-gray-2);--mantine-color-gray-light-color:var(--mantine-color-gray-9);--mantine-color-gray-outline:var(--mantine-color-gray-6);--mantine-color-gray-outline-hover:#868e960d;--mantine-color-red-text:var(--mantine-color-red-filled);--mantine-color-red-filled:var(--mantine-color-red-6);--mantine-color-red-filled-hover:var(--mantine-color-red-7);--mantine-color-red-light:var(--mantine-color-red-1);--mantine-color-red-light-hover:var(--mantine-color-red-2);--mantine-color-red-light-color:var(--mantine-color-red-9);--mantine-color-red-outline:var(--mantine-color-red-6);--mantine-color-red-outline-hover:#fa52520d;--mantine-color-pink-text:var(--mantine-color-pink-filled);--mantine-color-pink-filled:var(--mantine-color-pink-6);--mantine-color-pink-filled-hover:var(--mantine-color-pink-7);--mantine-color-pink-light:var(--mantine-color-pink-1);--mantine-color-pink-light-hover:var(--mantine-color-pink-2);--mantine-color-pink-light-color:var(--mantine-color-pink-9);--mantine-color-pink-outline:var(--mantine-color-pink-6);--mantine-color-pink-outline-hover:#e649800d;--mantine-color-grape-text:var(--mantine-color-grape-filled);--mantine-color-grape-filled:var(--mantine-color-grape-6);--mantine-color-grape-filled-hover:var(--mantine-color-grape-7);--mantine-color-grape-light:var(--mantine-color-grape-1);--mantine-color-grape-light-hover:var(--mantine-color-grape-2);--mantine-color-grape-light-color:var(--mantine-color-grape-9);--mantine-color-grape-outline:var(--mantine-color-grape-6);--mantine-color-grape-outline-hover:#be4bdb0d;--mantine-color-violet-text:var(--mantine-color-violet-filled);--mantine-color-violet-filled:var(--mantine-color-violet-6);--mantine-color-violet-filled-hover:var(--mantine-color-violet-7);--mantine-color-violet-light:var(--mantine-color-violet-1);--mantine-color-violet-light-hover:var(--mantine-color-violet-2);--mantine-color-violet-light-color:var(--mantine-color-violet-9);--mantine-color-violet-outline:var(--mantine-color-violet-6);--mantine-color-violet-outline-hover:#7950f20d;--mantine-color-indigo-text:var(--mantine-color-indigo-filled);--mantine-color-indigo-filled:var(--mantine-color-indigo-6);--mantine-color-indigo-filled-hover:var(--mantine-color-indigo-7);--mantine-color-indigo-light:var(--mantine-color-indigo-1);--mantine-color-indigo-light-hover:var(--mantine-color-indigo-2);--mantine-color-indigo-light-color:var(--mantine-color-indigo-9);--mantine-color-indigo-outline:var(--mantine-color-indigo-6);--mantine-color-indigo-outline-hover:#4c6ef50d;--mantine-color-blue-text:var(--mantine-color-blue-filled);--mantine-color-blue-filled:var(--mantine-color-blue-6);--mantine-color-blue-filled-hover:var(--mantine-color-blue-7);--mantine-color-blue-light:var(--mantine-color-blue-1);--mantine-color-blue-light-hover:var(--mantine-color-blue-2);--mantine-color-blue-light-color:var(--mantine-color-blue-9);--mantine-color-blue-outline:var(--mantine-color-blue-6);--mantine-color-blue-outline-hover:#228be60d;--mantine-color-cyan-text:var(--mantine-color-cyan-filled);--mantine-color-cyan-filled:var(--mantine-color-cyan-6);--mantine-color-cyan-filled-hover:var(--mantine-color-cyan-7);--mantine-color-cyan-light:var(--mantine-color-cyan-1);--mantine-color-cyan-light-hover:var(--mantine-color-cyan-2);--mantine-color-cyan-light-color:var(--mantine-color-cyan-9);--mantine-color-cyan-outline:var(--mantine-color-cyan-6);--mantine-color-cyan-outline-hover:#15aabf0d;--mantine-color-teal-text:var(--mantine-color-teal-filled);--mantine-color-teal-filled:var(--mantine-color-teal-6);--mantine-color-teal-filled-hover:var(--mantine-color-teal-7);--mantine-color-teal-light:var(--mantine-color-teal-1);--mantine-color-teal-light-hover:var(--mantine-color-teal-2);--mantine-color-teal-light-color:var(--mantine-color-teal-9);--mantine-color-teal-outline:var(--mantine-color-teal-6);--mantine-color-teal-outline-hover:#12b8860d;--mantine-color-green-text:var(--mantine-color-green-filled);--mantine-color-green-filled:var(--mantine-color-green-6);--mantine-color-green-filled-hover:var(--mantine-color-green-7);--mantine-color-green-light:var(--mantine-color-green-1);--mantine-color-green-light-hover:var(--mantine-color-green-2);--mantine-color-green-light-color:var(--mantine-color-green-9);--mantine-color-green-outline:var(--mantine-color-green-6);--mantine-color-green-outline-hover:#40c0570d;--mantine-color-lime-text:var(--mantine-color-lime-filled);--mantine-color-lime-filled:var(--mantine-color-lime-6);--mantine-color-lime-filled-hover:var(--mantine-color-lime-7);--mantine-color-lime-light:var(--mantine-color-lime-1);--mantine-color-lime-light-hover:var(--mantine-color-lime-2);--mantine-color-lime-light-color:var(--mantine-color-lime-9);--mantine-color-lime-outline:var(--mantine-color-lime-6);--mantine-color-lime-outline-hover:#82c91e0d;--mantine-color-yellow-text:var(--mantine-color-yellow-filled);--mantine-color-yellow-filled:var(--mantine-color-yellow-6);--mantine-color-yellow-filled-hover:var(--mantine-color-yellow-7);--mantine-color-yellow-light:var(--mantine-color-yellow-1);--mantine-color-yellow-light-hover:var(--mantine-color-yellow-2);--mantine-color-yellow-light-color:var(--mantine-color-yellow-9);--mantine-color-yellow-outline:var(--mantine-color-yellow-6);--mantine-color-yellow-outline-hover:#fab0050d;--mantine-color-orange-text:var(--mantine-color-orange-filled);--mantine-color-orange-filled:var(--mantine-color-orange-6);--mantine-color-orange-filled-hover:var(--mantine-color-orange-7);--mantine-color-orange-light:var(--mantine-color-orange-1);--mantine-color-orange-light-hover:var(--mantine-color-orange-2);--mantine-color-orange-light-color:var(--mantine-color-orange-9);--mantine-color-orange-outline:var(--mantine-color-orange-6);--mantine-color-orange-outline-hover:#fd7e140d}@media (prefers-reduced-motion:reduce){[data-respect-reduced-motion] [data-reduce-motion]{transition:none;animation:none}}[data-mantine-color-scheme=light] .mantine-light-hidden,[data-mantine-color-scheme=dark] .mantine-dark-hidden{display:none}.mantine-focus-auto:focus-visible,.mantine-focus-always:focus{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.mantine-focus-never:focus{outline:none}.mantine-active:active{transform:translateY(calc(.0625rem * var(--mantine-scale)))}fieldset:disabled .mantine-active:active{transform:none}:where([dir=rtl]) .mantine-rotate-rtl{transform:rotate(180deg)}.m_d57069b5{--scrollarea-scrollbar-size:calc(.75rem * var(--mantine-scale));position:relative;overflow:hidden}.m_d57069b5:where([data-autosize]) .m_b1336c6{min-width:min-content}.m_c0783ff9{scrollbar-width:none;overscroll-behavior:var(--scrollarea-over-scroll-behavior);-ms-overflow-style:none;-webkit-overflow-scrolling:touch;width:100%;height:100%}.m_c0783ff9::-webkit-scrollbar{display:none}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=y]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=y],[data-offset-scrollbars=present]):where([data-vertical-hidden]){padding-inline:0}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=y]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=y],[data-offset-scrollbars=present]):not([data-vertical-hidden]){padding-inline-start:unset;padding-inline-end:var(--scrollarea-scrollbar-size)}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=y]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=y],[data-offset-scrollbars=present]):not([data-vertical-hidden]):where([data-vertical-scrollbar-position=left]){padding-inline-end:unset;padding-left:var(--scrollarea-scrollbar-size);padding-right:unset}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=y]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=y],[data-offset-scrollbars=present]):not([data-vertical-hidden]):where([data-vertical-scrollbar-position=right]){padding-inline-end:unset;padding-left:unset;padding-right:var(--scrollarea-scrollbar-size)}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=x]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=x],[data-offset-scrollbars=present]):where([data-horizontal-hidden]){padding-bottom:0}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=x]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=x],[data-offset-scrollbars=present]):not([data-horizontal-hidden]){padding-bottom:var(--scrollarea-scrollbar-size)}.m_f8f631dd{min-width:100%;display:table}.m_c44ba933{-webkit-user-select:none;user-select:none;touch-action:none;box-sizing:border-box;padding:calc(var(--scrollarea-scrollbar-size) / 5);background-color:#0000;flex-direction:row;transition:background-color .15s,opacity .15s;display:flex}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_c44ba933:hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=light]) .m_c44ba933:hover>.m_d8b5e363{background-color:#00000080}:where([data-mantine-color-scheme=dark]) .m_c44ba933:hover{background-color:var(--mantine-color-dark-8)}:where([data-mantine-color-scheme=dark]) .m_c44ba933:hover>.m_d8b5e363{background-color:#ffffff80}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_c44ba933:active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=light]) .m_c44ba933:active>.m_d8b5e363{background-color:#00000080}:where([data-mantine-color-scheme=dark]) .m_c44ba933:active{background-color:var(--mantine-color-dark-8)}:where([data-mantine-color-scheme=dark]) .m_c44ba933:active>.m_d8b5e363{background-color:#ffffff80}}.m_c44ba933:where([data-hidden],[data-state=hidden]){display:none}.m_c44ba933:where([data-orientation=vertical]){width:var(--scrollarea-scrollbar-size);top:0;bottom:var(--sa-corner-width);inset-inline-end:0}.m_c44ba933:where([data-orientation=vertical]):where([data-vertical-scrollbar-position=left]){inset-inline-end:auto;left:0;right:auto}.m_c44ba933:where([data-orientation=vertical]):where([data-vertical-scrollbar-position=right]){inset-inline-end:auto;left:auto;right:0}.m_c44ba933:where([data-orientation=horizontal]){height:var(--scrollarea-scrollbar-size);bottom:0;flex-direction:column;inset-inline-start:0;inset-inline-end:var(--sa-corner-width)}.m_c44ba933:where([data-orientation=horizontal]):where([data-vertical-scrollbar-position=left]){inset-inline:auto;left:var(--sa-corner-width);right:0}.m_c44ba933:where([data-orientation=horizontal]):where([data-vertical-scrollbar-position=right]){inset-inline:auto;left:0;right:var(--sa-corner-width)}.m_d8b5e363{border-radius:var(--scrollarea-scrollbar-size);opacity:var(--thumb-opacity);flex:1;transition:background-color .15s;position:relative;overflow:hidden}.m_d8b5e363:before{content:"";width:100%;height:100%;min-width:calc(2.75rem * var(--mantine-scale));min-height:calc(2.75rem * var(--mantine-scale));position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}:where([data-mantine-color-scheme=light]) .m_d8b5e363{background-color:#0006}:where([data-mantine-color-scheme=dark]) .m_d8b5e363{background-color:#fff6}.m_21657268{opacity:0;inset-inline-end:0;transition:opacity .15s;display:block;position:absolute;bottom:0}.m_21657268:where([data-vertical-scrollbar-position=left]){inset-inline-end:auto;left:0;right:auto}.m_21657268:where([data-vertical-scrollbar-position=right]){inset-inline-end:auto;left:auto;right:0}:where([data-mantine-color-scheme=light]) .m_21657268{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_21657268{background-color:var(--mantine-color-dark-8)}.m_21657268:where([data-hovered]){opacity:1}.m_21657268:where([data-hidden]){display:none}.m_b1336c6{min-width:100%}.m_87cf2631{cursor:pointer;appearance:none;font-size:var(--mantine-font-size-md);text-align:start;color:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;background-color:#0000;border:0;padding:0;text-decoration:none}.m_515a97f8{clip:rect(0 0 0 0);height:calc(.0625rem * var(--mantine-scale));width:calc(.0625rem * var(--mantine-scale));margin:calc(-.0625rem * var(--mantine-scale));white-space:nowrap;border:0;padding:0;position:absolute;overflow:hidden}.m_1b7284a3{--paper-radius:var(--mantine-radius-default);-webkit-tap-highlight-color:transparent;touch-action:manipulation;border-radius:var(--paper-radius);box-shadow:var(--paper-shadow);background-color:var(--mantine-color-body);outline:0;text-decoration:none;display:block}[data-mantine-color-scheme=light] .m_1b7284a3{--paper-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m_1b7284a3{--paper-border-color:var(--mantine-color-dark-4)}.m_1b7284a3:where([data-with-border]){border:calc(.0625rem * var(--mantine-scale)) solid var(--paper-border-color)}.m_9814e45f{background:var(--overlay-bg,#0009);-webkit-backdrop-filter:var(--overlay-filter);backdrop-filter:var(--overlay-filter);border-radius:var(--overlay-radius,0);z-index:var(--overlay-z-index);position:absolute;inset:0}.m_9814e45f:where([data-fixed]){position:fixed}.m_9814e45f:where([data-center]){justify-content:center;align-items:center;display:flex}.m_38a85659{border:1px solid var(--popover-border-color);padding:var(--mantine-spacing-sm) var(--mantine-spacing-md);box-shadow:var(--popover-shadow,none);border-radius:var(--popover-radius,var(--mantine-radius-default));position:absolute}.m_38a85659:where([data-fixed]){position:fixed}.m_38a85659:focus{outline:none}:where([data-mantine-color-scheme=light]) .m_38a85659{--popover-border-color:var(--mantine-color-gray-2);background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_38a85659{--popover-border-color:var(--mantine-color-dark-4);background-color:var(--mantine-color-dark-6)}.m_a31dc6c1{background-color:inherit;border:1px solid var(--popover-border-color);z-index:1}.m_3d7bc908{position:fixed;inset:0}.m_5ae2e3c{--loader-size-xs:calc(1.125rem * var(--mantine-scale));--loader-size-sm:calc(1.375rem * var(--mantine-scale));--loader-size-md:calc(2.25rem * var(--mantine-scale));--loader-size-lg:calc(2.75rem * var(--mantine-scale));--loader-size-xl:calc(3.625rem * var(--mantine-scale));--loader-size:var(--loader-size-md);--loader-color:var(--mantine-primary-color-filled)}@keyframes m_5d2b3b9d{0%{opacity:0;transform:scale(.6)}50%,to{transform:scale(1)}}.m_7a2bd4cd{width:var(--loader-size);height:var(--loader-size);gap:calc(var(--loader-size) / 5);display:flex;position:relative}.m_870bb79{background:var(--loader-color);border-radius:calc(.125rem * var(--mantine-scale));flex:1;animation:1.2s cubic-bezier(0,.5,.5,1) infinite m_5d2b3b9d}.m_870bb79:first-of-type{animation-delay:-240ms}.m_870bb79:nth-of-type(2){animation-delay:-120ms}.m_870bb79:nth-of-type(3){animation-delay:0}@keyframes m_aac34a1{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.6)}}.m_4e3f22d7{justify-content:center;align-items:center;gap:calc(var(--loader-size) / 10);width:var(--loader-size);height:var(--loader-size);display:flex;position:relative}.m_870c4af{width:calc(var(--loader-size) / 3 - var(--loader-size) / 15);height:calc(var(--loader-size) / 3 - var(--loader-size) / 15);background:var(--loader-color);border-radius:50%;animation:.8s linear infinite m_aac34a1}.m_870c4af:nth-child(2){animation-delay:.4s}@keyframes m_f8e89c4b{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.m_b34414df{width:var(--loader-size);height:var(--loader-size);display:inline-block}.m_b34414df:after{content:"";width:var(--loader-size);height:var(--loader-size);border-radius:calc(625rem * var(--mantine-scale));border-width:calc(var(--loader-size) / 8);border-style:solid;border-color:var(--loader-color) var(--loader-color) var(--loader-color) transparent;animation:1.2s linear infinite m_f8e89c4b;display:block}.m_8d3f4000{--ai-size-xs:calc(1.125rem * var(--mantine-scale));--ai-size-sm:calc(1.375rem * var(--mantine-scale));--ai-size-md:calc(1.75rem * var(--mantine-scale));--ai-size-lg:calc(2.125rem * var(--mantine-scale));--ai-size-xl:calc(2.75rem * var(--mantine-scale));--ai-size-input-xs:calc(1.875rem * var(--mantine-scale));--ai-size-input-sm:calc(2.25rem * var(--mantine-scale));--ai-size-input-md:calc(2.625rem * var(--mantine-scale));--ai-size-input-lg:calc(3.125rem * var(--mantine-scale));--ai-size-input-xl:calc(3.75rem * var(--mantine-scale));--ai-size:var(--ai-size-md);--ai-color:var(--mantine-color-white);-webkit-user-select:none;user-select:none;width:var(--ai-size);height:var(--ai-size);min-width:var(--ai-size);min-height:var(--ai-size);border-radius:var(--ai-radius,var(--mantine-radius-default));background:var(--ai-bg,var(--mantine-primary-color-filled));color:var(--ai-color,var(--mantine-color-white));border:var(--ai-bd,calc(.0625rem * var(--mantine-scale)) solid transparent);cursor:pointer;justify-content:center;align-items:center;line-height:1;display:inline-flex;position:relative;overflow:hidden}@media (hover:hover){.m_8d3f4000:hover:where(:not([data-loading],:disabled,[data-disabled])){background-color:var(--ai-hover,var(--mantine-primary-color-filled-hover));color:var(--ai-hover-color,var(--ai-color))}}@media (hover:none){.m_8d3f4000:active:where(:not([data-loading],:disabled,[data-disabled])){background-color:var(--ai-hover,var(--mantine-primary-color-filled-hover));color:var(--ai-hover-color,var(--ai-color))}}.m_8d3f4000[data-loading]{cursor:not-allowed}.m_8d3f4000[data-loading] .m_8d3afb97{opacity:0;transform:translateY(100%)}.m_8d3f4000:where(:disabled:not([data-loading]),[data-disabled]:not([data-loading])){cursor:not-allowed;border:calc(.0625rem * var(--mantine-scale)) solid transparent;color:var(--mantine-color-disabled-color);background:var(--mantine-color-disabled)}.m_8d3f4000:where(:disabled:not([data-loading]),[data-disabled]:not([data-loading])):active{transform:none}.m_302b9fb1{inset:calc(-.0625rem * var(--mantine-scale));border-radius:var(--ai-radius,var(--mantine-radius-default));justify-content:center;align-items:center;display:flex;position:absolute}:where([data-mantine-color-scheme=light]) .m_302b9fb1{background-color:#ffffff26}:where([data-mantine-color-scheme=dark]) .m_302b9fb1{background-color:#00000026}.m_1a0f1b21{--ai-border-width:calc(.0625rem * var(--mantine-scale));display:flex}.m_1a0f1b21 :where(*):focus{z-index:1;position:relative}.m_1a0f1b21[data-orientation=horizontal]{flex-direction:row}.m_1a0f1b21[data-orientation=horizontal] .m_8d3f4000:not(:only-child):first-child,.m_1a0f1b21[data-orientation=horizontal] .m_437b6484:not(:only-child):first-child{border-inline-end-width:calc(var(--ai-border-width) / 2);border-start-end-radius:0;border-end-end-radius:0}.m_1a0f1b21[data-orientation=horizontal] .m_8d3f4000:not(:only-child):last-child,.m_1a0f1b21[data-orientation=horizontal] .m_437b6484:not(:only-child):last-child{border-inline-start-width:calc(var(--ai-border-width) / 2);border-start-start-radius:0;border-end-start-radius:0}.m_1a0f1b21[data-orientation=horizontal] .m_8d3f4000:not(:only-child):not(:first-child):not(:last-child),.m_1a0f1b21[data-orientation=horizontal] .m_437b6484:not(:only-child):not(:first-child):not(:last-child){border-inline-width:calc(var(--ai-border-width) / 2);border-radius:0}.m_1a0f1b21[data-orientation=vertical]{flex-direction:column}.m_1a0f1b21[data-orientation=vertical] .m_8d3f4000:not(:only-child):first-child,.m_1a0f1b21[data-orientation=vertical] .m_437b6484:not(:only-child):first-child{border-bottom-width:calc(var(--ai-border-width) / 2);border-end-end-radius:0;border-end-start-radius:0}.m_1a0f1b21[data-orientation=vertical] .m_8d3f4000:not(:only-child):last-child,.m_1a0f1b21[data-orientation=vertical] .m_437b6484:not(:only-child):last-child{border-top-width:calc(var(--ai-border-width) / 2);border-start-start-radius:0;border-start-end-radius:0}.m_1a0f1b21[data-orientation=vertical] .m_8d3f4000:not(:only-child):not(:first-child):not(:last-child),.m_1a0f1b21[data-orientation=vertical] .m_437b6484:not(:only-child):not(:first-child):not(:last-child){border-bottom-width:calc(var(--ai-border-width) / 2);border-top-width:calc(var(--ai-border-width) / 2);border-radius:0}.m_8d3afb97{justify-content:center;align-items:center;width:100%;height:100%;transition:transform .15s,opacity .1s;display:flex}.m_437b6484{--section-height-xs:calc(1.125rem * var(--mantine-scale));--section-height-sm:calc(1.375rem * var(--mantine-scale));--section-height-md:calc(1.75rem * var(--mantine-scale));--section-height-lg:calc(2.125rem * var(--mantine-scale));--section-height-xl:calc(2.75rem * var(--mantine-scale));--section-height-input-xs:calc(1.875rem * var(--mantine-scale));--section-height-input-sm:calc(2.25rem * var(--mantine-scale));--section-height-input-md:calc(2.625rem * var(--mantine-scale));--section-height-input-lg:calc(3.125rem * var(--mantine-scale));--section-height-input-xl:calc(3.75rem * var(--mantine-scale));--section-padding-x-xs:calc(.375rem * var(--mantine-scale));--section-padding-x-sm:calc(.5rem * var(--mantine-scale));--section-padding-x-md:calc(.625rem * var(--mantine-scale));--section-padding-x-lg:calc(.75rem * var(--mantine-scale));--section-padding-x-xl:calc(1rem * var(--mantine-scale));--section-height:var(--section-height-sm);--section-padding-x:var(--section-padding-x-sm);--section-color:var(--mantine-color-white);font-weight:var(--mantine-font-weight-medium);border-radius:var(--section-radius,var(--mantine-radius-default));width:auto;font-size:var(--section-fz,var(--mantine-font-size-sm));background:var(--section-bg,var(--mantine-primary-color-filled));border:var(--section-bd,calc(.0625rem * var(--mantine-scale)) solid transparent);color:var(--section-color,var(--mantine-color-white));height:var(--section-height,var(--section-height-sm));padding-inline:var(--section-padding-x,var(--section-padding-x-sm));vertical-align:middle;justify-content:center;align-items:center;line-height:1;display:inline-flex}.m_86a44da5{--cb-size-xs:calc(1.125rem * var(--mantine-scale));--cb-size-sm:calc(1.375rem * var(--mantine-scale));--cb-size-md:calc(1.75rem * var(--mantine-scale));--cb-size-lg:calc(2.125rem * var(--mantine-scale));--cb-size-xl:calc(2.75rem * var(--mantine-scale));--cb-size:var(--cb-size-md);--cb-icon-size:70%;--cb-radius:var(--mantine-radius-default);-webkit-user-select:none;user-select:none;width:var(--cb-size);height:var(--cb-size);min-width:var(--cb-size);min-height:var(--cb-size);border-radius:var(--cb-radius);justify-content:center;align-items:center;line-height:1;display:inline-flex;position:relative}:where([data-mantine-color-scheme=light]) .m_86a44da5{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_86a44da5{color:var(--mantine-color-dark-1)}.m_86a44da5[data-disabled],.m_86a44da5:disabled{cursor:not-allowed;opacity:.6}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_220c80f2:where(:not([data-disabled],:disabled)):hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_220c80f2:where(:not([data-disabled],:disabled)):hover{background-color:var(--mantine-color-dark-6)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_220c80f2:where(:not([data-disabled],:disabled)):active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_220c80f2:where(:not([data-disabled],:disabled)):active{background-color:var(--mantine-color-dark-6)}}.m_4081bf90{flex-direction:row;flex-wrap:var(--group-wrap,wrap);justify-content:var(--group-justify,flex-start);align-items:var(--group-align,center);gap:var(--group-gap,var(--mantine-spacing-md));display:flex}.m_4081bf90:where([data-grow])>*{max-width:var(--group-child-width);flex-grow:1}.m_615af6c9{line-height:1;font-weight:var(--mantine-font-weight-regular);font-size:var(--mantine-font-size-md);margin:0;padding:0}.m_b5489c3c{padding:var(--mb-padding,var(--mantine-spacing-md));background-color:var(--mantine-color-body);z-index:1000;min-height:calc(3.75rem * var(--mantine-scale));justify-content:space-between;align-items:center;padding-inline-end:calc(var(--mb-padding,var(--mantine-spacing-md)) - calc(.3125rem * var(--mantine-scale)));transition:padding-inline-end .1s;display:flex;position:sticky;top:0}.m_60c222c7{width:100%;z-index:var(--mb-z-index);pointer-events:none;position:fixed;top:0;bottom:0}.m_fd1ab0aa{pointer-events:all;box-shadow:var(--mb-shadow,var(--mantine-shadow-xl))}.m_fd1ab0aa [data-mantine-scrollbar]{z-index:1001}[data-offset-scrollbars] .m_fd1ab0aa:has([data-mantine-scrollbar]) .m_b5489c3c{padding-inline-end:calc(var(--mb-padding,var(--mantine-spacing-md)) + calc(.3125rem * var(--mantine-scale)))}.m_606cb269{margin-inline-start:auto}.m_5df29311{padding:var(--mb-padding,var(--mantine-spacing-md));padding-top:var(--mb-padding,var(--mantine-spacing-md))}.m_5df29311:where(:not(:only-child)){padding-top:0}.m_6c018570{margin-top:var(--input-margin-top,0rem);margin-bottom:var(--input-margin-bottom,0rem);--input-height-xs:calc(1.875rem * var(--mantine-scale));--input-height-sm:calc(2.25rem * var(--mantine-scale));--input-height-md:calc(2.625rem * var(--mantine-scale));--input-height-lg:calc(3.125rem * var(--mantine-scale));--input-height-xl:calc(3.75rem * var(--mantine-scale));--input-padding-y-xs:calc(.3125rem * var(--mantine-scale));--input-padding-y-sm:calc(.375rem * var(--mantine-scale));--input-padding-y-md:calc(.5rem * var(--mantine-scale));--input-padding-y-lg:calc(.625rem * var(--mantine-scale));--input-padding-y-xl:calc(.8125rem * var(--mantine-scale));--input-height:var(--input-height-sm);--input-radius:var(--mantine-radius-default);--input-cursor:text;--input-line-height:calc(var(--input-height) - calc(.125rem * var(--mantine-scale)));--input-padding:calc(var(--input-height) / 3);--input-padding-inline-start:var(--input-padding);--input-padding-inline-end:var(--input-padding);--input-placeholder-color:var(--mantine-color-placeholder);--input-color:var(--mantine-color-text);--input-disabled-bg:var(--mantine-color-disabled);--input-disabled-color:var(--mantine-color-disabled-color);--input-left-section-size:var(--input-left-section-width,calc(var(--input-height) - calc(.125rem * var(--mantine-scale))));--input-right-section-size:var(--input-right-section-width,calc(var(--input-height) - calc(.125rem * var(--mantine-scale))));--input-size:var(--input-height);--section-y:calc(.0625rem * var(--mantine-scale));--left-section-start:calc(.0625rem * var(--mantine-scale));--left-section-border-radius:var(--input-radius) 0 0 var(--input-radius);--right-section-end:calc(.0625rem * var(--mantine-scale));--right-section-border-radius:0 var(--input-radius) var(--input-radius) 0;position:relative}.m_6c018570[data-variant=unstyled]{--input-padding:0;--input-padding-y:0;--input-padding-inline-start:0;--input-padding-inline-end:0}.m_6c018570[data-pointer]{--input-cursor:pointer}.m_6c018570[data-with-bottom-section]{--input-bottom-section-height:calc(1.75rem * var(--mantine-scale))}.m_6c018570[data-multiline]{--input-padding-y-xs:calc(.28125rem * var(--mantine-scale));--input-padding-y-sm:calc(.34375rem * var(--mantine-scale));--input-padding-y-md:calc(.4375rem * var(--mantine-scale));--input-padding-y-lg:calc(.59375rem * var(--mantine-scale));--input-padding-y-xl:calc(.8125rem * var(--mantine-scale));--input-size:auto;--input-line-height:var(--mantine-line-height)}.m_6c018570[data-with-left-section]{--input-padding-inline-start:var(--input-left-section-size)}.m_6c018570[data-with-right-section]{--input-padding-inline-end:var(--input-right-section-size)}.m_6c018570[data-size=xs] .m_6c018570[data-with-right-section]:has([data-combined-clear-section]){--input-padding-inline-end:calc(2.5625rem * var(--mantine-scale))}.m_6c018570[data-size=sm] .m_6c018570[data-with-right-section]:has([data-combined-clear-section]){--input-padding-inline-end:calc(3.125rem * var(--mantine-scale))}.m_6c018570[data-size=md] .m_6c018570[data-with-right-section]:has([data-combined-clear-section]){--input-padding-inline-end:calc(3.75rem * var(--mantine-scale))}.m_6c018570[data-size=lg] .m_6c018570[data-with-right-section]:has([data-combined-clear-section]){--input-padding-inline-end:calc(4.5rem * var(--mantine-scale))}.m_6c018570[data-size=xl] .m_6c018570[data-with-right-section]:has([data-combined-clear-section]){--input-padding-inline-end:calc(5.5625rem * var(--mantine-scale))}[data-mantine-color-scheme=light] .m_6c018570[data-variant=default]{--input-bd:var(--mantine-color-gray-4);--input-bg:var(--mantine-color-white);--input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=light] .m_6c018570[data-variant=filled]{--input-bd:transparent;--input-bg:var(--mantine-color-gray-1);--input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=light] .m_6c018570[data-variant=unstyled]{--input-bd:transparent;--input-bg:transparent;--input-bd-focus:transparent}[data-mantine-color-scheme=dark] .m_6c018570[data-variant=default]{--input-bd:var(--mantine-color-dark-4);--input-bg:var(--mantine-color-dark-6);--input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=dark] .m_6c018570[data-variant=filled]{--input-bd:transparent;--input-bg:var(--mantine-color-dark-5);--input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=dark] .m_6c018570[data-variant=unstyled]{--input-bd:transparent;--input-bg:transparent;--input-bd-focus:transparent}[data-mantine-color-scheme] .m_6c018570[data-error]:not([data-variant=unstyled]){--input-bd:var(--mantine-color-error)}[data-mantine-color-scheme] .m_6c018570[data-error]{--input-color:var(--mantine-color-error);--input-placeholder-color:var(--mantine-color-error);--input-section-color:var(--mantine-color-error)}[data-mantine-color-scheme] .m_6c018570[data-success]:not([data-variant=unstyled]){--input-bd:var(--mantine-color-success)}[data-mantine-color-scheme] .m_6c018570[data-success]{--input-section-color:var(--mantine-color-success)}:where([dir=rtl]) .m_6c018570{--left-section-border-radius:0 var(--input-radius) var(--input-radius) 0;--right-section-border-radius:var(--input-radius) 0 0 var(--input-radius)}.m_6c018570[dir=ltr]{--left-section-border-radius:var(--input-radius) 0 0 var(--input-radius);--right-section-border-radius:0 var(--input-radius) var(--input-radius) 0}.m_8fb7ebe7{-webkit-tap-highlight-color:transparent;appearance:none;resize:var(--input-resize,none);width:100%;text-align:var(--input-text-align,start);color:var(--input-color);border:calc(.0625rem * var(--mantine-scale)) solid var(--input-bd);background-color:var(--input-bg);font-family:var(--input-font-family,var(--mantine-font-family));height:var(--input-size);min-height:var(--input-height);line-height:var(--input-line-height);font-size:var(--_input-fz,var(--input-fz,var(--mantine-font-size-md)));border-radius:var(--input-radius);padding-inline-start:var(--input-padding-inline-start);padding-inline-end:var(--input-padding-inline-end);padding-top:var(--input-padding-y,0rem);padding-bottom:var(--input-padding-y,0rem);cursor:var(--input-cursor);overflow:var(--input-overflow);transition:border-color .1s;display:block}.m_8fb7ebe7[data-no-overflow]{--input-overflow:hidden}.m_8fb7ebe7[data-monospace]{--input-font-family:var(--mantine-font-family-monospace);--_input-fz:calc(var(--input-fz) - calc(.125rem * var(--mantine-scale)))}.m_8fb7ebe7:focus,.m_8fb7ebe7:focus-within{--input-bd:var(--input-bd-focus);outline:none}.m_6c018570[data-error] .m_8fb7ebe7:focus,.m_6c018570[data-error] .m_8fb7ebe7:focus-within{--input-bd:var(--mantine-color-error)}.m_6c018570[data-success] .m_8fb7ebe7:focus,.m_6c018570[data-success] .m_8fb7ebe7:focus-within{--input-bd:var(--mantine-color-success)}.m_8fb7ebe7::placeholder{color:var(--input-placeholder-color);opacity:1}.m_8fb7ebe7::-webkit-inner-spin-button{appearance:none}.m_8fb7ebe7::-webkit-outer-spin-button{appearance:none}.m_8fb7ebe7::-webkit-search-decoration{appearance:none}.m_8fb7ebe7::-webkit-search-cancel-button{appearance:none}.m_8fb7ebe7::-webkit-search-results-button{appearance:none}.m_8fb7ebe7::-webkit-search-results-decoration{appearance:none}.m_8fb7ebe7[type=number]{-moz-appearance:textfield}.m_8fb7ebe7:disabled,.m_8fb7ebe7[data-disabled]{cursor:not-allowed;opacity:.6;background-color:var(--input-disabled-bg);color:var(--input-disabled-color)}.m_8fb7ebe7:has(input:disabled){cursor:not-allowed;opacity:.6;background-color:var(--input-disabled-bg);color:var(--input-disabled-color)}.m_8fb7ebe7[readonly]{caret-color:#0000}[data-with-bottom-section] .m_8fb7ebe7{padding-bottom:calc(var(--input-padding-y,0rem) + var(--input-bottom-section-height))}.m_93f4ed57{bottom:calc(.0625rem * var(--mantine-scale));left:calc(.0625rem * var(--mantine-scale));right:calc(.0625rem * var(--mantine-scale));height:var(--input-bottom-section-height);padding-inline:var(--input-padding);border-radius:0 0 var(--input-radius) var(--input-radius);pointer-events:all;color:var(--mantine-color-dimmed);font-size:var(--input-fz,var(--mantine-font-size-sm));justify-content:flex-start;align-items:center;display:flex;position:absolute}.m_82577fc2{pointer-events:var(--section-pointer-events);z-index:1;inset-inline-start:var(--section-start);inset-inline-end:var(--section-end);bottom:var(--section-y);top:var(--section-y);width:var(--section-size);border-radius:var(--section-border-radius);color:var(--input-section-color,var(--mantine-color-dimmed));justify-content:center;align-items:center;display:flex;position:absolute}.m_82577fc2[data-position=right]{--section-pointer-events:var(--input-right-section-pointer-events);--section-end:var(--right-section-end);--section-size:var(--input-right-section-size);--section-border-radius:var(--right-section-border-radius)}.m_6c018570[data-size=xs] .m_82577fc2[data-position=right]:has([data-combined-clear-section]){--section-size:calc(2.5625rem * var(--mantine-scale))}.m_6c018570[data-size=sm] .m_82577fc2[data-position=right]:has([data-combined-clear-section]){--section-size:calc(3.125rem * var(--mantine-scale))}.m_6c018570[data-size=md] .m_82577fc2[data-position=right]:has([data-combined-clear-section]){--section-size:calc(3.75rem * var(--mantine-scale))}.m_6c018570[data-size=lg] .m_82577fc2[data-position=right]:has([data-combined-clear-section]){--section-size:calc(4.5rem * var(--mantine-scale))}.m_6c018570[data-size=xl] .m_82577fc2[data-position=right]:has([data-combined-clear-section]){--section-size:calc(5.5625rem * var(--mantine-scale))}.m_82577fc2[data-position=left]{--section-pointer-events:var(--input-left-section-pointer-events);--section-start:var(--left-section-start);--section-size:var(--input-left-section-size);--section-border-radius:var(--left-section-border-radius)}.m_88bacfd0{color:var(--input-placeholder-color,var(--mantine-color-placeholder))}.m_6c018570[data-error] .m_88bacfd0{--input-placeholder-color:var(--input-color,var(--mantine-color-placeholder))}.m_46b77525{line-height:var(--mantine-line-height)}.m_8fdc1311{font-weight:var(--mantine-font-weight-medium);overflow-wrap:break-word;cursor:default;-webkit-tap-highlight-color:transparent;font-size:var(--input-label-size,var(--mantine-font-size-sm));display:inline-block}.m_78a94662{color:var(--input-asterisk-color,var(--mantine-color-error))}.m_8f816625,.m_9d9d40e0,.m_fe47ce59{word-wrap:break-word;margin:0;padding:0;line-height:1.2;display:block}.m_8f816625{color:var(--mantine-color-error);font-size:var(--input-error-size,calc(var(--mantine-font-size-sm) - calc(.125rem * var(--mantine-scale))))}.m_9d9d40e0{color:var(--mantine-color-success);font-size:var(--input-success-size,calc(var(--mantine-font-size-sm) - calc(.125rem * var(--mantine-scale))))}.m_fe47ce59{color:var(--mantine-color-dimmed);font-size:var(--input-description-size,calc(var(--mantine-font-size-sm) - calc(.125rem * var(--mantine-scale))))}.m_8bffd616{display:flex}.m_96b553a6{--transition-duration:.15s;z-index:0;transition-property:transform,width,height;transition-duration:0s;transition-timing-function:ease;position:absolute;top:0;left:0}.m_96b553a6:where([data-initialized]){transition-duration:var(--transition-duration)}.m_96b553a6:where([data-hidden]){display:none}.m_9bdbb667{--accordion-radius:var(--mantine-radius-default)}.m_df78851f{overflow-wrap:break-word}.m_4ba554d4{padding:var(--mantine-spacing-md);padding-top:calc(var(--mantine-spacing-xs) / 2)}.m_8fa820a0{width:100%;margin:0;padding:0}.m_4ba585b8{width:100%;padding-inline:var(--mantine-spacing-md);opacity:1;cursor:pointer;color:var(--mantine-color-bright);background-color:#0000;flex-direction:row-reverse;align-items:center;display:flex}.m_4ba585b8:where([data-chevron-position=left]){flex-direction:row;padding-inline-start:0}.m_4ba585b8:where(:disabled,[data-disabled]){opacity:.4;cursor:not-allowed}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_6939a5e9:where(:not(:disabled,[data-disabled])):hover,:where([data-mantine-color-scheme=light]) .m_4271d21b:where(:not(:disabled,[data-disabled])):hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_6939a5e9:where(:not(:disabled,[data-disabled])):hover,:where([data-mantine-color-scheme=dark]) .m_4271d21b:where(:not(:disabled,[data-disabled])):hover{background-color:var(--mantine-color-dark-6)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_6939a5e9:where(:not(:disabled,[data-disabled])):active,:where([data-mantine-color-scheme=light]) .m_4271d21b:where(:not(:disabled,[data-disabled])):active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_6939a5e9:where(:not(:disabled,[data-disabled])):active,:where([data-mantine-color-scheme=dark]) .m_4271d21b:where(:not(:disabled,[data-disabled])):active{background-color:var(--mantine-color-dark-6)}}.m_df3ffa0f{color:inherit;font-weight:var(--mantine-font-weight-regular);text-overflow:ellipsis;padding-top:var(--mantine-spacing-sm);padding-bottom:var(--mantine-spacing-sm);flex:1;overflow:hidden}.m_3f35ae96{transition:transform var(--accordion-transition-duration,.2s) ease;width:var(--accordion-chevron-size,calc(.9375rem * var(--mantine-scale)));min-width:var(--accordion-chevron-size,calc(.9375rem * var(--mantine-scale)));justify-content:flex-start;align-items:center;display:flex;transform:rotate(0)}.m_3f35ae96:where([data-rotate]){transform:rotate(180deg)}.m_3f35ae96:where([data-position=left]){margin-inline-start:var(--mantine-spacing-md);margin-inline-end:var(--mantine-spacing-md)}.m_9bd771fe{justify-content:center;align-items:center;margin-inline-end:var(--mantine-spacing-sm);display:flex}.m_9bd771fe:where([data-chevron-position=left]){margin-inline-start:var(--mantine-spacing-lg);margin-inline-end:0}:where([data-mantine-color-scheme=light]) .m_9bd7b098{--item-border-color:var(--mantine-color-gray-3);--item-filled-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_9bd7b098{--item-border-color:var(--mantine-color-dark-4);--item-filled-color:var(--mantine-color-dark-6)}.m_fe19b709{border-bottom:1px solid var(--item-border-color)}.m_1f921b3b{border:1px solid var(--item-border-color);transition:background-color .15s}.m_1f921b3b:where([data-active]){background-color:var(--item-filled-color)}.m_1f921b3b:first-of-type,.m_1f921b3b:first-of-type>[data-accordion-control],.m_1f921b3b:first-of-type>.m_8fa820a0>[data-accordion-control]{border-start-start-radius:var(--accordion-radius);border-start-end-radius:var(--accordion-radius)}.m_1f921b3b:last-of-type,.m_1f921b3b:last-of-type>[data-accordion-control],.m_1f921b3b:last-of-type>.m_8fa820a0>[data-accordion-control]{border-end-end-radius:var(--accordion-radius);border-end-start-radius:var(--accordion-radius)}.m_1f921b3b+.m_1f921b3b{border-top:0}.m_2cdf939a{border-radius:var(--accordion-radius)}.m_2cdf939a:where([data-active]){background-color:var(--item-filled-color)}.m_9f59b069{background-color:var(--item-filled-color);border-radius:var(--accordion-radius);border:calc(.0625rem * var(--mantine-scale)) solid transparent;transition:background-color .15s}.m_9f59b069[data-active]{border-color:var(--item-border-color)}:where([data-mantine-color-scheme=light]) .m_9f59b069[data-active]{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_9f59b069[data-active]{background-color:var(--mantine-color-dark-7)}.m_9f59b069+.m_9f59b069{margin-top:var(--mantine-spacing-md)}.m_7f854edf{z-index:var(--affix-z-index);inset-inline-start:var(--affix-left);inset-inline-end:var(--affix-right);top:var(--affix-top);bottom:var(--affix-bottom);position:fixed}.m_de09d2d2{align-items:center;gap:var(--mantine-spacing-sm);width:fit-content;margin-inline:auto;display:flex}.m_eab73b29{width:calc(.0625rem * var(--mantine-scale));background-color:var(--mantine-color-default-border);align-self:stretch}.m_66836ed3{--alert-radius:var(--mantine-radius-default);--alert-bg:var(--mantine-primary-color-light);--alert-bd:calc(.0625rem * var(--mantine-scale)) solid transparent;--alert-color:var(--mantine-primary-color-light-color);padding:var(--mantine-spacing-md) var(--mantine-spacing-md);border-radius:var(--alert-radius);background-color:var(--alert-bg);border:var(--alert-bd);color:var(--alert-color);position:relative;overflow:hidden}.m_a5d60502{display:flex}.m_667c2793{gap:var(--mantine-spacing-xs);flex-direction:column;flex:1;display:flex}.m_6a03f287{font-size:var(--mantine-font-size-sm);font-weight:var(--mantine-font-weight-bold);justify-content:space-between;align-items:center;display:flex}.m_6a03f287:where([data-with-close-button]){padding-inline-end:var(--mantine-spacing-md)}.m_698f4f23{text-overflow:ellipsis;display:block;overflow:hidden}.m_667f2a6a{width:calc(1.25rem * var(--mantine-scale));height:calc(1.25rem * var(--mantine-scale));margin-inline-end:var(--mantine-spacing-md);margin-top:calc(.0625rem * var(--mantine-scale));justify-content:flex-start;align-items:center;line-height:1;display:flex}.m_7fa78076{text-overflow:ellipsis;font-size:var(--mantine-font-size-sm);overflow:hidden}:where([data-mantine-color-scheme=light]) .m_7fa78076{color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_7fa78076{color:var(--mantine-color-white)}.m_7fa78076:where([data-variant=filled]){color:var(--alert-color)}.m_7fa78076:where([data-variant=white]){color:var(--mantine-color-black)}.m_87f54839{width:calc(1.25rem * var(--mantine-scale));height:calc(1.25rem * var(--mantine-scale));color:var(--alert-color)}.m_b6d8b162{-webkit-tap-highlight-color:transparent;font-size:var(--text-fz,var(--mantine-font-size-md));line-height:var(--text-lh,var(--mantine-line-height-md));font-weight:var(--mantine-font-weight-regular);text-wrap:var(--text-text-wrap,var(--mantine-text-wrap));margin:0;padding:0;text-decoration:none}.m_b6d8b162:where([data-truncate]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.m_b6d8b162:where([data-truncate=start]){text-align:end;direction:rtl}:where([dir=rtl]) .m_b6d8b162:where([data-truncate=start]){text-align:start;direction:ltr}.m_b6d8b162:where([data-variant=gradient]){background-image:var(--text-gradient);-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text}.m_b6d8b162:where([data-line-clamp]){text-overflow:ellipsis;-webkit-line-clamp:var(--text-line-clamp);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.m_b6d8b162:where([data-inherit]){line-height:inherit;font-weight:inherit;font-size:inherit}.m_b6d8b162:where([data-inline]){line-height:1}.m_849cf0da{color:var(--mantine-color-anchor);appearance:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;text-decoration:none;display:inline}@media (hover:hover){.m_849cf0da:where([data-underline=hover]):hover{text-decoration:underline}}@media (hover:none){.m_849cf0da:where([data-underline=hover]):active{text-decoration:underline}}.m_849cf0da:where([data-underline=not-hover]){text-decoration:underline}@media (hover:hover){.m_849cf0da:where([data-underline=not-hover]):hover{text-decoration:none}}@media (hover:none){.m_849cf0da:where([data-underline=not-hover]):active{text-decoration:none}}.m_849cf0da:where([data-underline=always]){text-decoration:underline}.m_849cf0da:where([data-variant=gradient]),.m_849cf0da:where([data-variant=gradient]):hover{text-decoration:none}.m_849cf0da:where([data-line-clamp]){display:-webkit-box}.m_48204f9b{width:var(--slider-size);height:var(--slider-size);-webkit-user-select:none;user-select:none;border-radius:100%;justify-content:center;align-items:center;display:flex;position:relative}.m_48204f9b:focus-within{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_48204f9b{--slider-size:calc(3.75rem * var(--mantine-scale));--thumb-size:calc(var(--slider-size) / 5)}:where([data-mantine-color-scheme=light]) .m_48204f9b{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_48204f9b{background-color:var(--mantine-color-dark-5)}.m_bb9cdbad{inset:calc(.0625rem * var(--mantine-scale));border-radius:var(--slider-size);pointer-events:none;position:absolute}.m_481dd586{width:calc(.125rem * var(--mantine-scale));transform:rotate(var(--angle));position:absolute;top:0;bottom:0;left:calc(50% - 1px)}.m_481dd586:before{content:"";top:calc(var(--thumb-size) / 3);left:calc(.03125rem * var(--mantine-scale));width:calc(.0625rem * var(--mantine-scale));height:calc(var(--thumb-size) / 1.5);position:absolute;transform:translate(-50%,-50%)}:where([data-mantine-color-scheme=light]) .m_481dd586:before{background-color:var(--mantine-color-gray-4)}:where([data-mantine-color-scheme=dark]) .m_481dd586:before{background-color:var(--mantine-color-dark-3)}.m_481dd586[data-label]:after{min-width:calc(1.125rem * var(--mantine-scale));text-align:center;content:attr(data-label);top:calc(-1.5rem * var(--mantine-scale));left:calc(-.4375rem * var(--mantine-scale));transform:rotate(calc(360deg - var(--angle)));font-size:var(--mantine-font-size-xs);position:absolute}.m_bc02ba3d{height:100%;width:calc(.1875rem * var(--mantine-scale));pointer-events:none;outline:none;position:absolute;inset-block:0;inset-inline:calc(50% - 1.5px) 0}.m_bc02ba3d:before{content:"";height:min(var(--thumb-size), calc(var(--slider-size) / 2));width:calc(.1875rem * var(--mantine-scale));position:absolute;top:0;right:0}:where([data-mantine-color-scheme=light]) .m_bc02ba3d:before{background-color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_bc02ba3d:before{background-color:var(--mantine-color-dark-1)}.m_bb8e875b{font-size:var(--mantine-font-size-xs)}.m_89ab340[data-resizing]{--app-shell-transition-duration:0s!important}.m_89ab340[data-disabled]{--app-shell-header-offset:0rem!important;--app-shell-navbar-offset:0rem!important;--app-shell-aside-offset:0rem!important;--app-shell-footer-offset:0rem!important}.m_89ab340[data-mode=static]{grid-template-columns:var(--app-shell-navbar-width,0) 1fr var(--app-shell-aside-width,0);grid-template-rows:auto 1fr auto;height:100%;display:grid;position:relative;overflow:auto}[data-mantine-color-scheme=light] .m_89ab340{--app-shell-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m_89ab340{--app-shell-border-color:var(--mantine-color-dark-4)}.m_45252eee,.m_9cdde9a,.m_3b16f56b,.m_8983817,.m_3840c879{transition-duration:var(--app-shell-transition-duration);transition-timing-function:var(--app-shell-transition-timing-function)}.m_45252eee,.m_9cdde9a{top:var(--app-shell-header-offset,0rem);height:calc(100dvh - var(--app-shell-header-offset,0rem) - var(--app-shell-footer-offset,0rem));background-color:var(--mantine-color-body);flex-direction:column;transition-property:transform,top,height;display:flex;position:fixed}:where([data-mode=static]) .m_45252eee,:where([data-mode=static]) .m_9cdde9a{position:var(--app-shell-navbar-position,fixed);grid-row:var(--app-shell-navbar-grid-row,auto);height:100%}:where([data-layout=alt]) .m_45252eee,:where([data-layout=alt]) .m_9cdde9a{height:100dvh;top:0}:where([data-mode=static][data-layout=alt]) .m_45252eee,:where([data-mode=static][data-layout=alt]) .m_9cdde9a{grid-row:1/-1;height:100%}.m_45252eee{width:var(--app-shell-navbar-width);transform:var(--app-shell-navbar-transform);z-index:var(--app-shell-navbar-z-index);transition-property:transform,top,height;inset-inline-start:0}:where([data-mode=static]) .m_45252eee{grid-column:var(--app-shell-navbar-grid-column,auto);display:var(--app-shell-navbar-display,flex)}:where([dir=rtl]) .m_45252eee{transform:var(--app-shell-navbar-transform-rtl)}.m_45252eee:where([data-with-border]){border-inline-end:1px solid var(--app-shell-border-color)}.m_9cdde9a{width:var(--app-shell-aside-width);transform:var(--app-shell-aside-transform);z-index:var(--app-shell-aside-z-index);inset-inline-end:0}:where([data-mode=static]) .m_9cdde9a{position:var(--app-shell-aside-position,fixed);grid-column:var(--app-shell-aside-grid-column,auto);grid-row:var(--app-shell-aside-grid-row,auto);display:var(--app-shell-aside-display,flex)}:where([dir=rtl]) .m_9cdde9a{transform:var(--app-shell-aside-transform-rtl)}.m_9cdde9a:where([data-with-border]){border-inline-start:1px solid var(--app-shell-border-color)}:where([data-mode=static][data-layout=alt]) .m_9cdde9a{grid-row:1/-1}:where([data-scroll-locked]) .m_9cdde9a{visibility:var(--app-shell-aside-scroll-locked-visibility)}.m_8983817{padding-inline-start:calc(var(--app-shell-navbar-offset,0rem) + var(--app-shell-padding));padding-inline-end:calc(var(--app-shell-aside-offset,0rem) + var(--app-shell-padding));padding-top:calc(var(--app-shell-header-offset,0rem) + var(--app-shell-padding));padding-bottom:calc(var(--app-shell-footer-offset,0rem) + var(--app-shell-padding));min-height:100dvh;transition-property:padding}:where([data-mode=static]) .m_8983817{padding-inline-start:var(--app-shell-padding);padding-inline-end:var(--app-shell-padding);padding-top:var(--app-shell-padding);padding-bottom:var(--app-shell-padding);grid-column:var(--app-shell-main-column-start,1) / var(--app-shell-main-column-end,-1);grid-row:var(--app-shell-main-grid-row,2);min-height:auto}.m_3b16f56b,.m_3840c879{background-color:var(--mantine-color-body);transition-property:transform,margin-inline-start,margin-inline-end;position:fixed;inset-inline:0}:where([data-mode=static]) .m_3b16f56b,:where([data-mode=static]) .m_3840c879{position:var(--app-shell-header-position,fixed);grid-column:var(--app-shell-header-grid-column,auto)}:where([data-layout=alt]) .m_3b16f56b,:where([data-layout=alt]) .m_3840c879{margin-inline-start:var(--app-shell-navbar-offset,0rem);margin-inline-end:var(--app-shell-aside-offset,0rem)}:where([data-mode=static][data-layout=alt]) .m_3b16f56b,:where([data-mode=static][data-layout=alt]) .m_3840c879{grid-column:var(--app-shell-main-column-start,1) / var(--app-shell-main-column-end,-1);margin-inline:0}.m_3b16f56b{height:var(--app-shell-header-height);background-color:var(--mantine-color-body);transform:var(--app-shell-header-transform);z-index:var(--app-shell-header-z-index);top:0}:where([data-mode=static]) .m_3b16f56b{grid-row:var(--app-shell-header-grid-row,auto)}.m_3b16f56b:where([data-with-border]){border-bottom:1px solid var(--app-shell-border-color)}.m_3840c879{height:calc(var(--app-shell-footer-height) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);transform:var(--app-shell-footer-transform);z-index:var(--app-shell-footer-z-index);bottom:0}:where([data-mode=static]) .m_3840c879{position:var(--app-shell-footer-position,fixed);grid-column:var(--app-shell-footer-grid-column,auto);grid-row:var(--app-shell-footer-grid-row,auto)}:where([data-mode=static][data-layout=alt]) .m_3840c879{grid-column:var(--app-shell-main-column-start,1) / var(--app-shell-main-column-end,-1)}.m_3840c879:where([data-with-border]){border-top:1px solid var(--app-shell-border-color)}.m_6dcfc7c7{flex-grow:0}.m_6dcfc7c7:where([data-grow]){flex-grow:1}.m_71ac47fc{--ar-ratio:1;max-width:100%}.m_71ac47fc>:where(:not(style)){aspect-ratio:var(--ar-ratio);width:100%}.m_71ac47fc>:where(img,video){object-fit:cover}.m_88b62a41{--combobox-padding:calc(.25rem * var(--mantine-scale));padding:var(--combobox-padding)}.m_88b62a41:has([data-mantine-scrollbar]) .m_985517d8{max-width:calc(100% + var(--combobox-padding))}.m_88b62a41[data-composed]{padding-inline-end:0}.m_88b62a41[data-hidden]{display:none}.m_88b62a41[data-floating-height=viewport]:not([data-hidden]){--combobox-floating-options-max-height:calc(var(--combobox-floating-max-height,100vh) - var(--combobox-padding) * 2);max-height:var(--combobox-floating-max-height,none);overflow:hidden}.m_88b62a41,.m_b2821a6e{--combobox-option-padding-xs:calc(.25rem * var(--mantine-scale)) calc(.5rem * var(--mantine-scale));--combobox-option-padding-sm:calc(.375rem * var(--mantine-scale)) calc(.625rem * var(--mantine-scale));--combobox-option-padding-md:calc(.5rem * var(--mantine-scale)) calc(.75rem * var(--mantine-scale));--combobox-option-padding-lg:calc(.625rem * var(--mantine-scale)) calc(1rem * var(--mantine-scale));--combobox-option-padding-xl:calc(.875rem * var(--mantine-scale)) calc(1.25rem * var(--mantine-scale));--combobox-option-padding:var(--combobox-option-padding-sm)}.m_92253aa5{padding:var(--combobox-option-padding);font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));border-radius:var(--mantine-radius-default);color:inherit;cursor:pointer;overflow-wrap:break-word;background-color:#0000}.m_92253aa5:where([data-combobox-selected]){background-color:var(--mantine-primary-color-filled);color:var(--mantine-color-white)}.m_92253aa5:where([data-combobox-disabled]){cursor:not-allowed;opacity:.35}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_92253aa5:hover:where(:not([data-combobox-selected],[data-combobox-disabled])){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_92253aa5:hover:where(:not([data-combobox-selected],[data-combobox-disabled])){background-color:var(--mantine-color-dark-7)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_92253aa5:active:where(:not([data-combobox-selected],[data-combobox-disabled])){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_92253aa5:active:where(:not([data-combobox-selected],[data-combobox-disabled])){background-color:var(--mantine-color-dark-7)}}.m_985517d8{margin-inline:calc(var(--combobox-padding) * -1);margin-top:calc(var(--combobox-padding) * -1);width:calc(100% + var(--combobox-padding) * 2);border-top-width:0;margin-bottom:var(--combobox-padding);border-inline-width:0;border-end-end-radius:0;border-end-start-radius:0;position:relative}:where([data-mantine-color-scheme=light]) .m_985517d8,:where([data-mantine-color-scheme=light]) .m_985517d8:focus{border-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_985517d8,:where([data-mantine-color-scheme=dark]) .m_985517d8:focus{border-color:var(--mantine-color-dark-4)}:where([data-mantine-color-scheme=light]) .m_985517d8{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_985517d8{background-color:var(--mantine-color-dark-7)}.m_2530cd1d{font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));text-align:center;padding:var(--combobox-option-padding);color:var(--mantine-color-dimmed)}.m_858f94bd,.m_82b967cb{font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));margin-inline:calc(var(--combobox-padding) * -1);padding:var(--combobox-option-padding);border:0 solid #0000}:where([data-mantine-color-scheme=light]) .m_858f94bd,:where([data-mantine-color-scheme=light]) .m_82b967cb{border-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_858f94bd,:where([data-mantine-color-scheme=dark]) .m_82b967cb{border-color:var(--mantine-color-dark-4)}.m_82b967cb{border-top-width:calc(.0625rem * var(--mantine-scale));margin-top:var(--combobox-padding);margin-bottom:calc(var(--combobox-padding) * -1)}.m_858f94bd{border-bottom-width:calc(.0625rem * var(--mantine-scale));margin-bottom:var(--combobox-padding);margin-top:calc(var(--combobox-padding) * -1)}.m_254f3e4f:has(.m_2bb2e9e5:only-child){display:none}.m_2bb2e9e5{color:var(--mantine-color-dimmed);font-size:calc(var(--combobox-option-fz,var(--mantine-font-size-sm)) * .85);padding:var(--combobox-option-padding);font-weight:var(--mantine-font-weight-medium);align-items:center;display:flex;position:relative}.m_2bb2e9e5:after{content:"";height:calc(.0625rem * var(--mantine-scale));flex:1;margin-inline-start:var(--mantine-spacing-xs);inset-inline:0}:where([data-mantine-color-scheme=light]) .m_2bb2e9e5:after{background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_2bb2e9e5:after{background-color:var(--mantine-color-dark-4)}.m_2bb2e9e5:only-child{display:none}.m_2943220b{--combobox-chevron-size-xs:calc(.875rem * var(--mantine-scale));--combobox-chevron-size-sm:calc(1.125rem * var(--mantine-scale));--combobox-chevron-size-md:calc(1.25rem * var(--mantine-scale));--combobox-chevron-size-lg:calc(1.5rem * var(--mantine-scale));--combobox-chevron-size-xl:calc(1.75rem * var(--mantine-scale));--combobox-chevron-size:var(--combobox-chevron-size-sm)}:where([data-mantine-color-scheme=light]) .m_2943220b{--_combobox-chevron-color:var(--combobox-chevron-color,var(--mantine-color-gray-6))}:where([data-mantine-color-scheme=dark]) .m_2943220b{--_combobox-chevron-color:var(--combobox-chevron-color,var(--mantine-color-dark-3))}.m_2943220b{width:var(--combobox-chevron-size);height:var(--combobox-chevron-size);color:var(--_combobox-chevron-color)}.m_2943220b:where([data-error]){color:var(--combobox-chevron-color,var(--mantine-color-error))}.m_390b5f4{align-items:center;gap:calc(.5rem * var(--mantine-scale));display:flex}.m_390b5f4:where([data-reverse]){justify-content:space-between}.m_8ee53fc2{opacity:.4;width:.8em;min-width:.8em;height:.8em}:where([data-combobox-selected]) .m_8ee53fc2{opacity:1}.m_a530ee0a{width:.8em;min-width:.8em;height:.8em}.m_5f75b09e{--label-lh-xs:calc(1rem * var(--mantine-scale));--label-lh-sm:calc(1.25rem * var(--mantine-scale));--label-lh-md:calc(1.5rem * var(--mantine-scale));--label-lh-lg:calc(1.875rem * var(--mantine-scale));--label-lh-xl:calc(2.25rem * var(--mantine-scale));--label-lh:var(--label-lh-sm)}.m_5f75b09e[data-label-position=left]{--label-order:1;--label-offset-end:var(--mantine-spacing-sm);--label-offset-start:0}.m_5f75b09e[data-label-position=right]{--label-order:2;--label-offset-end:0;--label-offset-start:var(--mantine-spacing-sm)}.m_5f6e695e{-webkit-tap-highlight-color:transparent;display:flex}.m_d3ea56bb{--label-cursor:var(--mantine-cursor-type);-webkit-tap-highlight-color:transparent;font-size:var(--label-fz,var(--mantine-font-size-sm));line-height:var(--label-lh);cursor:var(--label-cursor);flex-direction:column;order:var(--label-order);display:inline-flex}fieldset:disabled .m_d3ea56bb,.m_d3ea56bb[data-disabled]{--label-cursor:not-allowed}.m_8ee546b8{cursor:var(--label-cursor);color:inherit;padding-inline-start:var(--label-offset-start);padding-inline-end:var(--label-offset-end)}fieldset:disabled .m_8ee546b8,.m_8ee546b8:where([data-disabled]){color:var(--mantine-color-disabled-color)}.m_328f68c0{margin-top:calc(var(--mantine-spacing-xs) / 2);cursor:default;padding-inline-start:var(--label-offset-start);padding-inline-end:var(--label-offset-end)}.m_8e8a99cc{margin-top:calc(var(--mantine-spacing-xs) / 2);padding-inline-start:var(--label-offset-start);padding-inline-end:var(--label-offset-end)}.m_26775b0a{--card-radius:var(--mantine-radius-default);border-radius:var(--card-radius);cursor:pointer;width:100%;display:block}.m_26775b0a :where(*){cursor:inherit}.m_26775b0a:where([data-with-border]){border:calc(.0625rem * var(--mantine-scale)) solid transparent}:where([data-mantine-color-scheme=light]) .m_26775b0a:where([data-with-border]){border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_26775b0a:where([data-with-border]){border-color:var(--mantine-color-dark-4)}.m_5e5256ee{--checkbox-size-xs:calc(1rem * var(--mantine-scale));--checkbox-size-sm:calc(1.25rem * var(--mantine-scale));--checkbox-size-md:calc(1.5rem * var(--mantine-scale));--checkbox-size-lg:calc(1.875rem * var(--mantine-scale));--checkbox-size-xl:calc(2.25rem * var(--mantine-scale));--checkbox-size:var(--checkbox-size-sm);--checkbox-color:var(--mantine-primary-color-filled)}.m_5e5256ee:where([data-variant=filled]){--checkbox-icon-color:var(--mantine-color-white)}.m_5e5256ee:where([data-variant=outline]){--checkbox-icon-color:var(--checkbox-color)}.m_5e5256ee{border:calc(.0625rem * var(--mantine-scale)) solid transparent;width:var(--checkbox-size);min-width:var(--checkbox-size);height:var(--checkbox-size);min-height:var(--checkbox-size);border-radius:var(--checkbox-radius,var(--mantine-radius-default));cursor:var(--mantine-cursor-type);-webkit-tap-highlight-color:transparent;justify-content:center;align-items:center;transition:border-color .1s,background-color .1s;display:flex;position:relative}:where([data-mantine-color-scheme=light]) .m_5e5256ee{background-color:var(--mantine-color-white);border-color:var(--mantine-color-gray-4)}:where([data-mantine-color-scheme=dark]) .m_5e5256ee{background-color:var(--mantine-color-dark-6);border-color:var(--mantine-color-dark-4)}.m_5e5256ee[data-indeterminate],.m_5e5256ee[data-checked]{background-color:var(--checkbox-color);border-color:var(--checkbox-color)}.m_5e5256ee[data-indeterminate]>.m_1b1c543a,.m_5e5256ee[data-checked]>.m_1b1c543a{opacity:1;color:var(--checkbox-icon-color);transform:none}.m_5e5256ee[data-disabled]{cursor:not-allowed;border-color:var(--mantine-color-disabled-border);background-color:var(--mantine-color-disabled)}[data-mantine-color-scheme=light] .m_5e5256ee[data-disabled][data-checked]>.m_1b1c543a{color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m_5e5256ee[data-disabled][data-checked]>.m_1b1c543a{color:var(--mantine-color-dark-3)}.m_76e20374[data-indeterminate]:not([data-disabled]),.m_76e20374[data-checked]:not([data-disabled]){border-color:var(--checkbox-color);background-color:#0000}.m_76e20374[data-indeterminate]:not([data-disabled])>.m_1b1c543a,.m_76e20374[data-checked]:not([data-disabled])>.m_1b1c543a{color:var(--checkbox-icon-color);opacity:1;transform:none}.m_1b1c543a{color:#0000;pointer-events:none;width:60%;transform:translateY(calc(.3125rem * var(--mantine-scale))) scale(.5);opacity:1;transition:transform .1s,opacity .1s;display:block}.m_bf2d988c{--checkbox-size-xs:calc(1rem * var(--mantine-scale));--checkbox-size-sm:calc(1.25rem * var(--mantine-scale));--checkbox-size-md:calc(1.5rem * var(--mantine-scale));--checkbox-size-lg:calc(1.875rem * var(--mantine-scale));--checkbox-size-xl:calc(2.25rem * var(--mantine-scale));--checkbox-size:var(--checkbox-size-sm);--checkbox-color:var(--mantine-primary-color-filled)}.m_bf2d988c:where([data-variant=filled]){--checkbox-icon-color:var(--mantine-color-white)}.m_bf2d988c:where([data-variant=outline]){--checkbox-icon-color:var(--checkbox-color)}.m_26062bec{width:var(--checkbox-size);height:var(--checkbox-size);order:1;position:relative}.m_26062bec:where([data-label-position=left]){order:2}.m_26063560{appearance:none;border:calc(.0625rem * var(--mantine-scale)) solid transparent;width:var(--checkbox-size);height:var(--checkbox-size);border-radius:var(--checkbox-radius,var(--mantine-radius-default));cursor:var(--mantine-cursor-type);-webkit-tap-highlight-color:transparent;margin:0;padding:0;transition:border-color .1s,background-color .1s;display:block}:where([data-mantine-color-scheme=light]) .m_26063560{background-color:var(--mantine-color-white);border-color:var(--mantine-color-gray-4)}:where([data-mantine-color-scheme=dark]) .m_26063560{background-color:var(--mantine-color-dark-6);border-color:var(--mantine-color-dark-4)}.m_26063560:where([data-with-error-styles][data-error]){border-color:var(--mantine-color-error)}.m_26063560[data-indeterminate],.m_26063560:checked{background-color:var(--checkbox-color);border-color:var(--checkbox-color)}.m_26063560[data-indeterminate]+.m_bf295423,.m_26063560:checked+.m_bf295423{opacity:1;transform:none}.m_26063560:disabled{cursor:not-allowed;border-color:var(--mantine-color-disabled-border);background-color:var(--mantine-color-disabled)}.m_26063560:disabled+.m_bf295423{color:var(--mantine-color-disabled-color)}.m_215c4542+.m_bf295423{color:var(--checkbox-color)}.m_215c4542[data-indeterminate]:not(:disabled),.m_215c4542:checked:not(:disabled){border-color:var(--checkbox-color);background-color:#0000}.m_215c4542[data-indeterminate]:not(:disabled)+.m_bf295423,.m_215c4542:checked:not(:disabled)+.m_bf295423{color:var(--checkbox-icon-color);opacity:1;transform:none}.m_bf295423{width:60%;color:var(--checkbox-icon-color);pointer-events:none;transform:translateY(calc(.3125rem * var(--mantine-scale))) scale(.5);opacity:0;margin:auto;transition:transform .1s,opacity .1s;position:absolute;inset:0}.m_11def92b{--ag-spacing:var(--mantine-spacing-sm);--ag-offset:calc(var(--ag-spacing) * -1);padding-inline-start:var(--ag-spacing);display:flex}.m_f85678b6{--avatar-size-xs:calc(1rem * var(--mantine-scale));--avatar-size-sm:calc(1.625rem * var(--mantine-scale));--avatar-size-md:calc(2.375rem * var(--mantine-scale));--avatar-size-lg:calc(3.5rem * var(--mantine-scale));--avatar-size-xl:calc(5.25rem * var(--mantine-scale));--avatar-size:var(--avatar-size-md);--avatar-radius:calc(62.5rem * var(--mantine-scale));--avatar-bg:var(--mantine-color-gray-light);--avatar-bd:calc(.0625rem * var(--mantine-scale)) solid transparent;--avatar-color:var(--mantine-color-gray-light-color);--avatar-placeholder-fz:calc(var(--avatar-size) / 2.5);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;border-radius:var(--avatar-radius);width:var(--avatar-size);height:var(--avatar-size);min-width:var(--avatar-size);padding:0;text-decoration:none;display:block;position:relative;overflow:hidden}.m_f85678b6:where([data-within-group]){border:2px solid var(--mantine-color-body);background:var(--mantine-color-body);margin-inline-start:var(--ag-offset)}.m_11f8ac07{object-fit:cover;width:100%;height:100%;display:block}.m_104cd71f{font-weight:var(--mantine-font-weight-bold);-webkit-user-select:none;user-select:none;border-radius:var(--avatar-radius);width:100%;height:100%;font-size:var(--avatar-placeholder-fz);background:var(--avatar-bg);border:var(--avatar-bd);color:var(--avatar-color);justify-content:center;align-items:center;display:flex}.m_104cd71f>[data-avatar-placeholder-icon]{width:70%;height:70%}.m_2ce0de02{border-radius:var(--bi-radius,0);background-position:50%;background-size:cover;border:0;width:100%;text-decoration:none;display:block}.m_347db0ec{--badge-height-xs:calc(1rem * var(--mantine-scale));--badge-height-sm:calc(1.125rem * var(--mantine-scale));--badge-height-md:calc(1.25rem * var(--mantine-scale));--badge-height-lg:calc(1.625rem * var(--mantine-scale));--badge-height-xl:calc(2rem * var(--mantine-scale));--badge-fz-xs:calc(.5625rem * var(--mantine-scale));--badge-fz-sm:calc(.625rem * var(--mantine-scale));--badge-fz-md:calc(.6875rem * var(--mantine-scale));--badge-fz-lg:calc(.8125rem * var(--mantine-scale));--badge-fz-xl:calc(1rem * var(--mantine-scale));--badge-padding-x-xs:calc(.375rem * var(--mantine-scale));--badge-padding-x-sm:calc(.5rem * var(--mantine-scale));--badge-padding-x-md:calc(.625rem * var(--mantine-scale));--badge-padding-x-lg:calc(.75rem * var(--mantine-scale));--badge-padding-x-xl:calc(1rem * var(--mantine-scale));--badge-height:var(--badge-height-md);--badge-fz:var(--badge-fz-md);--badge-padding-x:var(--badge-padding-x-md);--badge-radius:calc(62.5rem * var(--mantine-scale));--badge-lh:calc(var(--badge-height) - calc(.125rem * var(--mantine-scale)));--badge-color:var(--mantine-color-white);--badge-bg:var(--mantine-primary-color-filled);--badge-border-width:calc(.0625rem * var(--mantine-scale));--badge-bd:var(--badge-border-width) solid transparent;-webkit-tap-highlight-color:transparent;font-size:var(--badge-fz);border-radius:var(--badge-radius);height:var(--badge-height);line-height:var(--badge-lh);padding:0 var(--badge-padding-x);text-transform:uppercase;width:fit-content;font-weight:var(--mantine-font-weight-bold);letter-spacing:calc(.015625rem * var(--mantine-scale));cursor:default;text-overflow:ellipsis;color:var(--badge-color);background:var(--badge-bg);border:var(--badge-bd);justify-content:center;align-items:center;text-decoration:none;display:inline-grid;overflow:hidden}.m_347db0ec:where([data-with-left-section],[data-variant=dot]){grid-template-columns:auto 1fr}.m_347db0ec:where([data-with-right-section]){grid-template-columns:1fr auto}.m_347db0ec:where([data-with-left-section][data-with-right-section],[data-variant=dot][data-with-right-section]){grid-template-columns:auto 1fr auto}.m_347db0ec:where([data-block]){width:100%;display:flex}.m_347db0ec:where([data-circle]){padding-inline:calc(.125rem * var(--mantine-scale));width:var(--badge-height);display:flex}.m_fbd81e3d{--badge-dot-size:calc(var(--badge-height) / 3.4)}:where([data-mantine-color-scheme=light]) .m_fbd81e3d{background-color:var(--mantine-color-white);border-color:var(--mantine-color-gray-4);color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_fbd81e3d{background-color:var(--mantine-color-dark-5);border-color:var(--mantine-color-dark-5);color:var(--mantine-color-white)}.m_fbd81e3d:before{content:"";width:var(--badge-dot-size);height:var(--badge-dot-size);border-radius:var(--badge-dot-size);background-color:var(--badge-dot-color);margin-inline-end:var(--badge-dot-size);display:block}.m_5add502a{white-space:nowrap;text-overflow:ellipsis;text-align:center;cursor:inherit;overflow:hidden}.m_91fdda9b{--badge-section-margin:calc(var(--mantine-spacing-xs) / 2);max-height:calc(var(--badge-height) - var(--badge-border-width) * 2);justify-content:center;align-items:center;display:inline-flex}.m_91fdda9b:where([data-position=left]){margin-inline-end:var(--badge-section-margin)}.m_91fdda9b:where([data-position=right]){margin-inline-start:var(--badge-section-margin)}.m_ddec01c0{--blockquote-border:3px solid var(--bq-bd);text-wrap:var(--bq-text-wrap,var(--mantine-text-wrap));border-inline-start:var(--blockquote-border);padding:var(--mantine-spacing-xl) calc(2.375rem * var(--mantine-scale));border-start-end-radius:var(--bq-radius);border-end-end-radius:var(--bq-radius);margin:0;position:relative}:where([data-mantine-color-scheme=light]) .m_ddec01c0{background-color:var(--bq-bg-light)}:where([data-mantine-color-scheme=dark]) .m_ddec01c0{background-color:var(--bq-bg-dark)}.m_dde7bd57{--blockquote-icon-offset:calc(var(--bq-icon-size) / -2);color:var(--bq-bd);background-color:var(--mantine-color-body);top:var(--blockquote-icon-offset);width:var(--bq-icon-size);height:var(--bq-icon-size);border-radius:var(--bq-icon-size);justify-content:center;align-items:center;display:flex;position:absolute;inset-inline-start:var(--blockquote-icon-offset)}.m_dde51a35{margin-top:var(--mantine-spacing-md);opacity:.6;font-size:85%;display:block}.m_8b3717df{flex-wrap:wrap;align-items:center;display:flex}.m_f678d540{white-space:nowrap;-webkit-tap-highlight-color:transparent;line-height:1}.m_3b8f2208{margin-inline:var(--bc-separator-margin,var(--mantine-spacing-xs));justify-content:center;align-items:center;line-height:1;display:flex}:where([data-mantine-color-scheme=light]) .m_3b8f2208{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_3b8f2208{color:var(--mantine-color-dark-2)}.m_fea6bf1a{--burger-size-xs:calc(.75rem * var(--mantine-scale));--burger-size-sm:calc(1.125rem * var(--mantine-scale));--burger-size-md:calc(1.5rem * var(--mantine-scale));--burger-size-lg:calc(2.125rem * var(--mantine-scale));--burger-size-xl:calc(2.625rem * var(--mantine-scale));--burger-size:var(--burger-size-md);--burger-line-size:calc(var(--burger-size) / 12);width:calc(var(--burger-size) + var(--mantine-spacing-xs));height:calc(var(--burger-size) + var(--mantine-spacing-xs));padding:calc(var(--mantine-spacing-xs) / 2);cursor:pointer}:where([data-mantine-color-scheme=light]) .m_fea6bf1a{--burger-color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_fea6bf1a{--burger-color:var(--mantine-color-white)}.m_d4fb9cad{-webkit-user-select:none;user-select:none;position:relative}.m_d4fb9cad,.m_d4fb9cad:before,.m_d4fb9cad:after{width:var(--burger-size);height:var(--burger-line-size);background-color:var(--burger-color);outline:calc(.0625rem * var(--mantine-scale)) solid transparent;transition-property:background-color,transform;transition-duration:var(--burger-transition-duration,.3s);transition-timing-function:var(--burger-transition-timing-function,ease);display:block}.m_d4fb9cad:before,.m_d4fb9cad:after{content:"";position:absolute;inset-inline-start:0}.m_d4fb9cad:before{top:calc(var(--burger-size) / -3)}.m_d4fb9cad:after{top:calc(var(--burger-size) / 3)}.m_d4fb9cad[data-opened]{background-color:#0000}.m_d4fb9cad[data-opened]:before{transform:translateY(calc(var(--burger-size) / 3)) rotate(45deg)}.m_d4fb9cad[data-opened]:after{transform:translateY(calc(var(--burger-size) / -3)) rotate(-45deg)}.m_77c9d27d{--button-height-xs:calc(1.875rem * var(--mantine-scale));--button-height-sm:calc(2.25rem * var(--mantine-scale));--button-height-md:calc(2.625rem * var(--mantine-scale));--button-height-lg:calc(3.125rem * var(--mantine-scale));--button-height-xl:calc(3.75rem * var(--mantine-scale));--button-height-compact-xs:calc(1.375rem * var(--mantine-scale));--button-height-compact-sm:calc(1.625rem * var(--mantine-scale));--button-height-compact-md:calc(1.875rem * var(--mantine-scale));--button-height-compact-lg:calc(2.125rem * var(--mantine-scale));--button-height-compact-xl:calc(2.5rem * var(--mantine-scale));--button-padding-x-xs:calc(.875rem * var(--mantine-scale));--button-padding-x-sm:calc(1.125rem * var(--mantine-scale));--button-padding-x-md:calc(1.375rem * var(--mantine-scale));--button-padding-x-lg:calc(1.625rem * var(--mantine-scale));--button-padding-x-xl:calc(2rem * var(--mantine-scale));--button-padding-x-compact-xs:calc(.4375rem * var(--mantine-scale));--button-padding-x-compact-sm:calc(.5rem * var(--mantine-scale));--button-padding-x-compact-md:calc(.625rem * var(--mantine-scale));--button-padding-x-compact-lg:calc(.75rem * var(--mantine-scale));--button-padding-x-compact-xl:calc(.875rem * var(--mantine-scale));--button-height:var(--button-height-sm);--button-padding-x:var(--button-padding-x-sm);--button-color:var(--mantine-color-white);-webkit-user-select:none;user-select:none;font-weight:var(--mantine-font-weight-medium);text-align:center;cursor:pointer;border-radius:var(--button-radius,var(--mantine-radius-default));width:auto;line-height:1;font-size:var(--button-fz,var(--mantine-font-size-sm));background:var(--button-bg,var(--mantine-primary-color-filled));border:var(--button-bd,calc(.0625rem * var(--mantine-scale)) solid transparent);color:var(--button-color,var(--mantine-color-white));height:var(--button-height,var(--button-height-sm));padding-inline:var(--button-padding-x,var(--button-padding-x-sm));vertical-align:middle;display:inline-block;position:relative;overflow:hidden}.m_77c9d27d:where([data-block]){width:100%;display:block}.m_77c9d27d:where([data-with-left-section]){padding-inline-start:calc(var(--button-padding-x) / 1.5)}.m_77c9d27d:where([data-with-right-section]){padding-inline-end:calc(var(--button-padding-x) / 1.5)}.m_77c9d27d:where(:disabled:not([data-loading]),[data-disabled]:not([data-loading])){cursor:not-allowed;border:calc(.0625rem * var(--mantine-scale)) solid transparent;color:var(--mantine-color-disabled-color);background:var(--mantine-color-disabled);transform:none}.m_77c9d27d:before{content:"";pointer-events:none;inset:calc(-.0625rem * var(--mantine-scale));border-radius:var(--button-radius,var(--mantine-radius-default));opacity:0;filter:blur(12px);transition:transform .15s,opacity .1s;position:absolute;transform:translateY(-100%)}:where([data-mantine-color-scheme=light]) .m_77c9d27d:before{background-color:#ffffff26}:where([data-mantine-color-scheme=dark]) .m_77c9d27d:before{background-color:#00000026}.m_77c9d27d:where([data-loading]){cursor:not-allowed;transform:none}.m_77c9d27d:where([data-loading]):before{opacity:1;transform:translateY(0)}.m_77c9d27d:where([data-loading]) .m_80f1301b{opacity:0;transform:translateY(100%)}@media (hover:hover){.m_77c9d27d:hover:where(:not([data-loading],:disabled,[data-disabled])){background-color:var(--button-hover,var(--mantine-primary-color-filled-hover));color:var(--button-hover-color,var(--button-color))}}@media (hover:none){.m_77c9d27d:active:where(:not([data-loading],:disabled,[data-disabled])){background-color:var(--button-hover,var(--mantine-primary-color-filled-hover));color:var(--button-hover-color,var(--button-color))}}.m_80f1301b{align-items:center;justify-content:var(--button-justify,center);height:100%;transition:transform .15s,opacity .1s;display:flex;overflow:visible}.m_811560b9{white-space:nowrap;opacity:1;text-box-trim:trim-both;text-box-edge:cap alphabetic;align-items:center;height:100%;display:flex;overflow:hidden}.m_811560b9:where([data-loading]){opacity:.2}.m_a74036a{align-items:center;display:flex}.m_a74036a:where([data-position=left]){margin-inline-end:var(--mantine-spacing-xs)}.m_a74036a:where([data-position=right]){margin-inline-start:var(--mantine-spacing-xs)}.m_a25b86ee{position:absolute;top:50%;left:50%}.m_80d6d844{--button-border-width:calc(.0625rem * var(--mantine-scale));display:flex}.m_80d6d844 :where(.m_77c9d27d):focus{z-index:1;position:relative}.m_80d6d844[data-orientation=horizontal]{flex-direction:row}.m_80d6d844[data-orientation=horizontal] .m_77c9d27d:not(:only-child):first-child,.m_80d6d844[data-orientation=horizontal] .m_70be2a01:not(:only-child):first-child{border-inline-end-width:calc(var(--button-border-width) / 2);border-start-end-radius:0;border-end-end-radius:0}.m_80d6d844[data-orientation=horizontal] .m_77c9d27d:not(:only-child):last-child,.m_80d6d844[data-orientation=horizontal] .m_70be2a01:not(:only-child):last-child{border-inline-start-width:calc(var(--button-border-width) / 2);border-start-start-radius:0;border-end-start-radius:0}.m_80d6d844[data-orientation=horizontal] .m_77c9d27d:not(:only-child):not(:first-child):not(:last-child),.m_80d6d844[data-orientation=horizontal] .m_70be2a01:not(:only-child):not(:first-child):not(:last-child){border-inline-width:calc(var(--button-border-width) / 2);border-radius:0}.m_80d6d844[data-orientation=vertical]{flex-direction:column}.m_80d6d844[data-orientation=vertical] .m_77c9d27d:not(:only-child):first-child,.m_80d6d844[data-orientation=vertical] .m_70be2a01:not(:only-child):first-child{border-bottom-width:calc(var(--button-border-width) / 2);border-end-end-radius:0;border-end-start-radius:0}.m_80d6d844[data-orientation=vertical] .m_77c9d27d:not(:only-child):last-child,.m_80d6d844[data-orientation=vertical] .m_70be2a01:not(:only-child):last-child{border-top-width:calc(var(--button-border-width) / 2);border-start-start-radius:0;border-start-end-radius:0}.m_80d6d844[data-orientation=vertical] .m_77c9d27d:not(:only-child):not(:first-child):not(:last-child),.m_80d6d844[data-orientation=vertical] .m_70be2a01:not(:only-child):not(:first-child):not(:last-child){border-bottom-width:calc(var(--button-border-width) / 2);border-top-width:calc(var(--button-border-width) / 2);border-radius:0}.m_70be2a01{--section-height-xs:calc(1.875rem * var(--mantine-scale));--section-height-sm:calc(2.25rem * var(--mantine-scale));--section-height-md:calc(2.625rem * var(--mantine-scale));--section-height-lg:calc(3.125rem * var(--mantine-scale));--section-height-xl:calc(3.75rem * var(--mantine-scale));--section-height-compact-xs:calc(1.375rem * var(--mantine-scale));--section-height-compact-sm:calc(1.625rem * var(--mantine-scale));--section-height-compact-md:calc(1.875rem * var(--mantine-scale));--section-height-compact-lg:calc(2.125rem * var(--mantine-scale));--section-height-compact-xl:calc(2.5rem * var(--mantine-scale));--section-padding-x-xs:calc(.875rem * var(--mantine-scale));--section-padding-x-sm:calc(1.125rem * var(--mantine-scale));--section-padding-x-md:calc(1.375rem * var(--mantine-scale));--section-padding-x-lg:calc(1.625rem * var(--mantine-scale));--section-padding-x-xl:calc(2rem * var(--mantine-scale));--section-padding-x-compact-xs:calc(.4375rem * var(--mantine-scale));--section-padding-x-compact-sm:calc(.5rem * var(--mantine-scale));--section-padding-x-compact-md:calc(.625rem * var(--mantine-scale));--section-padding-x-compact-lg:calc(.75rem * var(--mantine-scale));--section-padding-x-compact-xl:calc(.875rem * var(--mantine-scale));--section-height:var(--section-height-sm);--section-padding-x:var(--section-padding-x-sm);--section-color:var(--mantine-color-white);font-weight:var(--mantine-font-weight-medium);border-radius:var(--section-radius,var(--mantine-radius-default));width:auto;font-size:var(--section-fz,var(--mantine-font-size-sm));background:var(--section-bg,var(--mantine-primary-color-filled));border:var(--section-bd,calc(.0625rem * var(--mantine-scale)) solid transparent);color:var(--section-color,var(--mantine-color-white));height:var(--section-height,var(--section-height-sm));padding-inline:var(--section-padding-x,var(--section-padding-x-sm));vertical-align:middle;justify-content:center;align-items:center;line-height:1;display:inline-flex}.m_e615b15f{--card-padding:var(--mantine-spacing-md);padding:var(--card-padding);color:var(--mantine-color-text);display:flex;position:relative;overflow:hidden}.m_e615b15f:where([data-orientation=horizontal]){flex-direction:row}.m_e615b15f:where([data-orientation=vertical]){flex-direction:column}:where([data-mantine-color-scheme=light]) .m_e615b15f{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_e615b15f{background-color:var(--mantine-color-dark-6)}.m_599a2148{margin-inline:calc(var(--card-padding) * -1);display:block}:where([data-mantine-color-scheme=light]) .m_599a2148{--border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_599a2148{--border-color:var(--mantine-color-dark-4)}.m_599a2148:where([data-orientation=vertical]):first-child{margin-top:calc(var(--card-padding) * -1);border-top:none!important}.m_599a2148:where([data-orientation=vertical]):last-child{margin-bottom:calc(var(--card-padding) * -1);border-bottom:none!important}.m_599a2148:where([data-orientation=vertical])[data-inherit-padding]{padding-inline:var(--card-padding)}.m_599a2148:where([data-orientation=vertical])[data-with-border]{border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color)}.m_599a2148:where([data-orientation=vertical])+.m_599a2148:where([data-orientation=vertical]){border-top:none!important}.m_599a2148:where([data-orientation=horizontal]){margin-block:calc(var(--card-padding) * -1);margin-inline:0}.m_599a2148:where([data-orientation=horizontal]):first-child{margin-inline-start:calc(var(--card-padding) * -1);border-inline-start:none!important}.m_599a2148:where([data-orientation=horizontal]):last-child{margin-inline-end:calc(var(--card-padding) * -1);border-inline-end:none!important}.m_599a2148:where([data-orientation=horizontal])[data-inherit-padding]{padding-block:var(--card-padding)}.m_599a2148:where([data-orientation=horizontal])[data-with-border]{border-inline-start:1px solid var(--border-color);border-inline-end:1px solid var(--border-color)}.m_599a2148:where([data-orientation=horizontal])+.m_599a2148:where([data-orientation=horizontal]){border-inline-start:none!important}.m_9a782f2c{--cascader-column-width:calc(12.5rem * var(--mantine-scale));flex-direction:row;align-items:stretch;display:flex}.m_4c5a03a5{width:var(--cascader-column-width);min-width:var(--cascader-column-width);border-inline-end:calc(.0625rem * var(--mantine-scale)) solid var(--popover-border-color,var(--mantine-color-default-border));flex-direction:column;display:flex}.m_4c5a03a5:where([data-last]){border-inline-end-color:#0000}.m_7f3ac6d2{padding:var(--combobox-padding);flex:1}.m_6b93b90{padding-inline:calc(var(--combobox-padding) / 2);color:var(--mantine-color-dimmed);cursor:pointer;border-inline-end:calc(.0625rem * var(--mantine-scale)) solid var(--popover-border-color,var(--mantine-color-default-border));justify-content:center;align-self:stretch;align-items:center;display:flex}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_6b93b90:hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_6b93b90:hover{background-color:var(--mantine-color-dark-7)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_6b93b90:active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_6b93b90:active{background-color:var(--mantine-color-dark-7)}}.m_6b93b90>svg{width:.9em;height:.9em;transform:rotate(90deg)}.m_6b93b90:where([data-position=start]){border-start-start-radius:var(--popover-radius,var(--mantine-radius-default));border-end-start-radius:var(--popover-radius,var(--mantine-radius-default))}.m_6b93b90:where([data-position=end]){border-inline-end-color:#0000;border-start-end-radius:var(--popover-radius,var(--mantine-radius-default));border-end-end-radius:var(--popover-radius,var(--mantine-radius-default))}.m_6b93b90:where([data-position=end])>svg,:where([dir=rtl]) .m_6b93b90>svg{transform:rotate(-90deg)}:where([dir=rtl]) .m_6b93b90:where([data-position=end])>svg{transform:rotate(90deg)}.m_791f687a{align-items:center;gap:var(--mantine-spacing-xs);width:100%;padding:var(--combobox-option-padding);font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));border-radius:var(--combobox-option-radius,var(--mantine-radius-default));color:var(--mantine-color-text);cursor:pointer;display:flex}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_791f687a:hover:where(:not([data-disabled],[data-active])){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_791f687a:hover:where(:not([data-disabled],[data-active])){background-color:var(--mantine-color-dark-7)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_791f687a:active:where(:not([data-disabled],[data-active])){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_791f687a:active:where(:not([data-disabled],[data-active])){background-color:var(--mantine-color-dark-7)}}:where([data-mantine-color-scheme=light]) .m_791f687a:where([data-in-path]){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_791f687a:where([data-in-path]){background-color:var(--mantine-color-dark-6)}.m_791f687a:where([data-active]){background-color:var(--mantine-primary-color-filled);color:var(--mantine-color-white)}@media (hover:hover){.m_791f687a:where([data-active]):hover{background-color:var(--mantine-primary-color-filled-hover)}}@media (hover:none){.m_791f687a:where([data-active]):active{background-color:var(--mantine-primary-color-filled-hover)}}.m_791f687a:where([data-disabled]){color:var(--mantine-color-dimmed);cursor:not-allowed;opacity:.5}.m_452a61d{align-items:center;gap:var(--mantine-spacing-xs);width:100%;display:flex}.m_aecd629a{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.m_92054c13{width:.9em;min-width:.9em;height:.9em;color:var(--mantine-color-dimmed);justify-content:center;align-items:center;display:flex;transform:rotate(-90deg)}:where([data-active]) .m_92054c13{color:inherit}:where([dir=rtl]) .m_92054c13{transform:rotate(90deg)}.m_ae51c8ae{opacity:.4;width:.8em;min-width:.8em;height:.8em}:where([data-active]) .m_ae51c8ae,:where([data-combobox-selected]) .m_ae51c8ae{opacity:1}.m_97ff10a8{padding:var(--combobox-option-padding);color:var(--mantine-color-dimmed);font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));white-space:nowrap;justify-content:center;align-items:center;display:flex}.m_4451eb3a{justify-content:center;align-items:center;display:flex}.m_4451eb3a:where([data-inline]){display:inline-flex}.m_f59ffda3{--chip-size-xs:calc(1.4375rem * var(--mantine-scale));--chip-size-sm:calc(1.75rem * var(--mantine-scale));--chip-size-md:calc(2rem * var(--mantine-scale));--chip-size-lg:calc(2.25rem * var(--mantine-scale));--chip-size-xl:calc(2.5rem * var(--mantine-scale));--chip-icon-size-xs:calc(.5625rem * var(--mantine-scale));--chip-icon-size-sm:calc(.75rem * var(--mantine-scale));--chip-icon-size-md:calc(.875rem * var(--mantine-scale));--chip-icon-size-lg:calc(1rem * var(--mantine-scale));--chip-icon-size-xl:calc(1.125rem * var(--mantine-scale));--chip-padding-xs:calc(1rem * var(--mantine-scale));--chip-padding-sm:calc(1.25rem * var(--mantine-scale));--chip-padding-md:calc(1.5rem * var(--mantine-scale));--chip-padding-lg:calc(1.75rem * var(--mantine-scale));--chip-padding-xl:calc(2rem * var(--mantine-scale));--chip-checked-padding-xs:calc(.5125rem * var(--mantine-scale));--chip-checked-padding-sm:calc(.625rem * var(--mantine-scale));--chip-checked-padding-md:calc(.73125rem * var(--mantine-scale));--chip-checked-padding-lg:calc(.84375rem * var(--mantine-scale));--chip-checked-padding-xl:calc(.98125rem * var(--mantine-scale));--chip-spacing-xs:calc(.625rem * var(--mantine-scale));--chip-spacing-sm:calc(.75rem * var(--mantine-scale));--chip-spacing-md:calc(1rem * var(--mantine-scale));--chip-spacing-lg:calc(1.25rem * var(--mantine-scale));--chip-spacing-xl:calc(1.375rem * var(--mantine-scale));--chip-size:var(--chip-size-sm);--chip-icon-size:var(--chip-icon-size-sm);--chip-padding:var(--chip-padding-sm);--chip-spacing:var(--chip-spacing-sm);--chip-checked-padding:var(--chip-checked-padding-sm);--chip-bg:var(--mantine-primary-color-filled);--chip-hover:var(--mantine-primary-color-filled-hover);--chip-color:var(--mantine-color-white);--chip-bd:calc(.0625rem * var(--mantine-scale)) solid transparent}.m_be049a53{-webkit-user-select:none;user-select:none;border-radius:var(--chip-radius,1000rem);height:var(--chip-size);font-size:var(--chip-fz,var(--mantine-font-size-sm));line-height:calc(var(--chip-size) - calc(.125rem * var(--mantine-scale)));padding-inline:var(--chip-padding);cursor:pointer;white-space:nowrap;-webkit-tap-highlight-color:transparent;border:calc(.0625rem * var(--mantine-scale)) solid transparent;color:var(--mantine-color-text);text-box-trim:trim-both;text-box-edge:cap alphabetic;align-items:center;display:inline-flex}.m_be049a53:where([data-checked]){padding-inline:var(--chip-checked-padding)}.m_be049a53:where([data-disabled]){cursor:not-allowed;background-color:var(--mantine-color-disabled);color:var(--mantine-color-disabled-color)}:where([data-mantine-color-scheme=light]) .m_3904c1af:not([data-disabled]){background-color:var(--mantine-color-white);border:1px solid var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_3904c1af:not([data-disabled]){background-color:var(--mantine-color-dark-6);border:1px solid var(--mantine-color-dark-4)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_3904c1af:not([data-disabled]):hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_3904c1af:not([data-disabled]):hover{background-color:var(--mantine-color-dark-5)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_3904c1af:not([data-disabled]):active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_3904c1af:not([data-disabled]):active{background-color:var(--mantine-color-dark-5)}}.m_3904c1af:not([data-disabled]):where([data-checked]){--chip-icon-color:var(--chip-color);border:var(--chip-bd)}@media (hover:hover){.m_3904c1af:not([data-disabled]):where([data-checked]):hover{background-color:var(--chip-hover)}}@media (hover:none){.m_3904c1af:not([data-disabled]):where([data-checked]):active{background-color:var(--chip-hover)}}.m_fa109255:not([data-disabled]),.m_f7e165c3:not([data-disabled]){border:calc(.0625rem * var(--mantine-scale)) solid transparent;color:var(--mantine-color-text)}:where([data-mantine-color-scheme=light]) .m_fa109255:not([data-disabled]),:where([data-mantine-color-scheme=light]) .m_f7e165c3:not([data-disabled]){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_fa109255:not([data-disabled]),:where([data-mantine-color-scheme=dark]) .m_f7e165c3:not([data-disabled]){background-color:var(--mantine-color-dark-5)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_fa109255:not([data-disabled]):hover,:where([data-mantine-color-scheme=light]) .m_f7e165c3:not([data-disabled]):hover{background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_fa109255:not([data-disabled]):hover,:where([data-mantine-color-scheme=dark]) .m_f7e165c3:not([data-disabled]):hover{background-color:var(--mantine-color-dark-4)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_fa109255:not([data-disabled]):active,:where([data-mantine-color-scheme=light]) .m_f7e165c3:not([data-disabled]):active{background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_fa109255:not([data-disabled]):active,:where([data-mantine-color-scheme=dark]) .m_f7e165c3:not([data-disabled]):active{background-color:var(--mantine-color-dark-4)}}.m_fa109255:not([data-disabled]):where([data-checked]),.m_f7e165c3:not([data-disabled]):where([data-checked]){--chip-icon-color:var(--chip-color);color:var(--chip-color);background-color:var(--chip-bg)}@media (hover:hover){.m_fa109255:not([data-disabled]):where([data-checked]):hover,.m_f7e165c3:not([data-disabled]):where([data-checked]):hover{background-color:var(--chip-hover)}}@media (hover:none){.m_fa109255:not([data-disabled]):where([data-checked]):active,.m_f7e165c3:not([data-disabled]):where([data-checked]):active{background-color:var(--chip-hover)}}.m_9ac86df9{width:calc(var(--chip-icon-size) + (var(--chip-spacing) / 1.5));max-width:calc(var(--chip-icon-size) + (var(--chip-spacing) / 1.5));height:var(--chip-icon-size);align-items:center;display:flex;overflow:hidden}.m_d6d72580{width:var(--chip-icon-size);height:var(--chip-icon-size);color:var(--chip-icon-color,inherit);display:block}.m_bde07329{opacity:0;width:0;height:0;margin:0;padding:0}.m_bde07329:focus-visible+.m_be049a53{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_b183c0a2{font-family:var(--mantine-font-family-monospace);line-height:var(--mantine-line-height);padding:2px calc(var(--mantine-spacing-xs) / 2);border-radius:var(--mantine-radius-sm);font-size:var(--mantine-font-size-xs);margin:0;overflow:auto}:where([data-mantine-color-scheme=light]) .m_b183c0a2{background-color:var(--code-bg,var(--mantine-color-gray-0))}:where([data-mantine-color-scheme=dark]) .m_b183c0a2{background-color:var(--code-bg,var(--mantine-color-dark-6))}.m_b183c0a2[data-block]{padding:var(--mantine-spacing-xs)}.m_de3d2490{--cs-size:calc(1.75rem * var(--mantine-scale));--cs-radius:calc(62.5rem * var(--mantine-scale));-webkit-tap-highlight-color:transparent;appearance:none;width:var(--cs-size);height:var(--cs-size);min-width:var(--cs-size);min-height:var(--cs-size);border-radius:var(--cs-radius);color:inherit;border:none;line-height:1;text-decoration:none;display:block;position:relative}[data-mantine-color-scheme=light] .m_de3d2490{--alpha-overlay-color:var(--mantine-color-gray-3);--alpha-overlay-bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m_de3d2490{--alpha-overlay-color:var(--mantine-color-dark-4);--alpha-overlay-bg:var(--mantine-color-dark-7)}.m_862f3d1b{border-radius:var(--cs-radius);position:absolute;inset:0}.m_98ae7f22{border-radius:var(--cs-radius);z-index:1;box-shadow:#0000001a 0 0 0 calc(.0625rem * var(--mantine-scale)) inset, #00000026 0 0 calc(.25rem * var(--mantine-scale)) inset;position:absolute;inset:0}.m_95709ac0{border-radius:var(--cs-radius);background-size:calc(.5rem * var(--mantine-scale)) calc(.5rem * var(--mantine-scale));background-position:0 0, 0 calc(.25rem * var(--mantine-scale)), calc(.25rem * var(--mantine-scale)) calc(-.25rem * var(--mantine-scale)), calc(-.25rem * var(--mantine-scale)) 0;background-image:linear-gradient(45deg, var(--alpha-overlay-color) 25%, transparent 25%), linear-gradient(-45deg, var(--alpha-overlay-color) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--alpha-overlay-color) 75%), linear-gradient(-45deg, var(--alpha-overlay-bg) 75%, var(--alpha-overlay-color) 75%);position:absolute;inset:0}.m_93e74e3{border-radius:var(--cs-radius);z-index:2;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.m_fee9c77{--cp-width-xs:calc(11.25rem * var(--mantine-scale));--cp-width-sm:calc(12.5rem * var(--mantine-scale));--cp-width-md:calc(15rem * var(--mantine-scale));--cp-width-lg:calc(17.5rem * var(--mantine-scale));--cp-width-xl:calc(20rem * var(--mantine-scale));--cp-preview-size-xs:calc(1.625rem * var(--mantine-scale));--cp-preview-size-sm:calc(2.125rem * var(--mantine-scale));--cp-preview-size-md:calc(2.625rem * var(--mantine-scale));--cp-preview-size-lg:calc(3.125rem * var(--mantine-scale));--cp-preview-size-xl:calc(3.375rem * var(--mantine-scale));--cp-thumb-size-xs:calc(.5rem * var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem * var(--mantine-scale));--cp-thumb-size-md:calc(1rem * var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem * var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem * var(--mantine-scale));--cp-saturation-height-xs:calc(6.25rem * var(--mantine-scale));--cp-saturation-height-sm:calc(6.875rem * var(--mantine-scale));--cp-saturation-height-md:calc(7.5rem * var(--mantine-scale));--cp-saturation-height-lg:calc(8.75rem * var(--mantine-scale));--cp-saturation-height-xl:calc(10rem * var(--mantine-scale));--cp-preview-size:var(--cp-preview-size-sm);--cp-thumb-size:var(--cp-thumb-size-sm);--cp-saturation-height:var(--cp-saturation-height-sm);--cp-width:var(--cp-width-sm);--cp-body-spacing:var(--mantine-spacing-sm);width:var(--cp-width);padding:calc(.0625rem * var(--mantine-scale))}.m_fee9c77:where([data-full-width]){width:100%}.m_9dddfbac{width:var(--cp-preview-size);height:var(--cp-preview-size)}.m_bffecc3e{padding-top:calc(var(--cp-body-spacing) / 2);display:flex}.m_3283bb96{flex:1}.m_3283bb96:not(:only-child){margin-inline-end:var(--mantine-spacing-xs)}.m_40d572ba{border:2px solid var(--mantine-color-white);width:var(--cp-thumb-size);height:var(--cp-thumb-size);border-radius:var(--cp-thumb-size);left:calc(var(--thumb-x-offset) - var(--cp-thumb-size) / 2);top:calc(var(--thumb-y-offset) - var(--cp-thumb-size) / 2);position:absolute;overflow:hidden;box-shadow:0 0 1px #0009}.m_d8ee6fd8{margin:calc(.125rem * var(--mantine-scale));cursor:pointer;padding-bottom:calc(var(--cp-swatch-size) - calc(.25rem * var(--mantine-scale)));flex:0 0 calc(var(--cp-swatch-size) - calc(.25rem * var(--mantine-scale)));height:unset!important;width:unset!important;min-width:0!important;min-height:0!important}.m_5711e686{margin-top:calc(.3125rem * var(--mantine-scale));margin-inline:calc(-.125rem * var(--mantine-scale));flex-wrap:wrap;display:flex}.m_5711e686:only-child{margin-top:0}.m_202a296e{--cp-thumb-size-xs:calc(.5rem * var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem * var(--mantine-scale));--cp-thumb-size-md:calc(1rem * var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem * var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem * var(--mantine-scale));-webkit-tap-highlight-color:transparent;height:var(--cp-saturation-height);border-radius:var(--mantine-radius-sm);margin:calc(var(--cp-thumb-size) / 2);position:relative}.m_202a296e:where([data-focus-ring=auto]):focus:focus-visible .m_40d572ba,.m_202a296e:where([data-focus-ring=always]):focus .m_40d572ba{outline:2px solid var(--mantine-color-blue-filled)}.m_11b3db02{border-radius:var(--mantine-radius-sm);inset:calc(var(--cp-thumb-size) * -1 / 2 - calc(.0625rem * var(--mantine-scale)));position:absolute}.m_d856d47d{--cp-thumb-size-xs:calc(.5rem * var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem * var(--mantine-scale));--cp-thumb-size-md:calc(1rem * var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem * var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem * var(--mantine-scale));--cp-thumb-size:var(--cp-thumb-size,calc(.75rem * var(--mantine-scale)));height:calc(var(--cp-thumb-size) + calc(.125rem * var(--mantine-scale)));margin-inline:calc(var(--cp-thumb-size) / 2);outline:none;position:relative}.m_d856d47d+.m_d856d47d{margin-top:calc(.375rem * var(--mantine-scale))}.m_d856d47d:where([data-focus-ring=auto]):focus:focus-visible .m_40d572ba,.m_d856d47d:where([data-focus-ring=always]):focus .m_40d572ba{outline:2px solid var(--mantine-color-blue-filled)}:where([data-mantine-color-scheme=light]) .m_d856d47d{--slider-checkers:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_d856d47d{--slider-checkers:var(--mantine-color-dark-4)}.m_8f327113{top:0;bottom:0;inset-inline:calc(var(--cp-thumb-size) * -1 / 2 - calc(.0625rem * var(--mantine-scale)));border-radius:10000rem;position:absolute}.m_b077c2bc{--ci-eye-dropper-icon-size-xs:calc(.875rem * var(--mantine-scale));--ci-eye-dropper-icon-size-sm:calc(1rem * var(--mantine-scale));--ci-eye-dropper-icon-size-md:calc(1.125rem * var(--mantine-scale));--ci-eye-dropper-icon-size-lg:calc(1.25rem * var(--mantine-scale));--ci-eye-dropper-icon-size-xl:calc(1.375rem * var(--mantine-scale));--ci-eye-dropper-icon-size:var(--ci-eye-dropper-icon-size-sm)}.m_66a028b5{--ci-button-size-xs:calc(1.375rem * var(--mantine-scale));--ci-button-size-sm:calc(1.625rem * var(--mantine-scale));--ci-button-size-md:calc(1.75rem * var(--mantine-scale));--ci-button-size-lg:calc(2rem * var(--mantine-scale));--ci-button-size-xl:calc(2.5rem * var(--mantine-scale));--ci-button-size:var(--ci-button-size-sm);width:var(--ci-button-size);height:var(--ci-button-size);min-width:var(--ci-button-size);min-height:var(--ci-button-size)}.m_c5ccdcab{--ci-preview-size-xs:calc(1rem * var(--mantine-scale));--ci-preview-size-sm:calc(1.125rem * var(--mantine-scale));--ci-preview-size-md:calc(1.375rem * var(--mantine-scale));--ci-preview-size-lg:calc(1.75rem * var(--mantine-scale));--ci-preview-size-xl:calc(2.25rem * var(--mantine-scale));--ci-preview-size:var(--ci-preview-size-sm)}.m_5ece2cd7{padding:calc(.5rem * var(--mantine-scale))}.m_7485cace{--container-size-xs:calc(33.75rem * var(--mantine-scale));--container-size-sm:calc(45rem * var(--mantine-scale));--container-size-md:calc(60rem * var(--mantine-scale));--container-size-lg:calc(71.25rem * var(--mantine-scale));--container-size-xl:calc(82.5rem * var(--mantine-scale));--container-size:var(--container-size-md)}.m_7485cace:where([data-strategy=block]){max-width:var(--container-size);padding-inline:var(--mantine-spacing-md);margin-inline:auto}.m_7485cace:where([data-strategy=block]):where([data-fluid]){max-width:100%}.m_7485cace:where([data-strategy=grid]){grid-template-columns:1fr min(100%, var(--container-size)) 1fr;margin-inline:auto;display:grid}.m_7485cace:where([data-strategy=grid])>*{grid-column:2}.m_7485cace:where([data-strategy=grid])>[data-breakout]{grid-column:1/-1}.m_7485cace:where([data-strategy=grid])>[data-breakout]>[data-container]{max-width:var(--container-size);margin-inline:auto}.m_f84d0407{--data-list-fz:var(--mantine-font-size-sm);--data-list-lh:var(--mantine-line-height-sm);--data-list-gap:var(--mantine-spacing-sm);--data-list-label-width:calc(7.5rem * var(--mantine-scale));gap:var(--data-list-gap);font-size:var(--data-list-fz);line-height:var(--data-list-lh);flex-direction:column;margin:0;padding:0;display:flex}.m_f84d0407:where([data-with-divider]){gap:0}.m_f848fe38{align-items:baseline;gap:var(--mantine-spacing-xs);flex-direction:row;display:flex}.m_f84d0407:where([data-orientation=vertical])>.m_f848fe38{flex-direction:column;gap:0}.m_c791b39c{color:var(--mantine-color-dimmed);font-size:var(--data-list-fz);line-height:var(--data-list-lh);min-width:var(--data-list-label-width);margin:0}.m_f84d0407:where([data-orientation=vertical]) .m_c791b39c{min-width:100%}.m_c81ec619{font-size:var(--data-list-fz);line-height:var(--data-list-lh);margin:0}.m_f84d0407:where([data-with-divider])>.m_f848fe38:where(:not(:first-of-type)){border-top:calc(.0625rem * var(--mantine-scale)) solid var(--mantine-color-default-border);padding-top:var(--data-list-gap);margin-top:var(--data-list-gap)}.m_e2125a27{--dialog-size-xs:calc(10rem * var(--mantine-scale));--dialog-size-sm:calc(12.5rem * var(--mantine-scale));--dialog-size-md:calc(21.25rem * var(--mantine-scale));--dialog-size-lg:calc(25rem * var(--mantine-scale));--dialog-size-xl:calc(31.25rem * var(--mantine-scale));--dialog-size:var(--dialog-size-md);width:var(--dialog-size);max-width:calc(100vw - var(--mantine-spacing-xl) * 2);min-height:calc(3.125rem * var(--mantine-scale));position:relative}.m_5abab665{top:calc(var(--mantine-spacing-md) / 2);position:absolute;inset-inline-end:calc(var(--mantine-spacing-md) / 2)}.m_3eebeb36{--divider-size-xs:calc(.0625rem * var(--mantine-scale));--divider-size-sm:calc(.125rem * var(--mantine-scale));--divider-size-md:calc(.1875rem * var(--mantine-scale));--divider-size-lg:calc(.25rem * var(--mantine-scale));--divider-size-xl:calc(.3125rem * var(--mantine-scale));--divider-size:var(--divider-size-xs)}:where([data-mantine-color-scheme=light]) .m_3eebeb36{--divider-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_3eebeb36{--divider-color:var(--mantine-color-dark-4)}.m_3eebeb36:where([data-orientation=horizontal]){border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color)}.m_3eebeb36:where([data-orientation=vertical]){border-inline-start:var(--divider-size) var(--divider-border-style,solid) var(--divider-color);align-self:stretch;height:auto}.m_3eebeb36:where([data-with-label]){border:0}.m_9e365f20{font-size:var(--mantine-font-size-xs);color:var(--mantine-color-dimmed);white-space:nowrap;align-items:center;display:flex}.m_9e365f20:where([data-position=left]):before,.m_9e365f20:where([data-position=right]):after{display:none}.m_9e365f20:before{content:"";height:calc(.0625rem * var(--mantine-scale));border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color);flex:1;margin-inline-end:var(--mantine-spacing-xs)}.m_9e365f20:after{content:"";height:calc(.0625rem * var(--mantine-scale));border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color);flex:1;margin-inline-start:var(--mantine-spacing-xs)}.m_f11b401e{--drawer-size-xs:calc(20rem * var(--mantine-scale));--drawer-size-sm:calc(23.75rem * var(--mantine-scale));--drawer-size-md:calc(27.5rem * var(--mantine-scale));--drawer-size-lg:calc(38.75rem * var(--mantine-scale));--drawer-size-xl:calc(48.75rem * var(--mantine-scale));--drawer-size:var(--drawer-size-md);--drawer-offset:0rem}.m_5a7c2c9{z-index:1000}.m_b8a05bbd{flex:var(--drawer-flex,0 0 var(--drawer-size));height:var(--drawer-height,calc(100% - var(--drawer-offset) * 2));margin:var(--drawer-offset);max-width:calc(100% - var(--drawer-offset) * 2);max-height:calc(100% - var(--drawer-offset) * 2);overflow-y:auto}.m_b8a05bbd[data-hidden]{pointer-events:none;opacity:0!important}.m_31cd769a{justify-content:var(--drawer-justify,flex-start);align-items:var(--drawer-align,flex-start);display:flex}.m_7ffcadab{--empty-state-indicator-size-xs:calc(2rem * var(--mantine-scale));--empty-state-indicator-size-sm:calc(2.5rem * var(--mantine-scale));--empty-state-indicator-size-md:calc(3rem * var(--mantine-scale));--empty-state-indicator-size-lg:calc(3.75rem * var(--mantine-scale));--empty-state-indicator-size-xl:calc(4.5rem * var(--mantine-scale));--empty-state-gap-xs:calc(.375rem * var(--mantine-scale));--empty-state-gap-sm:calc(.5rem * var(--mantine-scale));--empty-state-gap-md:calc(.625rem * var(--mantine-scale));--empty-state-gap-lg:calc(.75rem * var(--mantine-scale));--empty-state-gap-xl:calc(1rem * var(--mantine-scale));--empty-state-title-fz-xs:var(--mantine-font-size-sm);--empty-state-title-fz-sm:var(--mantine-font-size-md);--empty-state-title-fz-md:var(--mantine-font-size-lg);--empty-state-title-fz-lg:var(--mantine-font-size-xl);--empty-state-title-fz-xl:calc(var(--mantine-font-size-xl) * 1.2);--empty-state-description-fz-xs:var(--mantine-font-size-xs);--empty-state-description-fz-sm:var(--mantine-font-size-sm);--empty-state-description-fz-md:var(--mantine-font-size-sm);--empty-state-description-fz-lg:var(--mantine-font-size-md);--empty-state-description-fz-xl:var(--mantine-font-size-lg);gap:var(--empty-state-gap,var(--empty-state-gap-md));display:flex}.m_7ffcadab[data-align=center]{flex-direction:column;align-items:center}.m_7ffcadab[data-align=left]{flex-direction:row;align-items:flex-start}.m_7ffcadab[data-align=right]{flex-direction:row-reverse;align-items:flex-start}.m_7ff5666b{gap:var(--empty-state-gap,var(--empty-state-gap-md));flex-direction:column;min-width:0;display:flex}[data-align=center]>.m_7ff5666b{text-align:center;align-items:center}[data-align=left]>.m_7ff5666b{text-align:left;align-items:flex-start}[data-align=right]>.m_7ff5666b{text-align:right;align-items:flex-end}.m_866226e6{color:var(--empty-state-indicator-color,var(--mantine-color-dimmed));font-size:var(--empty-state-indicator-size,var(--empty-state-indicator-size-md));flex-shrink:0;justify-content:center;align-items:center;line-height:1;display:flex}.m_866226e6>svg{width:1em;height:1em}[data-mantine-color-scheme=light] .m_866226e6[data-with-background]{--empty-state-indicator-default-bg:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .m_866226e6[data-with-background]{--empty-state-indicator-default-bg:var(--mantine-color-dark-6)}.m_866226e6[data-with-background]{border-radius:calc(62.5rem * var(--mantine-scale));background-color:var(--empty-state-indicator-bg,var(--empty-state-indicator-default-bg));width:2em;height:2em}.m_7fb28eaf{font-size:var(--empty-state-title-fz,var(--empty-state-title-fz-md));color:var(--mantine-color-bright);text-wrap:balance;margin:0;font-weight:600;line-height:1.3}.m_5f111313{font-size:var(--empty-state-description-fz,var(--empty-state-description-fz-md));color:var(--mantine-color-dimmed);text-wrap:pretty;max-width:32rem;margin:0;line-height:1.55}.m_65f4fb94{align-items:center;gap:var(--mantine-spacing-sm);flex-wrap:wrap;display:flex}.m_e9408a47{padding:var(--mantine-spacing-lg);padding-top:var(--mantine-spacing-xs);border-radius:var(--fieldset-radius,var(--mantine-radius-default));min-inline-size:auto}.m_84c9523a{border:calc(.0625rem * var(--mantine-scale)) solid}:where([data-mantine-color-scheme=light]) .m_84c9523a{border-color:var(--mantine-color-gray-3);background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_84c9523a{border-color:var(--mantine-color-dark-4);background-color:var(--mantine-color-dark-7)}.m_ef274e49{border:calc(.0625rem * var(--mantine-scale)) solid}:where([data-mantine-color-scheme=light]) .m_ef274e49{border-color:var(--mantine-color-gray-3);background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_ef274e49{border-color:var(--mantine-color-dark-4);background-color:var(--mantine-color-dark-6)}.m_eda993d3{border:0;border-radius:0;padding:0}.m_90794832{font-size:var(--mantine-font-size-sm)}.m_74ca27fe{margin-bottom:var(--mantine-spacing-sm);padding:0}.m_df020499{z-index:var(--floating-window-z-index);width:var(--floating-window-width,auto);height:var(--floating-window-height,auto);position:fixed}.m_8478a6da{container:mantine-grid/inline-size}.m_410352e9{--grid-overflow:visible;--grid-column-gap:var(--grid-gap);--grid-row-gap:var(--grid-gap);overflow:var(--grid-overflow)}.m_dee7bd2f{justify-content:var(--grid-justify);align-items:var(--grid-align);gap:var(--grid-row-gap) var(--grid-column-gap);flex-wrap:wrap;display:flex}.m_96bdd299{--col-flex-grow:0;--col-offset:0rem;flex-shrink:0;order:var(--col-order);flex-basis:var(--col-flex-basis);width:var(--col-width);max-width:var(--col-max-width);flex-grow:var(--col-flex-grow);align-self:var(--col-align-self);margin-inline-start:var(--col-offset)}.m_bcb3f3c2{color:var(--mantine-color-black)}:where([data-mantine-color-scheme=light]) .m_bcb3f3c2{background-color:var(--mark-bg-light)}:where([data-mantine-color-scheme=dark]) .m_bcb3f3c2{background-color:var(--mark-bg-dark)}.m_9e117634{object-fit:var(--image-object-fit,cover);border-radius:var(--image-radius,0);width:100%;display:block}@keyframes m_885901b1{0%{opacity:.6;transform:scale(0)}to{opacity:0;transform:scale(2.8)}}.m_e5262200{--indicator-size:calc(.625rem * var(--mantine-scale));--indicator-color:var(--mantine-primary-color-filled);display:block;position:relative}.m_e5262200:where([data-inline]){display:inline-block}.m_760d1fb1{top:var(--indicator-top);left:var(--indicator-left);right:var(--indicator-right);bottom:var(--indicator-bottom);transform:translate(var(--indicator-translate-x), var(--indicator-translate-y));min-width:var(--indicator-size);height:var(--indicator-size);border-radius:var(--indicator-radius,1000rem);z-index:var(--indicator-z-index,200);font-size:var(--mantine-font-size-xs);background-color:var(--indicator-color);color:var(--indicator-text-color,var(--mantine-color-white));white-space:nowrap;justify-content:center;align-items:center;display:flex;position:absolute}.m_760d1fb1:before{content:"";background-color:var(--indicator-color);border-radius:var(--indicator-radius,1000rem);z-index:-1;position:absolute;inset:0}.m_760d1fb1:where([data-with-label]){padding-inline:calc(var(--mantine-spacing-xs) / 2)}.m_760d1fb1:where([data-with-border]){border:2px solid var(--mantine-color-body)}.m_760d1fb1[data-processing]:before{animation:1s linear infinite m_885901b1}.m_dc6f14e2{--kbd-fz-xs:calc(.625rem * var(--mantine-scale));--kbd-fz-sm:calc(.75rem * var(--mantine-scale));--kbd-fz-md:calc(.875rem * var(--mantine-scale));--kbd-fz-lg:calc(1rem * var(--mantine-scale));--kbd-fz-xl:calc(1.25rem * var(--mantine-scale));--kbd-fz:var(--kbd-fz-sm);font-family:var(--mantine-font-family-monospace);line-height:var(--mantine-line-height);font-weight:var(--mantine-font-weight-bold);font-size:var(--kbd-fz);border-radius:var(--mantine-radius-sm);border:calc(.0625rem * var(--mantine-scale)) solid;border-bottom-width:calc(.1875rem * var(--mantine-scale));text-align:center;unicode-bidi:embed;padding:.12em .45em}:where([data-mantine-color-scheme=light]) .m_dc6f14e2{border-color:var(--mantine-color-gray-3);color:var(--mantine-color-gray-7);background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_dc6f14e2{border-color:var(--mantine-color-dark-4);color:var(--mantine-color-dark-0);background-color:var(--mantine-color-dark-6)}.m_abbac491{--list-fz:var(--mantine-font-size-md);--list-lh:var(--mantine-line-height-md);--list-marker-gap:var(--mantine-spacing-lg);font-size:var(--list-fz);line-height:var(--list-lh);margin:0;padding:0;padding-inline-start:var(--list-marker-gap);list-style-position:outside}.m_abbac491[data-type=none]{--list-marker-gap:0}.m_abbac491:where([data-with-padding]){padding-inline-start:calc(var(--list-marker-gap) + var(--mantine-spacing-md))}.m_abb6bec2{white-space:normal;line-height:var(--list-lh)}.m_abb6bec2:where([data-with-icon]){list-style:none}.m_abb6bec2:where([data-with-icon]) .m_75cd9f71{--li-direction:row;--li-align:center}.m_abb6bec2:where(:not(:first-of-type)){margin-top:var(--list-spacing,0)}.m_abb6bec2:where([data-centered]){line-height:1}.m_75cd9f71{flex-direction:var(--li-direction,column);align-items:var(--li-align,flex-start);white-space:normal;display:inline-flex}.m_60f83e5b{vertical-align:middle;margin-inline-end:var(--mantine-spacing-sm);display:inline-block}.m_6e45937b{z-index:var(--lo-z-index);justify-content:center;align-items:center;display:flex;position:absolute;inset:0;overflow:hidden}.m_e8eb006c{z-index:calc(var(--lo-z-index) + 1);position:relative}.m_df587f17{z-index:var(--lo-z-index)}@keyframes m_55dc625a{0%{transform:translate(0)}to{transform:translateX(calc(-100% / var(--marquee-repeat,4) - var(--marquee-gap,var(--mantine-spacing-md)) / var(--marquee-repeat,4)))}}@keyframes m_cdef532c{0%{transform:translateY(0)}to{transform:translateY(calc(-100% / var(--marquee-repeat,4) - var(--marquee-gap,var(--mantine-spacing-md)) / var(--marquee-repeat,4)))}}.m_7dc7d3cd{--_fade-color:var(--marquee-fade-color,var(--mantine-color-body));--_fade-size:var(--marquee-fade-size,5%);max-width:100%;max-height:100%;display:flex;position:relative;overflow:hidden}.m_7dc7d3cd:where([data-orientation=horizontal]){flex-direction:row}.m_7dc7d3cd:where([data-orientation=vertical]){flex-direction:column}.m_7dc7d3cd[data-fade-edges]:before,.m_7dc7d3cd[data-fade-edges]:after{content:"";z-index:1;pointer-events:none;position:absolute}.m_7dc7d3cd[data-orientation=horizontal][data-fade-edges]:before,.m_7dc7d3cd[data-orientation=horizontal][data-fade-edges]:after{width:var(--_fade-size);top:0;bottom:0}.m_7dc7d3cd[data-orientation=horizontal][data-fade-edges]:before{background:linear-gradient(to right, var(--_fade-color), transparent);left:0}.m_7dc7d3cd[data-orientation=horizontal][data-fade-edges]:after{background:linear-gradient(to left, var(--_fade-color), transparent);right:0}.m_7dc7d3cd[data-orientation=vertical][data-fade-edges]:before,.m_7dc7d3cd[data-orientation=vertical][data-fade-edges]:after{height:var(--_fade-size);left:0;right:0}.m_7dc7d3cd[data-orientation=vertical][data-fade-edges]:before{background:linear-gradient(to bottom, var(--_fade-color), transparent);top:0}.m_7dc7d3cd[data-orientation=vertical][data-fade-edges]:after{background:linear-gradient(to top, var(--_fade-color), transparent);bottom:0}.m_1f9675ae{gap:var(--marquee-gap,var(--mantine-spacing-md));animation-duration:var(--marquee-duration,100s);animation-timing-function:linear;animation-iteration-count:infinite;display:flex}.m_7dc7d3cd[data-orientation=horizontal]>.m_1f9675ae{flex-direction:row;animation-name:m_55dc625a}.m_7dc7d3cd[data-orientation=vertical]>.m_1f9675ae{flex-direction:column;animation-name:m_cdef532c}.m_7dc7d3cd[data-reverse]>.m_1f9675ae{animation-direction:reverse}.m_7dc7d3cd[data-pause-on-hover]:hover>.m_1f9675ae{animation-play-state:paused}.m_3a9900f4{gap:var(--marquee-gap,var(--mantine-spacing-md));flex-shrink:0;display:flex}.m_7dc7d3cd[data-orientation=horizontal] .m_3a9900f4{flex-direction:row}.m_7dc7d3cd[data-orientation=vertical] .m_3a9900f4{flex-direction:column}.m_dc9b7c9f{padding:calc(.25rem * var(--mantine-scale))}.m_9bfac126{color:var(--mantine-color-dimmed);font-weight:var(--mantine-font-weight-medium);font-size:var(--mantine-font-size-xs);padding:calc(var(--mantine-spacing-xs) / 2) var(--mantine-spacing-sm);cursor:default}.m_efdf90cb{margin-top:calc(.25rem * var(--mantine-scale));margin-bottom:calc(.25rem * var(--mantine-scale));border-top:calc(.0625rem * var(--mantine-scale)) solid}:where([data-mantine-color-scheme=light]) .m_efdf90cb{border-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_efdf90cb{border-color:var(--mantine-color-dark-4)}.m_99ac2aa1{font-size:var(--mantine-font-size-sm);width:100%;padding:calc(var(--mantine-spacing-xs) / 1.5) var(--mantine-spacing-sm);border-radius:var(--popover-radius,var(--mantine-radius-default));color:var(--menu-item-color,var(--mantine-color-text));-webkit-user-select:none;user-select:none;align-items:center;display:flex}.m_99ac2aa1:where([data-disabled],:disabled){color:var(--mantine-color-disabled-color);opacity:.6;cursor:not-allowed}:where([data-mantine-color-scheme=light]) .m_99ac2aa1:where(:hover,:focus,[data-menu-active]):where(:not(:disabled,[data-disabled])){background-color:var(--menu-item-hover,var(--mantine-color-gray-1))}:where([data-mantine-color-scheme=dark]) .m_99ac2aa1:where(:hover,:focus,[data-menu-active]):where(:not(:disabled,[data-disabled])){background-color:var(--menu-item-hover,var(--mantine-color-dark-4))}.m_99ac2aa1:where([data-sub-menu-item]){padding-inline-end:calc(.3125rem * var(--mantine-scale))}.m_ef8769b6{--menu-search-padding:var(--popover-padding,4px);margin-inline:calc(var(--menu-search-padding) * -1);margin-top:calc(var(--menu-search-padding) * -1);width:calc(100% + var(--menu-search-padding) * 2);border-top-width:0;margin-bottom:var(--menu-search-padding);border-inline-width:0;border-end-end-radius:0;border-end-start-radius:0}:where([data-mantine-color-scheme=light]) .m_ef8769b6,:where([data-mantine-color-scheme=light]) .m_ef8769b6:focus{border-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_ef8769b6,:where([data-mantine-color-scheme=dark]) .m_ef8769b6:focus{border-color:var(--mantine-color-dark-4)}:where([data-mantine-color-scheme=light]) .m_ef8769b6{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_ef8769b6{background-color:var(--mantine-color-dark-7)}.m_5476e0d3{flex:1}.m_8395186e{width:calc(.75rem * var(--mantine-scale));height:calc(.75rem * var(--mantine-scale));flex-shrink:0;justify-content:center;align-items:center;margin-inline-end:calc(.5rem * var(--mantine-scale));display:inline-flex}.m_8b75e504{justify-content:center;align-items:center;display:flex}.m_8b75e504:where([data-position=left]){margin-inline-end:var(--mantine-spacing-xs)}.m_8b75e504:where([data-position=right]){margin-inline-start:var(--mantine-spacing-xs)}.m_b85b0bed{transform:rotate(-90deg)}:where([dir=rtl]) .m_b85b0bed{transform:rotate(90deg)}.m_de2654db{align-items:center;display:flex}.m_f08a2b4a{font-size:var(--mantine-font-size-sm);padding:calc(var(--mantine-spacing-xs) / 1.5) var(--mantine-spacing-sm);border-radius:var(--mantine-radius-default);color:var(--mantine-color-text);-webkit-user-select:none;user-select:none;cursor:pointer;background-color:#0000;line-height:1}.m_f08a2b4a:where([data-disabled],:disabled){color:var(--mantine-color-disabled-color);opacity:.6;cursor:not-allowed}:where([data-mantine-color-scheme=light]) .m_f08a2b4a:where(:hover,:focus-visible,[data-expanded]):where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_f08a2b4a:where(:hover,:focus-visible,[data-expanded]):where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-dark-5)}.m_9df02822{--modal-size-xs:calc(20rem * var(--mantine-scale));--modal-size-sm:calc(23.75rem * var(--mantine-scale));--modal-size-md:calc(27.5rem * var(--mantine-scale));--modal-size-lg:calc(38.75rem * var(--mantine-scale));--modal-size-xl:calc(48.75rem * var(--mantine-scale));--modal-size:var(--modal-size-md);--modal-y-offset:5dvh;--modal-x-offset:5vw}.m_9df02822[data-full-screen]{--modal-border-radius:0!important}.m_9df02822[data-full-screen] .m_54c44539{--modal-content-flex:0 0 100%;--modal-content-max-height:auto;--modal-content-height:100dvh}.m_9df02822[data-full-screen] .m_1f958f16{--modal-inner-y-offset:0;--modal-inner-x-offset:0}.m_9df02822[data-centered] .m_1f958f16{--modal-inner-align:center}.m_d0e2b9cd{border-start-start-radius:var(--modal-radius,var(--mantine-radius-default));border-start-end-radius:var(--modal-radius,var(--mantine-radius-default))}.m_54c44539{flex:var(--modal-content-flex,0 0 var(--modal-size));max-width:100%;max-height:var(--modal-content-max-height,calc(100dvh - var(--modal-y-offset) * 2));height:var(--modal-content-height,auto);overflow-y:auto}.m_54c44539[data-full-screen]{border-radius:0}.m_54c44539[data-hidden]{pointer-events:none;opacity:0!important}.m_1f958f16{justify-content:center;align-items:var(--modal-inner-align,flex-start);padding-top:var(--modal-inner-y-offset,var(--modal-y-offset));padding-bottom:var(--modal-inner-y-offset,var(--modal-y-offset));padding-inline:var(--modal-inner-x-offset,var(--modal-x-offset));display:flex}.m_7cda1cd6{--pill-fz-xs:calc(.625rem * var(--mantine-scale));--pill-fz-sm:calc(.75rem * var(--mantine-scale));--pill-fz-md:calc(.875rem * var(--mantine-scale));--pill-fz-lg:calc(1rem * var(--mantine-scale));--pill-fz-xl:calc(1.125rem * var(--mantine-scale));--pill-height-xs:calc(1.125rem * var(--mantine-scale));--pill-height-sm:calc(1.375rem * var(--mantine-scale));--pill-height-md:calc(1.5625rem * var(--mantine-scale));--pill-height-lg:calc(1.75rem * var(--mantine-scale));--pill-height-xl:calc(2rem * var(--mantine-scale));--pill-fz:var(--pill-fz-sm);--pill-height:var(--pill-height-sm);font-size:var(--pill-fz);height:var(--pill-height);border-radius:var(--pill-radius,1000rem);white-space:nowrap;-webkit-user-select:none;user-select:none;flex:0;align-items:center;max-width:100%;padding-inline:.8em;line-height:1;display:inline-flex;position:relative}:where([data-mantine-color-scheme=dark]) .m_7cda1cd6{background-color:var(--mantine-color-dark-7);color:var(--mantine-color-dark-0)}:where([data-mantine-color-scheme=light]) .m_7cda1cd6{color:var(--mantine-color-black)}.m_7cda1cd6:where([data-with-remove]:not(:has(button:disabled))){padding-inline-end:0}.m_7cda1cd6:where([data-disabled],:has(button:disabled)){cursor:not-allowed}.m_7cda1cd6:where([draggable=true]){cursor:grab}.m_7cda1cd6:where([draggable=true]):focus-visible{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_7cda1cd6:where([data-dragging]){opacity:.4;cursor:grabbing}.m_7cda1cd6:where([data-drag-over=before]):before,.m_7cda1cd6:where([data-drag-over=after]):after{content:"";width:calc(.125rem * var(--mantine-scale));background-color:var(--mantine-primary-color-filled);pointer-events:none;z-index:1;position:absolute;top:0;bottom:0}.m_7cda1cd6:where([data-drag-over=before]):before{inset-inline-start:calc(-.25rem * var(--mantine-scale))}.m_7cda1cd6:where([data-drag-over=after]):after{inset-inline-end:calc(-.25rem * var(--mantine-scale))}:where([data-mantine-color-scheme=light]) .m_44da308b{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=light]) .m_44da308b:where([data-disabled],:has(button:disabled)){background-color:var(--mantine-color-disabled)}:where([data-mantine-color-scheme=light]) .m_e3a01f8{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=light]) .m_e3a01f8:where([data-disabled],:has(button:disabled)){background-color:var(--mantine-color-disabled)}.m_1e0e6180{cursor:inherit;height:100%;line-height:var(--pill-height);text-overflow:ellipsis;display:block;overflow:hidden}.m_ae386778{color:inherit;font-size:inherit;height:100%;min-height:unset;min-width:2em;width:unset;border-radius:0;border-start-end-radius:var(--pill-radius,50%);border-end-end-radius:var(--pill-radius,50%);flex:0;padding-inline:.1em .3em}.m_7cda1cd6[data-disabled]>.m_ae386778,.m_ae386778:disabled{cursor:not-allowed;background-color:#0000;width:.8em;min-width:.8em;padding:0;display:none}.m_7cda1cd6[data-disabled]>.m_ae386778>svg,.m_ae386778:disabled>svg{display:none}.m_ae386778>svg{pointer-events:none}.m_1dcfd90b{--pg-gap-xs:calc(.375rem * var(--mantine-scale));--pg-gap-sm:calc(.5rem * var(--mantine-scale));--pg-gap-md:calc(.625rem * var(--mantine-scale));--pg-gap-lg:calc(.75rem * var(--mantine-scale));--pg-gap-xl:calc(.75rem * var(--mantine-scale));--pg-gap:var(--pg-gap-sm);align-items:center;gap:var(--pg-gap);flex-wrap:wrap;display:flex}.m_45c4369d{appearance:none;min-width:calc(6.25rem * var(--mantine-scale));font-size:inherit;height:1.6em;color:inherit;background-color:#0000;border:0;flex:1;padding:0}.m_45c4369d::placeholder{color:var(--input-placeholder-color);opacity:1}.m_45c4369d:where([data-type=hidden],[data-type=auto]){height:calc(.0625rem * var(--mantine-scale));width:calc(.0625rem * var(--mantine-scale));pointer-events:none;opacity:0;position:absolute;top:0;left:0}.m_45c4369d:focus{outline:none}.m_45c4369d:where([data-type=auto]:focus){visibility:visible;opacity:1;height:1.6em;position:static}.m_45c4369d:where([data-pointer]:not([data-disabled],:disabled)){cursor:pointer}.m_45c4369d:where([data-disabled],:disabled){cursor:not-allowed}.m_f0824112{--nl-bg:var(--mantine-primary-color-light);--nl-hover:var(--mantine-primary-color-light-hover);--nl-color:var(--mantine-primary-color-light-color);width:100%;padding:8px var(--mantine-spacing-sm);-webkit-user-select:none;user-select:none;align-items:center;display:flex}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_f0824112:hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_f0824112:hover{background-color:var(--mantine-color-dark-6)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_f0824112:active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_f0824112:active{background-color:var(--mantine-color-dark-6)}}.m_f0824112:where([data-disabled]){opacity:.4;pointer-events:none}.m_f0824112:where([data-active],[aria-current=page]){background-color:var(--nl-bg);color:var(--nl-color)}@media (hover:hover){.m_f0824112:where([data-active],[aria-current=page]):hover{background-color:var(--nl-hover)}}@media (hover:none){.m_f0824112:where([data-active],[aria-current=page]):active{background-color:var(--nl-hover)}}.m_f0824112:where([data-active],[aria-current=page]) .m_57492dcc{--description-opacity:.9;--description-color:var(--nl-color)}.m_690090b5{justify-content:center;align-items:center;transition:transform .15s;display:flex}.m_690090b5>svg{display:block}.m_690090b5:where([data-position=left]){margin-inline-end:var(--mantine-spacing-sm)}.m_690090b5:where([data-position=right]){margin-inline-start:var(--mantine-spacing-sm)}.m_690090b5:where([data-rotate]){transform:rotate(90deg)}.m_1f6ac4c4{font-size:var(--mantine-font-size-sm)}.m_f07af9d2{text-overflow:ellipsis;flex:1;overflow:hidden}.m_f07af9d2:where([data-no-wrap]){white-space:nowrap}.m_57492dcc{font-size:var(--mantine-font-size-xs);opacity:var(--description-opacity,1);color:var(--description-color,var(--mantine-color-dimmed));text-overflow:ellipsis;display:block;overflow:hidden}:where([data-no-wrap]) .m_57492dcc{white-space:nowrap}.m_e17b862f{padding-inline-start:var(--nl-offset,var(--mantine-spacing-lg))}.m_1fd8a00b{transform:rotate(-90deg)}.m_a513464{--notification-radius:var(--mantine-radius-default);--notification-color:var(--mantine-primary-color-filled);box-sizing:border-box;padding-inline-start:calc(1.375rem * var(--mantine-scale));padding-inline-end:var(--mantine-spacing-xs);padding-top:var(--mantine-spacing-xs);padding-bottom:var(--mantine-spacing-xs);border-radius:var(--notification-radius);box-shadow:var(--mantine-shadow-lg);align-items:center;display:flex;position:relative;overflow:hidden}.m_a513464:before{content:"";width:calc(.375rem * var(--mantine-scale));top:var(--notification-radius);bottom:var(--notification-radius);border-radius:var(--notification-radius);background-color:var(--notification-color);display:block;position:absolute;inset-inline-start:calc(.25rem * var(--mantine-scale))}:where([data-mantine-color-scheme=light]) .m_a513464{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_a513464{background-color:var(--mantine-color-dark-6)}.m_a513464:where([data-with-icon]):before{display:none}:where([data-mantine-color-scheme=light]) .m_a513464:where([data-with-border]){border:1px solid var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_a513464:where([data-with-border]){border:1px solid var(--mantine-color-dark-4)}.m_a4ceffb{box-sizing:border-box;width:calc(1.75rem * var(--mantine-scale));height:calc(1.75rem * var(--mantine-scale));border-radius:calc(1.75rem * var(--mantine-scale));background-color:var(--notification-color);color:var(--mantine-color-white);justify-content:center;align-items:center;margin-inline-end:var(--mantine-spacing-md);display:flex}.m_b0920b15{margin-inline-end:var(--mantine-spacing-md)}.m_a49ed24{flex:1;margin-inline-end:var(--mantine-spacing-xs);overflow:hidden}.m_3feedf16{margin-bottom:calc(.125rem * var(--mantine-scale));text-overflow:ellipsis;font-size:var(--mantine-font-size-sm);line-height:var(--mantine-line-height-sm);font-weight:var(--mantine-font-weight-medium);overflow:hidden}:where([data-mantine-color-scheme=light]) .m_3feedf16{color:var(--mantine-color-gray-9)}:where([data-mantine-color-scheme=dark]) .m_3feedf16{color:var(--mantine-color-white)}.m_3d733a3a{font-size:var(--mantine-font-size-sm);line-height:var(--mantine-line-height-sm);text-overflow:ellipsis;overflow:hidden}:where([data-mantine-color-scheme=light]) .m_3d733a3a{color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_3d733a3a{color:var(--mantine-color-dark-0)}:where([data-mantine-color-scheme=light]) .m_3d733a3a:where([data-with-title]){color:var(--mantine-color-gray-6)}:where([data-mantine-color-scheme=dark]) .m_3d733a3a:where([data-with-title]){color:var(--mantine-color-dark-2)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_919a4d88:hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_919a4d88:hover{background-color:var(--mantine-color-dark-8)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_919a4d88:active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_919a4d88:active{background-color:var(--mantine-color-dark-8)}}.m_e2f5cd4e{--ni-right-section-width-xs:calc(1.0625rem * var(--mantine-scale));--ni-right-section-width-sm:calc(1.5rem * var(--mantine-scale));--ni-right-section-width-md:calc(1.6875rem * var(--mantine-scale));--ni-right-section-width-lg:calc(1.9375rem * var(--mantine-scale));--ni-right-section-width-xl:calc(2.125rem * var(--mantine-scale))}.m_95e17d22{--ni-chevron-size-xs:calc(.625rem * var(--mantine-scale));--ni-chevron-size-sm:calc(.875rem * var(--mantine-scale));--ni-chevron-size-md:calc(1rem * var(--mantine-scale));--ni-chevron-size-lg:calc(1.125rem * var(--mantine-scale));--ni-chevron-size-xl:calc(1.25rem * var(--mantine-scale));--ni-chevron-size:var(--ni-chevron-size-sm);width:100%;height:calc(var(--input-height) - calc(.125rem * var(--mantine-scale)));max-width:calc(var(--ni-chevron-size) * 1.7);flex-direction:column;margin-inline-start:auto;display:flex}.m_80b4b171{--control-border:1px solid var(--input-bd);--control-radius:calc(var(--input-radius) - calc(.0625rem * var(--mantine-scale)));width:100%;height:calc(var(--input-height) / 2 - calc(.0625rem * var(--mantine-scale)));border-inline-start:var(--control-border);color:var(--mantine-color-text);cursor:pointer;background-color:#0000;flex:0 0 50%;justify-content:center;align-items:center;padding:0;display:flex}.m_80b4b171:where(:disabled){cursor:not-allowed;opacity:.6;color:var(--mantine-color-disabled-color);background-color:#0000}.m_e2f5cd4e[data-error] :where(.m_80b4b171){color:var(--mantine-color-error)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_80b4b171:hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_80b4b171:hover{background-color:var(--mantine-color-dark-4)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_80b4b171:active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_80b4b171:active{background-color:var(--mantine-color-dark-4)}}.m_80b4b171:where(:first-of-type){border-radius:0;border-start-end-radius:var(--control-radius)}.m_80b4b171:last-of-type{border-radius:0;border-end-end-radius:var(--control-radius)}.m_f62ab2af{contain:layout style;gap:var(--ol-gap,var(--mantine-spacing-xs));flex-wrap:wrap;display:flex}.m_4addd315{--pagination-control-size-xs:calc(1.375rem * var(--mantine-scale));--pagination-control-size-sm:calc(1.625rem * var(--mantine-scale));--pagination-control-size-md:calc(2rem * var(--mantine-scale));--pagination-control-size-lg:calc(2.375rem * var(--mantine-scale));--pagination-control-size-xl:calc(2.75rem * var(--mantine-scale));--pagination-control-size-input-xs:calc(1.875rem * var(--mantine-scale));--pagination-control-size-input-sm:calc(2.25rem * var(--mantine-scale));--pagination-control-size-input-md:calc(2.625rem * var(--mantine-scale));--pagination-control-size-input-lg:calc(3.125rem * var(--mantine-scale));--pagination-control-size-input-xl:calc(3.75rem * var(--mantine-scale));--pagination-control-size:var(--pagination-control-size-md);--pagination-control-fz:var(--mantine-font-size-md);--pagination-active-bg:var(--mantine-primary-color-filled)}.m_4addd315:where([data-layout=responsive]){container-type:inline-size}.m_326d024a{border:calc(.0625rem * var(--mantine-scale)) solid;cursor:pointer;color:var(--mantine-color-text);height:var(--pagination-control-size);min-width:var(--pagination-control-size);font-size:var(--pagination-control-fz);border-radius:var(--pagination-control-radius,var(--mantine-radius-default));justify-content:center;align-items:center;line-height:1;display:flex}.m_326d024a:where([data-with-padding]){padding:calc(var(--pagination-control-size) / 4)}.m_326d024a:where(:disabled,[data-disabled]){cursor:not-allowed;opacity:.4}:where([data-mantine-color-scheme=light]) .m_326d024a{border-color:var(--mantine-color-gray-4);background-color:var(--mantine-color-white)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_326d024a:hover:where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-gray-0)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_326d024a:active:where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-gray-0)}}:where([data-mantine-color-scheme=dark]) .m_326d024a{border-color:var(--mantine-color-dark-4);background-color:var(--mantine-color-dark-6)}@media (hover:hover){:where([data-mantine-color-scheme=dark]) .m_326d024a:hover:where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-dark-5)}}@media (hover:none){:where([data-mantine-color-scheme=dark]) .m_326d024a:active:where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-dark-5)}}.m_326d024a:where([data-active]){background-color:var(--pagination-active-bg);border-color:var(--pagination-active-bg);color:var(--pagination-active-color,var(--mantine-color-white))}@media (hover:hover){.m_326d024a:where([data-active]):hover{background-color:var(--pagination-active-bg)}}@media (hover:none){.m_326d024a:where([data-active]):active{background-color:var(--pagination-active-bg)}}.m_4ad7767d{height:var(--pagination-control-size);min-width:var(--pagination-control-size);pointer-events:none;justify-content:center;align-items:center;display:flex}.m_105fdbed{gap:inherit;align-items:center;display:flex}@container (width<=400px){.m_105fdbed{display:none}}.m_10817321{height:var(--pagination-control-size);font-size:var(--pagination-control-fz);white-space:nowrap;justify-content:center;align-items:center;display:none}@container (width<=400px){.m_10817321{display:flex}}.m_f61ca620{--psi-button-size-xs:calc(1.375rem * var(--mantine-scale));--psi-button-size-sm:calc(1.625rem * var(--mantine-scale));--psi-button-size-md:calc(1.75rem * var(--mantine-scale));--psi-button-size-lg:calc(2rem * var(--mantine-scale));--psi-button-size-xl:calc(2.5rem * var(--mantine-scale));--psi-icon-size-xs:calc(1rem * var(--mantine-scale));--psi-icon-size-sm:calc(1.25rem * var(--mantine-scale));--psi-icon-size-md:calc(1.375rem * var(--mantine-scale));--psi-icon-size-lg:calc(1.5rem * var(--mantine-scale));--psi-icon-size-xl:calc(1.75rem * var(--mantine-scale));--psi-button-size:var(--psi-button-size-sm);--psi-icon-size:var(--psi-icon-size-sm)}.m_ccf8da4c{position:relative;overflow:hidden}.m_f2d85dd2{font-family:var(--mantine-font-family);font-size:inherit;line-height:var(--mantine-line-height);width:100%;height:100%;color:inherit;background-color:#0000;border:0;outline:0;padding-inline-start:var(--input-padding-inline-start);padding-inline-end:var(--input-padding-inline-end);position:absolute;inset:0}.m_ccf8da4c[data-disabled] .m_f2d85dd2,.m_f2d85dd2:disabled{cursor:not-allowed}.m_f2d85dd2::placeholder{color:var(--input-placeholder-color);opacity:1}.m_f2d85dd2::-ms-reveal{display:none}.m_b1072d44{width:var(--psi-button-size);height:var(--psi-button-size);min-width:var(--psi-button-size);min-height:var(--psi-button-size)}.m_b1072d44:disabled{display:none}.m_f1cb205a{--pin-input-size-xs:calc(1.875rem * var(--mantine-scale));--pin-input-size-sm:calc(2.25rem * var(--mantine-scale));--pin-input-size-md:calc(2.625rem * var(--mantine-scale));--pin-input-size-lg:calc(3.125rem * var(--mantine-scale));--pin-input-size-xl:calc(3.75rem * var(--mantine-scale));--pin-input-size:var(--pin-input-size-sm)}.m_cb288ead{width:var(--pin-input-size);height:var(--pin-input-size)}@keyframes m_81a374bd{0%{background-position:0 0}to{background-position:calc(2.5rem * var(--mantine-scale)) 0}}@keyframes m_e0fb7a86{0%{background-position:0 0}to{background-position:0 calc(2.5rem * var(--mantine-scale))}}.m_db6d6462{--progress-radius:var(--mantine-radius-default);--progress-size:var(--progress-size-md);--progress-size-xs:calc(.1875rem * var(--mantine-scale));--progress-size-sm:calc(.3125rem * var(--mantine-scale));--progress-size-md:calc(.5rem * var(--mantine-scale));--progress-size-lg:calc(.75rem * var(--mantine-scale));--progress-size-xl:calc(1rem * var(--mantine-scale));height:var(--progress-size);border-radius:var(--progress-radius);display:flex;position:relative;overflow:hidden}:where([data-mantine-color-scheme=light]) .m_db6d6462{background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_db6d6462{background-color:var(--mantine-color-dark-4)}.m_db6d6462:where([data-orientation=vertical]){height:auto;width:var(--progress-size);flex-direction:column-reverse}.m_2242eb65{background-color:var(--progress-section-color);height:100%;width:var(--progress-section-size);background-size:calc(1.25rem * var(--mantine-scale)) calc(1.25rem * var(--mantine-scale));transition:width var(--progress-transition-duration,.1s) ease;justify-content:center;align-items:center;display:flex;overflow:hidden}.m_2242eb65:where([data-striped]){background-image:linear-gradient(45deg,#ffffff26 25%,#0000 25% 50%,#ffffff26 50% 75%,#0000 75%,#0000)}.m_2242eb65:where([data-animated]){animation:1s linear infinite m_81a374bd}.m_2242eb65:where(:last-of-type){border-radius:0;border-start-end-radius:var(--progress-radius);border-end-end-radius:var(--progress-radius)}.m_2242eb65:where(:first-of-type){border-radius:0;border-start-start-radius:var(--progress-radius);border-end-start-radius:var(--progress-radius)}.m_db6d6462:where([data-orientation=vertical]) .m_2242eb65{width:100%;height:var(--progress-section-size);transition:height var(--progress-transition-duration,.1s) ease}.m_db6d6462:where([data-orientation=vertical]) .m_2242eb65:where([data-striped]){background-image:linear-gradient(135deg,#ffffff26 25%,#0000 25% 50%,#ffffff26 50% 75%,#0000 75%,#0000)}.m_db6d6462:where([data-orientation=vertical]) .m_2242eb65:where([data-animated]){animation:1s linear infinite m_e0fb7a86}.m_db6d6462:where([data-orientation=vertical]) .m_2242eb65:where(:last-of-type){border-radius:0;border-start-start-radius:var(--progress-radius);border-start-end-radius:var(--progress-radius)}.m_db6d6462:where([data-orientation=vertical]) .m_2242eb65:where(:first-of-type){border-radius:0;border-end-end-radius:var(--progress-radius);border-end-start-radius:var(--progress-radius)}.m_91e40b74{color:var(--progress-label-color,var(--mantine-color-white));-webkit-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;font-weight:700;font-size:min(calc(var(--progress-size) * .65), calc(1.125rem * var(--mantine-scale)));padding-inline:calc(.25rem * var(--mantine-scale));line-height:1;overflow:hidden}.m_db6d6462:where([data-orientation=vertical]) .m_91e40b74{writing-mode:vertical-rl}.m_9dc8ae12{--card-radius:var(--mantine-radius-default);border-radius:var(--card-radius);cursor:pointer;width:100%;display:block}.m_9dc8ae12 :where(*){cursor:inherit}.m_9dc8ae12:where([data-with-border]){border:calc(.0625rem * var(--mantine-scale)) solid transparent}:where([data-mantine-color-scheme=light]) .m_9dc8ae12:where([data-with-border]){border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_9dc8ae12:where([data-with-border]){border-color:var(--mantine-color-dark-4)}.m_717d7ff6{--radio-size-xs:calc(1rem * var(--mantine-scale));--radio-size-sm:calc(1.25rem * var(--mantine-scale));--radio-size-md:calc(1.5rem * var(--mantine-scale));--radio-size-lg:calc(1.875rem * var(--mantine-scale));--radio-size-xl:calc(2.25rem * var(--mantine-scale));--radio-icon-size-xs:calc(.375rem * var(--mantine-scale));--radio-icon-size-sm:calc(.5rem * var(--mantine-scale));--radio-icon-size-md:calc(.625rem * var(--mantine-scale));--radio-icon-size-lg:calc(.875rem * var(--mantine-scale));--radio-icon-size-xl:calc(1rem * var(--mantine-scale));--radio-icon-size:var(--radio-icon-size-sm);--radio-size:var(--radio-size-sm);--radio-color:var(--mantine-primary-color-filled);--radio-icon-color:var(--mantine-color-white);border:calc(.0625rem * var(--mantine-scale)) solid transparent;width:var(--radio-size);min-width:var(--radio-size);height:var(--radio-size);min-height:var(--radio-size);border-radius:var(--radio-radius,10000px);cursor:var(--mantine-cursor-type);-webkit-tap-highlight-color:transparent;justify-content:center;align-items:center;transition:border-color .1s,background-color .1s;display:flex;position:relative}:where([data-mantine-color-scheme=light]) .m_717d7ff6{background-color:var(--mantine-color-white);border-color:var(--mantine-color-gray-4)}:where([data-mantine-color-scheme=dark]) .m_717d7ff6{background-color:var(--mantine-color-dark-6);border-color:var(--mantine-color-dark-4)}.m_717d7ff6[data-checked]{background-color:var(--radio-color);border-color:var(--radio-color)}.m_717d7ff6[data-checked]>.m_3e4da632{opacity:1;color:var(--radio-icon-color);transform:none}.m_717d7ff6[data-disabled]{cursor:not-allowed;background-color:var(--mantine-color-disabled);border-color:var(--mantine-color-disabled-border)}.m_717d7ff6[data-disabled][data-checked]>.m_3e4da632{color:var(--mantine-color-disabled-color)}.m_2980836c[data-checked]:not([data-disabled]){border-color:var(--radio-color);background-color:#0000}.m_2980836c[data-checked]:not([data-disabled])>.m_3e4da632{color:var(--radio-color);opacity:1;transform:none}.m_3e4da632{width:var(--radio-icon-size);height:var(--radio-icon-size);color:#0000;pointer-events:none;transform:translateY(calc(.3125rem * var(--mantine-scale))) scale(.5);opacity:1;transition:transform .1s,opacity .1s;display:block}.m_f3f1af94{--radio-size-xs:calc(1rem * var(--mantine-scale));--radio-size-sm:calc(1.25rem * var(--mantine-scale));--radio-size-md:calc(1.5rem * var(--mantine-scale));--radio-size-lg:calc(1.875rem * var(--mantine-scale));--radio-size-xl:calc(2.25rem * var(--mantine-scale));--radio-size:var(--radio-size-sm);--radio-icon-size-xs:calc(.375rem * var(--mantine-scale));--radio-icon-size-sm:calc(.5rem * var(--mantine-scale));--radio-icon-size-md:calc(.625rem * var(--mantine-scale));--radio-icon-size-lg:calc(.875rem * var(--mantine-scale));--radio-icon-size-xl:calc(1rem * var(--mantine-scale));--radio-icon-size:var(--radio-icon-size-sm);--radio-icon-color:var(--mantine-color-white)}.m_89c4f5e4{width:var(--radio-size);height:var(--radio-size);order:1;position:relative}.m_89c4f5e4:where([data-label-position=left]){order:2}.m_f3ed6b2b{color:var(--radio-icon-color);opacity:var(--radio-icon-opacity,0);translate:-50% -50%;transform:var(--radio-icon-transform,scale(.2) translateY(calc(.625rem * var(--mantine-scale))));pointer-events:none;width:var(--radio-icon-size);height:var(--radio-icon-size);transition:opacity .1s,transform .2s;position:absolute;top:50%;left:50%}.m_8a3dbb89{border:calc(.0625rem * var(--mantine-scale)) solid;appearance:none;width:var(--radio-size);height:var(--radio-size);border-radius:var(--radio-radius,var(--radio-size));cursor:var(--mantine-cursor-type);-webkit-tap-highlight-color:transparent;justify-content:center;align-items:center;margin:0;transition-property:background-color,border-color;transition-duration:.1s;transition-timing-function:ease;display:flex;position:relative}:where([data-mantine-color-scheme=light]) .m_8a3dbb89{background-color:var(--mantine-color-white);border-color:var(--mantine-color-gray-4)}:where([data-mantine-color-scheme=dark]) .m_8a3dbb89{background-color:var(--mantine-color-dark-6);border-color:var(--mantine-color-dark-4)}.m_8a3dbb89:checked{background-color:var(--radio-color,var(--mantine-primary-color-filled));border-color:var(--radio-color,var(--mantine-primary-color-filled))}.m_8a3dbb89:checked+.m_f3ed6b2b{--radio-icon-opacity:1;--radio-icon-transform:scale(1)}.m_8a3dbb89:disabled{cursor:not-allowed;background-color:var(--mantine-color-disabled);border-color:var(--mantine-color-disabled-border)}.m_8a3dbb89:disabled+.m_f3ed6b2b{--radio-icon-color:var(--mantine-color-disabled-color)}.m_8a3dbb89:where([data-with-error-styles][data-error]){border-color:var(--mantine-color-error)}.m_1bfe9d39+.m_f3ed6b2b{--radio-icon-color:var(--radio-color)}.m_1bfe9d39:checked:not(:disabled){border-color:var(--radio-color);background-color:#0000}.m_1bfe9d39:checked:not(:disabled)+.m_f3ed6b2b{--radio-icon-color:var(--radio-color);--radio-icon-opacity:1;--radio-icon-transform:none}.m_f8d312f2{--rating-size-xs:calc(.875rem * var(--mantine-scale));--rating-size-sm:calc(1.125rem * var(--mantine-scale));--rating-size-md:calc(1.25rem * var(--mantine-scale));--rating-size-lg:calc(1.75rem * var(--mantine-scale));--rating-size-xl:calc(2rem * var(--mantine-scale));width:max-content;display:flex}.m_f8d312f2:where(:has(input:disabled)){pointer-events:none}.m_61734bb7{transition:transform .1s;position:relative}.m_61734bb7:where([data-active]){z-index:1;transform:scale(1.1)}.m_5662a89a{width:var(--rating-size);height:var(--rating-size);display:block}:where([data-mantine-color-scheme=light]) .m_5662a89a{fill:var(--mantine-color-gray-3);stroke:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_5662a89a{fill:var(--mantine-color-dark-3);stroke:var(--mantine-color-dark-3)}.m_5662a89a:where([data-filled]){fill:var(--rating-color);stroke:var(--rating-color)}.m_211007ba{white-space:nowrap;opacity:0;-webkit-tap-highlight-color:transparent;width:0;height:0;position:absolute;overflow:hidden}.m_211007ba:focus-visible+label{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_21342ee4{cursor:pointer;z-index:var(--rating-item-z-index,0);-webkit-tap-highlight-color:transparent;display:block;position:absolute;top:0;left:0}.m_21342ee4:where([data-read-only]){cursor:default}.m_21342ee4:where(:last-of-type){position:relative}.m_fae05d6a{clip-path:var(--rating-symbol-clip-path)}.m_47dd3981{align-items:baseline;display:inline-flex;position:relative;overflow:hidden}.m_47dd3981[data-tabular-numbers]{font-variant-numeric:tabular-nums}.m_ccf525bd{z-index:1;white-space:pre;color:#0000;forced-color-adjust:none;position:absolute;inset:0;overflow:hidden}.m_b301d46e{z-index:2;pointer-events:none;-webkit-user-select:none;user-select:none;width:1ch;height:1em;transition:width var(--rn-duration) var(--rn-timing-function), opacity var(--rn-duration) var(--rn-timing-function);line-height:1;display:inline-block;position:relative;overflow:hidden}.m_b301d46e[data-empty]{opacity:0;width:0}.m_8ae40964{animation:m_18d73873 var(--rn-duration) var(--rn-timing-function);flex-direction:column;display:flex}.m_8ae40964>span{justify-content:center;align-items:center;height:1em;display:flex}.m_47d64bf5{z-index:2;white-space:pre;pointer-events:none;-webkit-user-select:none;user-select:none;transition:opacity var(--rn-duration) var(--rn-timing-function);display:inline-block;position:relative;overflow:hidden}.m_47d64bf5[data-empty]{opacity:0;width:0}@keyframes m_18d73873{0%{transform:var(--rn-roll-from)}to{transform:var(--rn-roll-to)}}.m_1b3c8819{--tooltip-radius:var(--mantine-radius-default);padding:calc(var(--mantine-spacing-xs) / 2) var(--mantine-spacing-xs);pointer-events:none;font-size:var(--mantine-font-size-sm);white-space:nowrap;border-radius:var(--tooltip-radius);position:absolute}:where([data-mantine-color-scheme=light]) .m_1b3c8819{background-color:var(--tooltip-bg,var(--mantine-color-gray-9));color:var(--tooltip-color,var(--mantine-color-white))}:where([data-mantine-color-scheme=dark]) .m_1b3c8819{background-color:var(--tooltip-bg,var(--mantine-color-gray-2));color:var(--tooltip-color,var(--mantine-color-black))}.m_1b3c8819:where([data-multiline]){white-space:normal}.m_1b3c8819:where([data-fixed]){position:fixed}.m_1b3c8819:where([data-interactive]){pointer-events:auto}.m_f898399f{background-color:inherit;z-index:1;border:0}.m_b32e4812{width:var(--rp-size);height:var(--rp-size);min-width:var(--rp-size);min-height:var(--rp-size);--rp-transition-duration:0s;position:relative}.m_d43b5134{width:var(--rp-size);height:var(--rp-size);min-width:var(--rp-size);min-height:var(--rp-size);transform:rotate(calc(var(--rp-start-angle,270deg) - 360deg))}.m_b1ca1fbf{stroke:var(--curve-color,var(--rp-curve-root-color));transition:stroke-dashoffset var(--rp-transition-duration) ease, stroke-dasharray var(--rp-transition-duration) ease, stroke var(--rp-transition-duration)}[data-mantine-color-scheme=light] .m_b1ca1fbf{--rp-curve-root-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m_b1ca1fbf{--rp-curve-root-color:var(--mantine-color-dark-4)}.m_b23f9dc4{top:50%;inset-inline:var(--rp-label-offset);position:absolute;transform:translateY(-50%)}.m_bc8f275{--scroller-control-size:calc(3.125rem * var(--mantine-scale));--scroller-background-color:var(--mantine-color-body);align-items:center;max-width:100%;display:flex;position:relative;overflow:hidden}.m_ee44dece{scrollbar-width:none;-ms-overflow-style:none;-webkit-user-select:none;user-select:none;flex:1;overflow:auto hidden}.m_ee44dece::-webkit-scrollbar{display:none}.m_ee44dece[data-draggable]{cursor:grab}.m_53e4f606{white-space:nowrap;display:inline-flex}.m_47754fc8{width:var(--scroller-control-size);height:var(--scroller-control-size)}.m_53e526ea{width:var(--scroller-control-size);z-index:1;color:var(--mantine-color-dimmed);opacity:1;pointer-events:auto;align-items:center;transition:opacity .2s,color .15s;display:flex;position:absolute;top:0;bottom:0}.m_53e526ea:hover{color:var(--mantine-color-text)}.m_53e526ea:where([data-position=start]){background:linear-gradient(to right, var(--scroller-background-color) 40%, transparent);justify-content:flex-start;inset-inline-start:0}.m_53e526ea:where([data-position=start]) .m_47754fc8{transform:rotate(90deg)}.m_53e526ea:where([data-position=end]){background:linear-gradient(to left, var(--scroller-background-color) 40%, transparent);justify-content:flex-end;inset-inline-end:0}.m_53e526ea:where([data-position=end]) .m_47754fc8{transform:rotate(-90deg)}.m_53e526ea:where([data-hidden]){opacity:0;pointer-events:none}.m_cf365364{--sc-padding-xs:calc(.125rem * var(--mantine-scale)) calc(.375rem * var(--mantine-scale));--sc-padding-sm:calc(.1875rem * var(--mantine-scale)) calc(.625rem * var(--mantine-scale));--sc-padding-md:calc(.25rem * var(--mantine-scale)) calc(.875rem * var(--mantine-scale));--sc-padding-lg:calc(.4375rem * var(--mantine-scale)) calc(1rem * var(--mantine-scale));--sc-padding-xl:calc(.625rem * var(--mantine-scale)) calc(1.25rem * var(--mantine-scale));--sc-transition-duration:.2s;--sc-padding:var(--sc-padding-sm);--sc-transition-timing-function:ease;--sc-font-size:var(--mantine-font-size-sm);border-radius:var(--sc-radius,var(--mantine-radius-default));width:auto;padding:calc(.25rem * var(--mantine-scale));flex-direction:row;display:inline-flex;position:relative;overflow:hidden}.m_cf365364:where([data-full-width]){display:flex}.m_cf365364:where([data-orientation=vertical]){flex-direction:column;width:max-content;display:flex}.m_cf365364:where([data-orientation=vertical]):where([data-full-width]){width:auto}:where([data-mantine-color-scheme=light]) .m_cf365364{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_cf365364{background-color:var(--mantine-color-dark-8)}.m_9e182ccd{z-index:1;border-radius:max(calc(var(--sc-radius,var(--mantine-radius-default)) - 4px), calc(var(--sc-radius,var(--mantine-radius-default)) / 4));display:block;position:absolute}:where([data-mantine-color-scheme=light]) .m_9e182ccd{box-shadow:var(--sc-shadow,none);background-color:var(--sc-color,var(--mantine-color-white))}:where([data-mantine-color-scheme=dark]) .m_9e182ccd{box-shadow:none;background-color:var(--sc-color,var(--mantine-color-dark-5))}.m_1738fcb2{-webkit-tap-highlight-color:transparent;font-weight:var(--mantine-font-weight-medium);text-align:center;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;border-radius:calc(var(--sc-radius,var(--mantine-radius-default)) - 4px);font-size:var(--sc-font-size);padding:var(--sc-padding);transition:color var(--sc-transition-duration) var(--sc-transition-timing-function);cursor:pointer;outline:var(--segmented-control-outline,none);display:block;overflow:hidden}:where([data-mantine-color-scheme=light]) .m_1738fcb2{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_1738fcb2{color:var(--mantine-color-dark-1)}.m_1738fcb2:where([data-read-only]){cursor:default}fieldset:disabled .m_1738fcb2,.m_1738fcb2:where([data-disabled]){cursor:not-allowed;color:var(--mantine-color-disabled-color)}:where([data-mantine-color-scheme=light]) .m_1738fcb2:where([data-active]){color:var(--sc-label-color,var(--mantine-color-black))}:where([data-mantine-color-scheme=dark]) .m_1738fcb2:where([data-active]){color:var(--sc-label-color,var(--mantine-color-white))}.m_cf365364:where([data-initialized]) .m_1738fcb2:where([data-active]):before{display:none}.m_1738fcb2:where([data-active]):before{content:"";z-index:0;border-radius:calc(var(--sc-radius,var(--mantine-radius-default)) - 4px);position:absolute;inset:0}:where([data-mantine-color-scheme=light]) .m_1738fcb2:where([data-active]):before{box-shadow:var(--sc-shadow,none);background-color:var(--sc-color,var(--mantine-color-white))}:where([data-mantine-color-scheme=dark]) .m_1738fcb2:where([data-active]):before{box-shadow:none;background-color:var(--sc-color,var(--mantine-color-dark-5))}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_1738fcb2:where(:not([data-disabled],[data-active],[data-read-only])):hover{color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_1738fcb2:where(:not([data-disabled],[data-active],[data-read-only])):hover{color:var(--mantine-color-white)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_1738fcb2:where(:not([data-disabled],[data-active],[data-read-only])):active{color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_1738fcb2:where(:not([data-disabled],[data-active],[data-read-only])):active{color:var(--mantine-color-white)}}@media (hover:hover){fieldset:disabled .m_1738fcb2:hover{color:var(--mantine-color-disabled-color)!important}}@media (hover:none){fieldset:disabled .m_1738fcb2:active{color:var(--mantine-color-disabled-color)!important}}.m_1714d588{white-space:nowrap;opacity:0;width:0;height:0;position:absolute;overflow:hidden}.m_1714d588[data-focus-ring=auto]:focus:focus-visible+.m_1738fcb2,.m_1714d588[data-focus-ring=always]:focus+.m_1738fcb2{--segmented-control-outline:2px solid var(--mantine-primary-color-filled)}.m_69686b9b{z-index:2;transition:border-color var(--sc-transition-duration) var(--sc-transition-timing-function);flex:1;position:relative}.m_cf365364[data-with-items-borders] :where(.m_69686b9b):before{content:"";top:0;bottom:0;background-color:var(--separator-color);width:calc(.0625rem * var(--mantine-scale));transition:background-color var(--sc-transition-duration) var(--sc-transition-timing-function);position:absolute;inset-inline-start:0}.m_69686b9b[data-orientation=vertical]:before{top:0;inset-inline:0;height:calc(.0625rem * var(--mantine-scale));width:auto;bottom:auto}:where([data-mantine-color-scheme=light]) .m_69686b9b{--separator-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_69686b9b{--separator-color:var(--mantine-color-dark-4)}.m_69686b9b:first-of-type:before,[data-mantine-color-scheme] .m_69686b9b[data-active]:before,[data-mantine-color-scheme] .m_69686b9b[data-active]+.m_69686b9b:before{--separator-color:transparent}.m_78882f40{z-index:2;position:relative}.m_fa528724{--scp-filled-segment-color:var(--mantine-primary-color-filled);--scp-transition-duration:0s;--scp-thickness:calc(.75rem * var(--mantine-scale))}:where([data-mantine-color-scheme=light]) .m_fa528724{--scp-empty-segment-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_fa528724{--scp-empty-segment-color:var(--mantine-color-dark-4)}.m_fa528724{width:fit-content;position:relative}.m_62e9e7e2{transform:var(--scp-rotation);display:block;overflow:hidden}.m_c573fb6f{transition:stroke-dashoffset var(--scp-transition-duration) ease, stroke-dasharray var(--scp-transition-duration) ease, stroke-opacity var(--scp-transition-duration) ease, stroke var(--scp-transition-duration)}.m_4fa340f2{text-align:center;z-index:1;margin:0;padding:0;position:absolute;inset-inline:0}.m_4fa340f2:where([data-position=bottom]){padding-inline:calc(var(--scp-thickness) * 2);bottom:0}.m_4fa340f2:where([data-position=bottom]):where([data-orientation=down]){top:0;bottom:auto}.m_4fa340f2:where([data-position=center]){padding-inline:calc(var(--scp-thickness) * 3);top:50%;transform:translateY(-50%)}.m_925c2d2c{container:simple-grid/inline-size}.m_2415a157{grid-template-columns:repeat(var(--sg-cols), minmax(0, 1fr));grid-auto-rows:var(--sg-auto-rows,auto);gap:var(--sg-spacing-y) var(--sg-spacing-x);display:grid}.m_2415a157[data-auto-cols=auto-fill]{grid-template-columns:repeat(auto-fill, minmax(var(--sg-min-col-width), 1fr))}.m_2415a157[data-auto-cols=auto-fit]{grid-template-columns:repeat(auto-fit, minmax(var(--sg-min-col-width), 1fr))}@keyframes m_299c329c{0%,to{opacity:.4}50%{opacity:1}}.m_18320242{height:var(--skeleton-height,auto);width:var(--skeleton-width,100%);border-radius:var(--skeleton-radius,var(--mantine-radius-default));position:relative;transform:translateZ(0)}.m_18320242:where([data-animate]):after{animation:1.5s linear infinite m_299c329c}.m_18320242:where([data-visible]){overflow:hidden}.m_18320242:where([data-visible]):before{content:"";z-index:10;background-color:var(--mantine-color-body);position:absolute;inset:0}.m_18320242:where([data-visible]):after{content:"";z-index:11;position:absolute;inset:0}:where([data-mantine-color-scheme=light]) .m_18320242:where([data-visible]):after{background-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_18320242:where([data-visible]):after{background-color:var(--mantine-color-dark-4)}.m_dd36362e{--slider-size-xs:calc(.25rem * var(--mantine-scale));--slider-size-sm:calc(.375rem * var(--mantine-scale));--slider-size-md:calc(.5rem * var(--mantine-scale));--slider-size-lg:calc(.625rem * var(--mantine-scale));--slider-size-xl:calc(.75rem * var(--mantine-scale));--slider-size:var(--slider-size-md);--slider-radius:calc(62.5rem * var(--mantine-scale));--slider-color:var(--mantine-primary-color-filled);--slider-track-disabled-bg:var(--mantine-color-disabled);-webkit-tap-highlight-color:transparent;height:calc(var(--slider-size) * 2);padding-inline:var(--slider-size);touch-action:none;outline:none;flex-direction:column;align-items:center;display:flex;position:relative}[data-mantine-color-scheme=light] .m_dd36362e{--slider-track-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m_dd36362e{--slider-track-bg:var(--mantine-color-dark-4)}.m_dd36362e[data-orientation=vertical]{width:calc(var(--slider-size) * 2);height:calc(12.5rem * var(--mantine-scale));padding-inline:0;padding-block:var(--slider-size)}.m_c9357328{top:calc(-2.25rem * var(--mantine-scale));font-size:var(--mantine-font-size-xs);color:var(--mantine-color-white);padding:calc(var(--mantine-spacing-xs) / 2);border-radius:var(--mantine-radius-sm);white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none;touch-action:none;position:absolute}:where([data-mantine-color-scheme=light]) .m_c9357328{background-color:var(--mantine-color-gray-9)}:where([data-mantine-color-scheme=dark]) .m_c9357328{background-color:var(--mantine-color-dark-4)}:where(.m_dd36362e[data-orientation=vertical]) .m_c9357328{top:auto;inset-inline-start:calc(100% + 8px)}.m_c9a9a60a{height:var(--slider-thumb-size);width:var(--slider-thumb-size);border:calc(.25rem * var(--mantine-scale)) solid;cursor:pointer;border-radius:var(--slider-radius);z-index:3;-webkit-user-select:none;user-select:none;touch-action:none;outline-offset:calc(.125rem * var(--mantine-scale));top:50%;left:var(--slider-thumb-offset);justify-content:center;align-items:center;transition:box-shadow .1s,transform .1s;display:flex;position:absolute;transform:translate(-50%,-50%)}:where([dir=rtl]) .m_c9a9a60a{left:auto;right:calc(var(--slider-thumb-offset) - var(--slider-thumb-size))}fieldset:disabled .m_c9a9a60a,.m_c9a9a60a:where([data-disabled]){display:none}.m_c9a9a60a:where([data-dragging]){box-shadow:var(--mantine-shadow-sm);transform:translate(-50%,-50%)scale(1.05)}:where([data-mantine-color-scheme=light]) .m_c9a9a60a{color:var(--slider-color);border-color:var(--slider-color);background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_c9a9a60a{color:var(--mantine-color-white);border-color:var(--mantine-color-white);background-color:var(--slider-color)}:where(.m_dd36362e[data-orientation=vertical]) .m_c9a9a60a{top:auto;left:50%;right:auto;bottom:var(--slider-thumb-offset);transform:translate(-50%,50%)}:where(.m_dd36362e[data-orientation=vertical]) .m_c9a9a60a:where([data-dragging]){transform:translate(-50%,50%)scale(1.05)}:where([dir=rtl]) :where(.m_dd36362e[data-orientation=vertical]) .m_c9a9a60a{left:50%;right:auto}.m_a8645c2{width:100%;height:calc(var(--slider-size) * 2);cursor:pointer;align-items:center;display:flex}fieldset:disabled .m_a8645c2,.m_a8645c2:where([data-disabled]){cursor:not-allowed}:where(.m_dd36362e[data-orientation=vertical]) .m_a8645c2{width:calc(var(--slider-size) * 2);flex-direction:column;height:100%}.m_c9ade57f{width:100%;height:var(--slider-size);position:relative}.m_c9ade57f:where([data-inverted]:not([data-disabled])){--track-bg:var(--slider-color)}fieldset:disabled .m_c9ade57f:where([data-inverted]),.m_c9ade57f:where([data-inverted][data-disabled]){--track-bg:var(--slider-track-disabled-bg)}.m_c9ade57f:before{content:"";border-radius:var(--slider-radius);top:0;bottom:0;inset-inline:calc(var(--slider-size) * -1);background-color:var(--track-bg,var(--slider-track-bg));z-index:0;position:absolute}:where(.m_dd36362e[data-orientation=vertical]) .m_c9ade57f{width:var(--slider-size);height:100%}:where(.m_dd36362e[data-orientation=vertical]) .m_c9ade57f:before{inset-inline:0;top:calc(var(--slider-size) * -1);bottom:calc(var(--slider-size) * -1)}.m_38aeed47{z-index:1;background-color:var(--slider-color);border-radius:var(--slider-radius);width:var(--slider-bar-width);top:0;bottom:0;position:absolute;inset-inline-start:var(--slider-bar-offset)}.m_38aeed47:where([data-inverted]){background-color:var(--slider-track-bg)}fieldset:disabled .m_38aeed47:where(:not([data-inverted])),.m_38aeed47:where([data-disabled]:not([data-inverted])){background-color:var(--mantine-color-disabled-color)}:where(.m_dd36362e[data-orientation=vertical]) .m_38aeed47{top:auto;bottom:var(--slider-bar-offset);width:100%;height:var(--slider-bar-width);inset-inline-start:0}.m_b7b0423a{inset-inline-start:calc(var(--mark-offset) - var(--slider-size) / 2);z-index:2;pointer-events:none;height:0;position:absolute;top:0}:where(.m_dd36362e[data-orientation=vertical]) .m_b7b0423a{inset-inline-start:0;top:auto;bottom:calc(var(--mark-offset) + var(--slider-size) / 2);width:0;height:0}.m_dd33bc19{border:calc(.125rem * var(--mantine-scale)) solid;height:var(--slider-size);width:var(--slider-size);border-radius:calc(62.5rem * var(--mantine-scale));background-color:var(--mantine-color-white);pointer-events:none}:where([data-mantine-color-scheme=light]) .m_dd33bc19{border-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_dd33bc19{border-color:var(--mantine-color-dark-4)}.m_dd33bc19:where([data-filled]){border-color:var(--slider-color)}.m_dd33bc19:where([data-filled]):where([data-disabled]){border-color:var(--mantine-color-disabled-border)}.m_68c77a5b{transform:translate(calc(-50% + var(--slider-size) / 2), calc(var(--mantine-spacing-xs) / 2));font-size:var(--mantine-font-size-sm);white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none}:where([dir=rtl]) .m_68c77a5b{transform:translate(calc(50% - var(--slider-size) / 2), calc(var(--mantine-spacing-xs) / 2))}:where([data-mantine-color-scheme=light]) .m_68c77a5b{color:var(--mantine-color-gray-6)}:where([data-mantine-color-scheme=dark]) .m_68c77a5b{color:var(--mantine-color-dark-2)}:where(.m_dd36362e[data-orientation=vertical]) .m_68c77a5b{transform:translate(calc(var(--slider-size) + var(--mantine-spacing-xs) / 2), calc(-50% - var(--slider-size) / 2))}.m_19e66008{display:flex}.m_19e66008:where([data-orientation=horizontal]){flex-direction:row}.m_19e66008:where([data-orientation=vertical]){flex-direction:column}.m_19e5428e{flex-grow:0;flex-shrink:1;overflow:auto}.m_27f81bce{flex:0 0 var(--splitter-line-size,calc(.125rem * var(--mantine-scale)));touch-action:none;background-color:var(--splitter-handle-color,var(--mantine-color-body));outline:none;justify-content:center;align-items:center;display:flex;position:relative}.m_27f81bce:where([data-orientation=horizontal]){cursor:col-resize}.m_27f81bce:where([data-orientation=vertical]){cursor:row-resize}.m_22feb770{z-index:1;border-radius:calc(62.5rem * var(--mantine-scale));color:var(--mantine-color-dimmed);justify-content:center;align-items:center;transition:color .1s;display:flex;position:absolute}:where([data-mantine-color-scheme=light]) .m_22feb770{background-color:var(--mantine-color-white);border:calc(.0625rem * var(--mantine-scale)) solid var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_22feb770{background-color:var(--mantine-color-dark-6);border:calc(.0625rem * var(--mantine-scale)) solid var(--mantine-color-dark-4)}.m_22feb770:where([data-orientation=horizontal]){width:calc(.75rem * var(--mantine-scale));height:calc(3.75rem * var(--mantine-scale))}.m_22feb770:where([data-orientation=vertical]){width:calc(3.75rem * var(--mantine-scale));height:calc(.75rem * var(--mantine-scale))}.m_22feb770>svg{width:100%;height:100%}.m_27f81bce:focus-visible .m_22feb770{box-shadow:0 0 0 calc(.125rem * var(--mantine-scale)) var(--mantine-primary-color-filled)}.m_559cce2d{position:relative}.m_559cce2d:where([data-has-spoiler]){margin-bottom:calc(1.5rem * var(--mantine-scale))}.m_b912df4e{transition:max-height var(--spoiler-transition-duration,.2s) ease;flex-direction:column;display:flex;overflow:hidden}.m_b9131032{inset-inline-start:0;height:calc(1.5rem * var(--mantine-scale));position:absolute;top:100%}.m_6d731127{align-items:var(--stack-align,stretch);justify-content:var(--stack-justify,flex-start);gap:var(--stack-gap,var(--mantine-spacing-md));flex-direction:column;display:flex}.m_cbb4ea7e{--stepper-icon-size-xs:calc(2.125rem * var(--mantine-scale));--stepper-icon-size-sm:calc(2.25rem * var(--mantine-scale));--stepper-icon-size-md:calc(2.625rem * var(--mantine-scale));--stepper-icon-size-lg:calc(3rem * var(--mantine-scale));--stepper-icon-size-xl:calc(3.25rem * var(--mantine-scale));--stepper-icon-size:var(--stepper-icon-size-md);--stepper-color:var(--mantine-primary-color-filled);--stepper-content-padding:var(--mantine-spacing-md);--stepper-spacing:var(--mantine-spacing-md);--stepper-radius:calc(62.5rem * var(--mantine-scale));--stepper-fz:var(--mantine-font-size-md);--stepper-outline-thickness:calc(.125rem * var(--mantine-scale))}[data-mantine-color-scheme=light] .m_cbb4ea7e{--stepper-outline-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m_cbb4ea7e{--stepper-outline-color:var(--mantine-color-dark-5)}.m_aaf89d0b{flex-wrap:nowrap;align-items:center;display:flex}.m_aaf89d0b:where([data-wrap]){gap:var(--mantine-spacing-md) 0;flex-wrap:wrap}.m_aaf89d0b:where([data-label-position=bottom]){align-items:flex-start}.m_aaf89d0b:where([data-orientation=vertical]){flex-direction:column}.m_aaf89d0b:where([data-orientation=vertical]):where([data-icon-position=left]){align-items:flex-start}.m_aaf89d0b:where([data-orientation=vertical]):where([data-icon-position=right]){align-items:flex-end}.m_aaf89d0b:where([data-orientation=horizontal]){flex-direction:row}.m_2a371ac9{height:var(--stepper-outline-thickness);margin-inline:var(--mantine-spacing-md);background-color:var(--stepper-outline-color);flex:1;transition:background-color .15s}.m_2a371ac9:where([data-active]){background-color:var(--stepper-color)}.m_aaf89d0b:where([data-label-position=bottom]) .m_2a371ac9{margin-top:calc((var(--stepper-icon-size) - var(--stepper-outline-thickness)) / 2)}.m_78da155d{padding-top:var(--stepper-content-padding)}.m_cbb57068{--step-color:var(--stepper-color);cursor:default;display:flex}.m_cbb57068:where([data-allow-click]){cursor:pointer}.m_cbb57068:where([data-icon-position=left]){flex-direction:row}.m_cbb57068:where([data-icon-position=right]){flex-direction:row-reverse}.m_cbb57068:where([data-label-position=bottom]){min-width:var(--stepper-icon-size);max-width:calc(var(--stepper-icon-size) * 4);flex-direction:column;align-items:center;overflow:visible}.m_cbb57068:where([data-label-position=bottom]):where([data-icon-position=right]){flex-direction:column}.m_f56b1e2c{align-items:center}.m_833edb7e{--separator-spacing:calc(var(--mantine-spacing-xs) / 2);min-height:calc(var(--stepper-icon-size) + var(--mantine-spacing-xl) + var(--separator-spacing));margin-top:var(--separator-spacing);justify-content:flex-start;overflow:hidden}.m_833edb7e:where(:first-of-type){margin-top:0}.m_833edb7e:where(:last-of-type){min-height:auto}.m_833edb7e:where(:last-of-type) .m_6496b3f3{display:none}.m_818e70b{position:relative}.m_6496b3f3{top:calc(var(--stepper-icon-size) + var(--separator-spacing));border-inline-start:var(--stepper-outline-thickness) solid var(--stepper-outline-color);height:100vh;position:absolute;inset-inline-start:calc(var(--stepper-icon-size) / 2)}.m_6496b3f3:where([data-active]){border-color:var(--stepper-color)}.m_1959ad01{height:var(--stepper-icon-size);width:var(--stepper-icon-size);min-height:var(--stepper-icon-size);min-width:var(--stepper-icon-size);border-radius:var(--stepper-radius);font-size:var(--stepper-fz);border:var(--stepper-outline-thickness) solid var(--stepper-outline-color);background-color:var(--stepper-outline-color);justify-content:center;align-items:center;font-weight:700;transition:background-color .15s,border-color .15s;display:flex;position:relative}:where([data-mantine-color-scheme=light]) .m_1959ad01{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_1959ad01{color:var(--mantine-color-dark-1)}.m_1959ad01:where([data-progress]){border-color:var(--step-color)}.m_1959ad01:where([data-completed]){color:var(--stepper-icon-color,var(--mantine-color-white));background-color:var(--step-color);border-color:var(--step-color)}.m_8faaac38{display:flex}.m_a79331dc{color:var(--stepper-icon-color,var(--mantine-color-white));justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.m_1956aa2a{flex-direction:column;display:flex}.m_1956aa2a:where([data-icon-position=left]){margin-inline-start:var(--mantine-spacing-sm)}.m_1956aa2a:where([data-icon-position=right]){text-align:end;margin-inline-end:var(--mantine-spacing-sm)}.m_cbb57068:where([data-label-position=bottom]) .m_1956aa2a{text-align:center;margin:calc(var(--mantine-spacing-xs) / 2) 0 0;align-items:center}.m_12051f6c{font-weight:var(--mantine-font-weight-medium);font-size:var(--stepper-fz);line-height:1}.m_164eea74{margin-top:calc(var(--stepper-spacing) / 3);margin-bottom:calc(var(--stepper-spacing) / 3);font-size:calc(var(--stepper-fz) - calc(.125rem * var(--mantine-scale)));color:var(--mantine-color-dimmed);line-height:1}.m_5f93f3bb{--switch-height-xs:calc(1rem * var(--mantine-scale));--switch-height-sm:calc(1.25rem * var(--mantine-scale));--switch-height-md:calc(1.5rem * var(--mantine-scale));--switch-height-lg:calc(1.875rem * var(--mantine-scale));--switch-height-xl:calc(2.25rem * var(--mantine-scale));--switch-width-xs:calc(2rem * var(--mantine-scale));--switch-width-sm:calc(2.375rem * var(--mantine-scale));--switch-width-md:calc(2.875rem * var(--mantine-scale));--switch-width-lg:calc(3.5rem * var(--mantine-scale));--switch-width-xl:calc(4.5rem * var(--mantine-scale));--switch-thumb-size-xs:calc(.75rem * var(--mantine-scale));--switch-thumb-size-sm:calc(.875rem * var(--mantine-scale));--switch-thumb-size-md:calc(1.125rem * var(--mantine-scale));--switch-thumb-size-lg:calc(1.375rem * var(--mantine-scale));--switch-thumb-size-xl:calc(1.75rem * var(--mantine-scale));--switch-label-font-size-xs:calc(.3125rem * var(--mantine-scale));--switch-label-font-size-sm:calc(.375rem * var(--mantine-scale));--switch-label-font-size-md:calc(.4375rem * var(--mantine-scale));--switch-label-font-size-lg:calc(.5625rem * var(--mantine-scale));--switch-label-font-size-xl:calc(.6875rem * var(--mantine-scale));--switch-track-label-padding-xs:calc(.125rem * var(--mantine-scale));--switch-track-label-padding-sm:calc(.15625rem * var(--mantine-scale));--switch-track-label-padding-md:calc(.1875rem * var(--mantine-scale));--switch-track-label-padding-lg:calc(.1875rem * var(--mantine-scale));--switch-track-label-padding-xl:calc(.21875rem * var(--mantine-scale));--switch-height:var(--switch-height-sm);--switch-width:var(--switch-width-sm);--switch-thumb-size:var(--switch-thumb-size-sm);--switch-label-font-size:var(--switch-label-font-size-sm);--switch-track-label-padding:var(--switch-track-label-padding-sm);--switch-radius:calc(62.5rem * var(--mantine-scale));--switch-color:var(--mantine-primary-color-filled);--switch-disabled-color:var(--mantine-color-disabled);position:relative}.m_926b4011{opacity:0;white-space:nowrap;width:100%;height:100%;margin:0;padding:0;position:absolute;overflow:hidden}.m_9307d992{-webkit-tap-highlight-color:transparent;cursor:var(--switch-cursor,var(--mantine-cursor-type));border-radius:var(--switch-radius);background-color:var(--switch-bg);height:var(--switch-height);min-width:var(--switch-width);appearance:none;font-size:var(--switch-label-font-size);font-weight:var(--mantine-font-weight-medium);order:var(--switch-order,1);-webkit-user-select:none;user-select:none;z-index:0;color:var(--switch-text-color);align-items:center;margin:0;line-height:0;transition:background-color .15s,border-color .15s;display:flex;position:relative;overflow:hidden}.m_9307d992:where([data-without-labels]){width:var(--switch-width)}.m_926b4011:focus-visible+.m_9307d992{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_926b4011:checked+.m_9307d992{--switch-bg:var(--switch-color);--switch-text-color:var(--mantine-color-white)}.m_926b4011:disabled+.m_9307d992,.m_926b4011[data-disabled]+.m_9307d992{--switch-bg:var(--switch-disabled-color);--switch-cursor:not-allowed}[data-mantine-color-scheme=light] .m_9307d992{--switch-bg:var(--mantine-color-gray-3);--switch-text-color:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .m_9307d992{--switch-bg:var(--mantine-color-dark-5);--switch-text-color:var(--mantine-color-dark-1)}.m_9307d992[data-label-position=left]{--switch-order:2}.m_93039a1d{z-index:1;border-radius:var(--switch-radius);background-color:var(--switch-thumb-bg,var(--mantine-color-white));height:var(--switch-thumb-size);width:var(--switch-thumb-size);transition:inset-inline-start .15s;display:flex;position:absolute;inset-inline-start:var(--switch-thumb-start,var(--switch-track-label-padding))}.m_93039a1d:where([data-with-thumb-indicator]):before{content:"";background-color:var(--switch-bg);border-radius:var(--switch-radius);width:40%;height:40%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.m_93039a1d>*{margin:auto}.m_926b4011:checked+*>.m_93039a1d{--switch-thumb-start:calc(100% - var(--switch-thumb-size) - var(--switch-track-label-padding))}.m_926b4011:disabled+*>.m_93039a1d,.m_926b4011[data-disabled]+*>.m_93039a1d{--switch-thumb-bg:var(--switch-thumb-bg-disabled)}[data-mantine-color-scheme=light] .m_93039a1d{--switch-thumb-bg-disabled:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m_93039a1d{--switch-thumb-bg-disabled:var(--mantine-color-dark-3)}.m_8277e082{height:100%;min-width:calc(var(--switch-width) - var(--switch-thumb-size));padding-inline:var(--switch-track-label-padding);place-content:center;margin-inline-start:calc(var(--switch-thumb-size) + var(--switch-track-label-padding));transition:margin .15s;display:grid}.m_926b4011:checked+*>.m_8277e082{margin-inline-start:0;margin-inline-end:calc(var(--switch-thumb-size) + var(--switch-track-label-padding))}.m_b23fa0ef{border-collapse:collapse;border-spacing:0;width:100%;line-height:var(--mantine-line-height);font-size:var(--mantine-font-size-sm);table-layout:var(--table-layout,auto);caption-side:var(--table-caption-side,bottom);border:none}:where([data-mantine-color-scheme=light]) .m_b23fa0ef{--table-hover-color:var(--mantine-color-gray-1);--table-striped-color:var(--mantine-color-gray-0);--table-border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_b23fa0ef{--table-hover-color:var(--mantine-color-dark-5);--table-striped-color:var(--mantine-color-dark-6);--table-border-color:var(--mantine-color-dark-4)}.m_b23fa0ef:where([data-with-table-border]){border:calc(.0625rem * var(--mantine-scale)) solid var(--table-border-color)}.m_b23fa0ef:where([data-tabular-nums]){font-variant-numeric:tabular-nums}.m_b23fa0ef:where([data-variant=vertical]) :where(.m_4e7aa4f3){font-weight:var(--mantine-font-weight-medium)}:where([data-mantine-color-scheme=light]) .m_b23fa0ef:where([data-variant=vertical]) :where(.m_4e7aa4f3){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_b23fa0ef:where([data-variant=vertical]) :where(.m_4e7aa4f3){background-color:var(--mantine-color-dark-6)}.m_4e7aa4f3{text-align:start}.m_4e7aa4fd{background-color:#0000;border-bottom:none}@media (hover:hover){.m_4e7aa4fd:hover:where([data-hover]){background-color:var(--tr-hover-bg)}}@media (hover:none){.m_4e7aa4fd:active:where([data-hover]){background-color:var(--tr-hover-bg)}}.m_4e7aa4fd:where([data-with-row-border]){border-bottom:calc(.0625rem * var(--mantine-scale)) solid var(--table-border-color)}.m_4e7aa4ef,.m_4e7aa4f3{padding:var(--table-vertical-spacing) var(--table-horizontal-spacing,var(--mantine-spacing-xs))}.m_4e7aa4ef:where([data-with-column-border]:not(:first-child)),.m_4e7aa4f3:where([data-with-column-border]:not(:first-child)){border-inline-start:calc(.0625rem * var(--mantine-scale)) solid var(--table-border-color)}.m_4e7aa4ef:where([data-with-column-border]:not(:last-child)),.m_4e7aa4f3:where([data-with-column-border]:not(:last-child)){border-inline-end:calc(.0625rem * var(--mantine-scale)) solid var(--table-border-color)}.m_b2404537>:where(tr):where([data-with-row-border]:last-of-type){border-bottom:none}.m_b2404537>:where(tr):where([data-striped=odd]:nth-of-type(odd)),.m_b2404537>:where(tr):where([data-striped=even]:nth-of-type(2n)){background-color:var(--table-striped-color)}.m_b2404537>:where(tr)[data-hover]{--tr-hover-bg:var(--table-highlight-on-hover-color,var(--table-hover-color))}.m_b242d975{top:var(--table-sticky-header-offset,0);z-index:3}.m_b242d975:where([data-sticky]){position:sticky}.m_b242d975:where([data-sticky]) :where(.m_4e7aa4f3){top:var(--table-sticky-header-offset,0);background-color:var(--mantine-color-body);position:sticky}.m_b242d975:where([data-sticky]) :where(.m_4e7aa4fd[data-with-row-border]){border-bottom:none}.m_b242d975:where([data-sticky]) :where(.m_4e7aa4fd[data-with-row-border]) :where(.m_4e7aa4f3){box-shadow:inset 0 -1px 0 var(--table-border-color)}.m_b242d975:where([data-sticky]) :where(.m_4e7aa4f3[data-with-column-border]){border-inline:none}.m_b242d975:where([data-sticky]) :where(.m_4e7aa4f3[data-with-column-border]:not(:first-child)):before{content:"";width:calc(.0625rem * var(--mantine-scale));background-color:var(--table-border-color);position:absolute;inset-block:0;inset-inline-start:calc(-.03125rem * var(--mantine-scale))}:where([data-with-table-border]) .m_b242d975[data-sticky]{top:var(--table-sticky-header-offset,0);z-index:4;border-top:none;position:sticky}:where([data-with-table-border]) .m_b242d975[data-sticky]:before{content:"";left:0;top:calc(-.03125rem * var(--mantine-scale));width:100%;height:calc(.0625rem * var(--mantine-scale));background-color:var(--table-border-color);z-index:5;display:block;position:absolute}:where([data-with-table-border]) .m_b242d975[data-sticky] .m_4e7aa4f3:first-child{border-top:none}.m_9e5a3ac7{color:var(--mantine-color-dimmed)}.m_9e5a3ac7:where([data-side=top]){margin-bottom:var(--mantine-spacing-xs)}.m_9e5a3ac7:where([data-side=bottom]){margin-top:var(--mantine-spacing-xs)}.m_a100c15{overflow-x:var(--table-overflow)}.m_62259741{min-width:var(--table-min-width);max-height:var(--table-max-height)}.m_bcaa9990{--toc-depth-offset:.8em;flex-direction:column;display:flex}.m_375a65ef{font-size:var(--toc-size,var(--mantine-font-size-md));border-radius:var(--toc-radius,var(--mantine-radius-default));padding:.3em .8em;padding-left:max(calc(var(--depth-offset) * var(--toc-depth-offset)), .8em);display:block}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_375a65ef:where(:hover):where(:not([data-variant=none])){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_375a65ef:where(:hover):where(:not([data-variant=none])){background-color:var(--mantine-color-dark-5)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_375a65ef:where(:active):where(:not([data-variant=none])){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_375a65ef:where(:active):where(:not([data-variant=none])){background-color:var(--mantine-color-dark-5)}}.m_375a65ef:where([data-active]){background-color:var(--toc-bg);color:var(--toc-color)}[data-mantine-color-scheme=light] .m_89d60db1{--tab-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m_89d60db1{--tab-border-color:var(--mantine-color-dark-4)}.m_89d60db1{display:var(--tabs-display);flex-direction:var(--tabs-flex-direction);--tabs-list-direction:row;--tabs-panel-grow:unset;--tabs-display:block;--tabs-flex-direction:row;--tabs-list-border-width:0;--tabs-list-border-size:0 0 var(--tabs-list-border-width) 0;--tabs-list-gap:unset;--tabs-list-line-bottom:0;--tabs-list-line-top:unset;--tabs-list-line-start:0;--tabs-list-line-end:0;--tab-radius:var(--tabs-radius) var(--tabs-radius) 0 0;--tab-border-width:0 0 var(--tabs-list-border-width) 0}.m_89d60db1[data-inverted]{--tabs-list-line-bottom:unset;--tabs-list-line-top:0;--tab-radius:0 0 var(--tabs-radius) var(--tabs-radius);--tab-border-width:var(--tabs-list-border-width) 0 0 0}.m_89d60db1[data-inverted] .m_576c9d4:before{top:0;bottom:unset}.m_89d60db1[data-orientation=vertical]{--tabs-list-line-start:unset;--tabs-list-line-end:0;--tabs-list-line-top:0;--tabs-list-line-bottom:0;--tabs-list-border-size:0 var(--tabs-list-border-width) 0 0;--tab-border-width:0 var(--tabs-list-border-width) 0 0;--tab-radius:var(--tabs-radius) 0 0 var(--tabs-radius);--tabs-list-direction:column;--tabs-panel-grow:1;--tabs-display:flex}[dir=rtl] .m_89d60db1[data-orientation=vertical]{--tabs-list-border-size:0 0 0 var(--tabs-list-border-width);--tab-border-width:0 0 0 var(--tabs-list-border-width);--tab-radius:0 var(--tabs-radius) var(--tabs-radius) 0}.m_89d60db1[data-orientation=vertical][data-placement=right]{--tabs-flex-direction:row-reverse;--tabs-list-line-start:0;--tabs-list-line-end:unset;--tabs-list-border-size:0 0 0 var(--tabs-list-border-width);--tab-border-width:0 0 0 var(--tabs-list-border-width);--tab-radius:0 var(--tabs-radius) var(--tabs-radius) 0}[dir=rtl] .m_89d60db1[data-orientation=vertical][data-placement=right]{--tabs-list-border-size:0 var(--tabs-list-border-width) 0 0;--tab-border-width:0 var(--tabs-list-border-width) 0 0;--tab-radius:var(--tabs-radius) 0 0 var(--tabs-radius)}.m_89d60db1[data-variant=default]{--tabs-list-border-width:calc(.125rem * var(--mantine-scale))}[data-mantine-color-scheme=light] .m_89d60db1[data-variant=default]{--tab-hover-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m_89d60db1[data-variant=default]{--tab-hover-color:var(--mantine-color-dark-6)}.m_89d60db1[data-variant=outline]{--tabs-list-border-width:calc(.0625rem * var(--mantine-scale))}.m_89d60db1[data-variant=pills]{--tabs-list-gap:calc(var(--mantine-spacing-sm) / 2)}[data-mantine-color-scheme=light] .m_89d60db1[data-variant=pills]{--tab-hover-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m_89d60db1[data-variant=pills]{--tab-hover-color:var(--mantine-color-dark-6)}.m_89d33d6d{justify-content:var(--tabs-justify,flex-start);flex-wrap:wrap;flex-direction:var(--tabs-list-direction);gap:var(--tabs-list-gap);display:flex}.m_89d33d6d:where([data-grow]) .m_4ec4dce6{flex:1}.m_b0c91715{flex-grow:var(--tabs-panel-grow)}.m_4ec4dce6{padding:var(--mantine-spacing-xs) var(--mantine-spacing-md);font-size:var(--mantine-font-size-sm);white-space:nowrap;z-index:0;-webkit-user-select:none;user-select:none;align-items:center;line-height:1;display:flex;position:relative}.m_4ec4dce6:where(:disabled,[data-disabled]){opacity:.5;cursor:not-allowed}.m_4ec4dce6:focus{z-index:1}.m_fc420b1f{justify-content:center;align-items:center;display:flex}.m_fc420b1f:where([data-position=left]:not(:only-child)){margin-inline-end:var(--mantine-spacing-xs)}.m_fc420b1f:where([data-position=right]:not(:only-child)){margin-inline-start:var(--mantine-spacing-xs)}.m_42bbd1ae{text-align:center;flex:1}.m_576c9d4{position:relative}.m_576c9d4:before{content:"";border:1px solid var(--tab-border-color);bottom:var(--tabs-list-line-bottom);inset-inline-start:var(--tabs-list-line-start);inset-inline-end:var(--tabs-list-line-end);top:var(--tabs-list-line-top);position:absolute}.m_539e827b{border-radius:var(--tab-radius);border-width:var(--tab-border-width);background-color:#0000;border-style:solid;border-color:#0000}.m_539e827b:where([data-active]){border-color:var(--tabs-color)}@media (hover:hover){.m_539e827b:hover{background-color:var(--tab-hover-color)}.m_539e827b:hover:where(:not([data-active])){border-color:var(--tab-border-color)}}@media (hover:none){.m_539e827b:active{background-color:var(--tab-hover-color)}.m_539e827b:active:where(:not([data-active])){border-color:var(--tab-border-color)}}@media (hover:hover){.m_539e827b:disabled:hover,.m_539e827b[data-disabled]:hover{background-color:#0000}}@media (hover:none){.m_539e827b:disabled:active,.m_539e827b[data-disabled]:active{background-color:#0000}}.m_6772fbd5{position:relative}.m_6772fbd5:before{content:"";border-color:var(--tab-border-color);border-width:var(--tabs-list-border-size);bottom:var(--tabs-list-line-bottom);inset-inline-start:var(--tabs-list-line-start);inset-inline-end:var(--tabs-list-line-end);top:var(--tabs-list-line-top);border-style:solid;position:absolute}.m_b59ab47c{border-top:calc(.0625rem * var(--mantine-scale)) solid transparent;border-bottom:calc(.0625rem * var(--mantine-scale)) solid transparent;border-inline:calc(.0625rem * var(--mantine-scale)) solid transparent;border-top-color:var(--tab-border-top-color);border-bottom-color:var(--tab-border-bottom-color);border-radius:var(--tab-radius);--tab-border-bottom-color:transparent;--tab-border-top-color:transparent;--tab-border-inline-end-color:transparent;--tab-border-inline-start-color:transparent;position:relative}.m_b59ab47c:where([data-active]):before{content:"";background-color:var(--tab-border-color);bottom:var(--tab-before-bottom,calc(-.0625rem * var(--mantine-scale)));inset-inline-start:var(--tab-before-start,calc(-.0625rem * var(--mantine-scale)));inset-inline-end:var(--tab-before-end,auto);top:var(--tab-before-top,auto);width:calc(.0625rem * var(--mantine-scale));height:calc(.0625rem * var(--mantine-scale));position:absolute}.m_b59ab47c:where([data-active]):after{content:"";background-color:var(--tab-border-color);bottom:var(--tab-after-bottom,calc(-.0625rem * var(--mantine-scale)));inset-inline-start:var(--tab-after-start,auto);inset-inline-end:var(--tab-after-end,calc(-.0625rem * var(--mantine-scale)));top:var(--tab-after-top,auto);width:calc(.0625rem * var(--mantine-scale));height:calc(.0625rem * var(--mantine-scale));position:absolute}.m_b59ab47c:where([data-active]){border-top-color:var(--tab-border-top-color);border-bottom-color:var(--tab-border-bottom-color);border-inline-start-color:var(--tab-border-inline-start-color);border-inline-end-color:var(--tab-border-inline-end-color);--tab-border-top-color:var(--tab-border-color);--tab-border-inline-start-color:var(--tab-border-color);--tab-border-inline-end-color:var(--tab-border-color);--tab-border-bottom-color:var(--mantine-color-body)}.m_b59ab47c:where([data-active])[data-inverted]{--tab-border-bottom-color:var(--tab-border-color);--tab-border-top-color:var(--mantine-color-body);--tab-before-bottom:auto;--tab-before-top:calc(-.0625rem * var(--mantine-scale));--tab-after-bottom:auto;--tab-after-top:calc(-.0625rem * var(--mantine-scale))}.m_b59ab47c:where([data-active])[data-orientation=vertical][data-placement=left]{--tab-border-inline-end-color:var(--mantine-color-body);--tab-border-inline-start-color:var(--tab-border-color);--tab-border-bottom-color:var(--tab-border-color);--tab-before-end:calc(-.0625rem * var(--mantine-scale));--tab-before-start:auto;--tab-before-bottom:auto;--tab-before-top:calc(-.0625rem * var(--mantine-scale));--tab-after-start:auto;--tab-after-end:calc(-.0625rem * var(--mantine-scale))}.m_b59ab47c:where([data-active])[data-orientation=vertical][data-placement=right]{--tab-border-inline-start-color:var(--mantine-color-body);--tab-border-inline-end-color:var(--tab-border-color);--tab-border-bottom-color:var(--tab-border-color);--tab-before-start:calc(-.0625rem * var(--mantine-scale));--tab-before-end:auto;--tab-before-bottom:auto;--tab-before-top:calc(-.0625rem * var(--mantine-scale));--tab-after-end:auto;--tab-after-start:calc(-.0625rem * var(--mantine-scale))}.m_c3381914{border-radius:var(--tabs-radius);background-color:var(--tab-bg);color:var(--tab-color);--tab-bg:transparent;--tab-color:inherit}@media (hover:hover){.m_c3381914:not([data-disabled]):hover{--tab-bg:var(--tab-hover-color)}}@media (hover:none){.m_c3381914:not([data-disabled]):active{--tab-bg:var(--tab-hover-color)}}.m_c3381914[data-active][data-active]{--tab-bg:var(--tabs-color);--tab-color:var(--tabs-text-color,var(--mantine-color-white))}@media (hover:hover){.m_c3381914[data-active][data-active]:hover{--tab-bg:var(--tabs-color)}}@media (hover:none){.m_c3381914[data-active][data-active]:active{--tab-bg:var(--tabs-color)}}.m_7341320d{--ti-size-xs:calc(1.125rem * var(--mantine-scale));--ti-size-sm:calc(1.375rem * var(--mantine-scale));--ti-size-md:calc(1.75rem * var(--mantine-scale));--ti-size-lg:calc(2.125rem * var(--mantine-scale));--ti-size-xl:calc(2.75rem * var(--mantine-scale));--ti-size:var(--ti-size-md);-webkit-user-select:none;user-select:none;width:var(--ti-size);height:var(--ti-size);min-width:var(--ti-size);min-height:var(--ti-size);border-radius:var(--ti-radius,var(--mantine-radius-default));background:var(--ti-bg,var(--mantine-primary-color-filled));color:var(--ti-color,var(--mantine-color-white));border:var(--ti-bd,1px solid transparent);justify-content:center;align-items:center;line-height:1;display:inline-flex;position:relative}.m_43657ece{--offset:calc(var(--tl-bullet-size) / 2 + var(--tl-line-width) / 2);--tl-bullet-size:calc(1.25rem * var(--mantine-scale));--tl-line-width:calc(.25rem * var(--mantine-scale));--tl-radius:calc(62.5rem * var(--mantine-scale));--tl-color:var(--mantine-primary-color-filled)}.m_43657ece:where(:not([data-opposite])):where([data-align=left]){padding-inline-start:var(--offset)}.m_43657ece:where(:not([data-opposite])):where([data-align=right]){padding-inline-end:var(--offset)}.m_2ebe8099{font-weight:var(--mantine-font-weight-medium);margin-bottom:calc(var(--mantine-spacing-xs) / 2);line-height:1}.m_436178ff{--item-border:var(--tl-line-width) var(--tli-border-style,solid) var(--item-border-color);color:var(--mantine-color-text);position:relative}.m_436178ff:before{content:"";pointer-events:none;top:0;inset-inline-start:var(--timeline-line-start,0);inset-inline-end:var(--timeline-line-end,0);bottom:calc(var(--mantine-spacing-xl) * -1);border-inline-start:var(--item-border);display:var(--timeline-line-display,none);position:absolute}.m_43657ece:where(:not([data-opposite]))[data-align=left] .m_436178ff:before{--timeline-line-start:calc(var(--tl-line-width) * -1);--timeline-line-end:auto}.m_43657ece:where(:not([data-opposite]))[data-align=right] .m_436178ff:before{--timeline-line-start:auto;--timeline-line-end:calc(var(--tl-line-width) * -1)}.m_43657ece:where([data-opposite]) .m_436178ff:before{--timeline-line-start:calc(50% - var(--tl-line-width) / 2);--timeline-line-end:auto}.m_43657ece:where(:not([data-opposite])):where([data-align=left]) .m_436178ff{text-align:start;padding-inline-start:var(--offset)}.m_43657ece:where(:not([data-opposite])):where([data-align=right]) .m_436178ff{text-align:end;padding-inline-end:var(--offset)}.m_43657ece:where([data-opposite]) .m_436178ff{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);display:grid}:where([data-mantine-color-scheme=light]) .m_436178ff{--item-border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_436178ff{--item-border-color:var(--mantine-color-dark-4)}.m_436178ff:where([data-line-active]):before{border-color:var(--tli-color,var(--tl-color))}.m_436178ff:where(:not(:last-of-type)){--timeline-line-display:block}.m_436178ff:where(:not(:first-of-type)){margin-top:var(--mantine-spacing-xl)}.m_8affcee1{width:var(--tl-bullet-size);height:var(--tl-bullet-size);border-radius:var(--tli-radius,var(--tl-radius));border:var(--tl-line-width) solid;background-color:var(--mantine-color-body);color:var(--mantine-color-text);justify-content:center;align-items:center;display:flex;position:absolute;top:0}:where([data-mantine-color-scheme=light]) .m_8affcee1{border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_8affcee1{border-color:var(--mantine-color-dark-4)}.m_43657ece:where(:not([data-opposite])):where([data-align=left]) .m_8affcee1{inset-inline-start:calc((var(--tl-bullet-size) / 2 + var(--tl-line-width) / 2) * -1);inset-inline-end:auto}.m_43657ece:where(:not([data-opposite])):where([data-align=right]) .m_8affcee1{inset-inline-start:auto;inset-inline-end:calc((var(--tl-bullet-size) / 2 + var(--tl-line-width) / 2) * -1)}.m_43657ece:where([data-opposite]) .m_8affcee1{grid-area:1/2;position:relative;inset-inline-start:unset;inset-inline-end:unset}.m_8affcee1:where([data-with-child]){border-width:var(--tl-line-width)}:where([data-mantine-color-scheme=light]) .m_8affcee1:where([data-with-child]){background-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_8affcee1:where([data-with-child]){background-color:var(--mantine-color-dark-4)}.m_8affcee1:where([data-active]){border-color:var(--tli-color,var(--tl-color));background-color:var(--mantine-color-white);color:var(--tl-icon-color,var(--mantine-color-white))}.m_8affcee1:where([data-active]):where([data-with-child]){background-color:var(--tli-color,var(--tl-color));color:var(--tl-icon-color,var(--mantine-color-white))}.m_43657ece:where(:not([data-opposite])):where([data-align=left]) .m_540e8f41{text-align:start;padding-inline-start:var(--offset)}.m_43657ece:where(:not([data-opposite])):where([data-align=right]) .m_540e8f41{text-align:end;padding-inline-end:var(--offset)}.m_43657ece:where([data-opposite]):where([data-align=left]) .m_540e8f41{text-align:start;grid-area:1/3;padding-inline-start:var(--offset)}.m_43657ece:where([data-opposite]):where([data-align=right]) .m_540e8f41{text-align:end;grid-area:1/1;padding-inline-end:var(--offset)}.m_43657ece:where([data-opposite]):where([data-align=left]) .m_436178ff:where([data-alternate]) .m_540e8f41{text-align:end;grid-column:1;padding-inline-start:0;padding-inline-end:var(--offset)}.m_43657ece:where([data-opposite]):where([data-align=right]) .m_436178ff:where([data-alternate]) .m_540e8f41{text-align:start;grid-column:3;padding-inline-start:var(--offset);padding-inline-end:0}.m_43657ece:where([data-align=left]) .m_f3ba506{text-align:end;grid-area:1/1;padding-inline-end:var(--offset)}.m_43657ece:where([data-align=right]) .m_f3ba506{text-align:start;grid-area:1/3;padding-inline-start:var(--offset)}.m_43657ece:where([data-align=left]) .m_436178ff:where([data-alternate]) .m_f3ba506{text-align:start;grid-column:3;padding-inline-start:var(--offset);padding-inline-end:0}.m_43657ece:where([data-align=right]) .m_436178ff:where([data-alternate]) .m_f3ba506{text-align:end;grid-column:1;padding-inline-start:0;padding-inline-end:var(--offset)}.m_8a5d1357{font-weight:var(--title-fw);font-size:var(--title-fz);line-height:var(--title-lh);font-family:var(--mantine-font-family-headings);text-wrap:var(--title-text-wrap,var(--mantine-heading-text-wrap));margin:0}.m_8a5d1357:where([data-line-clamp]){text-overflow:ellipsis;-webkit-line-clamp:var(--title-line-clamp);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:where([data-tree-root]){--level-offset:var(--mantine-spacing-lg);--tree-line-width:calc(.0625rem * var(--mantine-scale));--tree-line-color:var(--mantine-color-default-border)}.m_f698e191{-webkit-user-select:none;user-select:none;margin:0;padding:0}.m_75f3ecf{margin:0;padding:0}.m_f6970eb1{cursor:pointer;outline:0;margin:0;padding:0;list-style:none}.m_f6970eb1:focus-visible>.m_dc283425,.m_f6970eb1[data-focus-ring]:focus>.m_dc283425{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_dc283425{padding-inline-start:var(--label-offset);position:relative}:where([data-mantine-color-scheme=light]) .m_dc283425:where([data-selected]){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_dc283425:where([data-selected]){background-color:var(--mantine-color-dark-5)}.m_dc283425:where([data-dragging]){opacity:.4}.m_dc283425:where([data-drag-over=before]):before{content:"";top:calc(-.0625rem * var(--mantine-scale));height:calc(.125rem * var(--mantine-scale));background-color:var(--mantine-primary-color-filled);pointer-events:none;z-index:1;position:absolute;inset-inline-start:var(--label-offset,0);inset-inline-end:0}.m_dc283425:where([data-drag-over=after]):after{content:"";bottom:calc(-.0625rem * var(--mantine-scale));height:calc(.125rem * var(--mantine-scale));background-color:var(--mantine-primary-color-filled);pointer-events:none;z-index:1;position:absolute;inset-inline-start:var(--label-offset,0);inset-inline-end:0}.m_dc283425:where([data-drag-over=inside]){background-color:var(--mantine-primary-color-light)}:where([data-with-lines]) .m_f6970eb1{position:relative}:where([data-with-lines]) .m_f6970eb1:not([data-level="1"]):before{content:"";top:calc(.75rem * var(--mantine-scale));width:calc(var(--level-offset) / 2);border-top:var(--tree-line-width) solid var(--tree-line-color);pointer-events:none;z-index:1;height:0;position:absolute;inset-inline-start:calc(var(--label-offset) - var(--level-offset) / 2)}:where([data-with-lines]) .m_75f3ecf>.m_f6970eb1:after{content:"";top:0;bottom:0;border-inline-start:var(--tree-line-width) solid var(--tree-line-color);pointer-events:none;z-index:1;width:0;position:absolute;inset-inline-start:calc(var(--label-offset) - var(--level-offset) / 2)}:where([data-with-lines]) .m_75f3ecf>.m_f6970eb1:last-child:after{height:calc(.75rem * var(--mantine-scale));bottom:auto}:where([data-with-lines]) .m_f6970eb1:where([data-dragging]):before,:where([data-with-lines]) .m_f6970eb1:where([data-dragging]):after,:where([data-with-lines]) .m_f6970eb1:where([data-dragging]) .m_c03b303c{display:none}.m_c03b303c{width:0;top:0;bottom:0;border-inline-start:var(--tree-line-width) solid var(--tree-line-color);pointer-events:none;z-index:1;display:none;position:absolute;inset-inline-start:calc((var(--flat-line-column) - 1.5) * var(--level-offset))}:where([data-with-lines]) .m_c03b303c{display:block}.m_bf7448d9{height:calc(.75rem * var(--mantine-scale));bottom:auto}.m_529d33e8{--ts-level-offset:calc(1.25rem * var(--mantine-scale));--ts-line-width:calc(.0625rem * var(--mantine-scale));--ts-line-color:var(--mantine-color-default-border);--ts-option-padding-y:calc(.25rem * var(--mantine-scale));--ts-option-padding-x:calc(.5rem * var(--mantine-scale))}.m_28bb748{align-items:center;gap:calc(.375rem * var(--mantine-scale));padding:var(--ts-option-padding-y) var(--ts-option-padding-x);padding-inline-start:var(--ts-option-padding-x);display:flex;position:relative}.m_aa3e3f86{--_ts-expand-icon-size:calc(1.45 * var(--combobox-option-fz,var(--mantine-font-size-sm)));width:var(--_ts-expand-icon-size);min-width:var(--_ts-expand-icon-size);height:var(--_ts-expand-icon-size);border-radius:var(--mantine-radius-sm);cursor:pointer;color:var(--mantine-color-dimmed);justify-content:center;align-items:center;display:flex;transform:rotate(-90deg)}:where([data-combobox-selected]) .m_aa3e3f86{color:var(--mantine-color-white)}:where([dir=rtl]) .m_aa3e3f86{transform:rotate(90deg)}.m_aa3e3f86:where([data-expanded]){transform:rotate(0)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_aa3e3f86:hover{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_aa3e3f86:hover{background-color:var(--mantine-color-dark-5)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_aa3e3f86:active{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_aa3e3f86:active{background-color:var(--mantine-color-dark-5)}}.m_eaa4cdee{opacity:.4;width:.8em;min-width:.8em;height:.8em;margin-inline-start:auto}:where([data-combobox-selected]) .m_eaa4cdee{opacity:1}.m_ffe3a9c1{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.m_57207d5d,.m_41b9db0b{border-inline-start:var(--ts-line-width) solid var(--ts-line-color);pointer-events:none;width:0;position:absolute;top:0;bottom:0}.m_41b9db0b:where([data-last]){height:50%;bottom:auto}.m_1246e79{border-top:var(--ts-line-width) solid var(--ts-line-color);pointer-events:none;height:0;position:absolute;top:50%}.m_d08caa0 :first-child{margin-top:0}.m_d08caa0 :last-child{margin-bottom:0}.m_d08caa0 :where(h1,h2,h3,h4,h5,h6){margin-bottom:var(--mantine-spacing-xs);text-wrap:var(--mantine-heading-text-wrap);font-family:var(--mantine-font-family-headings)}.m_d08caa0 :where(h1){margin-top:calc(1.5 * var(--mantine-spacing-xl));font-size:var(--mantine-h1-font-size);line-height:var(--mantine-h1-line-height);font-weight:var(--mantine-h1-font-weight)}.m_d08caa0 :where(h2){margin-top:var(--mantine-spacing-xl);font-size:var(--mantine-h2-font-size);line-height:var(--mantine-h2-line-height);font-weight:var(--mantine-h2-font-weight)}.m_d08caa0 :where(h3){margin-top:calc(.8 * var(--mantine-spacing-xl));font-size:var(--mantine-h3-font-size);line-height:var(--mantine-h3-line-height);font-weight:var(--mantine-h3-font-weight)}.m_d08caa0 :where(h4){margin-top:calc(.8 * var(--mantine-spacing-xl));font-size:var(--mantine-h4-font-size);line-height:var(--mantine-h4-line-height);font-weight:var(--mantine-h4-font-weight)}.m_d08caa0 :where(h5){margin-top:calc(.5 * var(--mantine-spacing-xl));font-size:var(--mantine-h5-font-size);line-height:var(--mantine-h5-line-height);font-weight:var(--mantine-h5-font-weight)}.m_d08caa0 :where(h6){margin-top:calc(.5 * var(--mantine-spacing-xl));font-size:var(--mantine-h6-font-size);line-height:var(--mantine-h6-line-height);font-weight:var(--mantine-h6-font-weight)}.m_d08caa0 :where(img){max-width:100%;margin-bottom:var(--mantine-spacing-xs)}.m_d08caa0 :where(p){margin-top:0;margin-bottom:var(--mantine-spacing-lg)}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(mark){background-color:var(--mantine-color-yellow-2);color:inherit}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(mark){background-color:var(--mantine-color-yellow-5);color:var(--mantine-color-black)}.m_d08caa0 :where(a){color:var(--mantine-color-anchor);text-decoration:none}@media (hover:hover){.m_d08caa0 :where(a):hover{text-decoration:underline}}@media (hover:none){.m_d08caa0 :where(a):active{text-decoration:underline}}.m_d08caa0 :where(hr){margin-top:var(--mantine-spacing-md);margin-bottom:var(--mantine-spacing-md);border:0;border-top:calc(.0625rem * var(--mantine-scale)) solid}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(hr){border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(hr){border-color:var(--mantine-color-dark-3)}.m_d08caa0 :where(pre){padding:var(--mantine-spacing-xs);line-height:var(--mantine-line-height);margin:0;margin-top:var(--mantine-spacing-md);margin-bottom:var(--mantine-spacing-md);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);border-radius:var(--mantine-radius-sm);overflow-x:auto}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(pre){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(pre){background-color:var(--mantine-color-dark-8)}.m_d08caa0 :where(pre) :where(code){color:inherit;background-color:#0000;border:0;border-radius:0;padding:0}.m_d08caa0 :where(kbd){--kbd-fz:calc(.75rem * var(--mantine-scale));--kbd-padding:calc(.1875rem * var(--mantine-scale)) calc(.3125rem * var(--mantine-scale));font-family:var(--mantine-font-family-monospace);line-height:var(--mantine-line-height);font-weight:var(--mantine-font-weight-bold);padding:var(--kbd-padding);font-size:var(--kbd-fz);border-radius:var(--mantine-radius-sm);border:calc(.0625rem * var(--mantine-scale)) solid;border-bottom-width:calc(.1875rem * var(--mantine-scale))}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(kbd){border-color:var(--mantine-color-gray-3);color:var(--mantine-color-gray-7);background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(kbd){border-color:var(--mantine-color-dark-3);color:var(--mantine-color-dark-0);background-color:var(--mantine-color-dark-5)}.m_d08caa0 :where(code){line-height:var(--mantine-line-height);padding:calc(.0625rem * var(--mantine-scale)) calc(.3125rem * var(--mantine-scale));border-radius:var(--mantine-radius-sm);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs)}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(code){background-color:var(--mantine-color-gray-0);color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(code){background-color:var(--mantine-color-dark-5);color:var(--mantine-color-white)}.m_d08caa0 :where(ul,ol):not([data-type=taskList]){margin-bottom:var(--mantine-spacing-md);padding-inline-start:var(--mantine-spacing-xl);list-style-position:outside}.m_d08caa0 :where(table){border-collapse:collapse;caption-side:bottom;width:100%;margin-bottom:var(--mantine-spacing-md)}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(table){--table-border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(table){--table-border-color:var(--mantine-color-dark-4)}.m_d08caa0 :where(table) :where(caption){margin-top:var(--mantine-spacing-xs);font-size:var(--mantine-font-size-sm);color:var(--mantine-color-dimmed)}.m_d08caa0 :where(table) :where(th){text-align:start;font-weight:700;font-size:var(--mantine-font-size-sm);padding:var(--mantine-spacing-xs) var(--mantine-spacing-sm)}.m_d08caa0 :where(table) :where(thead th){border-bottom:calc(.0625rem * var(--mantine-scale)) solid;border-color:var(--table-border-color)}.m_d08caa0 :where(table) :where(tfoot th){border-top:calc(.0625rem * var(--mantine-scale)) solid;border-color:var(--table-border-color)}.m_d08caa0 :where(table) :where(td){padding:var(--mantine-spacing-xs) var(--mantine-spacing-sm);border-bottom:calc(.0625rem * var(--mantine-scale)) solid;border-color:var(--table-border-color);font-size:var(--mantine-font-size-sm)}.m_d08caa0 :where(table) :where(tr:last-of-type td){border-bottom:0}.m_d08caa0 :where(details){margin-bottom:var(--mantine-spacing-md);padding:var(--mantine-spacing-sm) var(--mantine-spacing-md);border:1px solid var(--details-border-color);border-radius:var(--mantine-radius-default)}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(details){--details-border-color:var(--mantine-color-gray-3);--details-summary-hover:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(details){--details-border-color:var(--mantine-color-dark-4);--details-summary-hover:var(--mantine-color-dark-5)}.m_d08caa0 :where(details) :where(summary){align-items:center;gap:var(--mantine-spacing-xs);cursor:pointer;font-weight:600;list-style:none;display:flex;position:relative}.m_d08caa0 :where(details) :where(summary)::-webkit-details-marker{display:none}.m_d08caa0 :where(details) :where(summary):before{content:"";width:1.25rem;height:calc(1em * var(--mantine-line-height));border-radius:var(--mantine-radius-sm);flex-shrink:0}.m_d08caa0 :where(details) :where(summary:hover):before{background-color:var(--details-summary-hover)}.m_d08caa0 :where(details) :where(summary):after{content:"";inset-inline-start:calc(.4375rem * var(--mantine-scale));border-style:solid;border-width:calc(.3125rem * var(--mantine-scale)) 0 calc(.3125rem * var(--mantine-scale)) calc(.375rem * var(--mantine-scale));border-color:#0000 #0000 #0000 currentColor;width:0;height:0;position:absolute;top:50%;transform:translateY(-50%)}.m_d08caa0 :where(details):where([open])>:where(summary):after{transform:translateY(-50%)rotate(90deg)}.m_d08caa0 :where(details)>:where(:last-child){margin-bottom:0}.m_d08caa0 :where(blockquote){font-size:var(--mantine-font-size-lg);line-height:var(--mantine-line-height);margin:var(--mantine-spacing-md) 0;border-radius:var(--mantine-radius-sm);padding:var(--mantine-spacing-md) var(--mantine-spacing-lg)}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(blockquote){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(blockquote){background-color:var(--mantine-color-dark-8)}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal-BgDaEnEv.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2)format("woff2-variations");unicode-range:U+2000-2001,U+2004-2008,U+200A,U+23B8-23BD,U+2500-259F}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.react-grid-layout{transition:height .2s;position:relative}.react-grid-item{transition:left .2s,top .2s,width .2s,height .2s}.react-grid-item img{pointer-events:none;-webkit-user-select:none;user-select:none}.react-grid-item.cssTransforms{transition-property:transform,width,height}.react-grid-item.resizing{z-index:1;will-change:width, height;transition:none}.react-grid-item.react-draggable-dragging{z-index:3;will-change:transform;transition:none}.react-grid-item.dropping{visibility:hidden}.react-grid-item.react-grid-placeholder{opacity:.2;z-index:2;-webkit-user-select:none;user-select:none;background:red;transition-duration:.1s}.react-grid-item.react-grid-placeholder.placeholder-resizing{transition:none}.react-grid-item>.react-resizable-handle{opacity:0;width:20px;height:20px;position:absolute}.react-grid-item:hover>.react-resizable-handle{opacity:1}.react-grid-item>.react-resizable-handle:after{content:"";border-bottom:2px solid #0006;border-right:2px solid #0006;width:5px;height:5px;position:absolute;bottom:3px;right:3px}.react-resizable-hide>.react-resizable-handle{display:none}.react-grid-item>.react-resizable-handle.react-resizable-handle-sw{cursor:sw-resize;bottom:0;left:0;transform:rotate(90deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-se{cursor:se-resize;bottom:0;right:0}.react-grid-item>.react-resizable-handle.react-resizable-handle-nw{cursor:nw-resize;top:0;left:0;transform:rotate(180deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-ne{cursor:ne-resize;top:0;right:0;transform:rotate(270deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-w,.react-grid-item>.react-resizable-handle.react-resizable-handle-e{cursor:ew-resize;margin-top:-10px;top:50%}.react-grid-item>.react-resizable-handle.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-n,.react-grid-item>.react-resizable-handle.react-resizable-handle-s{cursor:ns-resize;margin-left:-10px;left:50%}.react-grid-item>.react-resizable-handle.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.react-resizable{position:relative}.react-resizable-handle{box-sizing:border-box;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+);background-position:100% 100%;background-repeat:no-repeat;background-origin:content-box;width:20px;height:20px;padding:0 3px 3px 0;position:absolute}.react-resizable-handle-sw{cursor:sw-resize;bottom:0;left:0;transform:rotate(90deg)}.react-resizable-handle-se{cursor:se-resize;bottom:0;right:0}.react-resizable-handle-nw{cursor:nw-resize;top:0;left:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;top:0;right:0;transform:rotate(270deg)}.react-resizable-handle-w,.react-resizable-handle-e{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;margin-left:-10px;left:50%}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}html{background:#fcfcfc}html[data-mantine-color-scheme=dark]{background:#0b0e14}:where(.mantine-Title-root,h1,h2,h3,h4,h5,h6){letter-spacing:-.01em}body{font-variant-numeric:tabular-nums}html,body,#root{min-width:320px;min-height:100%}.dashboard-grid{min-height:420px}.chat-composer-field{background:var(--mantine-color-body);transition:border-color .15s,box-shadow .15s}.chat-composer-field:focus-within{border-color:var(--mantine-primary-color-filled);box-shadow:0 0 0 2px var(--mantine-primary-color-light)}.rail-row{border-radius:var(--mantine-radius-md);transition:background-color .12s}.rail-row:hover{background:var(--mantine-color-default-hover)}.rail-row[data-active]{background:var(--mantine-primary-color-light)}.rail-row-actions{opacity:0;transition:opacity .12s}.rail-row:hover .rail-row-actions,.rail-row:focus-within .rail-row-actions{opacity:1}@media (hover:none){.rail-row-actions{opacity:1}}.react-grid-item.react-grid-placeholder{border-radius:var(--mantine-radius-lg);background:var(--mantine-primary-color-filled);opacity:.14}.react-grid-item>.react-resizable-handle{opacity:0;transition:opacity .15s}.react-grid-item:hover>.react-resizable-handle,.react-grid-item:focus-within>.react-resizable-handle{opacity:.55}.chat-pane{height:calc(100dvh - var(--app-shell-header-offset,0px));flex-direction:column;display:flex}.chat-scroll{flex:1;min-height:0;overflow-y:auto}.chat-composer{padding-bottom:var(--mantine-spacing-sm);background:var(--mantine-color-body);flex:none}.chat-message-meta,.chat-code-actions{opacity:0;transition:opacity .12s}.chat-message:hover .chat-message-meta,.chat-message:focus-within .chat-message-meta,.chat-code:hover .chat-code-actions,.chat-code:focus-within .chat-code-actions{opacity:1}@media (hover:none){.chat-message-meta,.chat-code-actions{opacity:1}}.chat-markdown :where(h1,h2,h3,h4){font-size:var(--mantine-font-size-lg);margin-top:var(--mantine-spacing-md);margin-bottom:var(--mantine-spacing-xs)}.chat-markdown :where(p,ul,ol){margin-top:0;margin-bottom:var(--mantine-spacing-sm)}.chat-table{margin-bottom:var(--mantine-spacing-sm);overflow-x:auto}.chat-code pre{margin:0 0 var(--mantine-spacing-sm);padding:var(--mantine-spacing-sm) var(--mantine-spacing-md);border:1px solid var(--mantine-color-default-border);border-radius:var(--mantine-radius-md);background:var(--mantine-color-default);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-sm);overflow-x:auto}.chat-code pre code{color:inherit;font-size:inherit;background:0 0;border-radius:0;padding:0;font-family:inherit}.widget-card .widget-body{flex-direction:column;flex:1;min-height:0;display:flex}.widget-card .widget-body>*{flex:1;min-height:0}.widget-chart{flex:1;min-height:140px}.widget-actions{opacity:0;transition:opacity .12s}.widget-card:hover .widget-actions,.widget-card:focus-within .widget-actions,.widget-actions[data-open]{opacity:1}@media (hover:none){.widget-actions{opacity:1}} diff --git a/internal/ui/dist/assets/index-DPHpSRp0.js b/internal/ui/dist/assets/index-DPHpSRp0.js deleted file mode 100644 index 48eb5824..00000000 --- a/internal/ui/dist/assets/index-DPHpSRp0.js +++ /dev/null @@ -1,17 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-CVfQ2xl8.js","assets/brand-MzZ03bSa.js","assets/auth-Co_9Gxq0.js","assets/settings-D3GW5SB3.js","assets/Tooltip-BJiO7C_G.js","assets/api-D6Wt-jwp.js","assets/WarningCircle.es-hJZtxy-A.js","assets/chat.index-CUHuiYQG.js","assets/chat-DAwpDVN4.js","assets/preload-helper-C6Mr44w1.js","assets/format-urrStEsn.js","assets/chat._threadId-CUHuiYQG.js","assets/dashboards.index-D0ibKOyV.js","assets/dashboard-CGsOX0Hw.js","assets/tokens-eDtvR5uq.js","assets/use-computed-color-scheme-6JIsge00.js","assets/dashboards._dashboardId-BflPchra.js"])))=>i.map(i=>d[i]); -import{B as e,C as t,F as n,G as r,H as i,I as a,J as o,K as s,L as c,M as l,N as u,O as d,P as f,S as p,St as m,V as h,W as g,X as _,Y as v,_ as y,_t as b,a as x,at as ee,b as te,ct as ne,d as re,dt as S,et as ie,f as ae,ft as oe,gt as se,h as ce,ht as le,j as ue,k as de,l as C,mt as fe,nt as pe,pt as me,rt as he,s as ge,st as _e,t as ve,u as ye,ut as be,x as xe,yt as Se}from"./brand-MzZ03bSa.js";import{a as Ce,d as we,f as Te,g as Ee,i as De,l as Oe,n as ke,o as Ae,r as je,t as Me,u as Ne}from"./auth-Co_9Gxq0.js";import{$ as Pe,A as Fe,B as Ie,C as Le,F as Re,G as ze,H as Be,I as Ve,J as He,K as Ue,L as We,M as Ge,N as Ke,P as qe,Q as Je,R as Ye,S as Xe,T as Ze,U as Qe,V as $e,W as et,X as tt,Y as nt,Z as rt,_ as it,a as at,at as ot,b as st,ct,d as lt,dt as ut,et as dt,ft,g as pt,i as mt,it as ht,j as gt,k as _t,l as vt,lt as yt,m as bt,n as xt,nt as St,o as Ct,ot as wt,pt as Tt,q as Et,r as Dt,rt as Ot,s as kt,st as At,t as jt,tt as Mt,u as Nt,ut as Pt,w as Ft,x as It,y as Lt,z as Rt}from"./tokens-eDtvR5uq.js";import{C as zt,b as Bt,o as Vt,t as Ht,w as Ut}from"./Tooltip-BJiO7C_G.js";import{n as Wt,t as Gt}from"./use-computed-color-scheme-6JIsge00.js";import{A as Kt,C as qt,D as Jt,E as Yt,F as Xt,H as Zt,I as Qt,L as $t,M as en,N as tn,O as nn,P as rn,R as an,S as on,_ as sn,a as cn,b as ln,c as un,d as dn,f as fn,g as pn,h as mn,i as hn,j as gn,k as _n,l as vn,m as yn,n as bn,o as xn,p as Sn,r as Cn,t as wn,u as Tn,v as En,x as Dn,y as On}from"./api-D6Wt-jwp.js";import{i as kn,n as An,o as jn,r as Mn,s as Nn,t as Pn}from"./preload-helper-C6Mr44w1.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Fn=b((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,ee||(ee=!0,ae());else{var t=n(l);t!==null&&ce(x,t.startTime-e)}}}var ee=!1,te=-1,ne=5,re=-1;function S(){return g?!0:!(e.unstable_now()-ret&&S());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ce(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ae():ee=!1}}}var ae;if(typeof y==`function`)ae=function(){y(ie)};else if(typeof MessageChannel<`u`){var oe=new MessageChannel,se=oe.port2;oe.port1.onmessage=ie,ae=function(){se.postMessage(null)}}else ae=function(){_(ie,0)};function ce(t,n){te=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(te),te=-1):h=!0,ce(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ae()))),r},e.unstable_shouldYield=S,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),In=b(((e,t)=>{t.exports=Fn()})),Ln=b((e=>{var t=In(),n=se(),r=le();function i(e){var t=`https://react.dev/errors/`+e;if(1he||(e.current=me[he],me[he]=null,he--)}function ve(e,t){he++,me[he]=e.current,e.current=t}var ye=ge(null),be=ge(null),xe=ge(null),Se=ge(null);function Ce(e,t){switch(ve(xe,t),ve(be,e),ve(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$d(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$d(t),e=ef(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ye),ve(ye,e)}function we(){_e(ye),_e(be),_e(xe)}function Te(e){e.memoizedState!==null&&ve(Se,e);var t=ye.current,n=ef(t,e.type);t!==n&&(ve(be,e),ve(ye,n))}function Ee(e){be.current===e&&(_e(ye),_e(be)),Se.current===e&&(_e(Se),sp._currentValue=pe)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ke(`Activity`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=Me(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),wn=!1;if(Cn)try{var Tn={};Object.defineProperty(Tn,"passive",{get:function(){wn=!0}}),window.addEventListener(`test`,Tn,Tn),window.removeEventListener(`test`,Tn,Tn)}catch{wn=!1}var En=null,Dn=null,On=null;function kn(){if(On)return On;var e,t=Dn,n=t.length,r,i=`value`in En?En.value:En.textContent,a=i.length;for(e=0;e=cr),dr=` `,fr=!1;function pr(e,t){switch(e){case`keyup`:return or.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function mr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var hr=!1;function gr(e,t){switch(e){case`compositionend`:return mr(t);case`keypress`:return t.which===32?(fr=!0,dr):null;case`textInput`:return e=t.data,e===dr&&fr?null:e;default:return null}}function _r(e,t){if(hr)return e===`compositionend`||!sr&&pr(e,t)?(e=kn(),On=Dn=En=null,hr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=zr(n)}}function Vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xt(e.document)}return t}function Ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Wr=Cn&&`documentMode`in document&&11>=document.documentMode,Gr=null,Kr=null,qr=null,Jr=!1;function Yr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jr||Gr==null||Gr!==Xt(r)||(r=Gr,`selectionStart`in r&&Ur(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qr&&Rr(qr,r)||(qr=r,r=Ld(Kr,`onSelect`),0>=o,i-=o,zi=1<<32-Ze(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),E&&Vi(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),E&&Vi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return E&&Vi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),E&&Vi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&Va(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ja(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=Ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Ja(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=Va(o),x(e,r,o,c)}if(de(o))return v(e,r,o,c);if(oe(o)){if(l=oe(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,qa(o),c);if(o.$$typeof===b)return x(e,r,ha(e,o),c);Ya(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ka=0;var i=x(e,t,n,r);return Ga=null,i}catch(t){if(t===Fa||t===La)throw t;var a=Ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Za=Xa(!0),Qa=Xa(!1),$a=!1;function eo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function to(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function no(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ro(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ul&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=bi(e),yi(e,null,n),t}return gi(e,r,t,n),bi(e)}function io(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function ao(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var oo=!1;function so(){if(oo){var e=Ea;if(e!==null)throw e}}function co(e,t,n,r){oo=!1;var i=e.updateQueue;$a=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Kl&p)===p:(r&p)===p){p!==0&&p===Ta&&(oo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:$a=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),eu|=o,e.lanes=o,e.memoizedState=d}}function lo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function uo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=C.T,s={};C.T=s,Us(e,!1,t,n);try{var c=i(),l=C.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Hs(e,t,ka(c,r),Su(e)):Hs(e,t,r,Su(e))}catch(n){Hs(e,t,{then:function(){},status:`rejected`,reason:n},Su())}finally{fe.p=a,o!==null&&s.types!==null&&(o.types=s.types),C.T=o}}function Ms(){}function Ns(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ps(e).queue;js(e,a,t,pe,n===null?Ms:function(){return Fs(e),n(r)})}function Ps(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fs(e){var t=Ps(e);t.next===null&&(t=e.alternate.memoizedState),Hs(e,t.next.queue,{},Su())}function Is(){return ma(sp)}function Ls(){return O().memoizedState}function Rs(){return O().memoizedState}function zs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Su();e=no(n);var r=ro(t,e,n);r!==null&&(wu(r,t,n),io(r,t,n)),t={cache:xa()},e.payload=t;return}t=t.return}}function Bs(e,t,n){var r=Su();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ws(e)?Gs(t,n):(n=_i(e,t,n,r),n!==null&&(wu(n,e,r),Ks(n,t,r)))}function Vs(e,t,n){Hs(e,t,n,Su())}function Hs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ws(e))Gs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Lr(s,o))return gi(e,t,i,0),Wl===null&&hi(),!1}catch{}if(n=_i(e,t,i,r),n!==null)return wu(n,e,r),Ks(n,t,r),!0}return!1}function Us(e,t,n,r){if(r={lane:2,revertLane:xd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ws(e)){if(t)throw Error(i(479))}else t=_i(e,n,r,2),t!==null&&wu(t,e,2)}function Ws(e){var t=e.alternate;return e===D||t!==null&&t===D}function Gs(e,t){Ao=ko=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ks(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var qs={readContext:ma,use:qo,useCallback:Io,useContext:Io,useEffect:Io,useImperativeHandle:Io,useLayoutEffect:Io,useInsertionEffect:Io,useMemo:Io,useReducer:Io,useRef:Io,useState:Io,useDebugValue:Io,useDeferredValue:Io,useTransition:Io,useSyncExternalStore:Io,useId:Io,useHostTransitionStatus:Io,useFormState:Io,useActionState:Io,useOptimistic:Io,useMemoCache:Io,useCacheRefresh:Io};qs.useEffectEvent=Io;var Js={readContext:ma,use:qo,useCallback:function(e,t){return Go().memoizedState=[e,t===void 0?null:t],e},useContext:ma,useEffect:vs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),gs(4194308,4,ws.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gs(4194308,4,e,t)},useInsertionEffect:function(e,t){gs(4,2,e,t)},useMemo:function(e,t){var n=Go();t=t===void 0?null:t;var r=e();if(jo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Go();if(n!==void 0){var i=n(t);if(jo){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Bs.bind(null,D,e),[r.memoizedState,e]},useRef:function(e){var t=Go();return e={current:e},t.memoizedState=e},useState:function(e){e=ns(e);var t=e.queue,n=Vs.bind(null,D,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Es,useDeferredValue:function(e,t){return ks(Go(),e,t)},useTransition:function(){var e=ns(!1);return e=js.bind(null,D,e.queue,!0,!1),Go().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=D,a=Go();if(E){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Wl===null)throw Error(i(349));Kl&127||j(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,vs(M.bind(null,r,o,e),[e]),r.flags|=2048,ms(9,{destroy:void 0},$o.bind(null,r,o,n,t),null),n},useId:function(){var e=Go(),t=Wl.identifierPrefix;if(E){var n=Bi,r=zi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Mo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[bt]=t,o[xt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Rc(t)}}return Uc(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,ea(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[bt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ud(e.nodeValue,n)),e||Zi(t,!0)}else e=Qd(e).createTextNode(r),e[bt]=t,t.stateNode=e}return Uc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ea(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[bt]=t}else ta(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),e=!1}else n=na(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Co(t),t):(Co(t),null);if(t.flags&128)throw Error(i(558))}return Uc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ea(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[bt]=t}else ta(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),a=!1}else a=na(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Co(t),t):(Co(t),null)}return Co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vc(t,t.updateQueue),Uc(t),null);case 4:return we(),e===null&&Nd(t.stateNode.containerInfo),Uc(t),null;case 10:return ca(t.type),Uc(t),null;case 19:if(_e(wo),r=t.memoizedState,r===null)return Uc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Hc(r,!1);else{if($l!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=To(e),o!==null){for(t.flags|=128,Hc(r,!1),e=o.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)T(n,e),n=n.sibling;return ve(wo,wo.current&1|2),E&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>uu&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=To(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!E)return Uc(t),null}else 2*ze()-r.renderingStartTime>uu&&n!==536870912&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Uc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,n=wo.current,ve(wo,a?n&1|2:n&1),E&&Vi(t,r.treeForkCount),e);case 22:case 23:return Co(t),go(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Uc(t),t.subtreeFlags&6&&(t.flags|=8192)):Uc(t),n=t.updateQueue,n!==null&&Vc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&_e(ja),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ca(ba),Uc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Gc(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ca(ba),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Co(t),t.alternate===null)throw Error(i(340));ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(wo),null;case 4:return we(),null;case 10:return ca(t.type),null;case 22:case 23:return Co(t),go(),e!==null&&_e(ja),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ca(ba),null;case 25:return null;default:return null}}function Kc(e,t){switch(Wi(t),t.tag){case 3:ca(ba),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&Co(t);break;case 13:Co(t);break;case 19:_e(wo);break;case 10:ca(t.type);break;case 22:case 23:Co(t),go(),e!==null&&_e(ja);break;case 24:ca(ba)}}function qc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ed(t,t.return,e)}}function Jc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ed(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ed(t,t.return,e)}}function Yc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{uo(t,n)}catch(t){ed(e,e.return,t)}}}function Xc(e,t,n){n.props=tc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ed(e,t,n)}}function Zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ed(e,t,n)}}function z(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ed(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ed(e,t,n)}else n.current=null}}function Qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ed(e,e.return,t)}}function $c(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[xt]=t}catch(t){ed(e,e.return,t)}}function el(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function tl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||el(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mn));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[bt]=e,t[xt]=n}catch(t){ed(e,e.return,t)}}var al=!1,ol=!1,sl=!1,cl=typeof WeakSet==`function`?WeakSet:Set,ll=null;function ul(e,t){if(e=e.containerInfo,Xd=hp,e=Hr(e),Ur(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},hp=!1,ll=t;ll!==null;)if(t=ll,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ll=e;else for(;ll!==null;){switch(t=ll,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Kd(o,r,n),o[bt]=e,Nt(o),r=o;break a;case`link`:var s=U(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Br(s,h),v=Br(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,C.T=null,n=vu,vu=null;var o=mu,s=gu;if(pu=0,hu=mu=null,gu=0,Ul&6)throw Error(i(331));var c=Ul;if(Ul|=4,Rl(o.current),Al(o,o.current,s,n),Ul=c,md(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{fe.p=a,C.T=r,Xu(e,t)}}function $u(e,t,n){t=ji(n,t),t=sc(e.stateNode,t,2),e=ro(e,t,2),e!==null&&(ut(e,2),pd(e))}function ed(e,t,n){if(e.tag===3)$u(e,e,n);else for(;t!==null;){if(t.tag===3){$u(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(fu===null||!fu.has(r))){e=ji(n,e),n=cc(2),r=ro(t,n,2),r!==null&&(lc(n,r,t,e),ut(r,2),pd(r));break}}t=t.return}}function td(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Zl=!0,i.add(n),e=nd.bind(null,e,t,n),t.then(e,e))}function nd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Wl===e&&(Kl&n)===n&&($l===4||$l===3&&(Kl&62914560)===Kl&&300>ze()-cu?!(Ul&2)&&ju(e,0):nu|=n,iu===Kl&&(iu=0)),pd(e)}function rd(e,t){t===0&&(t=ct()),e=vi(e,t),e!==null&&(ut(e,t),pd(e))}function id(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rd(e,n)}function ad(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),rd(e,n)}function od(e,t){return Fe(e,t)}var sd=null,cd=null,ld=!1,ud=!1,dd=!1,fd=0;function pd(e){e!==cd&&e.next===null&&(cd===null?sd=cd=e:cd=cd.next=e),ud=!0,ld||(ld=!0,bd())}function md(e,t){if(!dd&&ud){dd=!0;do for(var n=!1,r=sd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,yd(r,a))}else a=Kl,a=at(r,r===Wl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,yd(r,a))}r=r.next}while(n);dd=!1}}function hd(){gd()}function gd(){ud=ld=!1;var e=0;fd!==0&&rf()&&(e=fd);for(var t=ze(),n=null,r=sd;r!==null;){var i=r.next,a=_d(r,t);a===0?(r.next=null,n===null?sd=i:n.next=i,i===null&&(cd=n)):(n=r,(e!==0||a&3)&&(ud=!0)),r=i}pu!==0&&pu!==5||md(e,!1),fd!==0&&(fd=0)}function _d(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Mf(e,t,n){var r=jf;if(r&&typeof t==`string`&&t){var i=Qt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Ef.has(i)||(Ef.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function Nf(e){Of.D(e),Mf(`dns-prefetch`,e,null)}function Pf(e,t){Of.C(e,t),Mf(`preconnect`,e,t)}function Ff(e,t,n){Of.L(e,t,n);var r=jf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Qt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Qt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Qt(n.imageSizes)+`"]`)):i+=`[href="`+Qt(e)+`"]`;var a=i;switch(t){case`style`:a=Vf(e);break;case`script`:a=Gf(e)}Tf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Tf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Hf(a))||t===`script`&&r.querySelector(Kf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function If(e,t){Of.m(e,t);var n=jf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Qt(r)+`"][href="`+Qt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Gf(e)}if(!Tf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Tf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Kf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),Nt(r),n.head.appendChild(r)}}}function Lf(e,t,n){Of.S(e,t,n);var r=jf;if(r&&e){var i=Mt(r).hoistableStyles,a=Vf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Hf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Tf.get(a))&&Yf(e,n);var c=o=r.createElement(`link`);Nt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Jf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Rf(e,t){Of.X(e,t);var n=jf;if(n&&e){var r=Mt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=f({src:e,async:!0},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),Nt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t){Of.M(e,t);var n=jf;if(n&&e){var r=Mt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),Nt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t,n,r){var a=(a=xe.current)?Df(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Vf(n.href),n=Mt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Vf(n.href);var o=Mt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Hf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Tf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Tf.set(e,n),o||Wf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Gf(n),n=Mt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Vf(e){return`href="`+Qt(e)+`"`}function Hf(e){return`link[rel="stylesheet"][`+e+`]`}function Uf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Wf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),Nt(t),e.head.appendChild(t))}function Gf(e){return`[src="`+Qt(e)+`"]`}function Kf(e){return`script[async]`+e}function qf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Qt(n.href)+`"]`);if(r)return t.instance=r,Nt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Nt(r),Kd(r,`style`,a),Jf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Vf(n.href);var o=e.querySelector(Hf(a));if(o)return t.state.loading|=4,t.instance=o,Nt(o),o;r=Uf(n),(a=Tf.get(a))&&Yf(r,a),o=(e.ownerDocument||e).createElement(`link`),Nt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,Jf(o,n.precedence,e),t.instance=o;case`script`:return o=Gf(n.src),(a=e.querySelector(Kf(o)))?(t.instance=a,Nt(a),a):(r=n,(a=Tf.get(o))&&(r=f({},n),Xf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Nt(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Jf(r,n.precedence,e));return t.instance}function Jf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Vf(r.href),a=t.querySelector(Hf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=W.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nt(a);return}a=t.ownerDocument||t,r=Uf(r),(i=Tf.get(i))&&Yf(r,i),a=a.createElement(`link`),Nt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=W.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function W(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,W.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ln()}));function zn(e){return e?.isNotFound===!0}function Bn(){try{return sessionStorage}catch{return}}var Vn=`tsr-scroll-restoration-v1_3`,Hn=Bn();function Un(){try{return JSON.parse(Hn?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Wn(){try{Hn?.setItem(Vn,JSON.stringify(Gn))}catch{}}var Gn=Un(),Kn=`data-scroll-restoration-id`,qn=e=>e.state.__TSR_key||e.href;function Jn(e){let t=e.getAttribute(Kn);if(t)return`[${Kn}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Yn=!1,Xn=`window`;function Zn(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Qn(e){let t=new Set;for(let n of e){if(n===Xn)continue;let e=Zn(n);e&&t.add(e)}return t}function $n(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||qn,a=new Set,o=e=>{let t=Gn[e]||={};for(let e of a)e===document?t[Xn]={scrollX,scrollY}:e.isConnected&&(t[Jn(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Yn=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Yn||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Wn()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=Gn[d];if(e){let t=Gn[u];for(let n in e){if(n===Xn){if(s)continue}else{let e=Zn(n);if(!e||s&&o&&(l??=Qn(o),l.has(e)))continue}t||=Gn[u]={},t[n]??=e[n]}}}Yn=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Qn(o));let t=e&&i&&c,s=r.restoring?Gn[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Xn){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Zn(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Yn=!1}}))}function er(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function tr(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function nr(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=tr(r):Array.isArray(t)?t.push(tr(r)):n[e]=[t,tr(r)]}return n}var rr=/^(?:\s|["[{\d-]|fa|nu|tr)/,ir=or(JSON.parse),ar=sr(JSON.stringify,JSON.parse);function or(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=nr(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function sr(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!rr.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=er(e,r);return t?`?${t}`:``}}function cr(e){return{input:({url:t})=>{for(let n of e)t=ur(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=dr(e[n],t);return t}}}function lr(e){let t=He(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Ue([`/`,t,e.pathname]),e)}}function ur(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function dr(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function fr(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{ht(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var pr=`__TSR_index`,mr=`popstate`,hr=`beforeunload`;function gr(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=br(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[pr];i=_r(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[pr];i=_r(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[pr]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function _r(e,t){t||={};let n=xr();return{...t,key:n,__TSR_key:n,[pr]:e}}function vr(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>br(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=xr();t.history.replaceState({[pr]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(ee._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),ee._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(e,t,n)=>{let r=s(t),i=!!g;i||(u=l),l=br(t,n),g=[r,n,g?.[2]||e],i||queueMicrotask(()=>_())},y=e=>{l=c(),ee.notify({type:e})},b=async()=>{if(f){f=!1;return}let e=c(),n=e.state[pr]-l.state[pr],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),ee.notify(u);return}}}l=c(),ee.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},ee=gr({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(hr,x,{capture:!0}),t.removeEventListener(mr,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(hr,x,{capture:!0}),t.addEventListener(mr,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return ee._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return ee._ignoreSubscribers||y(`REPLACE`),n},ee}function yr(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function br(e,t){let n=yr(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=xr();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[pr]:0,key:a,__TSR_key:a}}}function xr(){return(Math.random()+1).toString(36).substring(7)}function Sr(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Cr(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function wr({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Tr(e,t,n,r){for(let i of t){if(r&&e._tx!==r)return;n.some(e=>e.routeId===i.routeId)||e.routesById[i.routeId].options.onLeave?.(i)}for(let i of n){if(r&&e._tx!==r)return;e.routesById[i.routeId].options[t.some(e=>e.routeId===i.routeId)?`onStay`:`onEnter`]?.(i)}}var Er=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=et(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:vr()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=St(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=fr(this.latestLocation,e),$n(this)}let a=this.options.basepath??`/`,o=this.options.rewrite;if(r||n!==a||i!==o){this.basepath=a;let e=[],t=He(a);t&&t!==`/`&&e.push(lr({basepath:a})),o&&e.push(o),this.rewrite=e.length===0?void 0:e.length===1?e[0]:cr(e),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Mt(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&dt(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:ot(e).path,external:!1,searchStr:o,search:ft(t?.search,i),hash:ot(r.slice(1)).path,state:Tt(t?.state,a)}}let o=new URL(i,this.origin),s=ur(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:ot(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:ft(t?.search,c),hash:ot(s.hash.slice(1)).path,state:Tt(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>Et({base:e,to:t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Je(nt(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let t=(t={})=>{if(t.href){let e=br(t.href,{});t={...t,to:ur(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let n=t._fromLocation||this._pendingLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r[1],a=r[2],o=r[3],s=this.resolvePathWithBase(i,t.to?`${t.to}`:`.`),c=Mr(t.params,o),l=this.routesByPath[nt(s)],u;if(l)u=this.getRouteBranch(l);else if(s.includes(`$`))u=[];else{let[e,t,n]=this.getMatchedRoutes(s);u=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(u=[...u,this.options.notFoundRoute])}if(u.length&&yt(c))for(let e of u){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){c===o&&(c=Object.assign(Object.create(null),c));try{Object.assign(c,t(c))}catch{}}}let d=e.leaveParams?s:ot(ze({path:s,params:c,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,f=a;if(e._includeValidateSearch&&this.options.search?.strict){let e={};u.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,kr(t.options.validateSearch,{...e,...f}))}catch{}}),f=e}f=Ar(f,t,u,e._includeValidateSearch),f=ft(a,f);let p=this.options.stringifySearch(f),m=t.hash===!0?n.hash:t.hash?ct(t.hash,n.hash):void 0,h=m?`#${m}`:``,g=t.state===!0?n.state:t.state?ct(t.state,n.state):{};t.state&&(g=Tt(n.state,g));let _=`${d}${p}${h}`,v,y,b=!1;if(this.rewrite){let e=new URL(_,this.origin),t=dr(this.rewrite,e);v=e.href.replace(e.origin,``),t.origin===this.origin?y=t.pathname+t.search+t.hash:(y=t.href,b=!0)}else v=At(_),y=v;return{publicHref:y,href:v,pathname:d,search:f,searchStr:p,state:g,hash:m??``,external:b,unmaskOnReload:t.unmaskOnReload}},n=t(e);if(e.mask)n.maskedLocation=t({from:e.from,...e.mask});else if(this.options.routeMasks){let r=rt(n.pathname,this.processedTree);if(r){let i=Object.assign(Object.create(null),r.rawParams),{from:a,params:o,...s}=r.route,c=Mr(o,i);n.maskedLocation=t({from:e.from,...s,params:c})}}return n},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=nt(this.latestLocation.href)===nt(n.href)&&wt(wr(n.state),wr(this.latestLocation.state)),a=this._commitPromise,o,s=new Promise(e=>{o=e});if(s.resolve=()=>{o(),a?.resolve()},this._commitPromise=s,i)this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:r}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(Pt(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Ci(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Cr(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Sr(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href){let t=this.buildLocation(e.options).publicHref||`/`;e.options.href=t,e.headers.set(`Location`,t)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&Pt(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=Ir,this.preloadRoute=e=>wi(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Pe(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!wt(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?wt(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ar,parseSearch:e.parseSearch??ir,protocolAllowlist:e.protocolAllowlist??Ot}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=tt(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:nt(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?jr(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;r&&n&&i.push(({search:e,next:t,meta:r})=>{let i=t(e);try{let e=kr(n,i);if(r&&e)for(let t in e)t in i||(r.defaulted||=new Map).set(t,e[t]);return{...i,...e}}catch{}return i})}let a=(e,n,r)=>{if(e>=i.length){if(!t.search)return{};if(t.search===!0)return n;let e=ct(t.search,n);return r&&(r.explicit=e),e}return i[e]({search:n,next:(t,n)=>{if(n){let n=r||{};return{search:a(e+1,t,n),meta:n}}return a(e+1,t,r)},meta:r})};return a(0,e)}function jr(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return Qe}function Mr(e,t){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return t;let n=Object.assign(Object.create(null),t);return Object.assign(n,ct(e,n))}function Nr(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Pr(e,t){return e.options[t]?.preload?.()}function Fr(e,t){let n=Pr(e,`component`),r=Pr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function Ir(e,t,n){let r=()=>t===!1?void 0:t?Pr(e,t):Fr(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Lr(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).finally(()=>t.removeEventListener(`abort`,i))})}function Gr(e,t){return e.routesById[t.routeId]}function Kr(e,t,n){return Be(e)?[Vr,e]:zn(e)?(e.routeId||=n,[Br,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[zr,e]):[Rr,e]}function qr(e,t){let n=Kr(t,!0,e.id);if(n[0]!==zr)return n;try{e.options.onError?.(n[1])}catch(t){n=Kr(t,!0,e.id)}return n}function Jr(e,t,n,r,i){return i[0].signal.aborted?Hr:ui(e,t,n,qr(n,r),i)}async function Yr(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;ie.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Zr(e,r),[i,Jr(e,t,u,a,n)]}if(c.aborted)return[i,Hr];let p=r.paramsError??r.searchError;if(p!==void 0)return Zr(e,r),[i,Jr(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{ei(e,r,`beforeLoad`,n[0]);let a=await Wr(m({...f,search:r.search,context:r.context,...e.options.additionalContext}),c);if(c.aborted)return[i,Hr];let o=ui(e,t,u,Kr(a,!1,u.id),n);if(o[0]!==Rr)return Zr(e,r),[i,o];r.context={...r.context,...a}}catch(a){return Zr(e,r),[i,Jr(e,t,u,a,n)]}finally{r.status=h,ei(e,r,!1,n[0])}}i()}function Xr(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Zr(e,t){let n=t._flight;t._flight=void 0,Xr(e,t,n)?.abort()}function Qr(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Xr(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function $r(e){for(let t of e){let e=t._flight;e&&e[2]++}}function ei(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function ti(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function ni(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Hr;if(!i)return[Rr,void 0];let l=n._flight;ei(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(ti(e,t,n,r,s,a,!!o[3]))).then(e=>Kr(e,!1,r.id),e=>Kr(e,!0,r.id)).then(t=>(t[0]!==Rr&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===zr&&l[2]?qr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],ui(e,t,r,await Wr(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Zr(e,n),Hr}finally{ei(e,n,!1,s)}}function ri(e,t,n){t[0]!==Vr&&(e.status=`success`,e.error=void 0,t[0]===Rr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function ii(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Zr(e,r)}function ai(e,t){return t[0]===zr||t[0]===Br?{...e,status:t[0]===zr?`error`:`notFound`,error:t[1],_flight:void 0}:e}function oi(e,t,n,r,i,a,o){let s=t[1][n],c=Gr(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(ti(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Hr)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,Zr(e,s),p=Jr(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),ee=n>=o?a[7]:void 0,te=c.lazyFn&&c._lazy!==!0?ee:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Xr(e,s,t)?.abort(),n>=o&&(s.status=`pending`),ee?.()}b||(s.isFetching=!1);let ne=(p?Promise.resolve(p):x?ni(e,t,s,c,g,i,a):Promise.resolve([Rr,s.loaderData])).then(t=>(x&&(ri(s,t,l),t[0]===Rr&&(m&&!a[0].signal.aborted&&ii(e,s,u),n>=o&&(s.status=`pending`))),t)),re=Wr(Promise.resolve().then(()=>Ir(c,void 0,te)),a[0].signal).then(()=>void 0,r=>t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound))?void 0:[n,Jr(e,t,c,r,a)]).then(e=>ne.then(t=>(x&&!e&&t[0]===Rr&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,ee?.()),e)));if(r.push([n,ne,re]),!y)return ne.then(e=>ai(s,e));let S={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ie=ni(e,t,S,c,g,i,a).then(e=>(s.isFetching=!1,ri(S,e,!1),e));return(t[2]??=[]).push([n,ie,re,S]),ie.then(e=>ai(S,e))}async function si(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Gr(e,t[n]);try{let e=Ir(i,!1);e&&await Wr(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function ci(e,t){t[2]&&=(Qr(e,t[2].map(e=>e[3])),void 0)}async function li(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Vr)throw[a,t];!i&&t[0]!==Rr&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Vr)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function ui(e,t,n,r,i,a){for(;r[0]===Vr;){let o=r[1],s=o.options;if(s.reloadDocument?i[3]:i[1]>=20)return r;try{return s.href&&s.reloadDocument?(e.resolveRedirect(o),r):[Vr,o,e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0})]}catch(e){r=a?[zr,e]:qr(n,e),a=!0}}return r}async function di(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Br?si(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Vr)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Rr&&t[0]=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Vr){let n=s[1];if(n[0]!==Vr||n[1].options.reloadDocument||n[2])return ci(e,t),n;c=!0,s=[0,[zr,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===zr?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Gr(e,u);try{await Wr(i?Promise.resolve().then(()=>Ir(m,l===zr?`errorComponent`:`notFoundComponent`)):Promise.all([Ir(m),Ir(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return ci(e,t),Hr}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),ci(e,t),Qr(e,o),p()):u.status=`success`}return t}async function fi(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;te._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await si(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l{for(let t=d;t=Vr&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=di(e,i,u,r[0],li(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=li(i[2],void 0,void 0,h.then(e=>Ur(e)?0:Lr(n).length,()=>0))),o=await h}catch(t){if(ci(e,i),t===a&&a.aborted)return Hr;throw t}return Ur(o)?o:fi(e,o,a,r[6]===n.length?r[6]:0)}function mi(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a0){i[3]=setTimeout(()=>mi(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function hi(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function gi(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Lr(t[3]).some(e=>e.id===n[1]))return;let i;try{await Wr(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function _i(e,t){e._committed=t,e.stores.setMatches(t)}function vi(e,t,n,r){let i=e._committed,a=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let o=Lr(n).length,s=new Map;{let t=Date.now();for(let r of[...i,...a.values()]){if(r.status!==`success`||n.some((e,t)=>e.id===r.id&&(t=(r.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||s.set(r.id,a.get(r.id)===r?r:{...r,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=s,_i(e,n),Qr(e,[...a.values(),...i],[...n,...s.values()]),Tr(e,i,n,t)}async function yi(e,t){let n=e._tx;for(;n&&n!==t;){if(await n[5],e._tx===n)return;n=e._tx}}function bi(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:i.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function xi(e,t,n,r,i){let a=n.map(e=>({...e}));$r(a);for(let t of r)Zr(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await di(e,o,r,t[0],i)}catch(t){throw Qr(e,a),t}if(Ur(s)){Qr(e,a),s[0]===Vr&&e._tx===t&&e._committed===n&&await bi(e,t,s);return}if(await fi(e,s,t[0].signal),e._tx!==t||e._committed!==n){Qr(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Zr(e,n))}_i(e,a),Qr(e,n,a)}async function Si(e,t,n,r,i,a){let o=await pi(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Ur(o)){let n=o[0]===Vr&&e._tx===t;if((!n||o[1].options.reloadDocument)&&hi(e,t),Qr(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){hi(e,t);return}await bi(e,t,o);return}let s=o[1];if(e._tx===t&&await gi(e,t),e._tx!==t){hi(e,t),Qr(e,s),ci(e,o);return}let c=t[2],l=Cr(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await gi(e,t),e._tx!==t){hi(e,t),Qr(e,s),ci(e,o);return}let n=await e.startTransition(()=>{hi(e,t),vi(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){ci(e,o);return}u?.length&&xi(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function Ci(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Cr(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await yi(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});$r(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Qr(e,m),await yi(e,n);return}e._preflight=void 0;let g,_=()=>Si(e,y,f,()=>mi(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_).then(),y=[p,s,a,m,Date.now(),v];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&ei(e,t,!1)}n[0].abort(),Qr(e,n[3],y[3],!0)}if(e._tx!==y){Qr(e,y[3]),y[3]=[],g?.(),await yi(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&mi(e,y),g?.(_()),await v,await yi(e,y)}async function wi(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),$r(a),o=(e._preloads??=new Map).set(i,a),s=await pi(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Qr(e,a)),i.abort()}if(!Ur(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){zn(e)||console.error(e);return}}}var w=m(se(),1),T=fe(),Ti=class extends w.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?w.createElement(this.props.errorComponent??Ei,{error:e,reset:this.reset}):this.props.children}};function Ei({error:e}){let[t,n]=w.useState(!1);return(0,T.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,T.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,T.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,T.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,T.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,T.jsx)(`div`,{children:(0,T.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,T.jsx)(`code`,{children:e.message}):null})}):null]})}var Di=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(Di||{});function Oi({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function ki(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Ai=[],ji=0,{link:Mi,unlink:Ni,propagate:Pi,checkDirty:Fi,shallowPropagate:Ii}=Oi({update(e){return e._update()},notify(e){Ai[Ri++]=e,e.flags&=~Di.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Di.Mutable|Di.Dirty,Hi(e))}}),Li=0,Ri=0,zi,Bi=0;function Vi(e){try{++Bi,e()}finally{--Bi||Ui()}}function Hi(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Ni(n,e)}function Ui(){if(!(Bi>0)){for(;Li{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=zi,o=t?.compare??Object.is;if(n)zi=i,++ji,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=Di.Mutable|Di.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{zi=a,n&&(i.flags&=~Di.RecursedCheck),Hi(i)}}};return n?(i.flags=Di.Mutable|Di.Dirty,i.get=function(){let e=i.flags;if(e&Di.Dirty||e&Di.Pending&&Fi(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Ii(e)}}else e&Di.Pending&&(i.flags=e&~Di.Pending);return zi!==void 0&&Mi(i,zi,ji),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Pi(e),Ii(e),Ui())}},i}function Gi(e){let t=()=>{let t=zi;zi=n,++ji,n.depsTail=void 0,n.flags=Di.Watching|Di.RecursedCheck;try{return e()}finally{zi=t,n.flags&=~Di.RecursedCheck,Hi(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Di.Watching|Di.RecursedCheck,notify(){let e=this.flags;e&Di.Dirty||e&Di.Pending&&Fi(this.deps,this)?t():this.flags=Di.Watching},stop(){this.flags=Di.None,this.depsTail=void 0,Hi(this)}};return t(),n}function Ki(e){let t=we(),n=`not-found-${Rt(t.stores.location,e=>e.pathname)}-${Rt(t.stores.status,e=>e)}`;return(0,T.jsx)(Ti,{getResetKey:()=>n,onCatch:(t,n)=>{if(zn(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(zn(t))return e.fallback?.(t);throw t},children:e.children})}function qi(){return(0,T.jsx)(`p`,{children:`Not Found`})}function E(e){return(0,T.jsx)(T.Fragment,{children:e.children})}function Ji(e,t,n){return t.options.notFoundComponent?(0,T.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,T.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,T.jsx)(qi,{})}function Yi(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,T.jsx)(n,{}):null}var Xi=(e,t)=>e[0]===t[0]&&e[1]===t[1],Zi=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Qi=w.memo(function({routeId:e}){let t=we();return(0,T.jsx)($i,{router:t,match:Rt(t.stores.getMatchStore(e),e=>e)})});function $i({router:e,match:t}){let n=e.routesById[t.routeId],r=Yi(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Zi(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?w.Suspense:E,l=i?Ti:E,u=o?Ki:E;return(0,T.jsxs)(n.isRoot?n.options.shellComponent??E:E,{children:[(0,T.jsx)(Ie.Provider,{value:t.routeId,children:(0,T.jsx)(c,{fallback:r,children:(0,T.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(zn(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:(0,T.jsx)(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return w.createElement(o,e)},children:s?(0,T.jsx)($e,{fallback:r,children:(0,T.jsx)(ea,{match:t})}):(0,T.jsx)(ea,{match:t})})})})}),null]})}var ea=w.memo(function({match:e}){let t=we(),n=e.routeId,r=t.routesById[n],i=w.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=w.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,T.jsx)(e,{},i):(0,T.jsx)(ta,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Zi(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Yi(t,r)}if(e.status===`notFound`)return Ji(t,r,e.error);if(e.status===`error`)throw e.error;return a}),ta=w.memo(function(){let e=we(),t=w.useContext(Ie),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Rt(a,e=>[!!e._notFound,e.error],Xi),i=Rt(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Ji(e,e.routesById[t],r);if(!i)return null;let a=(0,T.jsx)(Qi,{routeId:i});return t===`__root__`?(0,T.jsx)(w.Suspense,{fallback:Yi(e),children:a}):a});function na(e,t){let n=e[1];e.length=0,n?.(t)}function ra({t:e}){let t=we(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{na(n,!1),n.push(i,a),e(t),w.startTransition(r)}),Ee(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(nt(r.publicHref)!==nt(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Cr(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function ia(){let e=we(),t=e.routesById[Qe],n=Yi(e,t),r=e.ssr?E:w.Suspense,i=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(ra,{t:w.useState()[1]}),(0,T.jsx)(r,{fallback:n,children:(0,T.jsx)(aa,{})})]});return e.options.InnerWrap?(0,T.jsx)(e.options.InnerWrap,{children:i}):i}function aa(){let e=we(),t=e._rendered,n=Rt(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;Ee(()=>{t[0]===n&&na(t,!0)},[t,n]);let a=i?(0,T.jsx)(Qi,{routeId:i}):null;return(0,T.jsx)(Ie.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,T.jsx)(Ti,{getResetKey:()=>r,onCatch:void 0,children:a})})}var oa=e=>({createMutableStore:Wi,createReadonlyStore:Wi,batch:Vi}),sa=e=>new ca(e),ca=class extends Er{constructor(e){super(e,oa)}};function la({router:e,children:t,...n}){yt(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,T.jsx)(Te.Provider,{value:e,children:t});return e.options.Wrap?(0,T.jsx)(e.options.Wrap,{children:r}):r}function ua({router:e,...t}){return(0,T.jsx)(la,{router:e,...t,children:(0,T.jsx)(ia,{})})}function da(e){let t=we({warn:e?.router===void 0}),n=e?.router||t;return Rt(n.stores.__store,Ye(e,n))}function fa(e,t,n={leading:!1}){let[r,i]=(0,w.useState)(e),a=(0,w.useRef)(!1),o=(0,w.useRef)(null),s=(0,w.useRef)(!1),c=(0,w.useRef)(e);c.current=e;let l=(0,w.useCallback)(()=>{window.clearTimeout(o.current),o.current=null},[]),u=(0,w.useCallback)(()=>{l(),s.current=!1},[]),d=(0,w.useCallback)(()=>{o.current&&(u(),s.current=!1,i(c.current))},[]);return(0,w.useEffect)(()=>{a.current&&(l(),!s.current&&n.leading?(s.current=!0,i(e),o.current=window.setTimeout(()=>{s.current=!1},t)):o.current=window.setTimeout(()=>{s.current=!1,i(e)},t))},[e,n.leading,t]),(0,w.useEffect)(()=>(a.current=!0,u),[]),[r,u,{cancel:u,flush:d}]}function pa(e=!1,t={}){let[n,r]=(0,w.useState)(e),i=(0,w.useCallback)(()=>{r(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),a=(0,w.useCallback)(()=>{r(e=>e&&(t.onClose?.(),!1))},[t.onClose]);return[n,{open:i,close:a,toggle:(0,w.useCallback)(()=>{n?a():i()},[a,i,n]),set:r}]}function ma(e){return e===`auto`||e===`dark`||e===`light`}function ha({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return ma(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&ma(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function ga(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function _a({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,w.useRef)(null),[a,o]=(0,w.useState)(()=>e.get(t)),s=r||a,c=(0,w.useCallback)(t=>{r||(ga(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,w.useCallback)(()=>{o(t),ga(t,n),e.clear()},[e.clear,t]);return(0,w.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),pe(()=>{ga(e.get(t),n)},[]),(0,w.useEffect)(()=>{if(r)return ga(r,n),()=>{};r===void 0&&ga(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&ga(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}function va(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function ya(e,t){let n=t?[t]:[`:root`,`:host`],r=va(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=va(e.dark),o=va(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function ba({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:a=!0}){if(!e.colors[t])return{};if(n===`light`){let n=o(e,`light`),s={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:i(e.colors[t][n],.05)};return a?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...s}:s}let s=o(e,`dark`),c={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${s})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${s===9?8:s+1})`,[`--mantine-color-${r}-light`]:g(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:g(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(s-4,0)})`,[`--mantine-color-${r}-outline-hover`]:i(e.colors[t][Math.max(s-4,0)],.05)};return a?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...c}:c}function xa(e,t,n){me(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var Sa=e=>{let t=o(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:S(e.defaultRadius),i={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":_t(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":_t(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};xa(i.variables,e.breakpoints,`breakpoint`),xa(i.variables,e.spacing,`spacing`),xa(i.variables,e.fontSizes,`font-size`),xa(i.variables,e.lineHeights,`line-height`),xa(i.variables,e.shadows,`shadow`),xa(i.variables,e.radius,`radius`),xa(i.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{i.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),me(e.colors).forEach(t=>{let n=e.colors[t];if(r(n)){Object.assign(i.light,ba({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(i.dark,ba({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),i.light[`--mantine-color-${n.name}-contrast`]=Fe(n,e,`light`),i.dark[`--mantine-color-${n.name}-contrast`]=Fe(n,e,`dark`);return}n.forEach((e,n)=>{i.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(i.light,ba({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(i.dark,ba({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let a=e.headings.sizes;return me(a).forEach(t=>{i.variables[`--mantine-${t}-font-size`]=a[t].fontSize,i.variables[`--mantine-${t}-line-height`]=a[t].lineHeight,i.variables[`--mantine-${t}-font-weight`]=a[t].fontWeight||e.headings.fontWeight}),i};function Ca(){let t=u(),n=e(),r=me(t.breakpoints).reduce((e,n)=>{let r=t.breakpoints[n].includes(`px`),i=Ke(t.breakpoints[n]);return`${e}@media (max-width: ${r?`${i-.1}px`:be(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:be(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,T.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function wa({theme:e,generator:t}){let n=Sa(e),r=t?.(e);return r?oe(n,r):n}var Ta=Sa(f);function Ea(e){let t={variables:{},light:{},dark:{}};return me(e.variables).forEach(n=>{Ta.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),me(e.light).forEach(n=>{Ta.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),me(e.dark).forEach(n=>{Ta.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function Da(e){return ya({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function Oa({cssVariablesSelector:t,deduplicateCssVariables:n}){let r=u(),i=e(),a=wa({theme:r,generator:c()}),o=(t===void 0||t===`:root`||t===`:host`)&&n,s=ya(o?Ea(a):a,t);return s?(0,T.jsx)(`style`,{"data-mantine-styles":!0,nonce:i?.(),dangerouslySetInnerHTML:{__html:`${s}${o?``:Da(t)}`}}):null}Oa.displayName=`@mantine/CssVariables`;function ka({respectReducedMotion:e,getRootElement:t}){pe(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function Aa({theme:e,children:t,getStyleNonce:r,withStaticClasses:i=!0,withGlobalClasses:a=!0,deduplicateCssVariables:o=!0,withCssVariables:s=!0,cssVariablesSelector:c,classNamesPrefix:u=`mantine`,colorSchemeManager:d=ha(),defaultColorScheme:f=`light`,getRootElement:p=()=>document.documentElement,cssVariablesResolver:m,forceColorScheme:h,stylesTransform:g,env:_,deduplicateInlineStyles:v=!1}){let{colorScheme:y,setColorScheme:b,clearColorScheme:x}=_a({defaultColorScheme:f,forceColorScheme:h,manager:d,getRootElement:p});return ka({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:p}),(0,T.jsx)(n,{value:{colorScheme:y,setColorScheme:b,clearColorScheme:x,getRootElement:p,classNamesPrefix:u,getStyleNonce:r,cssVariablesResolver:m,cssVariablesSelector:c??`:root`,withStaticClasses:i,stylesTransform:g,env:_,deduplicateInlineStyles:v},children:(0,T.jsxs)(l,{theme:e,children:[s&&(0,T.jsx)(Oa,{cssVariablesSelector:c,deduplicateCssVariables:o}),a&&(0,T.jsx)(Ca,{}),t]})})}Aa.displayName=`@mantine/core/MantineProvider`;function ja(e){return e}var[Ma,Na]=Ut(`AppShell was not found in tree`),Pa={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},Fa=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellAside`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:v({[an.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});Fa.classes=Pa,Fa.displayName=`@mantine/core/AppShellAside`;var Ia=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellFooter`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:v({[an.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});Ia.classes=Pa,Ia.displayName=`@mantine/core/AppShellFooter`;var La=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellHeader`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:v({[an.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});La.classes=Pa,La.displayName=`@mantine/core/AppShellHeader`;var Ra=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`AppShellMain`,null,e);return(0,T.jsx)(xe,{component:`main`,...Na().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});Ra.classes=Pa,Ra.displayName=`@mantine/core/AppShellMain`;var za=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellNavbar`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});za.classes=Pa,za.displayName=`@mantine/core/AppShellNavbar`;var Ba=p(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=ue(`AppShellSection`,null,e),l=Na();return(0,T.jsx)(xe,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});Ba.classes=Pa,Ba.displayName=`@mantine/core/AppShellSection`;function Va(e){return typeof e==`object`?e.base:e}function Ha(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function Ua(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function Wa({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),Ha(o)){let t=S(Va(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(Ua(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=S(o.base),e[`--app-shell-aside-offset`]=S(o.base)),me(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=S(o[e]),t[e][`--app-shell-aside-offset`]=S(o[e]))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=Ge(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function Ga({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),Ha(i)){let t=S(Va(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}Ua(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=S(i.base),a&&(e[`--app-shell-footer-offset`]=S(i.base))),me(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=S(i[e]),a&&(t[e][`--app-shell-footer-offset`]=S(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function Ka({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),Ha(i)){let t=S(Va(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}Ua(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=S(i.base),a&&(e[`--app-shell-header-offset`]=S(i.base))),me(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=S(i[e]),a&&(t[e][`--app-shell-header-offset`]=S(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function qa({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),Ha(o)){let t=S(Va(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(Ua(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=S(o.base),e[`--app-shell-navbar-offset`]=S(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=S(o.base))),me(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=S(o[e]),t[e][`--app-shell-navbar-offset`]=S(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=S(o[e])))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=Ge(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function Ja(e){return Number(e)===0?`0px`:ne(e)}function Ya({padding:e,baseStyles:t,minMediaStyles:n}){Ha(e)&&(t[`--app-shell-padding`]=Ja(Va(e))),Ua(e)&&(e.base&&(t[`--app-shell-padding`]=Ja(e.base)),me(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=Ja(e[t]))}))}function Xa({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),qa({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),Wa({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),Ka({baseStyles:l,minMediaStyles:s,header:t,mode:o}),Ga({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),Ya({baseStyles:l,minMediaStyles:s,padding:i});let u=gt(me(s),a.breakpoints).map(e=>({query:`(min-width: ${be(e.px)})`,styles:s[e.value]})),d=gt(me(c),a.breakpoints).map(e=>({query:`(max-width: ${be(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function Za({navbar:e,header:t,aside:n,footer:r,padding:i,mode:o,selector:s}){let c=u(),l=a(),{media:f,baseStyles:p}=Xa({navbar:e,header:t,footer:r,aside:n,padding:i,theme:c,mode:o});return(0,T.jsx)(d,{media:f,styles:p,selector:s||l.cssVariablesSelector})}function Qa({transitionDuration:e,disabled:t}){let[n,r]=(0,w.useState)(!0),i=(0,w.useRef)(-1),a=(0,w.useRef)(-1);return Zt(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,w.startTransition)(()=>{r(!1)}),200)}),pe(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,w.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var $a={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:zt(`app`),mode:`fixed`},eo=_((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),to=t(e=>{let t=ue(`AppShell`,$a,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:ee,id:te,...ne}=t,re=de({name:`AppShell`,classes:Pa,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:ee,vars:s,varsResolver:eo}),S=Qa({disabled:g,transitionDuration:d}),ae=ie(te);return(0,T.jsxs)(Ma,{value:{getStyles:re,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,T.jsx)(Za,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${ae}`:void 0}),(0,T.jsx)(xe,{...re(`root`),id:ae,mod:[{resizing:S,layout:h,disabled:g,mode:b},x],...ne})]})});to.classes=Pa,to.varsResolver=eo,to.displayName=`@mantine/core/AppShell`,to.Navbar=za,to.Header=La,to.Main=Ra,to.Aside=Fa,to.Footer=Ia,to.Section=Ba;var no={group:`m_11def92b`,root:`m_f85678b6`,image:`m_11f8ac07`,placeholder:`m_104cd71f`},ro=(0,w.createContext)({withinGroup:!1}),io=_((e,{spacing:t})=>({group:{"--ag-spacing":ne(t)}})),ao=t(e=>{let t=ue(`AvatarGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,spacing:c,attributes:l,...u}=t,d=de({name:`AvatarGroup`,classes:no,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:io,rootSelector:`group`});return(0,T.jsx)(ro,{value:{withinGroup:!0},children:(0,T.jsx)(xe,{...d(`group`),...u})})});ao.classes=no,ao.varsResolver=io,ao.displayName=`@mantine/core/AvatarGroup`;function oo(e){return(0,T.jsx)(`svg`,{...e,"data-avatar-placeholder-icon":!0,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,T.jsx)(`path`,{d:`M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function so(e){let t=0;for(let n=0;ne[0]).slice(0,t).join(``).toUpperCase()}var fo=_((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o,name:s,allowedInitialsColors:c})=>{let l=a===`initials`&&typeof s==`string`?lo(s,c):a,u=e.variantColorResolver({color:l||`gray`,theme:e,gradient:i,variant:r||`light`,autoContrast:o});return{root:{"--avatar-size":_e(t,`avatar-size`),"--avatar-radius":n===void 0?void 0:ee(n),"--avatar-bg":l||r?u.background:void 0,"--avatar-color":l||r?u.color:void 0,"--avatar-bd":l||r?u.border:void 0}}}),po=p(e=>{let t=ue(`Avatar`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,src:c,alt:l,radius:u,color:d,gradient:f,imageProps:p,children:m,autoContrast:h,mod:g,name:_,allowedInitialsColors:v,attributes:y,...b}=t,x=(0,w.use)(ro),[ee,te]=(0,w.useState)(!c),ne=de({name:`Avatar`,props:t,classes:no,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:fo});return(0,w.useEffect)(()=>te(!c),[c]),(0,T.jsx)(xe,{...ne(`root`),mod:[{"within-group":x.withinGroup},g],...b,children:ee||!c?(0,T.jsx)(`span`,{...ne(`placeholder`),title:l,children:m||typeof _==`string`&&uo(_)||(0,T.jsx)(oo,{})}):(0,T.jsx)(`img`,{...p,...ne(`image`),src:c,alt:l,onError:e=>{te(!0),p?.onError?.(e)}})})});po.classes=no,po.varsResolver=fo,po.displayName=`@mantine/core/Avatar`,po.Group=ao;var mo={root:`m_fea6bf1a`,burger:`m_d4fb9cad`},ho=_((e,{color:t,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:a})=>({root:{"--burger-color":t?s(t,e):void 0,"--burger-size":_e(n,`burger-size`),"--burger-line-size":r?S(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":a}})),go=t(e=>{let t=ue(`Burger`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,children:l,transitionDuration:u,transitionTimingFunction:d,lineSize:f,attributes:p,...m}=t,h=de({name:`Burger`,classes:mo,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:ho});return(0,T.jsxs)(te,{...h(`root`),...m,children:[(0,T.jsx)(xe,{mod:[`reduce-motion`,{opened:c}],...h(`burger`)}),l]})});go.classes=mo,go.varsResolver=ho,go.displayName=`@mantine/core/Burger`;var[_o,vo]=Ut(`Drawer component was not found in tree`),yo={root:`m_f11b401e`,header:`m_5a7c2c9`,content:`m_b8a05bbd`,inner:`m_31cd769a`},bo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerBody`,null,e);return(0,T.jsx)(Qt,{...vo().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});bo.classes=yo,bo.displayName=`@mantine/core/DrawerBody`;var xo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerCloseButton`,null,e);return(0,T.jsx)(Xt,{...vo().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});xo.classes=yo,xo.displayName=`@mantine/core/DrawerCloseButton`;var So=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,radius:s,__hidden:c,...l}=ue(`DrawerContent`,null,e),u=vo(),d=u.scrollAreaComponent||Kt;return(0,T.jsx)(rn,{...u.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:u.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),...l,radius:s||u.radius||0,"data-hidden":c||void 0,children:(0,T.jsx)(d,{style:{height:`calc(100vh - var(--drawer-offset) * 2)`},children:o})})});So.classes=yo,So.displayName=`@mantine/core/DrawerContent`;var Co=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerHeader`,null,e);return(0,T.jsx)(tn,{...vo().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Co.classes=yo,Co.displayName=`@mantine/core/DrawerHeader`;var wo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerOverlay`,null,e);return(0,T.jsx)(en,{...vo().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});wo.classes=yo,wo.displayName=`@mantine/core/DrawerOverlay`;function To(e){switch(e){case`top`:return`flex-start`;case`bottom`:return`flex-end`;default:return}}function Eo(e){if(e===`top`||e===`bottom`)return`0 0 calc(100% - var(--drawer-offset, 0rem) * 2)`}var D={top:`slide-down`,bottom:`slide-up`,left:`slide-right`,right:`slide-left`},Do={top:`slide-down`,bottom:`slide-up`,right:`slide-right`,left:`slide-left`},Oo={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:zt(`modal`),position:`left`},ko=_((e,{position:t,size:n,offset:r})=>({root:{"--drawer-size":_e(n,`drawer-size`),"--drawer-flex":Eo(t),"--drawer-height":t===`left`||t===`right`?void 0:`var(--drawer-size)`,"--drawer-align":To(t),"--drawer-justify":t===`right`?`flex-end`:void 0,"--drawer-offset":S(r)}})),Ao=t(e=>{let t=ue(`DrawerRoot`,Oo,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,scrollAreaComponent:c,position:l,transitionProps:u,radius:d,attributes:f,...p}=t,{dir:m}=Bt(),h=de({name:`Drawer`,classes:yo,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:ko}),g=(m===`rtl`?Do:D)[l];return(0,T.jsx)(_o,{value:{scrollAreaComponent:c,getStyles:h,radius:d},children:(0,T.jsx)($t,{...h(`root`),transitionProps:{transition:g,...u},"data-offset-scrollbars":c===Vt.Autosize||void 0,unstyled:o,...p})})});Ao.classes=yo,Ao.varsResolver=ko,Ao.displayName=`@mantine/core/DrawerRoot`;var jo=(0,w.createContext)(null);function Mo({children:e}){let[t,n]=(0,w.useState)([]),[r,i]=(0,w.useState)(zt(`modal`));return(0,T.jsx)(jo,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Mo.displayName=`@mantine/core/DrawerStack`;var No=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerTitle`,null,e);return(0,T.jsx)(gn,{...vo().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});No.classes=yo,No.displayName=`@mantine/core/DrawerTitle`;var Po={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:zt(`modal`),withOverlay:!0,withCloseButton:!0},Fo=t(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,opened:s,stackId:c,zIndex:l,...u}=ue(`Drawer`,Po,e),d=(0,w.use)(jo),f=!!t||i,p=d&&c?{closeOnEscape:d.currentId===c,trapFocus:d.currentId===c,zIndex:d.getZIndex(c)}:{},m=n===!1?!1:c&&d?d.currentId===c:s;return(0,w.useEffect)(()=>{d&&c&&(s?d.addModal(c,l||zt(`modal`)):d.removeModal(c))},[s,c,l]),(0,T.jsxs)(Ao,{opened:s,zIndex:d&&c?d.getZIndex(c):l,...u,...p,children:[n&&(0,T.jsx)(wo,{visible:m,transitionProps:d&&c?{duration:0}:void 0,...r}),(0,T.jsxs)(So,{__hidden:d&&c&&s?c!==d.currentId:!1,children:[f&&(0,T.jsxs)(Co,{children:[t&&(0,T.jsx)(No,{children:t}),i&&(0,T.jsx)(xo,{...a})]}),(0,T.jsx)(bo,{children:o})]})]})});Fo.classes=yo,Fo.displayName=`@mantine/core/Drawer`,Fo.Root=Ao,Fo.Overlay=wo,Fo.Content=So,Fo.Body=bo,Fo.Header=Co,Fo.Title=No,Fo.CloseButton=xo,Fo.Stack=Mo;var Io={root:`m_dc6f14e2`},Lo=_((e,{size:t})=>({root:{"--kbd-fz":_e(t,`kbd-fz`)}})),Ro=t(e=>{let t=ue(`Kbd`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t;return(0,T.jsx)(xe,{component:`kbd`,...de({name:`Kbd`,classes:Io,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:Lo})(`root`),...l})});Ro.classes=Io,Ro.varsResolver=Lo,Ro.displayName=`@mantine/core/Kbd`;var zo=[];for(let e=0;e<256;++e)zo.push((e+256).toString(16).slice(1));function Bo(e,t=0){return(zo[e[t+0]]+zo[e[t+1]]+zo[e[t+2]]+zo[e[t+3]]+`-`+zo[e[t+4]]+zo[e[t+5]]+`-`+zo[e[t+6]]+zo[e[t+7]]+`-`+zo[e[t+8]]+zo[e[t+9]]+`-`+zo[e[t+10]]+zo[e[t+11]]+zo[e[t+12]]+zo[e[t+13]]+zo[e[t+14]]+zo[e[t+15]]).toLowerCase()}var Vo,Ho=new Uint8Array(16);function Uo(){if(!Vo){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Vo=crypto.getRandomValues.bind(crypto)}return Vo(Ho)}var Wo={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Go(e,t,n){if(Wo.randomUUID&&!t&&!e)return Wo.randomUUID();e||={};let r=e.random??e.rng?.()??Uo();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Bo(r)}var O;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(O||={});var Ko;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Ko||={});var k=O.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),qo=e=>{switch(typeof e){case`undefined`:return k.undefined;case`string`:return k.string;case`number`:return Number.isNaN(e)?k.nan:k.number;case`boolean`:return k.boolean;case`function`:return k.function;case`bigint`:return k.bigint;case`symbol`:return k.symbol;case`object`:return Array.isArray(e)?k.array:e===null?k.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?k.promise:typeof Map<`u`&&e instanceof Map?k.map:typeof Set<`u`&&e instanceof Set?k.set:typeof Date<`u`&&e instanceof Date?k.date:k.object;default:return k.unknown}},A=O.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Jo=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Jo.create=e=>new Jo(e);var Yo=(e,t)=>{let n;switch(e.code){case A.invalid_type:n=e.received===k.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case A.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,O.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:n=`Unrecognized key(s) in object: ${O.joinValues(e.keys,`, `)}`;break;case A.invalid_union:n=`Invalid input`;break;case A.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${O.joinValues(e.options)}`;break;case A.invalid_enum_value:n=`Invalid enum value. Expected ${O.joinValues(e.options)}, received '${e.received}'`;break;case A.invalid_arguments:n=`Invalid function arguments`;break;case A.invalid_return_type:n=`Invalid function return type`;break;case A.invalid_date:n=`Invalid date`;break;case A.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:O.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case A.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case A.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case A.custom:n=`Invalid input`;break;case A.invalid_intersection_types:n=`Intersection results could not be merged`;break;case A.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case A.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,O.assertNever(e)}return{message:n}},Xo=Yo;function Zo(){return Xo}var Qo=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function j(e,t){let n=Zo(),r=Qo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Yo?void 0:Yo].filter(e=>!!e)});e.common.issues.push(r)}var $o=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return M;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return M;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},M=Object.freeze({status:`aborted`}),es=e=>({status:`dirty`,value:e}),ts=e=>({status:`valid`,value:e}),ns=e=>e.status===`aborted`,rs=e=>e.status===`dirty`,is=e=>e.status===`valid`,as=e=>typeof Promise<`u`&&e instanceof Promise,N;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(N||={});var os=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ss=(e,t)=>{if(is(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Jo(e.common.issues);return this._error=t,this._error}}};function P(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var cs=class{get description(){return this._def.description}_getType(e){return qo(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:qo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new $o,ctx:{common:e.parent.common,data:e.data,parsedType:qo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(as(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)};return ss(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return is(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>is(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)},r=this._parse({data:e,path:n.path,parent:n});return ss(n,await(as(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:A.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new dc({schema:this,typeName:F.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return fc.create(this,this._def)}nullable(){return pc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ks.create(this)}promise(){return uc.create(this,this._def)}or(e){return Ys.create([this,e],this._def)}and(e){return $s.create(this,e,this._def)}transform(e){return new dc({...P(this._def),schema:this,typeName:F.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new mc({...P(this._def),innerType:this,defaultValue:t,typeName:F.ZodDefault})}brand(){return new _c({typeName:F.ZodBranded,type:this,...P(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new hc({...P(this._def),innerType:this,catchValue:t,typeName:F.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return vc.create(this,e)}readonly(){return yc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ls=/^c[^\s-]{8,}$/i,us=/^[0-9a-z]+$/,ds=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fs=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ps=/^[a-z0-9_-]{21}$/i,ms=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hs=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,gs=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_s=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,vs,ys=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xs=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ss=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Cs=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ws=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ts=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Es=RegExp(`^${Ts}$`);function Ds(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Os(e){return RegExp(`^${Ds(e)}$`)}function ks(e){let t=`${Ts}T${Ds(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function As(e,t){return!((t!==`v4`&&t||!ys.test(e))&&(t!==`v6`&&t||!xs.test(e)))}function js(e,t){if(!ms.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function Ms(e,t){return!((t!==`v4`&&t||!bs.test(e))&&(t!==`v6`&&t||!Ss.test(e)))}var Ns=class e extends cs{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==k.string){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.string,received:t.parsedType}),M}let t=new $o,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),j(n,{code:A.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:A.invalid_string,...N.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...N.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...N.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...N.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...N.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...N.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...N.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...N.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...N.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...N.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...N.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...N.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...N.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...N.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...N.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...N.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...N.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...N.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...N.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...N.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...N.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...N.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...N.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...N.errToObj(t)})}nonempty(e){return this.min(1,N.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Ns({checks:[],typeName:F.ZodString,coerce:e?.coerce??!1,...P(e)});function Ps(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var Fs=class e extends cs{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==k.number){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.number,received:t.parsedType}),M}let t,n=new $o;for(let r of this._def.checks)r.kind===`int`?O.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),j(t,{code:A.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),j(t,{code:A.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?Ps(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),j(t,{code:A.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),j(t,{code:A.not_finite,message:r.message}),n.dirty()):O.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,N.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,N.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,N.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,N.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:N.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:N.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:N.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:N.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:N.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:N.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:N.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:N.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:N.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:N.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&O.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew Fs({checks:[],typeName:F.ZodNumber,coerce:e?.coerce||!1,...P(e)});var Is=class e extends cs{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==k.bigint)return this._getInvalidInput(e);let t,n=new $o;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),j(t,{code:A.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),j(t,{code:A.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):O.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.bigint,received:t.parsedType}),M}gte(e,t){return this.setLimit(`min`,e,!0,N.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,N.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,N.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,N.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:N.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:N.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:N.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:N.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:N.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:N.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Is({checks:[],typeName:F.ZodBigInt,coerce:e?.coerce??!1,...P(e)});var Ls=class extends cs{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==k.boolean){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.boolean,received:t.parsedType}),M}return ts(e.data)}};Ls.create=e=>new Ls({typeName:F.ZodBoolean,coerce:e?.coerce||!1,...P(e)});var Rs=class e extends cs{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==k.date){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.date,received:t.parsedType}),M}if(Number.isNaN(e.data.getTime()))return j(this._getOrReturnCtx(e),{code:A.invalid_date}),M;let t=new $o,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),j(n,{code:A.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):O.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:N.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:N.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Rs({checks:[],coerce:e?.coerce||!1,typeName:F.ZodDate,...P(e)});var zs=class extends cs{_parse(e){if(this._getType(e)!==k.symbol){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.symbol,received:t.parsedType}),M}return ts(e.data)}};zs.create=e=>new zs({typeName:F.ZodSymbol,...P(e)});var Bs=class extends cs{_parse(e){if(this._getType(e)!==k.undefined){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.undefined,received:t.parsedType}),M}return ts(e.data)}};Bs.create=e=>new Bs({typeName:F.ZodUndefined,...P(e)});var Vs=class extends cs{_parse(e){if(this._getType(e)!==k.null){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.null,received:t.parsedType}),M}return ts(e.data)}};Vs.create=e=>new Vs({typeName:F.ZodNull,...P(e)});var Hs=class extends cs{constructor(){super(...arguments),this._any=!0}_parse(e){return ts(e.data)}};Hs.create=e=>new Hs({typeName:F.ZodAny,...P(e)});var Us=class extends cs{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ts(e.data)}};Us.create=e=>new Us({typeName:F.ZodUnknown,...P(e)});var Ws=class extends cs{_parse(e){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.never,received:t.parsedType}),M}};Ws.create=e=>new Ws({typeName:F.ZodNever,...P(e)});var Gs=class extends cs{_parse(e){if(this._getType(e)!==k.undefined){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.void,received:t.parsedType}),M}return ts(e.data)}};Gs.create=e=>new Gs({typeName:F.ZodVoid,...P(e)});var Ks=class e extends cs{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==k.array)return j(t,{code:A.invalid_type,expected:k.array,received:t.parsedType}),M;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(j(t,{code:A.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new os(t,e,t.path,n)))).then(e=>$o.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new os(t,e,t.path,n)));return $o.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:N.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:N.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:N.toString(n)}})}nonempty(e){return this.min(1,e)}};Ks.create=(e,t)=>new Ks({type:e,minLength:null,maxLength:null,exactLength:null,typeName:F.ZodArray,...P(t)});function qs(e){if(e instanceof Js){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=fc.create(qs(r))}return new Js({...e._def,shape:()=>t})}return e instanceof Ks?new Ks({...e._def,type:qs(e.element)}):e instanceof fc?fc.create(qs(e.unwrap())):e instanceof pc?pc.create(qs(e.unwrap())):e instanceof ec?ec.create(e.items.map(e=>qs(e))):e}var Js=class e extends cs{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=O.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==k.object){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.object,received:t.parsedType}),M}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ws&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new os(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Ws){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(j(n,{code:A.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new os(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>$o.mergeObjectSync(t,e)):$o.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return N.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:N.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:F.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of O.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of O.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return qs(this)}partial(t){let n={};for(let e of O.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of O.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof fc;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return sc(O.objectKeys(this.shape))}};Js.create=(e,t)=>new Js({shape:()=>e,unknownKeys:`strip`,catchall:Ws.create(),typeName:F.ZodObject,...P(t)}),Js.strictCreate=(e,t)=>new Js({shape:()=>e,unknownKeys:`strict`,catchall:Ws.create(),typeName:F.ZodObject,...P(t)}),Js.lazycreate=(e,t)=>new Js({shape:e,unknownKeys:`strip`,catchall:Ws.create(),typeName:F.ZodObject,...P(t)});var Ys=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Jo(e.ctx.common.issues));return j(t,{code:A.invalid_union,unionErrors:n}),M}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Jo(e));return j(t,{code:A.invalid_union,unionErrors:i}),M}}get options(){return this._def.options}};Ys.create=(e,t)=>new Ys({options:e,typeName:F.ZodUnion,...P(t)});var Xs=e=>e instanceof ac?Xs(e.schema):e instanceof dc?Xs(e.innerType()):e instanceof oc?[e.value]:e instanceof cc?e.options:e instanceof lc?O.objectValues(e.enum):e instanceof mc?Xs(e._def.innerType):e instanceof Bs?[void 0]:e instanceof Vs?[null]:e instanceof fc?[void 0,...Xs(e.unwrap())]:e instanceof pc?[null,...Xs(e.unwrap())]:e instanceof _c||e instanceof yc?Xs(e.unwrap()):e instanceof hc?Xs(e._def.innerType):[],Zs=class e extends cs{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==k.object)return j(t,{code:A.invalid_type,expected:k.object,received:t.parsedType}),M;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(j(t,{code:A.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),M)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=Xs(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:F.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...P(r)})}};function Qs(e,t){let n=qo(e),r=qo(t);if(e===t)return{valid:!0,data:e};if(n===k.object&&r===k.object){let n=O.objectKeys(t),r=O.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Qs(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===k.array&&r===k.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if(ns(e)||ns(r))return M;let i=Qs(e.value,r.value);return i.valid?((rs(e)||rs(r))&&t.dirty(),{status:t.value,value:i.data}):(j(n,{code:A.invalid_intersection_types}),M)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};$s.create=(e,t,n)=>new $s({left:e,right:t,typeName:F.ZodIntersection,...P(n)});var ec=class e extends cs{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.array)return j(n,{code:A.invalid_type,expected:k.array,received:n.parsedType}),M;if(n.data.lengththis._def.items.length&&(j(n,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new os(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>$o.mergeArray(t,e)):$o.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ec.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new ec({items:e,typeName:F.ZodTuple,rest:null,...P(t)})};var tc=class e extends cs{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.object)return j(n,{code:A.invalid_type,expected:k.object,received:n.parsedType}),M;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new os(n,e,n.path,e)),value:a._parse(new os(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?$o.mergeObjectAsync(t,r):$o.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof cs?new e({keyType:t,valueType:n,typeName:F.ZodRecord,...P(r)}):new e({keyType:Ns.create(),valueType:t,typeName:F.ZodRecord,...P(n)})}},nc=class extends cs{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.map)return j(n,{code:A.invalid_type,expected:k.map,received:n.parsedType}),M;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new os(n,e,n.path,[a,`key`])),value:i._parse(new os(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return M;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return M;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};nc.create=(e,t,n)=>new nc({valueType:t,keyType:e,typeName:F.ZodMap,...P(n)});var rc=class e extends cs{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.set)return j(n,{code:A.invalid_type,expected:k.set,received:n.parsedType}),M;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(j(n,{code:A.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return M;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new os(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:N.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:N.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};rc.create=(e,t)=>new rc({valueType:e,minSize:null,maxSize:null,typeName:F.ZodSet,...P(t)});var ic=class e extends cs{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==k.function)return j(t,{code:A.invalid_type,expected:k.function,received:t.parsedType}),M;function n(e,n){return Qo({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zo(),Yo].filter(e=>!!e),issueData:{code:A.invalid_arguments,argumentsError:n}})}function r(e,n){return Qo({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zo(),Yo].filter(e=>!!e),issueData:{code:A.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof uc){let e=this;return ts(async function(...t){let o=new Jo([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return ts(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Jo([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Jo([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ec.create(t).rest(Us.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||ec.create([]).rest(Us.create()),returns:n||Us.create(),typeName:F.ZodFunction,...P(r)})}},ac=class extends cs{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};ac.create=(e,t)=>new ac({getter:e,typeName:F.ZodLazy,...P(t)});var oc=class extends cs{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return j(t,{received:t.data,code:A.invalid_literal,expected:this._def.value}),M}return{status:`valid`,value:e.data}}get value(){return this._def.value}};oc.create=(e,t)=>new oc({value:e,typeName:F.ZodLiteral,...P(t)});function sc(e,t){return new cc({values:e,typeName:F.ZodEnum,...P(t)})}var cc=class e extends cs{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return j(t,{expected:O.joinValues(n),received:t.parsedType,code:A.invalid_type}),M}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return j(t,{received:t.data,code:A.invalid_enum_value,options:n}),M}return ts(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};cc.create=sc;var lc=class extends cs{_parse(e){let t=O.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==k.string&&n.parsedType!==k.number){let e=O.objectValues(t);return j(n,{expected:O.joinValues(e),received:n.parsedType,code:A.invalid_type}),M}if(this._cache||=new Set(O.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=O.objectValues(t);return j(n,{received:n.data,code:A.invalid_enum_value,options:e}),M}return ts(e.data)}get enum(){return this._def.values}};lc.create=(e,t)=>new lc({values:e,typeName:F.ZodNativeEnum,...P(t)});var uc=class extends cs{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==k.promise&&t.common.async===!1?(j(t,{code:A.invalid_type,expected:k.promise,received:t.parsedType}),M):ts((t.parsedType===k.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};uc.create=(e,t)=>new uc({type:e,typeName:F.ZodPromise,...P(t)});var dc=class extends cs{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===F.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{j(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return M;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?M:r.status===`dirty`||t.value===`dirty`?es(r.value):r});{if(t.value===`aborted`)return M;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?M:r.status===`dirty`||t.value===`dirty`?es(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?M:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?M:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!is(e))return M;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>is(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):M)}O.assertNever(r)}};dc.create=(e,t,n)=>new dc({schema:e,typeName:F.ZodEffects,effect:t,...P(n)}),dc.createWithPreprocess=(e,t,n)=>new dc({schema:t,effect:{type:`preprocess`,transform:e},typeName:F.ZodEffects,...P(n)});var fc=class extends cs{_parse(e){return this._getType(e)===k.undefined?ts(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};fc.create=(e,t)=>new fc({innerType:e,typeName:F.ZodOptional,...P(t)});var pc=class extends cs{_parse(e){return this._getType(e)===k.null?ts(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};pc.create=(e,t)=>new pc({innerType:e,typeName:F.ZodNullable,...P(t)});var mc=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===k.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};mc.create=(e,t)=>new mc({innerType:e,typeName:F.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...P(t)});var hc=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return as(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Jo(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Jo(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};hc.create=(e,t)=>new hc({innerType:e,typeName:F.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...P(t)});var gc=class extends cs{_parse(e){if(this._getType(e)!==k.nan){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.nan,received:t.parsedType}),M}return{status:`valid`,value:e.data}}};gc.create=e=>new gc({typeName:F.ZodNaN,...P(e)});var _c=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},vc=class e extends cs{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?M:e.status===`dirty`?(t.dirty(),es(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?M:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:F.ZodPipeline})}},yc=class extends cs{_parse(e){let t=this._def.innerType._parse(e),n=e=>(is(e)&&(e.value=Object.freeze(e.value)),e);return as(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};yc.create=(e,t)=>new yc({innerType:e,typeName:F.ZodReadonly,...P(t)}),Js.lazycreate;var F;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(F||={});var I=Ns.create,bc=Fs.create;gc.create,Is.create;var xc=Ls.create;Rs.create,zs.create,Bs.create,Vs.create;var Sc=Hs.create,Cc=Us.create;Ws.create,Gs.create;var wc=Ks.create,L=Js.create;Js.strictCreate;var Tc=Ys.create,Ec=Zs.create;$s.create,ec.create;var Dc=tc.create;nc.create,rc.create,ic.create,ac.create;var R=oc.create,Oc=cc.create,kc=lc.create;uc.create,dc.create,fc.create,pc.create,dc.createWithPreprocess,vc.create;var Ac=Rn(),jc=Dc(Sc()).optional();function Mc(e,t){return t===void 0?e:e===void 0?{...t}:{...e,...t}}var Nc=L({name:I(),arguments:I()}),Pc=L({id:I(),type:R(`function`),function:Nc,encryptedValue:I().optional(),metadata:jc}),Fc=L({id:I(),role:I(),content:I().optional(),name:I().optional(),encryptedValue:I().optional(),subagentRunId:I().optional(),metadata:jc}),Ic=L({type:R(`text`),text:I()}),Lc=Ec(`type`,[L({type:R(`data`),value:I(),mimeType:I()}),L({type:R(`url`),value:I(),mimeType:I().optional()})]),Rc=L({type:R(`image`),source:Lc,metadata:Cc().optional()}),zc=L({type:R(`audio`),source:Lc,metadata:Cc().optional()}),Bc=L({type:R(`video`),source:Lc,metadata:Cc().optional()}),Vc=L({type:R(`document`),source:Lc,metadata:Cc().optional()}),Hc=L({type:R(`binary`),mimeType:I(),id:I().optional(),url:I().optional(),data:I().optional(),filename:I().optional()}),Uc=(e,t)=>{!e.id&&!e.url&&!e.data&&t.addIssue({code:A.custom,message:`BinaryInputContent requires at least one of id, url, or data.`,path:[`id`]})};Hc.superRefine((e,t)=>{Uc(e,t)});var Wc=Ec(`type`,[Ic,Rc,zc,Bc,Vc,Hc]).superRefine((e,t)=>{e.type===`binary`&&Uc(e,t)}),Gc=Ec(`role`,[Fc.extend({role:R(`developer`),content:I()}),Fc.extend({role:R(`system`),content:I()}),Fc.extend({role:R(`assistant`),content:I().optional(),toolCalls:wc(Pc).optional()}),Fc.extend({role:R(`user`),content:Tc([I(),wc(Wc)])}),L({id:I(),content:I(),role:R(`tool`),toolCallId:I(),error:I().optional(),encryptedValue:I().optional(),subagentRunId:I().optional(),metadata:jc}),L({id:I(),role:R(`activity`),activityType:I(),content:Dc(Sc()),subagentRunId:I().optional(),metadata:jc}),L({id:I(),role:R(`reasoning`),content:I(),encryptedValue:I().optional(),subagentRunId:I().optional(),metadata:jc})]);Tc([R(`developer`),R(`system`),R(`assistant`),R(`user`),R(`tool`),R(`activity`),R(`reasoning`)]);var Kc=L({description:I(),value:I()}),qc=L({name:I(),description:I(),parameters:Sc(),metadata:Dc(Sc()).optional()}),Jc=L({id:I(),reason:I(),message:I().optional(),toolCallId:I().optional(),responseSchema:Dc(Sc()).optional(),expiresAt:I().optional(),metadata:Dc(Sc()).optional(),subagentRunId:I().optional()}),Yc=L({interruptId:I(),status:Oc([`resolved`,`cancelled`]),payload:Sc().optional(),metadata:jc}),Xc=L({threadId:I(),runId:I(),parentRunId:I().optional(),state:Sc().transform(e=>e??void 0),messages:wc(Gc),tools:wc(qc),context:wc(Kc),forwardedProps:Sc(),resume:wc(Yc).optional()}),Zc=Sc(),z=class extends Error{constructor(e){super(e)}},Qc=class extends z{constructor(){super(`Connect not implemented. This method is not supported by the current agent.`)}},$c=L({name:I(),description:I().optional()}),el=L({name:I().optional(),type:I().optional(),description:I().optional(),version:I().optional(),provider:I().optional(),documentationUrl:I().optional(),metadata:Dc(Cc()).optional()}),tl=L({streaming:xc().optional(),websocket:xc().optional(),httpBinary:xc().optional(),pushNotifications:xc().optional(),resumable:xc().optional()}),nl=L({supported:xc().optional(),items:wc(qc).optional(),parallelCalls:xc().optional(),clientProvided:xc().optional()}),rl=L({structuredOutput:xc().optional(),supportedMimeTypes:wc(I()).optional()}),il=L({snapshots:xc().optional(),deltas:xc().optional(),memory:xc().optional(),persistentState:xc().optional()}),al=L({supported:xc().optional(),delegation:xc().optional(),handoffs:xc().optional(),subAgents:wc($c).optional()}),ol=L({supported:xc().optional(),streaming:xc().optional(),encrypted:xc().optional()}),sl=L({image:xc().optional(),audio:xc().optional(),video:xc().optional(),pdf:xc().optional(),file:xc().optional()}),cl=L({image:xc().optional(),audio:xc().optional()}),ll=L({input:sl.optional(),output:cl.optional()}),ul=L({codeExecution:xc().optional(),sandboxed:xc().optional(),maxIterations:bc().optional(),maxExecutionTime:bc().optional()}),dl=L({supported:xc().optional(),approvals:xc().optional(),interventions:xc().optional(),feedback:xc().optional(),interrupts:xc().optional(),approveWithEdits:xc().optional()});L({identity:el.optional(),transport:tl.optional(),tools:nl.optional(),output:rl.optional(),state:il.optional(),multiAgent:al.optional(),reasoning:ol.optional(),multimodal:ll.optional(),execution:ul.optional(),humanInTheLoop:dl.optional(),custom:Dc(Cc()).optional()});var fl=Tc([R(`developer`),R(`system`),R(`assistant`),R(`user`)]),B=function(e){return e.TEXT_MESSAGE_START=`TEXT_MESSAGE_START`,e.TEXT_MESSAGE_CONTENT=`TEXT_MESSAGE_CONTENT`,e.TEXT_MESSAGE_END=`TEXT_MESSAGE_END`,e.TEXT_MESSAGE_CHUNK=`TEXT_MESSAGE_CHUNK`,e.TOOL_CALL_START=`TOOL_CALL_START`,e.TOOL_CALL_ARGS=`TOOL_CALL_ARGS`,e.TOOL_CALL_END=`TOOL_CALL_END`,e.TOOL_CALL_CHUNK=`TOOL_CALL_CHUNK`,e.TOOL_CALL_RESULT=`TOOL_CALL_RESULT`,e.THINKING_START=`THINKING_START`,e.THINKING_END=`THINKING_END`,e.THINKING_TEXT_MESSAGE_START=`THINKING_TEXT_MESSAGE_START`,e.THINKING_TEXT_MESSAGE_CONTENT=`THINKING_TEXT_MESSAGE_CONTENT`,e.THINKING_TEXT_MESSAGE_END=`THINKING_TEXT_MESSAGE_END`,e.STATE_SNAPSHOT=`STATE_SNAPSHOT`,e.STATE_DELTA=`STATE_DELTA`,e.MESSAGES_SNAPSHOT=`MESSAGES_SNAPSHOT`,e.ACTIVITY_SNAPSHOT=`ACTIVITY_SNAPSHOT`,e.ACTIVITY_DELTA=`ACTIVITY_DELTA`,e.RAW=`RAW`,e.CUSTOM=`CUSTOM`,e.RUN_STARTED=`RUN_STARTED`,e.RUN_FINISHED=`RUN_FINISHED`,e.RUN_ERROR=`RUN_ERROR`,e.STEP_STARTED=`STEP_STARTED`,e.STEP_FINISHED=`STEP_FINISHED`,e.REASONING_START=`REASONING_START`,e.REASONING_MESSAGE_START=`REASONING_MESSAGE_START`,e.REASONING_MESSAGE_CONTENT=`REASONING_MESSAGE_CONTENT`,e.REASONING_MESSAGE_END=`REASONING_MESSAGE_END`,e.REASONING_MESSAGE_CHUNK=`REASONING_MESSAGE_CHUNK`,e.REASONING_END=`REASONING_END`,e.REASONING_ENCRYPTED_VALUE=`REASONING_ENCRYPTED_VALUE`,e.SUBAGENT_STARTED=`SUBAGENT_STARTED`,e.SUBAGENT_FINISHED=`SUBAGENT_FINISHED`,e.SUBAGENT_ERROR=`SUBAGENT_ERROR`,e}({}),V=L({type:kc(B),timestamp:bc().optional(),rawEvent:Sc().optional(),metadata:jc}).passthrough(),pl=V.extend({type:R(B.TEXT_MESSAGE_START),messageId:I(),role:fl.default(`assistant`),name:I().optional(),subagentRunId:I().optional()}),ml=V.extend({type:R(B.TEXT_MESSAGE_CONTENT),messageId:I(),delta:I(),subagentRunId:I().optional()}),hl=V.extend({type:R(B.TEXT_MESSAGE_END),messageId:I(),subagentRunId:I().optional()}),gl=V.extend({type:R(B.TEXT_MESSAGE_CHUNK),messageId:I().optional(),role:fl.optional(),delta:I().optional(),name:I().optional(),subagentRunId:I().optional()}),_l=V.extend({type:R(B.THINKING_TEXT_MESSAGE_START)}),vl=ml.omit({messageId:!0,type:!0,subagentRunId:!0}).extend({type:R(B.THINKING_TEXT_MESSAGE_CONTENT)}),yl=V.extend({type:R(B.THINKING_TEXT_MESSAGE_END)}),bl=V.extend({type:R(B.TOOL_CALL_START),toolCallId:I(),toolCallName:I(),parentMessageId:I().nullable().optional().transform(e=>e??void 0),subagentRunId:I().optional()}),xl=V.extend({type:R(B.TOOL_CALL_ARGS),toolCallId:I(),delta:I(),subagentRunId:I().optional()}),Sl=V.extend({type:R(B.TOOL_CALL_END),toolCallId:I(),subagentRunId:I().optional()}),Cl=V.extend({messageId:I(),type:R(B.TOOL_CALL_RESULT),toolCallId:I(),content:I(),role:R(`tool`).optional(),subagentRunId:I().optional()}),wl=V.extend({type:R(B.TOOL_CALL_CHUNK),toolCallId:I().optional(),toolCallName:I().optional(),parentMessageId:I().nullable().optional().transform(e=>e??void 0),delta:I().optional(),subagentRunId:I().optional()}),Tl=V.extend({type:R(B.THINKING_START),title:I().optional()}),El=V.extend({type:R(B.THINKING_END)}),Dl=V.extend({type:R(B.STATE_SNAPSHOT),snapshot:Zc,subagentRunId:I().optional()}),Ol=V.extend({type:R(B.STATE_DELTA),delta:wc(Sc()),subagentRunId:I().optional()}),kl=V.extend({type:R(B.MESSAGES_SNAPSHOT),messages:wc(Gc)}),Al=V.extend({type:R(B.ACTIVITY_SNAPSHOT),messageId:I(),activityType:I(),content:Dc(Sc()),replace:xc().optional().default(!0),subagentRunId:I().optional()}),jl=V.extend({type:R(B.ACTIVITY_DELTA),messageId:I(),activityType:I(),patch:wc(Sc()),subagentRunId:I().optional()}),Ml=V.extend({type:R(B.RAW),event:Sc(),source:I().optional(),subagentRunId:I().optional()}),Nl=V.extend({type:R(B.CUSTOM),name:I(),value:Sc(),subagentRunId:I().optional()}),Pl=V.extend({type:R(B.RUN_STARTED),threadId:I(),runId:I(),parentRunId:I().optional(),input:Xc.optional()}),Fl=Ec(`type`,[L({type:R(`success`)}).strict(),L({type:R(`interrupt`),interrupts:wc(Jc).min(1)}).strict()]),Il=L({provider:I().optional(),model:I().optional(),inputTokens:bc().int().nonnegative().optional(),outputTokens:bc().int().nonnegative().optional(),totalTokens:bc().int().nonnegative().optional(),reasoningTokens:bc().int().nonnegative().optional(),cachedInputTokens:bc().int().nonnegative().optional()}),Ll=V.extend({type:R(B.RUN_FINISHED),threadId:I(),runId:I(),result:Sc().optional(),outcome:Fl.nullable().optional().transform(e=>e??void 0),usage:wc(Il).optional()}),Rl=V.extend({type:R(B.RUN_ERROR),message:I(),code:I().optional(),usage:wc(Il).optional()}),zl=V.extend({type:R(B.STEP_STARTED),stepName:I(),subagentRunId:I().optional()}),Bl=V.extend({type:R(B.STEP_FINISHED),stepName:I(),subagentRunId:I().optional()}),Vl=Tc([R(`tool-call`),R(`message`)]),Hl=V.extend({type:R(B.REASONING_START),messageId:I(),subagentRunId:I().optional()}),Ul=V.extend({type:R(B.REASONING_MESSAGE_START),messageId:I(),role:R(`reasoning`),subagentRunId:I().optional()}),Wl=V.extend({type:R(B.REASONING_MESSAGE_CONTENT),messageId:I(),delta:I(),subagentRunId:I().optional()}),Gl=V.extend({type:R(B.REASONING_MESSAGE_END),messageId:I(),subagentRunId:I().optional()}),Kl=V.extend({type:R(B.REASONING_MESSAGE_CHUNK),messageId:I().optional(),delta:I().optional(),subagentRunId:I().optional()}),ql=V.extend({type:R(B.REASONING_END),messageId:I(),subagentRunId:I().optional()}),Jl=V.extend({type:R(B.REASONING_ENCRYPTED_VALUE),subtype:Vl,entityId:I(),encryptedValue:I(),subagentRunId:I().optional()}),Yl=V.extend({type:R(B.SUBAGENT_STARTED),subagentRunId:I(),name:I(),description:I().optional(),parentSubagentRunId:I().optional(),parentToolCallId:I().optional(),parentMessageId:I().optional()}),Xl=Ec(`type`,[L({type:R(`success`)}).strict(),L({type:R(`suspended`),interruptIds:wc(I()).optional()}).strict()]),Zl=Ec(`type`,[pl,ml,hl,gl,Tl,El,_l,vl,yl,bl,xl,Sl,wl,Cl,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Ll,Rl,zl,Bl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,V.extend({type:R(B.SUBAGENT_FINISHED),subagentRunId:I(),result:Sc().optional(),outcome:Xl.optional()}),V.extend({type:R(B.SUBAGENT_ERROR),subagentRunId:I(),message:I(),code:I().optional()})]),Ql=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$l=Object.prototype.hasOwnProperty;function eu(e,t){return $l.call(e,t)}function tu(e){if(Array.isArray(e)){for(var t=Array(e.length),n=0;n=48&&r<=57){t++;continue}return!1}return!0}function iu(e){return e.indexOf(`/`)===-1&&e.indexOf(`~`)===-1?e:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function au(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function ou(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;tuu,_areEquals:()=>bu,applyOperation:()=>hu,applyPatch:()=>gu,applyReducer:()=>_u,deepClone:()=>du,getValueByPointer:()=>mu,validate:()=>yu,validator:()=>vu}),uu=cu,du=nu,fu={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=mu(n,this.path);r&&=nu(r);var i=hu(n,{op:`remove`,path:this.from}).removed;return hu(n,{op:`add`,path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=mu(n,this.from);return hu(n,{op:`add`,path:this.path,value:nu(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:bu(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},pu={add:function(e,t,n){return ru(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:fu.move,copy:fu.copy,test:fu.test,_get:fu._get};function mu(e,t){if(t==``)return e;var n={op:`_get`,path:t};return hu(e,n),n.value}function hu(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n==`function`?n(t,0,e,t.path):vu(t,0)),t.path===``){var o={newDocument:e};if(t.op===`add`)return o.newDocument=t.value,o;if(t.op===`replace`)return o.newDocument=t.value,o.removed=e,o;if(t.op===`move`||t.op===`copy`)return o.newDocument=mu(e,t.from),t.op===`move`&&(o.removed=e),o;if(t.op===`test`){if(o.test=bu(e,t.value),o.test===!1)throw new uu(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o.newDocument=e,o}if(t.op===`remove`)return o.removed=e,o.newDocument=null,o;if(t.op===`_get`)return t.value=e,o;if(n)throw new uu("Operation `op` property is not one of operations defined in RFC-6902",`OPERATION_OP_INVALID`,a,t,e);return o}r||(e=nu(e));var s=(t.path||``).split(`/`),c=e,l=1,u=s.length,d=void 0,f=void 0,p=void 0;for(p=typeof n==`function`?n:vu;;){if(f=s[l],f&&f.indexOf(`~`)!=-1&&(f=au(f)),i&&(f==`__proto__`||f==`prototype`&&l>0&&s[l-1]==`constructor`))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(c[f]===void 0?d=s.slice(0,l).join(`/`):l==u-1&&(d=t.path),d!==void 0&&p(t,0,e,d)),l++,Array.isArray(c)){if(f===`-`)f=c.length;else if(n&&!ru(f))throw new uu(`Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index`,`OPERATION_PATH_ILLEGAL_ARRAY_INDEX`,a,t,e);else ru(f)&&(f=~~f);if(l>=u){if(n&&t.op===`add`&&f>c.length)throw new uu(`The specified index MUST NOT be greater than the number of elements in the array`,`OPERATION_VALUE_OUT_OF_BOUNDS`,a,t,e);var o=pu[t.op].call(t,c,f,e);if(o.test===!1)throw new uu(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}}else if(l>=u){var o=fu[t.op].call(t,c,f,e);if(o.test===!1)throw new uu(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}if(c=c[f],n&&l0)throw new uu('Operation `path` property must start with "/"',`OPERATION_PATH_INVALID`,t,e,n);if((e.op===`move`||e.op===`copy`)&&typeof e.from!=`string`)throw new uu("Operation `from` property is not present (applicable in `move` and `copy` operations)",`OPERATION_FROM_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&e.value===void 0)throw new uu("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&ou(e.value))throw new uu("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED`,t,e,n);if(n){if(e.op==`add`){var i=e.path.split(`/`).length,a=r.split(`/`).length;if(i!==a+1&&i!==a)throw new uu("Cannot perform an `add` operation at the desired path",`OPERATION_PATH_CANNOT_ADD`,t,e,n)}else if(e.op===`replace`||e.op===`remove`||e.op===`_get`){if(e.path!==r)throw new uu(`Cannot perform the operation at a path that does not exist`,`OPERATION_PATH_UNRESOLVABLE`,t,e,n)}else if(e.op===`move`||e.op===`copy`){var o=yu([{op:`_get`,path:e.from,value:void 0}],n);if(o&&o.name===`OPERATION_PATH_UNRESOLVABLE`)throw new uu(`Cannot perform the operation from a path that does not exist`,`OPERATION_FROM_UNRESOLVABLE`,t,e,n)}}}function yu(e,t,n){try{if(!Array.isArray(e))throw new uu(`Patch sequence must be an array`,`SEQUENCE_NOT_AN_ARRAY`);if(t)gu(nu(t),nu(e),n||!0);else{n||=vu;for(var r=0;rMu,generate:()=>Au,observe:()=>ku,unobserve:()=>Ou}),Su=new WeakMap,Cu=function(){function e(e){this.observers=new Map,this.obj=e}return e}(),wu=function(){function e(e,t){this.callback=e,this.observer=t}return e}();function Tu(e){return Su.get(e)}function Eu(e,t){return e.observers.get(t)}function Du(e,t){e.observers.delete(t.callback)}function Ou(e,t){t.unobserve()}function ku(e,t){var n=[],r,i=Tu(e);if(!i)i=new Cu(e),Su.set(e,i);else{var a=Eu(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=nu(e),t){r.callback=t,r.next=null;var o=function(){Au(r)},s=function(){clearTimeout(r.next),r.next=setTimeout(o)};typeof window<`u`&&(window.addEventListener(`mouseup`,s),window.addEventListener(`keyup`,s),window.addEventListener(`mousedown`,s),window.addEventListener(`keydown`,s),window.addEventListener(`change`,s))}return r.patches=n,r.object=e,r.unobserve=function(){Au(r),clearTimeout(r.next),Du(i,r),typeof window<`u`&&(window.removeEventListener(`mouseup`,s),window.removeEventListener(`keyup`,s),window.removeEventListener(`mousedown`,s),window.removeEventListener(`keydown`,s),window.removeEventListener(`change`,s))},i.observers.set(t,new wu(t,r)),r}function Au(e,t){t===void 0&&(t=!1);var n=Su.get(e.object);ju(n.value,e.object,e.patches,``,t),e.patches.length&&gu(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function ju(e,t,n,r,i){if(t!==e){typeof t.toJSON==`function`&&(t=t.toJSON());for(var a=tu(t),o=tu(e),s=!1,c=o.length-1;c>=0;c--){var l=o[c],u=e[l];if(eu(t,l)&&(t[l]!==void 0||u===void 0||Array.isArray(t)!==!1)){var d=t[l];typeof u==`object`&&u&&typeof d==`object`&&d&&Array.isArray(u)===Array.isArray(d)?ju(u,d,n,r+`/`+iu(l),i):u!==d&&(i&&n.push({op:`test`,path:r+`/`+iu(l),value:nu(u)}),n.push({op:`replace`,path:r+`/`+iu(l),value:nu(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:`test`,path:r+`/`+iu(l),value:nu(u)}),n.push({op:`remove`,path:r+`/`+iu(l)}),s=!0):(i&&n.push({op:`test`,path:r,value:e}),n.push({op:`replace`,path:r,value:t}))}if(s||a.length!=o.length)for(var c=0;c0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function zu(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Bu(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof Vu?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function Uu(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Ru==`function`?Ru(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function Wu(e){return typeof e==`function`}function Gu(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Ku=Gu(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription: -`+t.map(function(e,t){return t+1+`) `+e.toString()}).join(` - `):``,this.name=`UnsubscriptionError`,this.errors=t}});function qu(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Ju=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=Ru(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(Wu(c))try{c()}catch(e){i=e instanceof Ku?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Ru(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{Zu(f)}catch(e){i??=[],e instanceof Ku?i=Bu(Bu([],zu(i)),zu(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new Ku(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)Zu(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&qu(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&qu(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),Yu=Ju.EMPTY;function Xu(e){return e instanceof Ju||e&&`closed`in e&&Wu(e.remove)&&Wu(e.add)&&Wu(e.unsubscribe)}function Zu(e){Wu(e)?e():e.unsubscribe()}var Qu={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},$u={setTimeout:function(e,t){var n=[...arguments].slice(2),r=$u.delegate;return r?.setTimeout?r.setTimeout.apply(r,Bu([e,t],zu(n))):setTimeout.apply(void 0,Bu([e,t],zu(n)))},clearTimeout:function(e){return($u.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function ed(e){$u.setTimeout(function(){var t=Qu.onUnhandledError;if(t)t(e);else throw e})}function td(){}var nd=(function(){return ad(`C`,void 0,void 0)})();function rd(e){return ad(`E`,void 0,e)}function id(e){return ad(`N`,e,void 0)}function ad(e,t,n){return{kind:e,value:t,error:n}}var od=null;function sd(e){if(Qu.useDeprecatedSynchronousErrorHandling){var t=!od;if(t&&(od={errorThrown:!1,error:null}),e(),t){var n=od,r=n.errorThrown,i=n.error;if(od=null,r)throw i}}else e()}function cd(e){Qu.useDeprecatedSynchronousErrorHandling&&od&&(od.errorThrown=!0,od.error=e)}var ld=function(e){Fu(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Xu(t)&&t.add(n)):n.destination=_d,n}return t.create=function(e,t,n){return new pd(e,t,n)},t.prototype.next=function(e){this.isStopped?gd(id(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?gd(rd(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?gd(nd,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ju),ud=Function.prototype.bind;function dd(e,t){return ud.call(e,t)}var fd=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){md(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){md(e)}else md(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){md(e)}},e}(),pd=function(e){Fu(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(Wu(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&Qu.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&dd(t.next,o),error:t.error&&dd(t.error,o),complete:t.complete&&dd(t.complete,o)}):a=t}return i.destination=new fd(a),i}return t}(ld);function md(e){Qu.useDeprecatedSynchronousErrorHandling?cd(e):ed(e)}function hd(e){throw e}function gd(e,t){var n=Qu.onStoppedNotification;n&&$u.setTimeout(function(){return n(e,t)})}var _d={closed:!0,next:td,error:hd,complete:td},vd=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function yd(e){return e}function bd(){return xd([...arguments])}function xd(e){return e.length===0?yd:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Sd=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Td(e)?e:new pd(e,t,n);return sd(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Cd(t),new t(function(t,r){var i=new pd({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[vd]=function(){return this},e.prototype.pipe=function(){return xd([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Cd(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Cd(e){return e??Qu.Promise??Promise}function wd(e){return e&&Wu(e.next)&&Wu(e.error)&&Wu(e.complete)}function Td(e){return e&&e instanceof ld||wd(e)&&Xu(e)}function Ed(e){return Wu(e?.lift)}function Dd(e){return function(t){if(Ed(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Od(e,t,n,r,i){return new kd(e,t,n,r,i)}var kd=function(e){Fu(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(ld),Ad=Gu(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),jd=function(e){Fu(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Md(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ad},t.prototype.next=function(e){var t=this;sd(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Ru(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;sd(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;sd(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?Yu:(this.currentObservers=null,a.push(e),new Ju(function(){t.currentObservers=null,qu(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Sd;return e.source=this,e},t.create=function(e,t){return new Md(e,t)},t}(Sd),Md=function(e){Fu(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??Yu},t}(jd),Nd={now:function(){return(Nd.delegate||Date).now()},delegate:void 0},Pd=function(e){Fu(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=Nd);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a=0}function Mf(e){for(var t=[`topLevel`],n=0,r,i,a,o=function(e){return t.push(e)},s=function(e){return t[t.length-1]=e},c=function(e){r??(r=n,i=t.length,a=e)},l=function(e){e===a&&(r=void 0,i=void 0,a=void 0)},u=function(){return t.pop()},d=function(){return n--},f=function(e){if(`0`<=e&&e<=`9`){o(`number`);return}switch(e){case`"`:o(`string`);return;case`-`:o(`numberNeedsDigit`);return;case`t`:o(`true`);return;case`f`:o(`false`);return;case`n`:o(`null`);return;case`[`:o(`arrayNeedsValue`);return;case`{`:o(`objectNeedsKey`);return}},p=e.length;n`9`)&&(d(),u());break;case`numberNeedsDigit`:s(`number`);break;case`numberNeedsExponent`:s(m===`+`||m===`-`?`numberNeedsDigit`:`number`);break;case`true`:case`false`:case`null`:(m<`a`||m>`z`)&&(d(),u());break;case`arrayNeedsValue`:m===`]`?u():jf(m)||(l(`collectionItem`),s(`arrayNeedsComma`),f(m));break;case`arrayNeedsComma`:m===`]`?u():m===`,`&&(c(`collectionItem`),s(`arrayNeedsValue`));break;case`objectNeedsKey`:m===`}`?u():m===`"`&&(c(`collectionItem`),s(`objectNeedsColon`),o(`string`));break;case`objectNeedsColon`:m===`:`&&s(`objectNeedsValue`);break;case`objectNeedsValue`:jf(m)||(l(`collectionItem`),s(`objectNeedsComma`),f(m));break;case`objectNeedsComma`:m===`}`?u():m===`,`&&(c(`collectionItem`),s(`objectNeedsKey`))}}i!=null&&(t.length=i);for(var h=[r==null?e:e.slice(0,r)],g=function(t){return h.push(t.slice(e.length-e.lastIndexOf(t[0])))},_=t.length-1;_>=0;_--)switch(t[_]){case`string`:h.push(`"`);break;case`numberNeedsDigit`:case`numberNeedsExponent`:h.push(`0`);break;case`true`:g(`true`);break;case`false`:g(`false`);break;case`null`:g(`null`);break;case`arrayNeedsValue`:case`arrayNeedsComma`:h.push(`]`);break;case`objectNeedsKey`:case`objectNeedsColon`:case`objectNeedsValue`:case`objectNeedsComma`:h.push(`}`)}return h.join(``)}function Nf(){let e=this.buf,t=this.pos,n=0,r=0;for(let i=0;i<28;i+=7){let a=e[t++];if(n|=(a&127)<>4,!(i&128)){this.pos=t,this.assertBounds(),this.varint64Lo=n,this.varint64Hi=r;return}for(let i=3;i<=31;i+=7){let a=e[t++];if(r|=(a&127)<=Pf&&(i+=r/Pf|0,r%=Pf)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?Bf(r,i):zf(r,i)}function If(e,t){let n=zf(e,t),r=n.hi&2147483648;r&&(n=Bf(n.lo,n.hi));let i=Lf(n.lo,n.hi);return r?`-`+i:i}function Lf(e,t){if({lo:e,hi:t}=Rf(e,t),t<=2097151)return String(Pf*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,s=i*2,c=1e7;return a>=c&&(o+=Math.floor(a/c),a%=c),o>=c&&(s+=Math.floor(o/c),o%=c),s.toString()+Vf(o)+Vf(a)}function Rf(e,t){return{lo:e>>>0,hi:t>>>0}}function zf(e,t){return{lo:e|0,hi:t|0}}function Bf(e,t){return t=~t,e?e=~e+1:t+=1,zf(e,t)}var Vf=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function Hf(){let e=this.buf[this.pos++];if(!(e&128))return this.assertBounds(),e;let t=e&127;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}var Uf=Wf();function Wf(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt==`function`&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`&&(globalThis.Deno||globalThis.Bun||typeof process!=`object`||{}.BUF_BIGINT_DISABLE!==`1`)){let t=BigInt(`-9223372036854775808`),n=BigInt(`9223372036854775807`),r=BigInt(`0`),i=BigInt(`18446744073709551615`);return{zero:BigInt(0),supported:!0,parse(e){let r=typeof e==`bigint`?e:BigInt(e);if(r>n||ri||ta.call(e)),Jf(i)}return qf}function Xf(e){return(t,n)=>{let r=e(t);return n.set(r),{written:r.byteLength}}}var Zf;(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(Zf||={});var U=class{constructor(e){this.stackPos=[],this.encodeUtf8Into=e?Xf(e):Yf().encodeUtf8Into,this.buffer=ep,this.viewCache=tp,this.pos=0}ensureCapacity(e){let t=this.pos+e;if(t>this.buffer.length){let e=this.buffer.length||Qf;for(;e0&&n.set(this.buffer),this.buffer=n}}view(){let e=this.buffer,t=this.viewCache;if(t.byteLength===e.byteLength)return t;let n=new DataView(e.buffer);return this.viewCache=n,n}finish(){let e=this.buffer.slice(0,this.pos);return this.pos=0,this.stackPos=[],e}fork(){return this.stackPos.push(this.pos),this.ensureCapacity($f),this.buffer[this.pos++]=0,this}join(){let e=this.stackPos.pop();if(e===void 0)throw Error(`invalid state, fork stack empty`);let t=this.pos-e-$f,n=rp(t);return n>$f&&(this.ensureCapacity(n-$f),this.buffer.copyWithin(e+n,e+$f,this.pos)),this.pos=e,this.uint32(t),this.pos+=t,this}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.ensureCapacity(e.length),this.buffer.set(e,this.pos),this.pos+=e.length,this}uint32(e){if(ap(e),this.ensureCapacity(5),e<128)return this.buffer[this.pos++]=e,this;for(;e>127;)this.buffer[this.pos++]=e&127|128,e>>>=7;return this.buffer[this.pos++]=e,this}int32(e){if(ip(e),e>=0)return this.uint32(e);this.ensureCapacity(10);for(let t=0;t<9;t++)this.buffer[this.pos++]=e&127|128,e>>=7;return this.buffer[this.pos++]=1,this}bool(e){return this.ensureCapacity(1),this.buffer[this.pos++]=+!!e,this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){typeof e!=`string`&&(e=String(e));let t=e.length;if(t<=np){this.ensureCapacity(t+1);let n=this.buffer,r=this.pos;n[r++]=t;let i=0;for(;i127)break;n[r++]=t}if(i==t)return this.pos=r,this}this.ensureCapacity(t*3+5);let n=rp(t),r=this.buffer,i=this.pos,{written:a}=this.encodeUtf8Into(e,r.subarray(i+n)),o=rp(a);return o!=n&&r.copyWithin(i+o,i+n,i+n+a),this.uint32(a),this.pos+=a,this}float(e){return op(e),this.ensureCapacity(4),this.view().setFloat32(this.pos,e,!0),this.pos+=4,this}double(e){return this.ensureCapacity(8),this.view().setFloat64(this.pos,e,!0),this.pos+=8,this}fixed32(e){return ap(e),this.ensureCapacity(4),this.view().setUint32(this.pos,e,!0),this.pos+=4,this}sfixed32(e){return ip(e),this.ensureCapacity(4),this.view().setInt32(this.pos,e,!0),this.pos+=4,this}sint32(e){return ip(e),this.uint32((e<<1^e>>31)>>>0)}sfixed64(e){let t=Uf.enc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}fixed64(e){let t=Uf.uEnc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}int64(e){let t=Uf.enc(e);return this.writeVarint64(t.lo,t.hi)}sint64(e){let t=Uf.enc(e),n=t.hi>>31,r=t.lo<<1^n,i=(t.hi<<1|t.lo>>>31)^n;return this.writeVarint64(r,i)}uint64(e){let t=Uf.uEnc(e);return this.writeVarint64(t.lo,t.hi)}writeVarint64(e,t){this.ensureCapacity(10);let n=this.buffer,r=this.pos;for(let i=0;i<28;i+=7){let a=e>>>i,o=!(!(a>>>7)&&t==0);if(n[r++]=(o?a|128:a)&255,!o)return this.pos=r,this}let i=e>>>28&15|(t&7)<<4,a=!!(t>>3);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this;for(let e=3;e<31;e+=7){let i=t>>>e,a=!!(i>>>7);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this}return n[r++]=t>>>31&1,this.pos=r,this}},Qf=128,$f=1,ep=new Uint8Array,tp=new DataView(ep.buffer),np=32;function rp(e){return e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5}var W=class{constructor(e,t=Yf().decodeUtf8){this.decodeUtf8=t,this.varint64Lo=0,this.varint64Hi=0,this.varint64=Nf,this.uint32=Hf,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,t=this.uint32(),n=this.pos-e;if(n>5||n==5&&this.buf[this.pos-1]>15)throw Error(`illegal tag: varint overflows uint32`);let r=t>>>3,i=t&7;if(r<=0||i>5)throw Error(`illegal tag: field no `+r+` wire type `+i);return[r,i]}skip(e,t,n=100){let r=this.pos;switch(e){case Zf.Varint:for(;this.buf[this.pos++]&128;);break;case Zf.Bit64:this.pos+=4;case Zf.Bit32:this.pos+=4;break;case Zf.LengthDelimited:let r=this.uint32();this.pos+=r;break;case Zf.StartGroup:if(n<=0)throw Error(`maximum recursion depth reached`);for(;;){let[e,r]=this.tag();if(r===Zf.EndGroup){if(t!==void 0&&e!==t)throw Error(`invalid end group tag`);break}this.skip(r,e,n-1)}break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return this.varint64(),Uf.dec(this.varint64Lo,this.varint64Hi)}uint64(){return this.varint64(),Uf.uDec(this.varint64Lo,this.varint64Hi)}sint64(){this.varint64();let e=this.varint64Lo,t=this.varint64Hi,n=-(e&1);return e=(e>>>1|(t&1)<<31)^n,t=t>>>1^n,Uf.dec(e,t)}bool(){let e=this.buf[this.pos];return e<128?(this.pos++,e!==0):(this.varint64(),this.varint64Lo!==0||this.varint64Hi!==0)}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Uf.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Uf.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(e){let t=this.bytes(),n=t.length;if(n<=np){let r=Array(n);for(let i=0;i127)return this.decodeUtf8(t,e);r[i]=n}return String.fromCharCode.apply(String,r)}return this.decodeUtf8(t,e)}};function ip(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid int32: `+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error(`invalid int32: `+e)}function ap(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid uint32: `+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error(`invalid uint32: `+e)}function op(e){if(typeof e==`string`){let t=e;if(e=Number(e),Number.isNaN(e)&&t!==`NaN`)throw Error(`invalid float32: `+t)}else if(typeof e!=`number`)throw Error(`invalid float32: `+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error(`invalid float32: `+e)}var sp=function(e){return e[e.NULL_VALUE=0]=`NULL_VALUE`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function cp(){return{fields:{}}}var lp={encode(e,t=new U){return Object.entries(e.fields).forEach(([e,n])=>{n!==void 0&&dp.encode({key:e,value:n},t.uint32(10).fork()).join()}),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=cp();for(;n.pos>>3){case 1:{if(e!==10)break;let t=dp.decode(n,n.uint32());t.value!==void 0&&(i.fields[t.key]=t.value);continue}}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return lp.fromPartial(e??{})},fromPartial(e){let t=cp();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,n])=>(n!==void 0&&(e[t]=n),e),{}),t},wrap(e){let t=cp();if(e!==void 0)for(let n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){let t={};if(e.fields)for(let n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function up(){return{key:``,value:void 0}}var dp={encode(e,t=new U){return e.key!==``&&t.uint32(10).string(e.key),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=up();for(;n.pos>>3){case 1:if(e!==10)break;i.key=n.string();continue;case 2:if(e!==18)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return dp.fromPartial(e??{})},fromPartial(e){let t=up();return t.key=e.key??``,t.value=e.value??void 0,t}};function fp(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var G={encode(e,t=new U){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&lp.encode(lp.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&mp.encode(mp.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=fp();for(;n.pos>>3){case 1:if(e!==8)break;i.nullValue=n.int32();continue;case 2:if(e!==17)break;i.numberValue=n.double();continue;case 3:if(e!==26)break;i.stringValue=n.string();continue;case 4:if(e!==32)break;i.boolValue=n.bool();continue;case 5:if(e!==42)break;i.structValue=lp.unwrap(lp.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.listValue=mp.unwrap(mp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return G.fromPartial(e??{})},fromPartial(e){let t=fp();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=fp();if(e===null)t.nullValue=sp.NULL_VALUE;else if(typeof e==`boolean`)t.boolValue=e;else if(typeof e==`number`)t.numberValue=e;else if(typeof e==`string`)t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e==`object`)t.structValue=e;else if(e!==void 0)throw new globalThis.Error(`Unsupported any value type: `+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function pp(){return{values:[]}}var mp={encode(e,t=new U){for(let n of e.values)G.encode(G.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=pp();for(;n.pos>>3){case 1:if(e!==10)break;i.values.push(G.unwrap(G.decode(n,n.uint32())));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mp.fromPartial(e??{})},fromPartial(e){let t=pp();return t.values=e.values?.map(e=>e)||[],t},wrap(e){let t=pp();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty(`values`)&&globalThis.Array.isArray(e.values)?e.values:e}},hp=function(e){return e[e.ADD=0]=`ADD`,e[e.REMOVE=1]=`REMOVE`,e[e.REPLACE=2]=`REPLACE`,e[e.MOVE=3]=`MOVE`,e[e.COPY=4]=`COPY`,e[e.TEST=5]=`TEST`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function gp(){return{op:0,path:``,from:void 0,value:void 0}}var _p={encode(e,t=new U){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==``&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=gp();for(;n.pos>>3){case 1:if(e!==8)break;i.op=n.int32();continue;case 2:if(e!==18)break;i.path=n.string();continue;case 3:if(e!==26)break;i.from=n.string();continue;case 4:if(e!==34)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return _p.fromPartial(e??{})},fromPartial(e){let t=gp();return t.op=e.op??0,t.path=e.path??``,t.from=e.from??void 0,t.value=e.value??void 0,t}};function vp(){return{id:``,type:``,function:void 0,metadata:void 0}}var yp={encode(e,t=new U){return e.id!==``&&t.uint32(10).string(e.id),e.type!==``&&t.uint32(18).string(e.type),e.function!==void 0&&xp.encode(e.function,t.uint32(26).fork()).join(),e.metadata!==void 0&&lp.encode(lp.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=vp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.type=n.string();continue;case 3:if(e!==26)break;i.function=xp.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.metadata=lp.unwrap(lp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return yp.fromPartial(e??{})},fromPartial(e){let t=vp();return t.id=e.id??``,t.type=e.type??``,t.function=e.function!==void 0&&e.function!==null?xp.fromPartial(e.function):void 0,t.metadata=e.metadata??void 0,t}};function bp(){return{name:``,arguments:``}}var xp={encode(e,t=new U){return e.name!==``&&t.uint32(10).string(e.name),e.arguments!==``&&t.uint32(18).string(e.arguments),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=bp();for(;n.pos>>3){case 1:if(e!==10)break;i.name=n.string();continue;case 2:if(e!==18)break;i.arguments=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return xp.fromPartial(e??{})},fromPartial(e){let t=bp();return t.name=e.name??``,t.arguments=e.arguments??``,t}};function Sp(){return{value:``,mimeType:``}}var Cp={encode(e,t=new U){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==``&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Sp();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Cp.fromPartial(e??{})},fromPartial(e){let t=Sp();return t.value=e.value??``,t.mimeType=e.mimeType??``,t}};function wp(){return{value:``,mimeType:void 0}}var Tp={encode(e,t=new U){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==void 0&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=wp();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Tp.fromPartial(e??{})},fromPartial(e){let t=wp();return t.value=e.value??``,t.mimeType=e.mimeType??void 0,t}};function Ep(){return{data:void 0,url:void 0}}var Dp={encode(e,t=new U){return e.data!==void 0&&Cp.encode(e.data,t.uint32(10).fork()).join(),e.url!==void 0&&Tp.encode(e.url,t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Ep();for(;n.pos>>3){case 1:if(e!==10)break;i.data=Cp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.url=Tp.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Dp.fromPartial(e??{})},fromPartial(e){let t=Ep();return t.data=e.data!==void 0&&e.data!==null?Cp.fromPartial(e.data):void 0,t.url=e.url!==void 0&&e.url!==null?Tp.fromPartial(e.url):void 0,t}};function Op(){return{text:``}}var kp={encode(e,t=new U){return e.text!==``&&t.uint32(10).string(e.text),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Op();for(;n.pos>>3){case 1:if(e!==10)break;i.text=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return kp.fromPartial(e??{})},fromPartial(e){let t=Op();return t.text=e.text??``,t}};function Ap(){return{source:void 0,metadata:void 0}}var jp={encode(e,t=new U){return e.source!==void 0&&Dp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Ap();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Dp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return jp.fromPartial(e??{})},fromPartial(e){let t=Ap();return t.source=e.source!==void 0&&e.source!==null?Dp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Mp(){return{source:void 0,metadata:void 0}}var Np={encode(e,t=new U){return e.source!==void 0&&Dp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Mp();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Dp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Np.fromPartial(e??{})},fromPartial(e){let t=Mp();return t.source=e.source!==void 0&&e.source!==null?Dp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Pp(){return{source:void 0,metadata:void 0}}var Fp={encode(e,t=new U){return e.source!==void 0&&Dp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Pp();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Dp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Fp.fromPartial(e??{})},fromPartial(e){let t=Pp();return t.source=e.source!==void 0&&e.source!==null?Dp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Ip(){return{source:void 0,metadata:void 0}}var Lp={encode(e,t=new U){return e.source!==void 0&&Dp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Ip();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Dp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Lp.fromPartial(e??{})},fromPartial(e){let t=Ip();return t.source=e.source!==void 0&&e.source!==null?Dp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Rp(){return{text:void 0,image:void 0,audio:void 0,video:void 0,document:void 0}}var zp={encode(e,t=new U){return e.text!==void 0&&kp.encode(e.text,t.uint32(10).fork()).join(),e.image!==void 0&&jp.encode(e.image,t.uint32(18).fork()).join(),e.audio!==void 0&&Np.encode(e.audio,t.uint32(26).fork()).join(),e.video!==void 0&&Fp.encode(e.video,t.uint32(34).fork()).join(),e.document!==void 0&&Lp.encode(e.document,t.uint32(42).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Rp();for(;n.pos>>3){case 1:if(e!==10)break;i.text=kp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.image=jp.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.audio=Np.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.video=Fp.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.document=Lp.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return zp.fromPartial(e??{})},fromPartial(e){let t=Rp();return t.text=e.text!==void 0&&e.text!==null?kp.fromPartial(e.text):void 0,t.image=e.image!==void 0&&e.image!==null?jp.fromPartial(e.image):void 0,t.audio=e.audio!==void 0&&e.audio!==null?Np.fromPartial(e.audio):void 0,t.video=e.video!==void 0&&e.video!==null?Fp.fromPartial(e.video):void 0,t.document=e.document!==void 0&&e.document!==null?Lp.fromPartial(e.document):void 0,t}};function Bp(){return{id:``,role:``,content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[],metadata:void 0,subagentRunId:void 0}}var Vp={encode(e,t=new U){e.id!==``&&t.uint32(10).string(e.id),e.role!==``&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(let n of e.toolCalls)yp.encode(n,t.uint32(42).fork()).join();e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error);for(let n of e.contentParts)zp.encode(n,t.uint32(66).fork()).join();return e.metadata!==void 0&&lp.encode(lp.wrap(e.metadata),t.uint32(74).fork()).join(),e.subagentRunId!==void 0&&t.uint32(82).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Bp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.role=n.string();continue;case 3:if(e!==26)break;i.content=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.toolCalls.push(yp.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.toolCallId=n.string();continue;case 7:if(e!==58)break;i.error=n.string();continue;case 8:if(e!==66)break;i.contentParts.push(zp.decode(n,n.uint32()));continue;case 9:if(e!==74)break;i.metadata=lp.unwrap(lp.decode(n,n.uint32()));continue;case 10:if(e!==82)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Vp.fromPartial(e??{})},fromPartial(e){let t=Bp();return t.id=e.id??``,t.role=e.role??``,t.content=e.content??void 0,t.name=e.name??void 0,t.toolCalls=e.toolCalls?.map(e=>yp.fromPartial(e))||[],t.toolCallId=e.toolCallId??void 0,t.error=e.error??void 0,t.contentParts=e.contentParts?.map(e=>zp.fromPartial(e))||[],t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Hp(){return{id:``,reason:``,message:void 0,toolCallId:void 0,responseSchema:void 0,expiresAt:void 0,metadata:void 0,subagentRunId:void 0}}var Up={encode(e,t=new U){return e.id!==``&&t.uint32(10).string(e.id),e.reason!==``&&t.uint32(18).string(e.reason),e.message!==void 0&&t.uint32(26).string(e.message),e.toolCallId!==void 0&&t.uint32(34).string(e.toolCallId),e.responseSchema!==void 0&&G.encode(G.wrap(e.responseSchema),t.uint32(42).fork()).join(),e.expiresAt!==void 0&&t.uint32(50).string(e.expiresAt),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(58).fork()).join(),e.subagentRunId!==void 0&&t.uint32(66).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Hp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.reason=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.toolCallId=n.string();continue;case 5:if(e!==42)break;i.responseSchema=G.unwrap(G.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.expiresAt=n.string();continue;case 7:if(e!==58)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue;case 8:if(e!==66)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Up.fromPartial(e??{})},fromPartial(e){let t=Hp();return t.id=e.id??``,t.reason=e.reason??``,t.message=e.message??void 0,t.toolCallId=e.toolCallId??void 0,t.responseSchema=e.responseSchema??void 0,t.expiresAt=e.expiresAt??void 0,t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}},Wp=function(e){return e[e.TEXT_MESSAGE_START=0]=`TEXT_MESSAGE_START`,e[e.TEXT_MESSAGE_CONTENT=1]=`TEXT_MESSAGE_CONTENT`,e[e.TEXT_MESSAGE_END=2]=`TEXT_MESSAGE_END`,e[e.TOOL_CALL_START=3]=`TOOL_CALL_START`,e[e.TOOL_CALL_ARGS=4]=`TOOL_CALL_ARGS`,e[e.TOOL_CALL_END=5]=`TOOL_CALL_END`,e[e.STATE_SNAPSHOT=6]=`STATE_SNAPSHOT`,e[e.STATE_DELTA=7]=`STATE_DELTA`,e[e.MESSAGES_SNAPSHOT=8]=`MESSAGES_SNAPSHOT`,e[e.RAW=9]=`RAW`,e[e.CUSTOM=10]=`CUSTOM`,e[e.RUN_STARTED=11]=`RUN_STARTED`,e[e.RUN_FINISHED=12]=`RUN_FINISHED`,e[e.RUN_ERROR=13]=`RUN_ERROR`,e[e.STEP_STARTED=14]=`STEP_STARTED`,e[e.STEP_FINISHED=15]=`STEP_FINISHED`,e[e.SUBAGENT_STARTED=16]=`SUBAGENT_STARTED`,e[e.SUBAGENT_FINISHED=17]=`SUBAGENT_FINISHED`,e[e.SUBAGENT_ERROR=18]=`SUBAGENT_ERROR`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function Gp(){return{type:0,timestamp:void 0,rawEvent:void 0,metadata:void 0}}var K={encode(e,t=new U){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&G.encode(G.wrap(e.rawEvent),t.uint32(26).fork()).join(),e.metadata!==void 0&&lp.encode(lp.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Gp();for(;n.pos>>3){case 1:if(e!==8)break;i.type=n.int32();continue;case 2:if(e!==16)break;i.timestamp=Rm(n.int64());continue;case 3:if(e!==26)break;i.rawEvent=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.metadata=lp.unwrap(lp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return K.fromPartial(e??{})},fromPartial(e){let t=Gp();return t.type=e.type??0,t.timestamp=e.timestamp??void 0,t.rawEvent=e.rawEvent??void 0,t.metadata=e.metadata??void 0,t}};function Kp(){return{baseEvent:void 0,messageId:``,role:void 0,name:void 0,subagentRunId:void 0}}var qp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.name!==void 0&&t.uint32(34).string(e.name),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Kp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return qp.fromPartial(e??{})},fromPartial(e){let t=Kp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.role=e.role??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Jp(){return{baseEvent:void 0,messageId:``,delta:``,subagentRunId:void 0}}var Yp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Jp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Yp.fromPartial(e??{})},fromPartial(e){let t=Jp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Xp(){return{baseEvent:void 0,messageId:``,subagentRunId:void 0}}var Zp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Xp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Zp.fromPartial(e??{})},fromPartial(e){let t=Xp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Qp(){return{baseEvent:void 0,toolCallId:``,toolCallName:``,parentMessageId:void 0,subagentRunId:void 0}}var $p={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.toolCallName!==``&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Qp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return $p.fromPartial(e??{})},fromPartial(e){let t=Qp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.toolCallName=e.toolCallName??``,t.parentMessageId=e.parentMessageId??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function em(){return{baseEvent:void 0,toolCallId:``,delta:``,subagentRunId:void 0}}var tm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=em();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return tm.fromPartial(e??{})},fromPartial(e){let t=em();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function nm(){return{baseEvent:void 0,toolCallId:``,subagentRunId:void 0}}var rm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=nm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return rm.fromPartial(e??{})},fromPartial(e){let t=nm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function im(){return{baseEvent:void 0,snapshot:void 0,subagentRunId:void 0}}var am={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&G.encode(G.wrap(e.snapshot),t.uint32(18).fork()).join(),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=im();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.snapshot=G.unwrap(G.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return am.fromPartial(e??{})},fromPartial(e){let t=im();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.snapshot=e.snapshot??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function om(){return{baseEvent:void 0,delta:[],subagentRunId:void 0}}var sm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.delta)_p.encode(n,t.uint32(18).fork()).join();return e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=om();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.delta.push(_p.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return sm.fromPartial(e??{})},fromPartial(e){let t=om();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.delta=e.delta?.map(e=>_p.fromPartial(e))||[],t.subagentRunId=e.subagentRunId??void 0,t}};function cm(){return{baseEvent:void 0,messages:[]}}var lm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.messages)Vp.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=cm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messages.push(Vp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return lm.fromPartial(e??{})},fromPartial(e){let t=cm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messages=e.messages?.map(e=>Vp.fromPartial(e))||[],t}};function um(){return{baseEvent:void 0,event:void 0,source:void 0,subagentRunId:void 0}}var dm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&G.encode(G.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=um();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.event=G.unwrap(G.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.source=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return dm.fromPartial(e??{})},fromPartial(e){let t=um();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.event=e.event??void 0,t.source=e.source??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function fm(){return{baseEvent:void 0,name:``,value:void 0,subagentRunId:void 0}}var pm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==``&&t.uint32(18).string(e.name),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(26).fork()).join(),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=fm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.name=n.string();continue;case 3:if(e!==26)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return pm.fromPartial(e??{})},fromPartial(e){let t=fm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.name=e.name??``,t.value=e.value??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function mm(){return{baseEvent:void 0,threadId:``,runId:``}}var hm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=mm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return hm.fromPartial(e??{})},fromPartial(e){let t=mm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t}};function gm(){return{provider:void 0,model:void 0,inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0}}var _m={encode(e,t=new U){return e.provider!==void 0&&t.uint32(10).string(e.provider),e.model!==void 0&&t.uint32(18).string(e.model),e.inputTokens!==void 0&&t.uint32(24).int64(e.inputTokens),e.outputTokens!==void 0&&t.uint32(32).int64(e.outputTokens),e.totalTokens!==void 0&&t.uint32(40).int64(e.totalTokens),e.reasoningTokens!==void 0&&t.uint32(48).int64(e.reasoningTokens),e.cachedInputTokens!==void 0&&t.uint32(56).int64(e.cachedInputTokens),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=gm();for(;n.pos>>3){case 1:if(e!==10)break;i.provider=n.string();continue;case 2:if(e!==18)break;i.model=n.string();continue;case 3:if(e!==24)break;i.inputTokens=Rm(n.int64());continue;case 4:if(e!==32)break;i.outputTokens=Rm(n.int64());continue;case 5:if(e!==40)break;i.totalTokens=Rm(n.int64());continue;case 6:if(e!==48)break;i.reasoningTokens=Rm(n.int64());continue;case 7:if(e!==56)break;i.cachedInputTokens=Rm(n.int64());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return _m.fromPartial(e??{})},fromPartial(e){let t=gm();return t.provider=e.provider??void 0,t.model=e.model??void 0,t.inputTokens=e.inputTokens??void 0,t.outputTokens=e.outputTokens??void 0,t.totalTokens=e.totalTokens??void 0,t.reasoningTokens=e.reasoningTokens??void 0,t.cachedInputTokens=e.cachedInputTokens??void 0,t}};function vm(){return{baseEvent:void 0,threadId:``,runId:``,result:void 0,outcome:``,interrupts:[],usage:[]}}var ym={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),e.result!==void 0&&G.encode(G.wrap(e.result),t.uint32(34).fork()).join(),e.outcome!==``&&t.uint32(42).string(e.outcome);for(let n of e.interrupts)Up.encode(n,t.uint32(50).fork()).join();for(let n of e.usage)_m.encode(n,t.uint32(58).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=vm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue;case 4:if(e!==34)break;i.result=G.unwrap(G.decode(n,n.uint32()));continue;case 5:if(e!==42)break;i.outcome=n.string();continue;case 6:if(e!==50)break;i.interrupts.push(Up.decode(n,n.uint32()));continue;case 7:if(e!==58)break;i.usage.push(_m.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return ym.fromPartial(e??{})},fromPartial(e){let t=vm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interrupts=e.interrupts?.map(e=>Up.fromPartial(e))||[],t.usage=e.usage?.map(e=>_m.fromPartial(e))||[],t}};function bm(){return{baseEvent:void 0,code:void 0,message:``,usage:[]}}var xm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==``&&t.uint32(26).string(e.message);for(let n of e.usage)_m.encode(n,t.uint32(34).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=bm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.code=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.usage.push(_m.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return xm.fromPartial(e??{})},fromPartial(e){let t=bm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.code=e.code??void 0,t.message=e.message??``,t.usage=e.usage?.map(e=>_m.fromPartial(e))||[],t}};function Sm(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var Cm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Sm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Cm.fromPartial(e??{})},fromPartial(e){let t=Sm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function wm(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var Tm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=wm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Tm.fromPartial(e??{})},fromPartial(e){let t=wm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Em(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0,subagentRunId:void 0}}var Dm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),e.name!==void 0&&t.uint32(42).string(e.name),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Em();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.delta=n.string();continue;case 5:if(e!==42)break;i.name=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Dm.fromPartial(e??{})},fromPartial(e){let t=Em();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??void 0,t.role=e.role??void 0,t.delta=e.delta??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Om(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0,subagentRunId:void 0}}var km={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Om();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.delta=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return km.fromPartial(e??{})},fromPartial(e){let t=Om();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??void 0,t.toolCallName=e.toolCallName??void 0,t.parentMessageId=e.parentMessageId??void 0,t.delta=e.delta??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Am(){return{baseEvent:void 0,subagentRunId:``,name:``,description:void 0,parentSubagentRunId:void 0,parentToolCallId:void 0,parentMessageId:void 0}}var jm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.name!==``&&t.uint32(26).string(e.name),e.description!==void 0&&t.uint32(34).string(e.description),e.parentSubagentRunId!==void 0&&t.uint32(42).string(e.parentSubagentRunId),e.parentToolCallId!==void 0&&t.uint32(50).string(e.parentToolCallId),e.parentMessageId!==void 0&&t.uint32(58).string(e.parentMessageId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Am();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.name=n.string();continue;case 4:if(e!==34)break;i.description=n.string();continue;case 5:if(e!==42)break;i.parentSubagentRunId=n.string();continue;case 6:if(e!==50)break;i.parentToolCallId=n.string();continue;case 7:if(e!==58)break;i.parentMessageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return jm.fromPartial(e??{})},fromPartial(e){let t=Am();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.name=e.name??``,t.description=e.description??void 0,t.parentSubagentRunId=e.parentSubagentRunId??void 0,t.parentToolCallId=e.parentToolCallId??void 0,t.parentMessageId=e.parentMessageId??void 0,t}};function Mm(){return{baseEvent:void 0,subagentRunId:``,result:void 0,outcome:``,interruptIds:[]}}var Nm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.result!==void 0&&G.encode(G.wrap(e.result),t.uint32(26).fork()).join(),e.outcome!==``&&t.uint32(34).string(e.outcome);for(let n of e.interruptIds)t.uint32(42).string(n);return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Mm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.result=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.outcome=n.string();continue;case 5:if(e!==42)break;i.interruptIds.push(n.string());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Nm.fromPartial(e??{})},fromPartial(e){let t=Mm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interruptIds=e.interruptIds?.map(e=>e)||[],t}};function Pm(){return{baseEvent:void 0,subagentRunId:``,message:``,code:void 0}}var Fm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.message!==``&&t.uint32(26).string(e.message),e.code!==void 0&&t.uint32(34).string(e.code),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Pm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.code=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Fm.fromPartial(e??{})},fromPartial(e){let t=Pm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.message=e.message??``,t.code=e.code??void 0,t}};function Im(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0,subagentStarted:void 0,subagentFinished:void 0,subagentError:void 0}}var Lm={encode(e,t=new U){return e.textMessageStart!==void 0&&qp.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&Yp.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&Zp.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&$p.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&tm.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&rm.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&am.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&sm.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&lm.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&dm.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&pm.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&hm.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&ym.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&xm.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&Cm.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&Tm.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&Dm.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&km.encode(e.toolCallChunk,t.uint32(146).fork()).join(),e.subagentStarted!==void 0&&jm.encode(e.subagentStarted,t.uint32(154).fork()).join(),e.subagentFinished!==void 0&&Nm.encode(e.subagentFinished,t.uint32(162).fork()).join(),e.subagentError!==void 0&&Fm.encode(e.subagentError,t.uint32(170).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Im();for(;n.pos>>3){case 1:if(e!==10)break;i.textMessageStart=qp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.textMessageContent=Yp.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.textMessageEnd=Zp.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.toolCallStart=$p.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.toolCallArgs=tm.decode(n,n.uint32());continue;case 6:if(e!==50)break;i.toolCallEnd=rm.decode(n,n.uint32());continue;case 7:if(e!==58)break;i.stateSnapshot=am.decode(n,n.uint32());continue;case 8:if(e!==66)break;i.stateDelta=sm.decode(n,n.uint32());continue;case 9:if(e!==74)break;i.messagesSnapshot=lm.decode(n,n.uint32());continue;case 10:if(e!==82)break;i.raw=dm.decode(n,n.uint32());continue;case 11:if(e!==90)break;i.custom=pm.decode(n,n.uint32());continue;case 12:if(e!==98)break;i.runStarted=hm.decode(n,n.uint32());continue;case 13:if(e!==106)break;i.runFinished=ym.decode(n,n.uint32());continue;case 14:if(e!==114)break;i.runError=xm.decode(n,n.uint32());continue;case 15:if(e!==122)break;i.stepStarted=Cm.decode(n,n.uint32());continue;case 16:if(e!==130)break;i.stepFinished=Tm.decode(n,n.uint32());continue;case 17:if(e!==138)break;i.textMessageChunk=Dm.decode(n,n.uint32());continue;case 18:if(e!==146)break;i.toolCallChunk=km.decode(n,n.uint32());continue;case 19:if(e!==154)break;i.subagentStarted=jm.decode(n,n.uint32());continue;case 20:if(e!==162)break;i.subagentFinished=Nm.decode(n,n.uint32());continue;case 21:if(e!==170)break;i.subagentError=Fm.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Lm.fromPartial(e??{})},fromPartial(e){let t=Im();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?qp.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?Yp.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?Zp.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?$p.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?tm.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?rm.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?am.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?sm.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?lm.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?dm.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?pm.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?hm.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?ym.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?xm.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?Cm.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?Tm.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?Dm.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?km.fromPartial(e.toolCallChunk):void 0,t.subagentStarted=e.subagentStarted!==void 0&&e.subagentStarted!==null?jm.fromPartial(e.subagentStarted):void 0,t.subagentFinished=e.subagentFinished!==void 0&&e.subagentFinished!==null?Nm.fromPartial(e.subagentFinished):void 0,t.subagentError=e.subagentError!==void 0&&e.subagentError!==null?Fm.fromPartial(e.subagentError):void 0,t}};function Rm(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error(`Value is larger than Number.MAX_SAFE_INTEGER`);if(te&&typeof e==`object`?e:void 0,Bm=e=>{let t=zm(e);if(t){if(t.data){let e=t.data;return{type:`data`,value:e.value,mimeType:e.mimeType}}if(t.url){let e=t.url;return{type:`url`,value:e.value,mimeType:e.mimeType}}}},Vm=e=>{let t=zm(e);if(t){if(t.text)return{type:`text`,text:t.text.text};if(t.image){let e=t.image;return{type:`image`,source:Bm(e.source),metadata:e.metadata}}if(t.audio){let e=t.audio;return{type:`audio`,source:Bm(e.source),metadata:e.metadata}}if(t.video){let e=t.video;return{type:`video`,source:Bm(e.source),metadata:e.metadata}}if(t.document){let e=t.document;return{type:`document`,source:Bm(e.source),metadata:e.metadata}}}};function Hm(e){let t=Lm.decode(e),n=Object.values(t).find(e=>e!==void 0);if(!n)throw Error(`Invalid event`);if(n.type=Wp[n.baseEvent.type],n.timestamp=n.baseEvent.timestamp,n.rawEvent=n.baseEvent.rawEvent,n.baseEvent.metadata!==void 0&&(n.metadata=n.baseEvent.metadata),delete n.baseEvent,n.type===B.MESSAGES_SNAPSHOT)for(let e of n.messages){let t=e;if(t.role===`user`&&Array.isArray(t.contentParts)){let e=t.contentParts.map(e=>Vm(e)).filter(e=>e!==void 0);e.length>0&&(t.content=e)}Array.isArray(t.contentParts)&&t.contentParts.length===0&&(t.contentParts=void 0),t.toolCalls?.length===0&&(t.toolCalls=void 0)}if(n.type===B.RUN_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interrupts)?e.interrupts:[];delete e.interrupts,t===`interrupt`?e.outcome={type:`interrupt`,interrupts:r}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if(n.type===B.SUBAGENT_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interruptIds)?e.interruptIds:[];delete e.interruptIds,t===`suspended`?e.outcome={type:`suspended`,...r.length>0&&{interruptIds:r}}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if((n.type===B.RUN_FINISHED||n.type===B.RUN_ERROR)&&Array.isArray(n.usage)&&n.usage.length===0&&delete n.usage,n.type===B.STATE_DELTA)for(let e of n.delta)e.op=hp[e.op].toLowerCase(),Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]});return Object.keys(n).forEach(e=>{n[e]===void 0&&delete n[e]}),Zl.parse(n)}var Um;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(Um||={});var Wm;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Wm||={});var q=Um.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),Gm=e=>{switch(typeof e){case`undefined`:return q.undefined;case`string`:return q.string;case`number`:return Number.isNaN(e)?q.nan:q.number;case`boolean`:return q.boolean;case`function`:return q.function;case`bigint`:return q.bigint;case`symbol`:return q.symbol;case`object`:return Array.isArray(e)?q.array:e===null?q.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?q.promise:typeof Map<`u`&&e instanceof Map?q.map:typeof Set<`u`&&e instanceof Set?q.set:typeof Date<`u`&&e instanceof Date?q.date:q.object;default:return q.unknown}},J=Um.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Km=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Km.create=e=>new Km(e);var qm=(e,t)=>{let n;switch(e.code){case J.invalid_type:n=e.received===q.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case J.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Um.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:n=`Unrecognized key(s) in object: ${Um.joinValues(e.keys,`, `)}`;break;case J.invalid_union:n=`Invalid input`;break;case J.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Um.joinValues(e.options)}`;break;case J.invalid_enum_value:n=`Invalid enum value. Expected ${Um.joinValues(e.options)}, received '${e.received}'`;break;case J.invalid_arguments:n=`Invalid function arguments`;break;case J.invalid_return_type:n=`Invalid function return type`;break;case J.invalid_date:n=`Invalid date`;break;case J.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Um.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case J.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case J.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case J.custom:n=`Invalid input`;break;case J.invalid_intersection_types:n=`Intersection results could not be merged`;break;case J.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case J.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,Um.assertNever(e)}return{message:n}},Jm=qm;function Ym(){return Jm}var Xm=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function Y(e,t){let n=Ym(),r=Xm({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qm?void 0:qm].filter(e=>!!e)});e.common.issues.push(r)}var Zm=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return X;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return X;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},X=Object.freeze({status:`aborted`}),Qm=e=>({status:`dirty`,value:e}),$m=e=>({status:`valid`,value:e}),eh=e=>e.status===`aborted`,th=e=>e.status===`dirty`,nh=e=>e.status===`valid`,rh=e=>typeof Promise<`u`&&e instanceof Promise,Z;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(Z||={});var ih=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ah=(e,t)=>{if(nh(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Km(e.common.issues);return this._error=t,this._error}}};function Q(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var oh=class{get description(){return this._def.description}_getType(e){return Gm(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Gm(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Zm,ctx:{common:e.parent.common,data:e.data,parsedType:Gm(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(rh(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gm(e)};return ah(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gm(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return nh(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>nh(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gm(e)},r=this._parse({data:e,path:n.path,parent:n});return ah(n,await(rh(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:J.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new lg({schema:this,typeName:$.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return ug.create(this,this._def)}nullable(){return dg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wh.create(this)}promise(){return cg.create(this,this._def)}or(e){return qh.create([this,e],this._def)}and(e){return Zh.create(this,e,this._def)}transform(e){return new lg({...Q(this._def),schema:this,typeName:$.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new fg({...Q(this._def),innerType:this,defaultValue:t,typeName:$.ZodDefault})}brand(){return new hg({typeName:$.ZodBranded,type:this,...Q(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new pg({...Q(this._def),innerType:this,catchValue:t,typeName:$.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return gg.create(this,e)}readonly(){return _g.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},sh=/^c[^\s-]{8,}$/i,ch=/^[0-9a-z]+$/,lh=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uh=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,dh=/^[a-z0-9_-]{21}$/i,fh=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ph=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,mh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,hh=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,gh,_h=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,yh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,bh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,xh=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Sh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ch=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,wh=RegExp(`^${Ch}$`);function Th(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Eh(e){return RegExp(`^${Th(e)}$`)}function Dh(e){let t=`${Ch}T${Th(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function Oh(e,t){return!((t!==`v4`&&t||!_h.test(e))&&(t!==`v6`&&t||!yh.test(e)))}function kh(e,t){if(!fh.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function Ah(e,t){return!((t!==`v4`&&t||!vh.test(e))&&(t!==`v6`&&t||!bh.test(e)))}var jh=class e extends oh{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==q.string){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.string,received:t.parsedType}),X}let t=new Zm,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),Y(n,{code:J.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:J.invalid_string,...Z.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...Z.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...Z.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...Z.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...Z.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...Z.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...Z.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...Z.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...Z.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...Z.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...Z.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...Z.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...Z.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...Z.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Z.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...Z.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...Z.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...Z.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...Z.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...Z.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...Z.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...Z.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...Z.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...Z.errToObj(t)})}nonempty(e){return this.min(1,Z.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew jh({checks:[],typeName:$.ZodString,coerce:e?.coerce??!1,...Q(e)});function Mh(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var Nh=class e extends oh{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==q.number){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.number,received:t.parsedType}),X}let t,n=new Zm;for(let r of this._def.checks)r.kind===`int`?Um.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Y(t,{code:J.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?Mh(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_finite,message:r.message}),n.dirty()):Um.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,Z.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Z.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Z.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Z.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Z.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:Z.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:Z.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Z.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:Z.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:Z.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:Z.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&Um.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew Nh({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...Q(e)});var Ph=class e extends oh{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==q.bigint)return this._getInvalidInput(e);let t,n=new Zm;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):Um.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.bigint,received:t.parsedType}),X}gte(e,t){return this.setLimit(`min`,e,!0,Z.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Z.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Z.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Z.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Z.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:Z.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Z.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Ph({checks:[],typeName:$.ZodBigInt,coerce:e?.coerce??!1,...Q(e)});var Fh=class extends oh{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==q.boolean){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.boolean,received:t.parsedType}),X}return $m(e.data)}};Fh.create=e=>new Fh({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...Q(e)});var Ih=class e extends oh{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==q.date){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.date,received:t.parsedType}),X}if(Number.isNaN(e.data.getTime()))return Y(this._getOrReturnCtx(e),{code:J.invalid_date}),X;let t=new Zm,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),Y(n,{code:J.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):Um.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:Z.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:Z.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Ih({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...Q(e)});var Lh=class extends oh{_parse(e){if(this._getType(e)!==q.symbol){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.symbol,received:t.parsedType}),X}return $m(e.data)}};Lh.create=e=>new Lh({typeName:$.ZodSymbol,...Q(e)});var Rh=class extends oh{_parse(e){if(this._getType(e)!==q.undefined){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.undefined,received:t.parsedType}),X}return $m(e.data)}};Rh.create=e=>new Rh({typeName:$.ZodUndefined,...Q(e)});var zh=class extends oh{_parse(e){if(this._getType(e)!==q.null){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.null,received:t.parsedType}),X}return $m(e.data)}};zh.create=e=>new zh({typeName:$.ZodNull,...Q(e)});var Bh=class extends oh{constructor(){super(...arguments),this._any=!0}_parse(e){return $m(e.data)}};Bh.create=e=>new Bh({typeName:$.ZodAny,...Q(e)});var Vh=class extends oh{constructor(){super(...arguments),this._unknown=!0}_parse(e){return $m(e.data)}};Vh.create=e=>new Vh({typeName:$.ZodUnknown,...Q(e)});var Hh=class extends oh{_parse(e){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.never,received:t.parsedType}),X}};Hh.create=e=>new Hh({typeName:$.ZodNever,...Q(e)});var Uh=class extends oh{_parse(e){if(this._getType(e)!==q.undefined){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.void,received:t.parsedType}),X}return $m(e.data)}};Uh.create=e=>new Uh({typeName:$.ZodVoid,...Q(e)});var Wh=class e extends oh{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==q.array)return Y(t,{code:J.invalid_type,expected:q.array,received:t.parsedType}),X;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(Y(t,{code:J.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new ih(t,e,t.path,n)))).then(e=>Zm.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new ih(t,e,t.path,n)));return Zm.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Z.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Z.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Z.toString(n)}})}nonempty(e){return this.min(1,e)}};Wh.create=(e,t)=>new Wh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...Q(t)});function Gh(e){if(e instanceof Kh){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=ug.create(Gh(r))}return new Kh({...e._def,shape:()=>t})}return e instanceof Wh?new Wh({...e._def,type:Gh(e.element)}):e instanceof ug?ug.create(Gh(e.unwrap())):e instanceof dg?dg.create(Gh(e.unwrap())):e instanceof Qh?Qh.create(e.items.map(e=>Gh(e))):e}var Kh=class e extends oh{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Um.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==q.object){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.object,received:t.parsedType}),X}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Hh&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new ih(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Hh){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(Y(n,{code:J.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new ih(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Zm.mergeObjectSync(t,e)):Zm.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return Z.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:Z.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of Um.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of Um.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return Gh(this)}partial(t){let n={};for(let e of Um.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of Um.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof ug;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return ag(Um.objectKeys(this.shape))}};Kh.create=(e,t)=>new Kh({shape:()=>e,unknownKeys:`strip`,catchall:Hh.create(),typeName:$.ZodObject,...Q(t)}),Kh.strictCreate=(e,t)=>new Kh({shape:()=>e,unknownKeys:`strict`,catchall:Hh.create(),typeName:$.ZodObject,...Q(t)}),Kh.lazycreate=(e,t)=>new Kh({shape:e,unknownKeys:`strip`,catchall:Hh.create(),typeName:$.ZodObject,...Q(t)});var qh=class extends oh{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Km(e.ctx.common.issues));return Y(t,{code:J.invalid_union,unionErrors:n}),X}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Km(e));return Y(t,{code:J.invalid_union,unionErrors:i}),X}}get options(){return this._def.options}};qh.create=(e,t)=>new qh({options:e,typeName:$.ZodUnion,...Q(t)});var Jh=e=>e instanceof rg?Jh(e.schema):e instanceof lg?Jh(e.innerType()):e instanceof ig?[e.value]:e instanceof og?e.options:e instanceof sg?Um.objectValues(e.enum):e instanceof fg?Jh(e._def.innerType):e instanceof Rh?[void 0]:e instanceof zh?[null]:e instanceof ug?[void 0,...Jh(e.unwrap())]:e instanceof dg?[null,...Jh(e.unwrap())]:e instanceof hg||e instanceof _g?Jh(e.unwrap()):e instanceof pg?Jh(e._def.innerType):[],Yh=class e extends oh{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q.object)return Y(t,{code:J.invalid_type,expected:q.object,received:t.parsedType}),X;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Y(t,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),X)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=Jh(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Q(r)})}};function Xh(e,t){let n=Gm(e),r=Gm(t);if(e===t)return{valid:!0,data:e};if(n===q.object&&r===q.object){let n=Um.objectKeys(t),r=Um.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Xh(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===q.array&&r===q.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if(eh(e)||eh(r))return X;let i=Xh(e.value,r.value);return i.valid?((th(e)||th(r))&&t.dirty(),{status:t.value,value:i.data}):(Y(n,{code:J.invalid_intersection_types}),X)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Zh.create=(e,t,n)=>new Zh({left:e,right:t,typeName:$.ZodIntersection,...Q(n)});var Qh=class e extends oh{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.array)return Y(n,{code:J.invalid_type,expected:q.array,received:n.parsedType}),X;if(n.data.lengththis._def.items.length&&(Y(n,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new ih(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>Zm.mergeArray(t,e)):Zm.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Qh.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new Qh({items:e,typeName:$.ZodTuple,rest:null,...Q(t)})};var $h=class e extends oh{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.object)return Y(n,{code:J.invalid_type,expected:q.object,received:n.parsedType}),X;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new ih(n,e,n.path,e)),value:a._parse(new ih(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Zm.mergeObjectAsync(t,r):Zm.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof oh?new e({keyType:t,valueType:n,typeName:$.ZodRecord,...Q(r)}):new e({keyType:jh.create(),valueType:t,typeName:$.ZodRecord,...Q(n)})}},eg=class extends oh{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.map)return Y(n,{code:J.invalid_type,expected:q.map,received:n.parsedType}),X;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new ih(n,e,n.path,[a,`key`])),value:i._parse(new ih(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return X;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return X;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};eg.create=(e,t,n)=>new eg({valueType:t,keyType:e,typeName:$.ZodMap,...Q(n)});var tg=class e extends oh{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.set)return Y(n,{code:J.invalid_type,expected:q.set,received:n.parsedType}),X;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(Y(n,{code:J.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return X;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new ih(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:Z.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Z.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};tg.create=(e,t)=>new tg({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...Q(t)});var ng=class e extends oh{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q.function)return Y(t,{code:J.invalid_type,expected:q.function,received:t.parsedType}),X;function n(e,n){return Xm({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ym(),qm].filter(e=>!!e),issueData:{code:J.invalid_arguments,argumentsError:n}})}function r(e,n){return Xm({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ym(),qm].filter(e=>!!e),issueData:{code:J.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof cg){let e=this;return $m(async function(...t){let o=new Km([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return $m(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Km([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Km([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Qh.create(t).rest(Vh.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||Qh.create([]).rest(Vh.create()),returns:n||Vh.create(),typeName:$.ZodFunction,...Q(r)})}},rg=class extends oh{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};rg.create=(e,t)=>new rg({getter:e,typeName:$.ZodLazy,...Q(t)});var ig=class extends oh{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return Y(t,{received:t.data,code:J.invalid_literal,expected:this._def.value}),X}return{status:`valid`,value:e.data}}get value(){return this._def.value}};ig.create=(e,t)=>new ig({value:e,typeName:$.ZodLiteral,...Q(t)});function ag(e,t){return new og({values:e,typeName:$.ZodEnum,...Q(t)})}var og=class e extends oh{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return Y(t,{expected:Um.joinValues(n),received:t.parsedType,code:J.invalid_type}),X}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return Y(t,{received:t.data,code:J.invalid_enum_value,options:n}),X}return $m(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};og.create=ag;var sg=class extends oh{_parse(e){let t=Um.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==q.string&&n.parsedType!==q.number){let e=Um.objectValues(t);return Y(n,{expected:Um.joinValues(e),received:n.parsedType,code:J.invalid_type}),X}if(this._cache||=new Set(Um.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=Um.objectValues(t);return Y(n,{received:n.data,code:J.invalid_enum_value,options:e}),X}return $m(e.data)}get enum(){return this._def.values}};sg.create=(e,t)=>new sg({values:e,typeName:$.ZodNativeEnum,...Q(t)});var cg=class extends oh{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==q.promise&&t.common.async===!1?(Y(t,{code:J.invalid_type,expected:q.promise,received:t.parsedType}),X):$m((t.parsedType===q.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};cg.create=(e,t)=>new cg({type:e,typeName:$.ZodPromise,...Q(t)});var lg=class extends oh{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{Y(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return X;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?X:r.status===`dirty`||t.value===`dirty`?Qm(r.value):r});{if(t.value===`aborted`)return X;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?X:r.status===`dirty`||t.value===`dirty`?Qm(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?X:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?X:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!nh(e))return X;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>nh(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):X)}Um.assertNever(r)}};lg.create=(e,t,n)=>new lg({schema:e,typeName:$.ZodEffects,effect:t,...Q(n)}),lg.createWithPreprocess=(e,t,n)=>new lg({schema:t,effect:{type:`preprocess`,transform:e},typeName:$.ZodEffects,...Q(n)});var ug=class extends oh{_parse(e){return this._getType(e)===q.undefined?$m(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ug.create=(e,t)=>new ug({innerType:e,typeName:$.ZodOptional,...Q(t)});var dg=class extends oh{_parse(e){return this._getType(e)===q.null?$m(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};dg.create=(e,t)=>new dg({innerType:e,typeName:$.ZodNullable,...Q(t)});var fg=class extends oh{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===q.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};fg.create=(e,t)=>new fg({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...Q(t)});var pg=class extends oh{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return rh(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Km(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Km(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};pg.create=(e,t)=>new pg({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...Q(t)});var mg=class extends oh{_parse(e){if(this._getType(e)!==q.nan){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.nan,received:t.parsedType}),X}return{status:`valid`,value:e.data}}};mg.create=e=>new mg({typeName:$.ZodNaN,...Q(e)});var hg=class extends oh{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},gg=class e extends oh{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?X:e.status===`dirty`?(t.dirty(),Qm(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?X:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:$.ZodPipeline})}},_g=class extends oh{_parse(e){let t=this._def.innerType._parse(e),n=e=>(nh(e)&&(e.value=Object.freeze(e.value)),e);return rh(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};_g.create=(e,t)=>new _g({innerType:e,typeName:$.ZodReadonly,...Q(t)}),Kh.lazycreate;var $;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})($||={});var vg=jh.create;Nh.create,mg.create,Ph.create;var yg=Fh.create;Ih.create,Lh.create,Rh.create,zh.create;var bg=Bh.create;Vh.create,Hh.create,Uh.create,Wh.create;var xg=Kh.create;Kh.strictCreate,qh.create;var Sg=Yh.create;Zh.create,Qh.create,$h.create,eg.create,tg.create,ng.create,rg.create;var Cg=ig.create,wg=og.create;sg.create,cg.create,lg.create,ug.create,dg.create,lg.createWithPreprocess,gg.create;var Tg=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Eg=e=>{if(typeof e!=`string`)throw TypeError(`Invalid argument expected string`);let t=e.match(Tg);if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Dg=e=>e===`*`||e===`x`||e===`X`,Og=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},kg=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],Ag=(e,t)=>{if(Dg(e)||Dg(t))return 0;let[n,r]=kg(Og(e),Og(t));return n>r?1:n{for(let n=0;n{let n=Eg(e),r=Eg(t),i=n.pop(),a=r.pop(),o=jg(n,r);return o===0?i&&a?jg(i.split(`.`),a.split(`.`)):i||a?i?-1:1:0:o},Ng=e=>{if(typeof structuredClone==`function`)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function Pg(){return Go()}function Fg(e){if(Object.freeze(e),typeof e==`object`&&e)for(let t of Object.values(e))typeof t==`object`&&t&&!Object.isFrozen(t)&&Fg(t);return e}var Ig=524288;function Lg(e,t,n){let r=0,i=[e,t],a=new WeakSet;for(;i.length>0;){let e=i.pop();if(typeof e==`string`){if(r+=e.length,r>n)return!0}else if(typeof e==`object`&&e){if(a.has(e))continue;if(a.add(e),Array.isArray(e))for(let t=0;tn)return!0;i.push(e[o])}}}}return!1}async function Rg(e,t,n,r){let i=typeof process<`u`&&!0,a=i&&!!{}.VITEST_WORKER_ID,o=i&&!!{}.VITEST_WORKER_ID,s=o&&!Lg(t,n,Ig),c=s?Ng(t):t,l=s?Ng(n):n,u=!1,d=!1,f;for(let t of e)try{s&&(Fg(c),Fg(l));let e=await r(t,c,l);if(e===void 0)continue;let n=!1;if(e.messages!==void 0&&e.messages!==c&&(c=Ng(e.messages),u=!0,n=!0),e.state!==void 0&&e.state!==l&&(l=Ng(e.state),d=!0,n=!0),s&&n&&Lg(c,l,Ig)&&(s=!1),f=e.stopPropagation,f===!0)break}catch(e){if(o&&e instanceof TypeError){if(a)throw e;console.error(`AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.`,e)}else a||console.error(`Subscriber error:`,e);continue}return{...u?{messages:Object.isFrozen(c)?Ng(c):c}:{},...d?{state:Object.isFrozen(l)?Ng(l):l}:{},...f===void 0?{}:{stopPropagation:f}}}function zg(e){if(!e)return{enabled:!1,events:!1,lifecycle:!1,verbose:!1};if(e===!0)return{enabled:!0,events:!0,lifecycle:!0,verbose:!0};let t=e.events??!0,n=e.lifecycle??!0,r=e.verbose??!1;return{enabled:t||n,events:t,lifecycle:n,verbose:r}}function Bg(e){if(e instanceof Vg)return e;if(e===!0)return new Vg(zg(!0))}var Vg=class{constructor(e){this.config=e}event(e,t,n,r){this.config.events&&(this.config.verbose?console.debug(`[${e}] ${t}`,typeof n==`string`?n:JSON.stringify(n)):console.debug(`[${e}] ${t}`,r??n))}lifecycle(e,t,n){this.config.lifecycle&&(n?console.debug(`[${e}] ${t}`,n):console.debug(`[${e}] ${t}`))}get eventsEnabled(){return this.config.events}get lifecycleEnabled(){return this.config.lifecycle}get enabled(){return this.config.enabled}};function Hg(e){return e.enabled?new Vg(e):void 0}function Ug(e,t,n){if(t){let r=e.find(e=>e.id===t);if(r?.role===`assistant`)return r;r&&console.warn(`TOOL_CALL_START: parentMessageId '${t}' matches a '${r.role}' message, not assistant — falling back to toolCallId`);let i={id:r?n:t,role:`assistant`,toolCalls:[]};return e.push(i),i}let r={id:n,role:`assistant`,toolCalls:[]};return e.push(r),r}function Wg(e,t){return!e||t.metadata===void 0?!1:(e.metadata=Mc(e.metadata,Ng(t.metadata)),!0)}var Gg=(e,t,n,r,i)=>{let a=Bg(i),o=Ng(n.messages),s=Ng(e.state),c={},l=e=>{e.messages!==void 0&&(o=e.messages,c.messages=e.messages),e.state!==void 0&&(s=e.state,c.state=e.state)},u=()=>{let e=Ng(c);return c={},e.messages!==void 0||e.state!==void 0?hf(e):Fd};return t.pipe(Tf(async t=>{let i=await Rg(r,o,s,(r,i,a)=>r.onEvent?.({event:t,agent:n,input:e,messages:i,state:a}));if(l(i),i.stopPropagation===!0?a?.event(`APPLY`,`Event dropped:`,t,{type:t.type,reason:`stopPropagation by subscriber`}):a?.event(`APPLY`,`Event applied:`,t,{type:t.type,subscribers:r.length}),i.stopPropagation===!0)return u();switch(t.type){case B.TEXT_MESSAGE_START:{let i=await Rg(r,o,s,(r,i,a)=>r.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e,role:n=`assistant`,name:r,subagentRunId:i}=t,a=o.find(t=>t.id===e);if(a?.role===`activity`)return console.warn(`TEXT_MESSAGE_START: Message '${e}' is an activity message — message ids must be unique across activity and text messages`),u();let s=a;if(!s){let t={id:e,role:n,content:``,...r!==void 0&&{name:r},...i!=null&&{subagentRunId:i}};o.push(t),s=t}let c=Wg(s,t);(!a||c)&&l({messages:o})}return u()}case B.TEXT_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${i}'`),u();if(c.role===`activity`)return console.warn(`TEXT_MESSAGE_CONTENT: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),u();let d=await Rg(r,o,s,(r,i,a)=>r.onTextMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,textMessageBuffer:typeof c.content==`string`?c.content:``}));return l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,Wg(c,t),l({messages:o})),u()}case B.TEXT_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),u();if(a.role===`activity`)return console.warn(`TEXT_MESSAGE_END: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),u();let c=await Rg(r,o,s,(r,i,o)=>r.onTextMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,textMessageBuffer:typeof a.content==`string`?a.content:``}));return l(c),c.stopPropagation!==!0&&Wg(a,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()}case B.TOOL_CALL_START:{let i=await Rg(r,o,s,(r,i,a)=>r.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{toolCallId:e,toolCallName:n,parentMessageId:r,subagentRunId:i}=t,a=o.find(t=>t.toolCalls?.some(t=>t.id===e))?.toolCalls?.find(t=>t.id===e);if(a){let r=a.function.name!==n;return r&&(console.warn(`TOOL_CALL_START: tool call '${e}' already exists with name '${a.function.name}' — updating it to '${n}'`),a.function.name=n),(Wg(a,t)||r)&&l({messages:o}),u()}let s=new Set(o.map(e=>e.id)),c=Ug(o,r,e);!s.has(c.id)&&i!=null&&c.subagentRunId===void 0&&(c.subagentRunId=i),c.toolCalls??=[];let d={id:e,type:`function`,function:{name:n,arguments:``}};c.toolCalls.push(d),Wg(d,t),l({messages:o})}return u()}case B.TOOL_CALL_ARGS:{let{toolCallId:i,delta:a}=t,c=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!c)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${i}'`),u();let d=c.toolCalls?.find(e=>e.id===i);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),u();let f=await Rg(r,o,s,(r,i,a)=>{let o=d.function.arguments,s=d.function.name,c={};try{c=Mf(o)}catch{}return r.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallBuffer:o,toolCallName:s,partialToolCallArgs:c})});return l(f),f.stopPropagation!==!0&&(d.function.arguments+=a,Wg(d,t),l({messages:o})),u()}case B.TOOL_CALL_END:{let{toolCallId:i}=t,a=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!a)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${i}'`),u();let c=a.toolCalls?.find(e=>e.id===i);if(!c)return console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),u();let d=await Rg(r,o,s,(r,i,a)=>{let o=c.function.arguments,s=c.function.name,l={};try{l=JSON.parse(o)}catch{}return r.onToolCallEndEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallName:s,toolCallArgs:l})});return l(d),d.stopPropagation!==!0&&Wg(c,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewToolCall?.({toolCall:c,messages:o,state:s,agent:n,input:e})})),u()}case B.TOOL_CALL_RESULT:{let i=await Rg(r,o,s,(r,i,a)=>r.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:i,toolCallId:a,content:c,role:u,subagentRunId:d}=t,f={id:i,toolCallId:a,role:u||`tool`,content:c,...d!=null&&{subagentRunId:d}};Wg(f,t);let p=o.findIndex(e=>e.role===`assistant`&&e.toolCalls?.some(e=>e.id===a));if(p===-1)o.push(f);else{let e=p+1;for(;e{t.onNewMessage?.({message:f,messages:o,state:s,agent:n,input:e})})),l({messages:o})}return u()}case B.STATE_SNAPSHOT:{let i=await Rg(r,o,s,(r,i,a)=>r.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{snapshot:e}=t;s=e,l({state:s})}return u()}case B.STATE_DELTA:{let i=await Rg(r,o,s,(r,i,a)=>r.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{delta:e}=t;try{s=Nu.applyPatch(s,e,!0,!1).newDocument,l({state:s})}catch(t){let n=t instanceof Error?t.message:String(t);console.warn(`Failed to apply state patch:\nCurrent state: ${JSON.stringify(s,null,2)}\nPatch operations: ${JSON.stringify(e,null,2)}\nError: ${n}`)}}return u()}case B.MESSAGES_SNAPSHOT:{let i=await Rg(r,o,s,(r,i,a)=>r.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messages:e}=t,n=e.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}),r=new Map(n.map(e=>[e.id,e])),i=n.some(e=>e.role===`activity`),a=n.some(e=>e.role===`reasoning`),s=e=>e.role===`activity`&&!i||e.role===`reasoning`&&!a;o=o.filter(e=>s(e)||r.has(e.id)).map(e=>s(e)?e:r.get(e.id));let c=new Set(o.map(e=>e.id));for(let e of n)c.has(e.id)||o.push(e);l({messages:o})}return u()}case B.ACTIVITY_SNAPSHOT:{let i=t,a=o.findIndex(e=>e.id===i.messageId),c=a>=0?o[a]:void 0,d=c?.role===`activity`?c:void 0,f=i.replace??!0,p=await Rg(r,o,s,(t,r,a)=>t.onActivitySnapshotEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d,existingMessage:c}));if(l(p),p.stopPropagation!==!0){let t={id:i.messageId,role:`activity`,activityType:i.activityType,content:Ng(i.content),...i.subagentRunId!=null&&{subagentRunId:i.subagentRunId}},c,u;a===-1?(o.push(t),c=t,u=t):d?(f&&(o[a]={...d,activityType:i.activityType,content:Ng(i.content),subagentRunId:i.subagentRunId},i.subagentRunId??delete o[a].subagentRunId),u=o[a]):f&&(o[a]=t,c=t,u=t),Wg(u,i),l({messages:o}),c&&await Promise.all(r.map(t=>t.onNewMessage?.({message:c,messages:o,state:s,agent:n,input:e})))}return u()}case B.ACTIVITY_DELTA:{let i=t,a=o.findIndex(e=>e.id===i.messageId);if(a===-1)return u();let c=o[a];if(c.role!==`activity`)return console.warn(`ACTIVITY_DELTA: Message '${i.messageId}' is not an activity message`),u();let d=c,f=await Rg(r,o,s,(t,r,a)=>t.onActivityDeltaEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d}));if(l(f),f.stopPropagation!==!0)try{Wg(d,i)&&l({messages:o});let e=Ng(d.content??{}),t=Nu.applyPatch(e,i.patch??[],!0,!1).newDocument;o[a]={...d,content:Ng(t),activityType:i.activityType},l({messages:o})}catch(e){let t=e instanceof Error?e.message:String(e);console.warn(`Failed to apply activity patch for '${i.messageId}': ${t}`)}return u()}case B.RAW:return l(await Rg(r,o,s,(r,i,a)=>r.onRawEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.CUSTOM:return l(await Rg(r,o,s,(r,i,a)=>r.onCustomEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.RUN_STARTED:{let i=await Rg(r,o,s,(r,i,a)=>r.onRunStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let e=t;if(e.input?.messages){for(let t of e.input.messages){let e=t;if(t.subagentRunId===null){let n={...t};delete n.subagentRunId,e=n}o.find(t=>t.id===e.id)||o.push(e)}l({messages:o})}}return u()}case B.RUN_FINISHED:{let i=t,a=i.outcome?.type===`interrupt`?{event:i,outcome:`interrupt`,interrupts:i.outcome.interrupts}:{event:i,outcome:`success`,result:i.result},c=await Rg(r,o,s,(t,r,i)=>t.onRunFinishedEvent?.({...a,messages:r,state:i,agent:n,input:e}));return l(c),c.stopPropagation!==!0&&(n.pendingInterrupts=a.outcome===`interrupt`?a.interrupts.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}):[]),u()}case B.RUN_ERROR:return l(await Rg(r,o,s,(r,i,a)=>r.onRunErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.STEP_STARTED:return l(await Rg(r,o,s,(r,i,a)=>r.onStepStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.STEP_FINISHED:return l(await Rg(r,o,s,(r,i,a)=>r.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.TEXT_MESSAGE_CHUNK:throw Error(`TEXT_MESSAGE_CHUNK must be transformed before being applied`);case B.TOOL_CALL_CHUNK:throw Error(`TOOL_CALL_CHUNK must be transformed before being applied`);case B.THINKING_START:return u();case B.THINKING_END:return u();case B.THINKING_TEXT_MESSAGE_START:return u();case B.THINKING_TEXT_MESSAGE_CONTENT:return u();case B.THINKING_TEXT_MESSAGE_END:return u();case B.REASONING_START:return l(await Rg(r,o,s,(r,i,a)=>r.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.REASONING_MESSAGE_START:{let i=await Rg(r,o,s,(r,i,a)=>r.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e,subagentRunId:n}=t,r=o.find(t=>t.id===e),i=r;if(!i){let t={id:e,role:`reasoning`,content:``,...n!=null&&{subagentRunId:n}};o.push(t),i=t}let a=Wg(i,t);(!r||a)&&l({messages:o})}return u()}case B.REASONING_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`REASONING_MESSAGE_CONTENT: No message found with ID '${i}'`),u();let d=await Rg(r,o,s,(r,i,a)=>r.onReasoningMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,reasoningMessageBuffer:typeof c.content==`string`?c.content:``}));return l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,Wg(c,t),l({messages:o})),u()}case B.REASONING_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),u();let c=await Rg(r,o,s,(r,i,o)=>r.onReasoningMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,reasoningMessageBuffer:typeof a.content==`string`?a.content:``}));return l(c),c.stopPropagation!==!0&&Wg(a,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()}case B.REASONING_MESSAGE_CHUNK:throw Error(`REASONING_MESSAGE_CHUNK must be transformed before being applied`);case B.REASONING_END:return l(await Rg(r,o,s,(r,i,a)=>r.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:d}=t,f=await Rg(r,o,s,(r,i,a)=>r.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(f),f.stopPropagation!==!0){let e=!1;if(i===`tool-call`){for(let t of o)if(t.role===`assistant`&&t.toolCalls){let n=t.toolCalls.find(e=>e.id===a);if(n){n.encryptedValue=d,e=!0;break}}}else{let t=o.find(e=>e.id===a);t?.role!==`activity`&&t&&(t.encryptedValue=d,e=!0)}e&&(c.messages=o)}return u()}case B.SUBAGENT_STARTED:return l(await Rg(r,o,s,(r,i,a)=>r.onSubagentStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.SUBAGENT_FINISHED:return l(await Rg(r,o,s,(r,i,a)=>r.onSubagentFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.SUBAGENT_ERROR:return l(await Rg(r,o,s,(r,i,a)=>r.onSubagentErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u()}return t.type,u()}),xf(),r.length>0?Ef({}):e=>e)},Kg=e=>t=>{let n=Bg(e),r=new Set,i=new Set,a=new Set,o={message:new Map,toolCall:new Map,activity:new Map,reasoning:new Map},s=!1,c=!1,l=!1,u=new Map,d=e=>{let t=u.get(e);return t||(t=new Map,u.set(e,t)),t},f=()=>{for(let e of u.values())if(e.size>0)return!0;return!1},p=new Map,m=new Set,h=!1,g=!1,_=!1,v=()=>{r.clear(),i.clear(),a.clear(),o.message.clear(),o.toolCall.clear(),o.activity.clear(),o.reasoning.clear(),u.clear(),p.clear(),m.clear(),h=!1,g=!1,s=!1,c=!1,_=!0},y=(e,t)=>{let n=e??[];if(Array.isArray(n))for(let e of n){if(!e||typeof e.id!=`string`)continue;if(e.subagentRunId===null)return new z(`Cannot send a message (id '${e.id}') with 'subagentRunId: null'. The field is optional — omit it entirely.`);let n=e.role===`reasoning`?o.reasoning:e.role===`activity`?o.activity:o.message;(t||!n.has(e.id))&&n.set(e.id,{subagentRunId:e.subagentRunId});for(let n of e.toolCalls??[])n&&typeof n.id==`string`&&(t||!o.toolCall.has(n.id))&&o.toolCall.set(n.id,{subagentRunId:e.subagentRunId??void 0})}},b=(e,t,n,r,i)=>{if(t!==void 0&&n&&n.subagentRunId!==t)return new z(`Cannot send '${e}': subagentRunId '${t}' does not match the ${r} '${i}' opener's subagent '${n.subagentRunId??`(the parent agent)`}'.`)};return t.pipe(bf(e=>{let t=e.type;if(n?.event(`VERIFY`,`Event:`,e,{type:e.type}),c&&t!==B.RUN_STARTED)return H(()=>new z(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(s&&t!==B.RUN_ERROR&&t!==B.RUN_STARTED)return H(()=>new z(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(!l){if(l=!0,t!==B.RUN_STARTED&&t!==B.RUN_ERROR)return H(()=>new z(`First event must be 'RUN_STARTED'`))}else if(t===B.RUN_STARTED){if(_&&!s&&!c)return H(()=>new z(`Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run.`));(s||c)&&v()}if(e.subagentRunId===null)return H(()=>new z(`Cannot send '${t}' with 'subagentRunId: null'. The field is optional — omit it entirely.`));if(t===B.SUBAGENT_STARTED||t===B.SUBAGENT_FINISHED||t===B.SUBAGENT_ERROR){let n=t===B.SUBAGENT_STARTED?[`description`,`parentSubagentRunId`,`parentToolCallId`,`parentMessageId`]:t===B.SUBAGENT_FINISHED?[`outcome`]:[`code`];for(let r of n)if(e[r]===null)return H(()=>new z(`Cannot send '${t}' with '${r}: null'. The field is optional — omit it entirely.`));let r=e.outcome;if(r!=null&&r.type!==`success`&&r.type!==`suspended`)return H(()=>new z(`Cannot send '${t}' with outcome type '${String(r.type)}'. The outcome is either { type: "success" } or { type: "suspended" }.`));if(r&&r.interruptIds===null)return H(()=>new z(`Cannot send '${t}' with 'outcome.interruptIds: null'. The field is optional — omit it entirely.`));if(r&&Array.isArray(r.interruptIds)&&r.interruptIds.some(e=>typeof e!=`string`))return H(()=>new z(`Cannot send '${t}' with a non-string entry in 'outcome.interruptIds'. Interrupt ids are strings.`))}if(t===B.RUN_FINISHED){let t=e.outcome;if(t?.type===`interrupt`&&Array.isArray(t.interrupts)){for(let e of t.interrupts)if(e&&e.subagentRunId===null)return H(()=>new z(`Cannot send 'RUN_FINISHED' with an interrupt (id '${e.id}') carrying 'subagentRunId: null'. The field is optional — omit it entirely.`))}}switch(t){case B.TEXT_MESSAGE_START:{let n=e.messageId;if(r.has(n))return H(()=>new z(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${n}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`));let i=o.message.get(n);if(i){let r=b(t,e.subagentRunId,i,`message`,n);if(r)return H(()=>r)}return r.add(n),i||o.message.set(n,{subagentRunId:e.subagentRunId}),hf(e)}case B.TEXT_MESSAGE_CONTENT:{let n=e.messageId;if(!r.has(n))return H(()=>new z(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${n}'. Start a text message with 'TEXT_MESSAGE_START' first.`));let i=b(t,e.subagentRunId,o.message.get(n),`message`,n);return i?H(()=>i):hf(e)}case B.TEXT_MESSAGE_END:{let n=e.messageId;if(!r.has(n))return H(()=>new z(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${n}'. A 'TEXT_MESSAGE_START' event must be sent first.`));let i=b(t,e.subagentRunId,o.message.get(n),`message`,n);return i?H(()=>i):(r.delete(n),hf(e))}case B.TOOL_CALL_START:{let n=e.toolCallId;if(i.has(n))return H(()=>new z(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${n}' is already in progress. Complete it with 'TOOL_CALL_END' first.`));let r=e.parentMessageId,a=e.subagentRunId,s;if(r!==void 0){let e=o.message.get(r);if(e){if(a!==void 0&&a!==e.subagentRunId)return H(()=>new z(`Cannot send 'TOOL_CALL_START': subagentRunId '${a}' does not match its parent message '${r}' owner '${e.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`));s=e}}let c=o.toolCall.get(n);if(c){let e=b(t,a,c,`tool call`,n);if(e)return H(()=>e);if(a===void 0&&s&&s.subagentRunId!==c.subagentRunId)return H(()=>new z(`Cannot send 'TOOL_CALL_START': tool call '${n}' is owned by '${c.subagentRunId??`(the parent agent)`}' but its parent message '${r}' is owned by '${s.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`))}return i.add(n),c||o.toolCall.set(n,a===void 0?s??{subagentRunId:void 0}:{subagentRunId:a}),hf(e)}case B.TOOL_CALL_ARGS:{let n=e.toolCallId;if(!i.has(n))return H(()=>new z(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${n}'. Start a tool call with 'TOOL_CALL_START' first.`));let r=b(t,e.subagentRunId,o.toolCall.get(n),`tool call`,n);return r?H(()=>r):hf(e)}case B.TOOL_CALL_END:{let n=e.toolCallId;if(!i.has(n))return H(()=>new z(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${n}'. A 'TOOL_CALL_START' event must be sent first.`));let r=b(t,e.subagentRunId,o.toolCall.get(n),`tool call`,n);return r?H(()=>r):(i.delete(n),hf(e))}case B.STEP_STARTED:{let t=e.stepName,n=e.subagentRunId;return d(n).has(t)?H(()=>new z(`Step "${t}" is already active for 'STEP_STARTED'${n===void 0?``:` in subagent '${n}'`}`)):(d(n).set(t,!0),hf(e))}case B.STEP_FINISHED:{let t=e.stepName,n=e.subagentRunId;if(!d(n).has(t)){let e,r=!1;for(let[i,a]of u)if(i!==n&&a.has(t)){e=i,r=!0;break}return H(r?()=>new z(`Cannot send 'STEP_FINISHED' for step "${t}" attributed to ${n===void 0?`the parent agent`:`subagent '${n}'`}: that step is open under ${e===void 0?`the parent agent`:`subagent '${e}'`}. A step must be finished by whoever started it.`):()=>new z(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}return d(n).delete(t),hf(e)}case B.ACTIVITY_SNAPSHOT:{let t=e.messageId;return(!o.activity.has(t)||e.replace!==!1)&&o.activity.set(t,{subagentRunId:e.subagentRunId}),hf(e)}case B.TOOL_CALL_RESULT:{let t=e.messageId;return typeof t==`string`&&o.message.set(t,{subagentRunId:e.subagentRunId}),hf(e)}case B.REASONING_START:case B.REASONING_MESSAGE_START:{let n=e.messageId,r=o.reasoning.get(n);if(r){let i=b(t,e.subagentRunId,r,`reasoning message`,n);if(i)return H(()=>i)}return a.add(n),r||o.reasoning.set(n,{subagentRunId:e.subagentRunId}),hf(e)}case B.REASONING_MESSAGE_CONTENT:case B.REASONING_MESSAGE_END:case B.REASONING_END:{let n=e.messageId,r=b(t,e.subagentRunId,o.reasoning.get(n),`reasoning message`,n);return r?H(()=>r):(t===B.REASONING_END&&a.delete(n),hf(e))}case B.REASONING_ENCRYPTED_VALUE:{let n=e.entityId,r=e.subtype,i=r===`tool-call`?o.toolCall.get(n):r===`message`?o.message.get(n)??o.reasoning.get(n):o.reasoning.get(n),a=r===`tool-call`?`tool call`:r===`message`?`message`:`reasoning message`,s=b(t,e.subagentRunId,i,a,n);return s?H(()=>s):hf(e)}case B.ACTIVITY_DELTA:{let n=e.messageId,r=b(t,e.subagentRunId,o.activity.get(n),`activity`,n);return r?H(()=>r):hf(e)}case B.SUBAGENT_STARTED:{if(typeof e.subagentRunId!=`string`)return H(()=>new z(`Cannot send 'SUBAGENT_STARTED' without a 'subagentRunId'.`));if(typeof e.name!=`string`)return H(()=>new z(`Cannot send 'SUBAGENT_STARTED' without a 'name'.`));let t=e.subagentRunId,n=e.parentSubagentRunId;return p.has(t)?H(()=>new z(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' is already active. Finish it with 'SUBAGENT_FINISHED' first.`)):m.has(t)?H(()=>new z(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' has already finished in this run. Subagent IDs are per-invocation and cannot be reused.`)):n!==void 0&&!p.has(n)&&!m.has(n)?H(()=>new z(`Cannot send 'SUBAGENT_STARTED': parentSubagentRunId '${n}' has not been started in this run.`)):(p.set(t,!0),hf(e))}case B.SUBAGENT_FINISHED:case B.SUBAGENT_ERROR:{if(typeof e.subagentRunId!=`string`)return H(()=>new z(`Cannot send '${t}' without a 'subagentRunId'.`));if(t===B.SUBAGENT_ERROR&&typeof e.message!=`string`)return H(()=>new z(`Cannot send 'SUBAGENT_ERROR' without a 'message'.`));let n=e.subagentRunId;return p.has(n)?(p.delete(n),m.add(n),hf(e)):H(()=>new z(`Cannot send '${t}': no active subagent found with ID '${n}'. A 'SUBAGENT_STARTED' event must be sent first.`))}case B.MESSAGES_SNAPSHOT:{let t=y(e.messages,!0);if(t)return H(()=>t)}return hf(e);case B.RUN_STARTED:_=!0;{let t=y((e.input??{}).messages,!1);if(t)return H(()=>t)}return hf(e);case B.RUN_FINISHED:if(f()){let e=[];for(let[t,n]of u)for(let r of n.keys())e.push(t===void 0?r:`${r} (subagent '${t}')`);let t=e.join(`, `);return H(()=>new z(`Cannot send 'RUN_FINISHED' while steps are still active: ${t}`))}if(r.size>0){let e=Array.from(r.keys()).join(`, `);return H(()=>new z(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(`, `);return H(()=>new z(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}if(p.size>0){let e=Array.from(p.keys()).join(`, `);return H(()=>new z(`Cannot send 'RUN_FINISHED' while subagents are still active: ${e}`))}return s=!0,hf(e);case B.RUN_ERROR:return c=!0,hf(e);case B.CUSTOM:return hf(e);case B.THINKING_TEXT_MESSAGE_START:return h?g?H(()=>new z(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.`)):(g=!0,hf(e)):H(()=>new z(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first.`));case B.THINKING_TEXT_MESSAGE_CONTENT:return g?hf(e):H(()=>new z(`Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first.`));case B.THINKING_TEXT_MESSAGE_END:return g?(g=!1,hf(e)):H(()=>new z(`Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first.`));case B.THINKING_START:return h?H(()=>new z(`Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.`)):(h=!0,hf(e));case B.THINKING_END:return h?(h=!1,hf(e)):H(()=>new z(`Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first.`));default:return hf(e)}}))},qg=function(e){return e.HEADERS=`headers`,e.DATA=`data`,e}({}),Jg=e=>Sf(()=>mf(e())).pipe(Of(e=>{if(!e.ok){let t=e.headers.get(`content-type`)||``;return mf(e.text()).pipe(bf(n=>{let r=n;if(t.includes(`application/json`))try{r=JSON.parse(n)}catch{}let i=Error(`HTTP ${e.status}: ${typeof r==`string`?r:JSON.stringify(r)}`);return i.status=e.status,i.payload=r,H(()=>i)}))}let t={type:qg.HEADERS,status:e.status,headers:e.headers},n=e.body?.getReader();return n?new Sd(e=>(e.next(t),(async()=>{try{for(;;){let{done:t,value:r}=await n.read();if(t)break;let i={type:qg.DATA,data:r};e.next(i)}e.complete()}catch(t){e.error(t)}})(),()=>{n.cancel().catch(e=>{if(e?.name!==`AbortError`)throw e})})):H(()=>Error(`Failed to getReader() from response`))})),Yg=(e,t)=>{let n=Bg(t),r=new jd,i=new TextDecoder(`utf-8`,{fatal:!1}),a=``;e.subscribe({next:e=>{if(e.type!==qg.HEADERS&&e.type===qg.DATA&&e.data){let t=i.decode(e.data,{stream:!0});a+=t;let n=a.split(/\n\n/);a=n.pop()||``;for(let e of n)o(e)}},error:e=>r.error(e),complete:()=>{a&&(a+=i.decode(),o(a)),r.complete()}});function o(e){let t=e.split(` -`),i=[];for(let e of t)e.startsWith(`data:`)&&i.push(e.slice(5).replace(/^ /,``));if(i.length>0)try{let e=i.join(` -`),t=JSON.parse(e);n?.event(`SSE`,`Event received:`,t,{type:t.type}),r.next(t)}catch(e){r.error(e)}}return r.asObservable()},Xg=e=>{let t=new jd,n=new Uint8Array;e.subscribe({next:e=>{if(e.type!==qg.HEADERS&&e.type===qg.DATA&&e.data){let t=new Uint8Array(n.length+e.data.length);t.set(n,0),t.set(e.data,n.length),n=t,r()}},error:e=>t.error(e),complete:()=>{if(n.length>0)try{r()}catch{console.warn(`Incomplete or invalid protocol buffer data at stream end`)}t.complete()}});function r(){for(;n.length>=4;){let e=4+new DataView(n.buffer,n.byteOffset,4).getUint32(0,!1);if(n.length{let n=Bg(t),r=new jd,i=new Pd,a=!1;return e.subscribe({next:e=>{if(i.next(e),e.type===qg.HEADERS&&!a){a=!0;let t=e.headers.get(`content-type`);n?.lifecycle(`HTTP`,`Stream format detected:`,{contentType:t,parser:t===`application/vnd.ag-ui.event+proto`?`protobuf`:`sse`}),t===`application/vnd.ag-ui.event+proto`?Xg(i).subscribe({next:e=>r.next(e),error:e=>r.error(e),complete:()=>r.complete()}):Yg(i,n).subscribe({next:e=>{try{let t=Zl.parse(e);n?.event(`HTTP`,`Event validated:`,t,{type:t.type,valid:!0}),r.next(t)}catch(t){n?.event(`HTTP`,`Event invalid:`,{json:e,error:String(t)}),r.error(t)}},error:e=>{if(e?.name===`AbortError`){r.next({type:B.RUN_ERROR,message:e.message||`Request aborted`,code:`abort`,rawEvent:e}),r.complete();return}return r.error(e)},complete:()=>r.complete()})}else a||r.error(Error(`No headers event received before data events`))},error:e=>{i.error(e),r.error(e)},complete:()=>{i.complete()}}),r.asObservable()},Qg=wg([`TextMessageStart`,`TextMessageContent`,`TextMessageEnd`,`ActionExecutionStart`,`ActionExecutionArgs`,`ActionExecutionEnd`,`ActionExecutionResult`,`AgentStateMessage`,`MetaEvent`,`RunStarted`,`RunFinished`,`RunError`,`NodeStarted`,`NodeFinished`]),$g=wg([`LangGraphInterruptEvent`,`PredictState`,`Exit`]);Sg(`type`,[xg({type:Cg(Qg.enum.TextMessageStart),messageId:vg(),parentMessageId:vg().optional(),role:vg().optional()}),xg({type:Cg(Qg.enum.TextMessageContent),messageId:vg(),content:vg()}),xg({type:Cg(Qg.enum.TextMessageEnd),messageId:vg()}),xg({type:Cg(Qg.enum.ActionExecutionStart),actionExecutionId:vg(),actionName:vg(),parentMessageId:vg().optional()}),xg({type:Cg(Qg.enum.ActionExecutionArgs),actionExecutionId:vg(),args:vg()}),xg({type:Cg(Qg.enum.ActionExecutionEnd),actionExecutionId:vg()}),xg({type:Cg(Qg.enum.ActionExecutionResult),actionName:vg(),actionExecutionId:vg(),result:vg()}),xg({type:Cg(Qg.enum.AgentStateMessage),threadId:vg(),agentName:vg(),nodeName:vg(),runId:vg(),active:yg(),role:vg(),state:vg(),running:yg()}),xg({type:Cg(Qg.enum.MetaEvent),name:$g,value:bg()}),xg({type:Cg(Qg.enum.RunError),message:vg(),code:vg().optional()})]),xg({id:vg(),role:vg(),content:vg(),parentMessageId:vg().optional()}),xg({id:vg(),name:vg(),arguments:bg(),parentMessageId:vg().optional()}),xg({id:vg(),result:bg(),actionExecutionId:vg(),actionName:vg()});var e_=e=>{if(typeof e==`string`)return e;if(!Array.isArray(e))return;let t=e.filter(e=>e.type===`text`).map(e=>e.text).filter(e=>e.length>0);if(t.length!==0)return t.join(` -`)},t_=(e,t,n)=>r=>{let i={},a=!0,o=!0,s=``,c=null,l=null,u=[],d={},f=e=>{typeof e==`object`&&e&&(`messages`in e&&delete e.messages,i=e)};return r.pipe(bf(r=>{switch(r.type){case B.TEXT_MESSAGE_START:{let e=r;return[{type:Qg.enum.TextMessageStart,messageId:e.messageId,role:e.role}]}case B.TEXT_MESSAGE_CONTENT:{let e=r;return[{type:Qg.enum.TextMessageContent,messageId:e.messageId,content:e.delta}]}case B.TEXT_MESSAGE_END:{let e=r;return[{type:Qg.enum.TextMessageEnd,messageId:e.messageId}]}case B.TOOL_CALL_START:{let e=r;return u.push({id:e.toolCallId,type:`function`,function:{name:e.toolCallName,arguments:``}}),o=!0,d[e.toolCallId]=e.toolCallName,[{type:Qg.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}]}case B.TOOL_CALL_ARGS:{let c=r,d=u.find(e=>e.id===c.toolCallId);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${c.toolCallId}'`),[];d.function.arguments+=c.delta;let p=!1;if(l){let e=l.find(e=>e.tool==d.function.name);if(e)try{let t=JSON.parse(Mf(d.function.arguments));e.tool_argument&&e.tool_argument in t?(f({...i,[e.state_key]:t[e.tool_argument]}),p=!0):e.tool_argument||(f({...i,[e.state_key]:t}),p=!0)}catch{}}return[{type:Qg.enum.ActionExecutionArgs,actionExecutionId:c.toolCallId,args:c.delta},...p?[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]:[]]}case B.TOOL_CALL_END:{let e=r;return[{type:Qg.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}]}case B.TOOL_CALL_RESULT:{let e=r;return[{type:Qg.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:d[e.toolCallId]||`unknown`}]}case B.RAW:return[];case B.CUSTOM:{let e=r;switch(e.name){case`Exit`:a=!1;break;case`PredictState`:l=e.value}return[{type:Qg.enum.MetaEvent,name:e.name,value:e.value}]}case B.STATE_SNAPSHOT:return f(r.snapshot),[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}];case B.STATE_DELTA:{let c=r,l=Nu.applyPatch(i,c.delta,!0,!1);return l?(f(l.newDocument),[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]):[]}case B.MESSAGES_SNAPSHOT:return c=r.messages,[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case B.RUN_STARTED:return[];case B.RUN_FINISHED:return c&&(i.messages=c),Object.keys(i).length===0?[]:[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:n_(c)}:{}}),active:!1}];case B.RUN_ERROR:{let e=r;return[{type:Qg.enum.RunError,message:e.message,code:e.code}]}case B.STEP_STARTED:return s=r.stepName,u=[],l=null,[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!0}];case B.STEP_FINISHED:return u=[],l=null,[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!1}];default:return[]}}))};function n_(e){let t=[];for(let n of e)if(n.role===`assistant`||n.role===`user`||n.role===`system`){let e=e_(n.content);if(e){let r={id:n.id,role:n.role,content:e};t.push(r)}if(n.role===`assistant`&&n.toolCalls&&n.toolCalls.length>0)for(let e of n.toolCalls){let r={id:e.id,name:e.function.name,arguments:JSON.parse(e.function.arguments),parentMessageId:n.id};t.push(r)}}else if(n.role===`tool`){let r=`unknown`;for(let t of e)if(t.role===`assistant`&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===n.toolCallId){r=e.function.name;break}}let i={id:n.id,result:n.content,actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}var r_=e=>e.kind===`tool`?e.fields.toolCallId:e.fields.messageId,i_=e=>e===`tool`?`toolCallId`:`messageId`,a_=(e,t)=>t.metadata===void 0?e:{...e,metadata:t.metadata},o_=e=>t=>{let n=Bg(e),r=new Map,i=e=>{let t=r.get(e);if(!t)return[];switch(r.delete(e),t.kind){case`text`:{let e={type:B.TEXT_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TEXT_MESSAGE_END`,e,{messageId:e.messageId}),[e]}case`tool`:{let e={type:B.TOOL_CALL_END,toolCallId:t.fields.toolCallId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TOOL_CALL_END`,e,{toolCallId:e.toolCallId}),[e]}case`reasoning`:{let e={type:B.REASONING_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`REASONING_MESSAGE_END`,e,{messageId:e.messageId}),[e]}}},a=()=>[...r.keys()].flatMap(e=>i(e)),o=(e,t)=>{for(let[n,i]of r)if(i.kind===e&&r_(i)===t)return{owner:n}},s=(e,t,n,i,a)=>{if(t!==void 0){let r=o(e,t);if(r){if(n!==void 0&&n!==r.owner)throw Error(`Cannot continue ${a} '${t}': chunk subagentRunId '${n}' does not match the open stream's subagent '${r.owner??`(the parent agent)`}'.`);return r.owner}return n}if(n!==void 0)return n;if(r.get(void 0)?.kind===e)return;let s=[...r.entries()].filter(([,t])=>t.kind===e);if(s.length===1)return s[0][0];if(s.length>1)throw Error(`Ambiguous ${i}: it carries neither a ${i_(e)} nor a subagentRunId, but ${s.length} lanes have an open ${a}. Attribute the chunk to the subagent it belongs to.`)};return t.pipe(bf(e=>{switch(e.type){case B.TEXT_MESSAGE_START:case B.TEXT_MESSAGE_CONTENT:case B.TEXT_MESSAGE_END:case B.TOOL_CALL_START:case B.TOOL_CALL_ARGS:case B.TOOL_CALL_END:case B.TOOL_CALL_RESULT:case B.STATE_SNAPSHOT:case B.STATE_DELTA:case B.CUSTOM:case B.STEP_STARTED:case B.STEP_FINISHED:case B.THINKING_START:case B.THINKING_END:case B.THINKING_TEXT_MESSAGE_START:case B.THINKING_TEXT_MESSAGE_CONTENT:case B.THINKING_TEXT_MESSAGE_END:case B.REASONING_START:case B.REASONING_MESSAGE_START:case B.REASONING_MESSAGE_CONTENT:case B.REASONING_MESSAGE_END:case B.REASONING_END:return[...i(e.subagentRunId??void 0),e];case B.RUN_STARTED:case B.RUN_FINISHED:case B.RUN_ERROR:case B.MESSAGES_SNAPSHOT:return[...a(),e];case B.RAW:case B.ACTIVITY_SNAPSHOT:case B.ACTIVITY_DELTA:case B.REASONING_ENCRYPTED_VALUE:case B.SUBAGENT_STARTED:return[e];case B.SUBAGENT_FINISHED:case B.SUBAGENT_ERROR:{let t=e.subagentRunId;return t==null?[e]:[...i(t),e]}case B.TEXT_MESSAGE_CHUNK:{let t=e,a=s(`text`,t.messageId,t.subagentRunId??void 0,`TEXT_MESSAGE_CHUNK`,`text message`),o=r.get(a),c=[],l;if(o?.kind===`text`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First TEXT_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,name:t.name,subagentRunId:t.subagentRunId},r.set(a,{kind:`text`,fields:l});let e=a_({type:B.TEXT_MESSAGE_START,messageId:t.messageId,role:t.role||`assistant`,...t.name!==void 0&&{name:t.name},...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=a_({type:B.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TEXT_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:B.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case B.TOOL_CALL_CHUNK:{let t=e,a=s(`tool`,t.toolCallId,t.subagentRunId??void 0,`TOOL_CALL_CHUNK`,`tool call`),o=r.get(a),c=[],l;if(o?.kind===`tool`&&(t.toolCallId===void 0||t.toolCallId===o.fields.toolCallId))l=o.fields;else{if(c.push(...i(a)),t.toolCallId===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallId`);if(t.toolCallName===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallName`);l={toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`tool`,fields:l});let e=a_({type:B.TOOL_CALL_START,toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_START`,e,{toolCallId:t.toolCallId,toolCallName:t.toolCallName})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=a_({type:B.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TOOL_CALL_ARGS`,r,{toolCallId:l.toolCallId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:B.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case B.REASONING_MESSAGE_CHUNK:{let t=e,a=s(`reasoning`,t.messageId,t.subagentRunId??void 0,`REASONING_MESSAGE_CHUNK`,`reasoning message`),o=r.get(a),c=[],l;if(o?.kind===`reasoning`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First REASONING_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`reasoning`,fields:l});let e=a_({type:B.REASONING_MESSAGE_START,messageId:t.messageId,role:`reasoning`,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=a_({type:B.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`REASONING_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:B.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}}return e.type,[]}),Df(()=>{a()}))};function s_(e,t=new Date){return e.expiresAt!==void 0&&new Date(e.expiresAt)<=t}var c_=class{runNext(e,t){return t.run(e).pipe(o_(!1))}runNextWithState(e,t){let n=Ng(e.messages||[]),r=Ng(e.state||{}),i=new Pd;return Gg(e,i,t,[]).subscribe(e=>{e.messages!==void 0&&(n=e.messages),e.state!==void 0&&(r=e.state)}),this.runNext(e,t).pipe(Tf(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:Ng(n),state:Ng(r)})))}},l_=class extends c_{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function u_(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(``);return{...e,content:n}}return typeof t==`string`?e:{...e,content:``}}var d_=class extends c_{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(u_)};return this.runNext(i,t)}},f_=`THINKING_START`,p_=`THINKING_END`,m_=`THINKING_TEXT_MESSAGE_START`,h_=`THINKING_TEXT_MESSAGE_CONTENT`,g_=`THINKING_TEXT_MESSAGE_END`,__=class extends c_{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe(vf(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case f_:{this.currentReasoningId=Pg();let{title:t,...n}=e;return this.warnAboutTransformation(f_,B.REASONING_START),{...n,type:B.REASONING_START,messageId:this.currentReasoningId}}case m_:return this.currentMessageId=Pg(),this.warnAboutTransformation(m_,B.REASONING_MESSAGE_START),{...e,type:B.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`assistant`};case h_:{let{delta:t,...n}=e;return this.warnAboutTransformation(h_,B.REASONING_MESSAGE_CONTENT),{...n,type:B.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??Pg(),delta:t}}case g_:{let t=this.currentMessageId??Pg();return this.warnAboutTransformation(g_,B.REASONING_MESSAGE_END),{...e,type:B.REASONING_MESSAGE_END,messageId:t}}case p_:{let t=this.currentReasoningId??Pg();return this.warnAboutTransformation(p_,B.REASONING_END),{...e,type:B.REASONING_END,messageId:t}}default:return e}}};function v_(e){return e.startsWith(`image/`)?`image`:e.startsWith(`audio/`)?`audio`:e.startsWith(`video/`)?`video`:`document`}function y_(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`binary`&&`mimeType`in e&&typeof e.mimeType==`string`}function b_(e){let t=v_(e.mimeType);return e.data?{type:t,source:{type:`data`,value:e.data,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e.url?{type:t,source:{type:`url`,value:e.url,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e}function x_(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.map(e=>y_(e)?b_(e):e);return{...e,content:n}}var S_=class extends c_{run(e,t){let n={...e,messages:e.messages.map(x_)};return this.runNext(n,t)}},C_=`SUBAGENT_STARTED`,w_=`SUBAGENT_FINISHED`,T_=`SUBAGENT_ERROR`;function E_(e){if(e&&typeof e==`object`&&`subagentRunId`in e){let{subagentRunId:t,...n}=e;return n}return e}function D_(e){return e.map(e=>E_(e))}var O_=class extends c_{warnDroppedLifecycleEvent(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is dropping ${e} because the target agent predates subagent support. To remove this warning, upgrade your AG-UI integration package. To suppress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){let n={...e,messages:(e.messages??[]).map(e=>E_(e))};return this.runNext(n,t).pipe(Af(e=>{let t=e.type;(t===C_||t===w_||t===T_)&&this.warnDroppedLifecycleEvent(t)}),Cf(e=>{let t=e.type;return t!==C_&&t!==w_&&t!==T_}),vf(e=>{let t=E_(e);if(t.type===B.MESSAGES_SNAPSHOT){let e=t;if(Array.isArray(e.messages))return{...e,messages:D_(e.messages)}}if(t.type===B.RUN_FINISHED){let e=t;if(e.outcome&&Array.isArray(e.outcome.interrupts))return{...e,outcome:{...e.outcome,interrupts:e.outcome.interrupts.map(e=>E_(e))}}}if(t.type===B.RUN_STARTED){let e=t;if(e.input&&Array.isArray(e.input.messages))return{...e,input:{...e.input,messages:D_(e.input.messages)}}}return t}))}},k_=`0.0.59`,A_=class{get maxVersion(){return k_}get debug(){return this._debug}set debug(e){this._debug=zg(e),this._debugLogger=Hg(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){this._debugLogger=typeof e==`boolean`?e?Hg(zg(!0)):void 0:e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.agentId=e,this.description=t??``,this.threadId=n??Go(),this.messages=Ng(r??[]),this.state=Ng(i??{}),this._debug=zg(a),this._debugLogger=Hg(this._debug),Mg(this.maxVersion,`0.0.39`)<=0&&this.middlewares.unshift(new d_),Mg(this.maxVersion,`0.0.45`)<=0&&this.middlewares.unshift(new __),Mg(this.maxVersion,`0.0.47`)<=0&&this.middlewares.unshift(new S_),Mg(this.maxVersion,`0.0.57`)<=0&&this.middlewares.unshift(new O_)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>typeof e==`function`?new l_(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Go();let n=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle(`LIFECYCLE`,`Run started:`,{agentId:this.agentId,threadId:this.threadId});let r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new jd;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await _f(bd(()=>this.middlewares.length===0?this.run(n):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),o_(this.debugLogger),Kg(this.debugLogger),e=>e.pipe(kf(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),wf(e=>(this.debugLogger?.lifecycle(`LIFECYCLE`,`Run errored:`,{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(n,e,a))),Df(()=>{this.debugLogger?.lifecycle(`LIFECYCLE`,`Run finished:`,{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(hf(null)));let s=Ng(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}connect(e){throw new Qc}async connectAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Go();let n=this.prepareRunAgentInput(e),r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new jd;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await _f(bd(()=>Sf(()=>this.connect(n)),o_(this.debugLogger),Kg(this.debugLogger),e=>e.pipe(kf(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),wf(e=>(this.isRunning=!1,e instanceof Qc?Fd:this.onError(n,e,a))),Df(()=>{this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(hf(null)),{defaultValue:void 0});let s=Ng(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}apply(e,t,n){return Gg(e,t,this,n,this.debugLogger)}processApplyEvents(e,t,n){return t.pipe(Af(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=Ng(this.messages);for(let e of t)e.subagentRunId===null&&delete e.subagentRunId;let n=t.filter(e=>e.role!==`activity`);return{threadId:this.threadId,runId:e?.runId||Go(),tools:Ng(e?.tools??[]),context:Ng(e?.context??[]),forwardedProps:Ng(e?.forwardedProps??{}),state:Ng(this.state),messages:n,...e?.resume===void 0?{}:{resume:Ng(e.resume)}}}async onInitialize(e,t){if(this.pendingInterrupts.length>0){let t=new Set((e.resume??[]).map(e=>e.interruptId)),n=this.pendingInterrupts.map(e=>e.id).filter(e=>!t.has(e));if(n.length>0)throw new z(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(`, `)}`);for(let e of this.pendingInterrupts)if(s_(e))throw new z(`Interrupt ${e.id} expired at ${e.expiresAt}`)}let n=await Rg(t,this.messages,this.state,(t,n,r)=>t.onRunInitialized?.({messages:n,state:r,agent:this,input:e}));if(n.messages!==void 0||n.state!==void 0){if(n.messages){this.messages=n.messages;for(let e of n.messages)e.subagentRunId===null&&delete e.subagentRunId;e.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})}n.state&&(this.state=n.state,e.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}}onError(e,t,n){return mf(Rg(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe(vf(r=>{let i=r;if((i.messages!==void 0||i.state!==void 0)&&(i.messages!==void 0&&(this.messages=i.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),i.state!==void 0&&(this.state=i.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),i.stopPropagation!==!0){let e=String(t);if(t.name!==`AbortError`&&t.message!==`Fetch is aborted`&&t.message!==`signal is aborted without reason`&&t.message!==`component unmounted`&&e!==`component unmounted`)throw console.error(`Agent execution failed:`,t),t}return{}}))}async onFinalize(e,t){let n=await Rg(t,this.messages,this.state,(t,n,r)=>t.onRunFinalized?.({messages:n,state:r,agent:this,input:e}));(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=Ng(this.messages),e.state=Ng(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=Ng(this.pendingInterrupts),e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if(e.role===`assistant`&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if(t.role===`assistant`&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=Ng(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=Ng(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){this.agentId=this.agentId??Go();let t=this.prepareRunAgentInput(e);return(this.middlewares.length===0?this.run(t):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(t)).pipe(o_(this.debugLogger),Kg(this.debugLogger),t_(this.threadId,t.runId,this.agentId),e=>e.pipe(vf(e=>(this.debugLogger?.event(`LEGACY`,`Event:`,e,{type:e.type}),e))))}};function j_(e){if(!Array.isArray(e.messages))return e;let t=!1,n=e.messages.map(e=>{if(e.subagentRunId===null){t=!0;let n={...e};return delete n.subagentRunId,n}return e});return t?{...e,messages:n}:e}var M_=class extends A_{requestInit(e){return{method:`POST`,headers:{...this.headers,"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify(j_(e)),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=Ng(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return Zg(Jg(()=>this.fetch(this.url,this.requestInit(e))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=Ng(this.headers??{}),e.fetch=this.fetch;let t=new AbortController,n=this.abortController.signal;return n.aborted&&t.abort(n.reason),e.abortController=t,e}},N_=class extends un{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Tn(t,n.data),hasPreviousPage:dn(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},P_=class extends mn{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new xn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=F_(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=F_(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=F_(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=F_(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Sn.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>On(t,e))}findAll(e={}){return this.getAll().filter(t=>On(e,t))}notify(e){Sn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Sn.batch(()=>Promise.all(e.map(e=>e.continue().catch(Dn))))}};function F_(e){return e.options.scope?.id}var I_=class extends mn{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??En(r,t),a=this.get(i);return a||(a=new vn({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Sn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ln(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ln(e,t)):t}notify(e){Sn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Sn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Sn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},L_=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new I_,this.#t=e.mutationCache||new P_,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=yn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=fn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=pn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Sn.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Sn.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Sn.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=Sn.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Dn).catch(Dn)}invalidateQueries(e,t={}){return Sn.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Sn.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Dn)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Dn)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(qt(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(qt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Dn).catch(Dn)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Dn).catch(Dn)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return fn.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(sn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{on(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(sn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{on(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=En(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Yt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function R_(e,t){return cn(e,N_,t)}var z_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z`}))]]),B_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),V_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),H_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),U_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M240.49,15.51a12,12,0,0,0-17,0L173.94,65.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L100,83l-3.51-3.52a12,12,0,0,0-17,17L83,100,62.54,120.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l49.57-49.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L156,173l3.51,3.52a12,12,0,0,0,17-17L173,156l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,49.58-49.57A12,12,0,0,0,240.49,15.51Zm-121.95,161a12,12,0,0,1-17,0L79.51,154.43a12,12,0,0,1,0-17L100,117l39,39Zm58-57.95h0L156,139l-39-39,20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17ZM85.27,33.37a12,12,0,0,1,21.46-10.74l8,16A12,12,0,1,1,93.27,49.37Zm-68,57.26a12,12,0,0,1,16.1-5.36l16,8a12,12,0,1,1-10.74,21.46l-16-8A12,12,0,0,1,17.27,90.63Zm221.46,74.74a12,12,0,0,1-16.1,5.36l-16-8a12,12,0,0,1,10.74-21.46l16,8A12,12,0,0,1,238.73,165.37Zm-68,57.26a12,12,0,1,1-21.46,10.74l-8-16a12,12,0,0,1,21.46-10.74Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M185,127,127,185a24,24,0,0,1-33.94,0L71,162.91A24,24,0,0,1,71,129L129,71a24,24,0,0,1,33.94,0L185,93.09A24,24,0,0,1,185,127Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32.06,32.06,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94h0L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22a16,16,0,0,1,0,22.63ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM29,103.43l20,8A8,8,0,1,0,55,96.57l-20-8A8,8,0,0,0,29,103.43ZM227,152.57l-20-8A8,8,0,1,0,201,159.43l20,8A8,8,0,0,0,227,152.57ZM159.43,201A8,8,0,0,0,144.57,207l8,20A8,8,0,1,0,167.43,221ZM237.91,18.52a8,8,0,0,0-11.5-.18L174,70.75l-5.38-5.38a32,32,0,0,0-45.28,0L106.14,82.54a4,4,0,0,0,0,5.66l61.7,61.66a4,4,0,0,0,5.66,0l16.74-16.74a32.76,32.76,0,0,0,9.81-22.52,31.82,31.82,0,0,0-9.37-23.17l-5.38-5.37,52.2-52.17A8.22,8.22,0,0,0,237.91,18.52ZM85.64,90.34a8,8,0,0,0-11.49.18,8.22,8.22,0,0,0,.41,11.37L80.67,108,65.34,123.31A31.82,31.82,0,0,0,56,146.47,32.75,32.75,0,0,0,65.77,169l5,4.94L18.49,226.13a8.21,8.21,0,0,0-.61,11.1,8,8,0,0,0,11.72.43L82,185.25l5.37,5.38a32.1,32.1,0,0,0,45.29,0L148,175.31l6.34,6.35a8,8,0,0,0,11.32-11.32Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M236.24,19.76a6,6,0,0,0-8.48,0L173.94,73.57l-6.79-6.78a30,30,0,0,0-42.42,0L100,91.51l-7.76-7.75a6,6,0,0,0-8.48,8.48L91.51,100,66.79,124.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l53.82-53.81,6.79,6.78a30,30,0,0,0,42.42,0L156,164.49l7.76,7.75a6,6,0,0,0,8.48-8.48L164.49,156l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,53.81-53.82A6,6,0,0,0,236.24,19.76Zm-113.45,161a18,18,0,0,1-25.46,0L75.27,158.67a18,18,0,0,1,0-25.46L100,108.49,147.51,156Zm57.94-57.94L156,147.51,108.49,100l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46ZM90.43,34.23a6,6,0,0,1,11.14-4.46l8,20a6,6,0,1,1-11.14,4.46Zm-64,59.54a6,6,0,0,1,7.8-3.34l20,8a6,6,0,1,1-4.46,11.14l-20-8A6,6,0,0,1,26.43,93.77Zm203.14,68.46a6,6,0,0,1-7.8,3.34l-20-8a6,6,0,0,1,4.46-11.14l20,8A6,6,0,0,1,229.57,162.23Zm-64,59.54a6,6,0,1,1-11.14,4.46l-8-20a6,6,0,0,1,11.14-4.46Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32,32,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,179.31,121.37ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z`}))]]),W_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z`}))]]),G_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),K_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:z_}));K_.displayName=`BookOpenIcon`;var q_=K_,J_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:B_}));J_.displayName=`MagnifyingGlassIcon`;var Y_=J_,X_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:V_}));X_.displayName=`MoonIcon`;var Z_=X_,Q_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:H_}));Q_.displayName=`PencilSimpleIcon`;var $_=Q_,ev=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:U_}));ev.displayName=`PlugsConnectedIcon`;var tv=ev,nv=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:W_}));nv.displayName=`SignOutIcon`;var rv=nv,iv=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:G_}));iv.displayName=`SunIcon`;var av=iv,ov={home:`https://fanout.run/start/what-fanout-is`,ingest:`https://fanout.run/start/send-telemetry`};async function sv(e,t){let n=new URLSearchParams({limit:`30`});e&&n.set(`q`,e),t&&n.set(`cursor`,t);let r=await De(`/api/agent/threads?${n}`);if(!r.ok)throw Error(`Unable to load chats (${r.status})`);return r.json()}function cv({agentAvailable:e,activeThreadID:t,activeDashboardID:n,autoFocusSearch:r=!1,onNewChat:i,onSelectThread:a,onDeletedThread:o,onSelectDashboard:s,onCreateDashboard:c,onInvestigateService:l,ref:u}){let d=nn(),[f,p]=(0,w.useState)(``),[m]=fa(f.trim(),250),[h,g]=(0,w.useState)(null),[_,v]=(0,w.useState)(null),[b,x]=(0,w.useState)(``),[ee,ne]=(0,w.useState)(``),[S,ie]=(0,w.useState)(!1),oe=(0,w.useRef)(null);(0,w.useImperativeHandle)(u,()=>({focusSearch:()=>oe.current?.focus()}),[]),(0,w.useEffect)(()=>{r&&requestAnimationFrame(()=>oe.current?.focus())},[r]);let se=R_({queryKey:[...Cn,m],queryFn:({pageParam:e})=>sv(m,e),initialPageParam:``,getNextPageParam:e=>e.nextCursor||void 0,enabled:e}),le=hn({queryKey:wn,queryFn:()=>bn(`/api/dashboards`),refetchInterval:3e4,staleTime:bt}),ue=(0,w.useMemo)(()=>se.data?.pages.flatMap(e=>e.threads)??[],[se.data]),de=(0,w.useMemo)(()=>mv(ue),[ue]),fe=pt(`overview`,it({window:`1h`,namespace:``}),!!m&&!!l),pe=(0,w.useMemo)(()=>{if(!m)return[];let e=m.toLowerCase();return(fe.data?.data.services??[]).map(e=>e.service).filter(t=>t.toLowerCase().includes(e)).slice(0,6)},[fe.data,m]),me=(0,w.useMemo)(()=>{let e=le.data?.dashboards??[],t=m.toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)):e},[le.data,m]);function he(e){ne(``),x(e.title),g(e)}async function _e(){if(h&&b.trim()){ie(!0),ne(``);try{let e=await De(`/api/agent/threads/${encodeURIComponent(h.threadId)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:b.trim()})});if(!e.ok)throw Error(`Unable to rename chat (${e.status})`);await d.invalidateQueries({queryKey:Cn}),g(null)}catch(e){ne(e instanceof Error?e.message:`Unable to rename this chat.`)}finally{ie(!1)}}}async function ve(){if(_){ie(!0),ne(``);try{let e=await De(`/api/agent/threads/${encodeURIComponent(_.threadId)}`,{method:`DELETE`});if(!e.ok)throw Error(`Unable to delete chat (${e.status})`);let t=_.threadId;v(null),await d.invalidateQueries({queryKey:Cn}),o(t)}catch(e){ne(e instanceof Error?e.message:`Unable to delete this chat.`)}finally{ie(!1)}}}return(0,T.jsxs)(ge,{gap:`sm`,h:`100%`,component:`nav`,"aria-label":`Navigation`,children:[e&&(0,T.jsx)(ye,{leftSection:(0,T.jsx)(Xe,{size:16,weight:`bold`}),onClick:i,children:`New chat`}),(0,T.jsx)(Vt,{type:`auto`,offsetScrollbars:!0,flex:1,mx:-4,px:4,children:(0,T.jsxs)(ge,{gap:`lg`,pb:`sm`,children:[e&&(0,T.jsxs)(ge,{gap:4,children:[(0,T.jsx)(lv,{children:`Chats`}),se.isLoading&&(0,T.jsx)(C,{py:`md`,children:(0,T.jsx)(y,{size:`xs`})}),se.isError&&(0,T.jsx)(ae,{color:`bad`,radius:`md`,p:`xs`,children:`Chats could not be loaded.`}),!se.isLoading&&!se.isError&&ue.length===0&&(0,T.jsx)(re,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:m?`No matching chats`:`No chats yet`}),de.map(e=>(0,T.jsxs)(ge,{gap:2,children:[de.length>1&&(0,T.jsx)(re,{c:`dimmed`,size:`xs`,px:`sm`,pt:4,children:e.label}),e.threads.map(e=>(0,T.jsx)(uv,{thread:e,active:e.threadId===t,onSelect:()=>a(e.threadId),onRename:()=>he(e),onDelete:()=>{ne(``),v(e)}},e.threadId))]},e.label)),se.hasNextPage&&(0,T.jsx)(ye,{variant:`subtle`,color:`gray`,size:`compact-sm`,loading:se.isFetchingNextPage,onClick:()=>void se.fetchNextPage(),children:`See all`})]}),pe.length>0&&l&&(0,T.jsxs)(ge,{gap:4,children:[(0,T.jsx)(lv,{children:`Services`}),pe.map(e=>(0,T.jsx)(te,{className:`rail-row`,p:`sm`,onClick:()=>l(e),children:(0,T.jsx)(re,{size:`sm`,fw:500,truncate:!0,children:e})},e))]}),(0,T.jsxs)(ge,{gap:4,children:[(0,T.jsx)(lv,{children:`Dashboards`}),le.isLoading&&(0,T.jsx)(C,{py:`md`,children:(0,T.jsx)(y,{size:`xs`})}),le.isError&&(0,T.jsx)(ae,{color:`bad`,radius:`md`,p:`xs`,children:`Dashboards could not be loaded.`}),!le.isLoading&&!le.isError&&m&&me.length===0&&(0,T.jsx)(re,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:`No matching dashboards`}),me.map(e=>{let t=e.id===n;return(0,T.jsx)(te,{className:`rail-row`,"data-active":t||void 0,"aria-current":t?`page`:void 0,p:`sm`,onClick:()=>s(e.id),children:(0,T.jsxs)(ce,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,T.jsx)(re,{size:`sm`,fw:t?600:500,truncate:!0,children:e.name}),e.is_default&&(0,T.jsx)(Ze,{size:`xs`,variant:`light`,color:`gray`,children:`Default`})]})},e.id)}),e&&(0,T.jsx)(ye,{variant:`subtle`,color:`gray`,size:`compact-sm`,justify:`flex-start`,leftSection:(0,T.jsx)(It,{size:14,weight:`fill`}),onClick:c,children:`Create with AI`})]})]})}),(0,T.jsx)(Ae,{ref:oe,value:f,onChange:e=>p(e.currentTarget.value),leftSection:(0,T.jsx)(Y_,{size:15}),rightSection:(0,T.jsx)(Ro,{size:`xs`,children:`⌘K`}),rightSectionWidth:44,placeholder:`Search`,"aria-label":`Search chats, dashboards and services`,size:`sm`}),(0,T.jsx)(_n,{opened:h!==null,onClose:()=>!S&&g(null),title:`Rename chat`,centered:!0,children:(0,T.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),_e()},children:(0,T.jsxs)(ge,{children:[(0,T.jsx)(Ae,{label:`Name`,value:b,onChange:e=>x(e.currentTarget.value),maxLength:120,autoFocus:!0}),ee&&(0,T.jsx)(ae,{color:`bad`,children:ee}),(0,T.jsxs)(ce,{justify:`flex-end`,children:[(0,T.jsx)(ye,{variant:`default`,onClick:()=>g(null),disabled:S,children:`Cancel`}),(0,T.jsx)(ye,{type:`submit`,loading:S,disabled:!b.trim(),children:`Save`})]})]})})}),(0,T.jsx)(_n,{opened:_!==null,onClose:()=>!S&&v(null),title:`Delete chat?`,centered:!0,children:(0,T.jsxs)(ge,{children:[(0,T.jsxs)(re,{size:`sm`,children:[`This permanently removes `,(0,T.jsx)(re,{span:!0,fw:650,children:_?.title}),` and its saved messages.`]}),ee&&(0,T.jsx)(ae,{color:`bad`,children:ee}),(0,T.jsxs)(ce,{justify:`flex-end`,children:[(0,T.jsx)(ye,{variant:`default`,onClick:()=>v(null),disabled:S,children:`Cancel`}),(0,T.jsx)(ye,{color:`bad`,loading:S,onClick:()=>void ve(),children:`Delete`})]})]})})]})}function lv({children:e}){return(0,T.jsx)(re,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,px:`sm`,children:e})}function uv({thread:e,active:t,onSelect:n,onRename:r,onDelete:i}){return(0,T.jsx)(xe,{"data-active":t||void 0,className:`rail-row`,children:(0,T.jsxs)(ce,{gap:2,wrap:`nowrap`,children:[(0,T.jsx)(te,{onClick:n,"aria-current":t?`page`:void 0,p:`sm`,flex:1,style:{minWidth:0},children:(0,T.jsxs)(ge,{gap:0,children:[(0,T.jsx)(re,{size:`sm`,fw:t?600:500,truncate:!0,children:e.title}),(0,T.jsx)(re,{c:`dimmed`,size:`xs`,children:hv(e.updatedAt)})]})}),(0,T.jsxs)(Ft,{position:`bottom-end`,withinPortal:!0,children:[(0,T.jsx)(Ft.Target,{children:(0,T.jsx)(Nn,{className:`rail-row-actions`,variant:`subtle`,color:`gray`,size:`sm`,mr:4,"aria-label":`Actions for ${e.title}`,children:(0,T.jsx)(Le,{size:18,weight:`bold`})})}),(0,T.jsxs)(Ft.Dropdown,{children:[(0,T.jsx)(Ft.Item,{leftSection:(0,T.jsx)($_,{size:15}),onClick:r,children:`Rename`}),(0,T.jsx)(Ft.Item,{color:`bad`,leftSection:(0,T.jsx)(st,{size:15}),onClick:i,children:`Delete`})]})]})]})})}function dv(e){return e.includes(`T`)?new Date(e):new Date(`${e.replace(` `,`T`)}Z`)}function fv(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}var pv=[`Today`,`Yesterday`,`Previous 7 days`,`Older`];function mv(e){let t=fv(new Date),n=new Map;for(let r of e){let e=Math.floor((t-fv(dv(r.updatedAt)))/864e5),i=e<=0?`Today`:e===1?`Yesterday`:e<=7?`Previous 7 days`:`Older`,a=n.get(i)??[];a.push(r),n.set(i,a)}return pv.filter(e=>n.has(e)).map(e=>({label:e,threads:n.get(e)}))}function hv(e){let t=dv(e),n=fv(new Date);return Math.floor((n-fv(t))/864e5)<=1?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(t):new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}).format(t)}function gv({children:e}){let{agentAvailable:t,threadID:n,threadMissing:r,newThread:i,selectThread:a,openChat:o}=jn(),s=Ne(),c=da({select:e=>e.location.pathname}),{dashboardId:l}=We({strict:!1}),u=c===`/chat`||c.startsWith(`/chat/`),[d,f]=pa(!1),[p,m]=(0,w.useState)(!1),[h,g]=(0,w.useState)(``),_=(0,w.useRef)(null),v=he(`(max-width: 62em)`),y=(0,w.useRef)(v);y.current=v,(0,w.useEffect)(()=>{f.close()},[c]),(0,w.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),y.current?(m(!0),f.open()):_.current?.focusSearch())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let b={agentAvailable:t,activeThreadID:u&&!r&&c!==`/chat`?n:void 0,activeDashboardID:l,onNewChat:i,onSelectThread:a,onDeletedThread:e=>{e===n&&i()},onSelectDashboard:e=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e}}),onCreateDashboard:()=>o(kn),onInvestigateService:e=>o(`Investigate the ${e} service. Explain its errors and latency.`)};return(0,T.jsxs)(to,{header:{height:52},navbar:{width:256,breakpoint:`md`,collapsed:{mobile:!0}},padding:0,children:[(0,T.jsx)(to.Header,{children:(0,T.jsxs)(ce,{h:`100%`,px:{base:`sm`,sm:`md`},justify:`space-between`,wrap:`nowrap`,children:[(0,T.jsxs)(ce,{gap:`sm`,wrap:`nowrap`,children:[(0,T.jsx)(go,{hiddenFrom:`md`,opened:d,onClick:()=>{m(!1),f.toggle()},size:`sm`,"aria-label":d?`Close navigation`:`Open navigation`}),(0,T.jsx)(ve,{size:`small`})]}),(0,T.jsxs)(ce,{gap:`xs`,wrap:`nowrap`,children:[(0,T.jsx)(Ht,{label:`Documentation`,children:(0,T.jsx)(Nn,{component:`a`,href:ov.home,target:`_blank`,rel:`noopener noreferrer`,variant:`subtle`,color:`gray`,"aria-label":`Documentation`,children:(0,T.jsx)(q_,{size:17,weight:`bold`})})}),(0,T.jsx)(_v,{}),(0,T.jsx)(vv,{onError:g})]})]})}),(0,T.jsx)(to.Navbar,{p:`sm`,children:(0,T.jsx)(cv,{ref:_,...b})}),(0,T.jsx)(Fo,{opened:d,onClose:f.close,hiddenFrom:`md`,size:288,padding:`sm`,title:(0,T.jsx)(ve,{size:`small`}),overlayProps:{backgroundOpacity:.24,blur:1},children:(0,T.jsx)(cv,{...b,autoFocusSearch:d&&p})}),(0,T.jsxs)(to.Main,{children:[h&&(0,T.jsx)(ae,{color:`bad`,m:`md`,withCloseButton:!0,onClose:()=>g(``),children:h}),e]})]})}function _v(){let{setColorScheme:e}=Wt(),t=Gt(`light`,{getInitialValueInEffect:!0}),n=t===`dark`?`light`:`dark`,[r,i]=(0,w.useState)(!1);return(0,T.jsx)(Ht,{label:`Switch to ${n} theme`,opened:r,children:(0,T.jsx)(Nn,{variant:`subtle`,color:`gray`,"aria-label":`Switch to ${n} theme`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),onClick:()=>{i(!1),e(n)},children:t===`dark`?(0,T.jsx)(av,{size:17,weight:`bold`}):(0,T.jsx)(Z_,{size:17,weight:`bold`})})})}function vv({onError:e}){let t=Ne(),n=je(),r=(n.name.trim()||n.email.trim()||`?`).charAt(0).toUpperCase();return(0,T.jsxs)(Ft,{position:`bottom-end`,withinPortal:!0,shadow:`md`,children:[(0,T.jsx)(Ft.Target,{children:(0,T.jsx)(Nn,{variant:`subtle`,color:`gray`,size:`lg`,radius:`xl`,"aria-label":`Account menu`,children:(0,T.jsx)(po,{size:26,radius:`xl`,color:`brand`,children:r})})}),(0,T.jsxs)(Ft.Dropdown,{children:[(0,T.jsx)(Ft.Label,{children:n.email||`Signed in`}),(0,T.jsx)(Ft.Item,{leftSection:(0,T.jsx)(tv,{size:15}),onClick:()=>void t({to:`/settings`}),children:`Connect telemetry`}),(0,T.jsx)(Ft.Divider,{}),(0,T.jsx)(Ft.Item,{leftSection:(0,T.jsx)(rv,{size:15}),onClick:()=>void Ce().catch(t=>e(t instanceof Error?t.message:`Sign-out failed — your session is still active.`)),children:`Sign out`})]})]})}function yv(){let{agent_available:e}=ke(),t=Ne(),n=nn(),{threadId:r}=We({strict:!1}),[i,a]=(0,w.useState)(Lt),o=(0,w.useRef)(new Set),s=r??i,[c,l]=(0,w.useState)([]),[u,d]=(0,w.useState)({}),[f,p]=(0,w.useState)(``),[m,h]=(0,w.useState)(!1),[g,_]=(0,w.useState)(!1),[v,y]=(0,w.useState)(``),[b,x]=(0,w.useState)(``),[ee,te]=(0,w.useState)(``),[ne,re]=(0,w.useState)(0),S=(0,w.useRef)(``),ie=(0,w.useRef)(null),ae=(0,w.useRef)(0),oe=(0,w.useMemo)(()=>new M_({url:`/api/agent/runs`,threadId:s,fetch:(e,t)=>De(e,t)}),[s]),se=!e||f===s;function ce(){ae.current=0,y(``)}(0,w.useEffect)(()=>{let t=!0;if(l([]),d({}),p(``),h(!1),_(!1),ce(),te(``),!e){p(s);return}!r||o.current.has(s)?(oe.setMessages([]),p(s)):De(`/api/agent/threads/${encodeURIComponent(s)}`).then(async e=>{if(e.status===404)return null;if(!e.ok)throw Error(`Unable to load thread (${e.status})`);return e.json()}).then(e=>{if(t){if(e===null){h(!0),p(s);return}oe.setMessages(e.messages??[]),l([...e.messages??[]]),p(s)}}).catch(()=>{t&&(S.current=``,te(`This chat could not be restored. Start a new chat or try again.`))});let i=oe.subscribe({onEvent:({messages:e})=>l([...e]),onRunInitialized:()=>{_(!0),te(``)},onToolCallStartEvent:({event:e})=>{ae.current+=1,y(Mn(e.toolCallName))},onToolCallEndEvent:()=>{ae.current=Math.max(0,ae.current-1),ae.current===0&&y(``)},onRunFinalized:({messages:e})=>{let t=[...e];l(t),d(e=>{let n={...e};for(let e of t)e.role===`assistant`&&!n[e.id]&&(n[e.id]=Date.now());return n}),_(!1),ce(),o.current.delete(s),n.invalidateQueries({queryKey:Cn})},onRunFailed:e=>{console.error(`Agent run failed`,e),te(`Fanout could not complete this analysis.`),_(!1),ce(),o.current.delete(s),n.invalidateQueries({queryKey:Cn})}});return()=>{t=!1,i.unsubscribe(),oe.abortRun()}},[oe,e,n,ne,s]),(0,w.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.target,i=n?.matches(`input, textarea, [contenteditable='true']`);e.key===`/`&&!i&&(e.preventDefault(),r?requestAnimationFrame(()=>ie.current?.focus()):t({to:`/chat`}).then(()=>requestAnimationFrame(()=>ie.current?.focus()))),e.key===`Escape`&&n===ie.current&&(x(``),ie.current?.blur())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,r]);async function le(){_(!0),te(``);try{await oe.runAgent()}catch(e){console.error(`Agent run failed`,e),te(`Fanout could not complete this analysis.`),_(!1),ce(),o.current.delete(s)}}async function ue(n){let i=n.trim();if(!e||!i||g||!se||m)return;r||(o.current.add(s),t({to:`/chat/$threadId`,params:{threadId:s},replace:!0}));let a={id:Lt(),role:`user`,content:i};oe.addMessage(a),l([...oe.messages]),d(e=>({...e,[a.id]:Date.now()})),x(``),await le()}(0,w.useEffect)(()=>{let e=S.current;se&&r&&e&&(S.current=``,ue(e))},[se,r,s]);function de(e){e.preventDefault(),ue(b)}function C(){oe.abortRun(),_(!1),ce(),o.current.delete(s)}function fe(){!g&&oe.messages.some(e=>e.role===`user`)&&le()}function pe(n){if(!e)return;let r=Lt();o.current.add(r),S.current=n??``,t({to:`/chat/$threadId`,params:{threadId:r}})}function me(){oe.abortRun(),S.current=``,a(Lt()),t({to:`/chat`})}function he(e){t({to:`/chat/$threadId`,params:{threadId:e}})}function ge(){re(e=>e+1)}return(0,T.jsx)(An.Provider,{value:{agentAvailable:e,threadID:s,threadMissing:m,messages:c,messageTimes:u,ready:se,running:g,activity:v,input:b,setInput:x,error:ee,inputRef:ie,send:ue,submit:de,stop:C,retry:fe,reloadThread:ge,openChat:pe,newThread:me,selectThread:he},children:(0,T.jsx)(gv,{children:(0,T.jsx)(ta,{})})})}function bv(){let e=(0,w.useMemo)(()=>new L_,[]);return(0,T.jsx)(Jt,{client:e,children:(0,T.jsx)(Me,{children:(0,T.jsx)(yv,{})})})}var xv=Ve({component:bv,notFoundComponent:()=>(0,T.jsx)(Oe,{to:`/`,replace:!0})}),Sv=Re(`/`)({component:qe(()=>Pn(()=>import(`./routes-CVfQ2xl8.js`),__vite__mapDeps([0,1,2])),`component`)}),Cv=Re(`/settings`)({component:qe(()=>Pn(()=>import(`./settings-D3GW5SB3.js`),__vite__mapDeps([3,1,2,4,5,6])),`component`)}),wv=Re(`/chat/`)({component:qe(()=>Pn(()=>import(`./chat.index-CUHuiYQG.js`),__vite__mapDeps([7,8,1,4,9,10])),`component`)}),Tv=Re(`/chat/$threadId`)({component:qe(()=>Pn(()=>import(`./chat._threadId-CUHuiYQG.js`),__vite__mapDeps([11,8,1,4,9,10])),`component`)}),Ev=Re(`/dashboards/`)({component:qe(()=>Pn(()=>import(`./dashboards.index-D0ibKOyV.js`),__vite__mapDeps([12,1,2,13,14,4,15,5,9,10,6])),`component`),validateSearch:lt}),Dv=Re(`/dashboards/$dashboardId`)({component:qe(()=>Pn(()=>import(`./dashboards._dashboardId-BflPchra.js`),__vite__mapDeps([16,1,2,13,14,4,15,5,9,10,6])),`component`),validateSearch:lt}),Ov=Sv.update({id:`/`,path:`/`,getParentRoute:()=>xv}),kv=Cv.update({id:`/settings`,path:`/settings`,getParentRoute:()=>xv}),Av=wv.update({id:`/chat/`,path:`/chat/`,getParentRoute:()=>xv}),jv=Tv.update({id:`/chat/$threadId`,path:`/chat/$threadId`,getParentRoute:()=>xv}),Mv=Ev.update({id:`/dashboards/`,path:`/dashboards/`,getParentRoute:()=>xv}),Nv={IndexRoute:Ov,SettingsRoute:kv,ChatThreadIdRoute:jv,DashboardsDashboardIdRoute:Dv.update({id:`/dashboards/$dashboardId`,path:`/dashboards/$dashboardId`,getParentRoute:()=>xv}),ChatIndexRoute:Av,DashboardsIndexRoute:Mv},Pv=sa({routeTree:xv._addFileChildren(Nv)._addFileTypes(),defaultPreload:`intent`,scrollRestoration:!0}),Fv={brand:Dt,ok:kt,warn:Nt,bad:xt,info:Ct},Iv={light:7,dark:5};function Lv(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function Rv(e){let t=Lv(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function zv(e){return Object.fromEntries(Object.entries(Fv).map(([t,n])=>[`--fanout-color-${t}-contrast`,Rv(n[Iv[e]])]))}function Bv(e){return t=>{let n=t.color??Uv.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(Fv,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var Vv=.25,Hv={xs:9,sm:10,md:11,lg:13,xl:16},Uv={primaryColor:`brand`,primaryShade:Iv,autoContrast:!0,luminanceThreshold:Vv,colors:{dark:jt,brand:Dt,ok:kt,warn:Nt,bad:xt,info:Ct},defaultRadius:`md`,fontFamily:at.body,fontFamilyMonospace:at.display,headings:{fontFamily:at.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:Kv(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:Kv(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:Gv(t.size)})}}},Wv=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":mt.light.muted,...zv(`light`)},dark:zv(`dark`)});function Gv(e){let t=Hv[e??`md`];return t===void 0||t>=vt.micro?{}:{"--badge-fz":`${vt.micro/16}rem`}}function Kv(e,t){return!e||e===Uv.primaryColor?{[t]:`var(--fanout-color-${Uv.primaryColor}-contrast)`}:{}}var qv=Bv(h),Jv=ja({...Uv,variantColorResolver:qv});(0,Ac.createRoot)(document.getElementById(`root`)).render((0,T.jsx)(w.StrictMode,{children:(0,T.jsx)(Aa,{theme:Jv,defaultColorScheme:`auto`,cssVariablesResolver:Wv,children:(0,T.jsx)(ua,{router:Pv})})}));export{Ev as n,ov as r,Dv as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/index-DQPTd0xk.css b/internal/ui/dist/assets/index-DQPTd0xk.css deleted file mode 100644 index 5406b223..00000000 --- a/internal/ui/dist/assets/index-DQPTd0xk.css +++ /dev/null @@ -1 +0,0 @@ -:root,:host{color-scheme:var(--mantine-color-scheme)}*,:before,:after{box-sizing:border-box}input,button,textarea,select{font:inherit}button,select{text-transform:none}body,:host{font-family:var(--mantine-font-family);font-size:var(--mantine-font-size-md);line-height:var(--mantine-line-height);background-color:var(--mantine-color-body);color:var(--mantine-color-text);-webkit-font-smoothing:var(--mantine-webkit-font-smoothing);-moz-osx-font-smoothing:var(--mantine-moz-font-smoothing);margin:0}@media screen and (device-width<=31.25em){body,:host{-webkit-text-size-adjust:100%}}@media (prefers-reduced-motion:reduce){[data-respect-reduced-motion] [data-reduce-motion]{transition:none;animation:none}}[data-mantine-color-scheme=light] .mantine-light-hidden,[data-mantine-color-scheme=dark] .mantine-dark-hidden{display:none}.mantine-focus-auto:focus-visible,.mantine-focus-always:focus{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.mantine-focus-never:focus{outline:none}.mantine-active:active{transform:translateY(calc(.0625rem * var(--mantine-scale)))}fieldset:disabled .mantine-active:active{transform:none}:where([dir=rtl]) .mantine-rotate-rtl{transform:rotate(180deg)}:root,:host{--mantine-z-index-app:100;--mantine-z-index-modal:200;--mantine-z-index-popover:300;--mantine-z-index-overlay:400;--mantine-z-index-max:9999;--mantine-scale:1;--mantine-cursor-type:default;--mantine-webkit-font-smoothing:antialiased;--mantine-moz-font-smoothing:grayscale;--mantine-color-white:#fff;--mantine-color-black:#000;--mantine-line-height:1.55;--mantine-font-family:-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;--mantine-font-family-monospace:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;--mantine-font-family-headings:-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;--mantine-heading-font-weight:700;--mantine-heading-text-wrap:wrap;--mantine-radius-default:calc(.5rem * var(--mantine-scale));--mantine-primary-color-filled:var(--mantine-color-blue-filled);--mantine-primary-color-filled-hover:var(--mantine-color-blue-filled-hover);--mantine-primary-color-light:var(--mantine-color-blue-light);--mantine-primary-color-light-hover:var(--mantine-color-blue-light-hover);--mantine-primary-color-light-color:var(--mantine-color-blue-light-color);--mantine-breakpoint-xs:36em;--mantine-breakpoint-sm:48em;--mantine-breakpoint-md:62em;--mantine-breakpoint-lg:75em;--mantine-breakpoint-xl:88em;--mantine-spacing-xs:calc(.625rem * var(--mantine-scale));--mantine-spacing-sm:calc(.75rem * var(--mantine-scale));--mantine-spacing-md:calc(1rem * var(--mantine-scale));--mantine-spacing-lg:calc(1.25rem * var(--mantine-scale));--mantine-spacing-xl:calc(2rem * var(--mantine-scale));--mantine-font-size-xs:calc(.75rem * var(--mantine-scale));--mantine-font-size-sm:calc(.875rem * var(--mantine-scale));--mantine-font-size-md:calc(1rem * var(--mantine-scale));--mantine-font-size-lg:calc(1.125rem * var(--mantine-scale));--mantine-font-size-xl:calc(1.25rem * var(--mantine-scale));--mantine-line-height-xs:1.4;--mantine-line-height-sm:1.45;--mantine-line-height-md:1.55;--mantine-line-height-lg:1.6;--mantine-line-height-xl:1.65;--mantine-shadow-xs:0 calc(.0625rem * var(--mantine-scale)) calc(.1875rem * var(--mantine-scale)) #0000000d, 0 calc(.0625rem * var(--mantine-scale)) calc(.125rem * var(--mantine-scale)) #0000001a;--mantine-shadow-sm:0 calc(.0625rem * var(--mantine-scale)) calc(.1875rem * var(--mantine-scale)) #0000000d, #0000000d 0 calc(.625rem * var(--mantine-scale)) calc(.9375rem * var(--mantine-scale)) calc(-.3125rem * var(--mantine-scale)), #0000000a 0 calc(.4375rem * var(--mantine-scale)) calc(.4375rem * var(--mantine-scale)) calc(-.3125rem * var(--mantine-scale));--mantine-shadow-md:0 calc(.0625rem * var(--mantine-scale)) calc(.1875rem * var(--mantine-scale)) #0000000d, #0000000d 0 calc(1.25rem * var(--mantine-scale)) calc(1.5625rem * var(--mantine-scale)) calc(-.3125rem * var(--mantine-scale)), #0000000a 0 calc(.625rem * var(--mantine-scale)) calc(.625rem * var(--mantine-scale)) calc(-.3125rem * var(--mantine-scale));--mantine-shadow-lg:0 calc(.0625rem * var(--mantine-scale)) calc(.1875rem * var(--mantine-scale)) #0000000d, #0000000d 0 calc(1.75rem * var(--mantine-scale)) calc(1.4375rem * var(--mantine-scale)) calc(-.4375rem * var(--mantine-scale)), #0000000a 0 calc(.75rem * var(--mantine-scale)) calc(.75rem * var(--mantine-scale)) calc(-.4375rem * var(--mantine-scale));--mantine-shadow-xl:0 calc(.0625rem * var(--mantine-scale)) calc(.1875rem * var(--mantine-scale)) #0000000d, #0000000d 0 calc(2.25rem * var(--mantine-scale)) calc(1.75rem * var(--mantine-scale)) calc(-.4375rem * var(--mantine-scale)), #0000000a 0 calc(1.0625rem * var(--mantine-scale)) calc(1.0625rem * var(--mantine-scale)) calc(-.4375rem * var(--mantine-scale));--mantine-radius-xs:calc(.125rem * var(--mantine-scale));--mantine-radius-sm:calc(.25rem * var(--mantine-scale));--mantine-radius-md:calc(.5rem * var(--mantine-scale));--mantine-radius-lg:calc(1rem * var(--mantine-scale));--mantine-radius-xl:calc(2rem * var(--mantine-scale));--mantine-font-weight-regular:400;--mantine-font-weight-medium:600;--mantine-font-weight-bold:700;--mantine-primary-color-0:var(--mantine-color-blue-0);--mantine-primary-color-1:var(--mantine-color-blue-1);--mantine-primary-color-2:var(--mantine-color-blue-2);--mantine-primary-color-3:var(--mantine-color-blue-3);--mantine-primary-color-4:var(--mantine-color-blue-4);--mantine-primary-color-5:var(--mantine-color-blue-5);--mantine-primary-color-6:var(--mantine-color-blue-6);--mantine-primary-color-7:var(--mantine-color-blue-7);--mantine-primary-color-8:var(--mantine-color-blue-8);--mantine-primary-color-9:var(--mantine-color-blue-9);--mantine-color-dark-0:#c9c9c9;--mantine-color-dark-1:#b8b8b8;--mantine-color-dark-2:#828282;--mantine-color-dark-3:#696969;--mantine-color-dark-4:#424242;--mantine-color-dark-5:#3b3b3b;--mantine-color-dark-6:#2e2e2e;--mantine-color-dark-7:#242424;--mantine-color-dark-8:#1f1f1f;--mantine-color-dark-9:#141414;--mantine-color-gray-0:#f8f9fa;--mantine-color-gray-1:#f1f3f5;--mantine-color-gray-2:#e9ecef;--mantine-color-gray-3:#dee2e6;--mantine-color-gray-4:#ced4da;--mantine-color-gray-5:#adb5bd;--mantine-color-gray-6:#868e96;--mantine-color-gray-7:#495057;--mantine-color-gray-8:#343a40;--mantine-color-gray-9:#212529;--mantine-color-red-0:#fff5f5;--mantine-color-red-1:#ffe3e3;--mantine-color-red-2:#ffc9c9;--mantine-color-red-3:#ffa8a8;--mantine-color-red-4:#ff8787;--mantine-color-red-5:#ff6b6b;--mantine-color-red-6:#fa5252;--mantine-color-red-7:#f03e3e;--mantine-color-red-8:#e03131;--mantine-color-red-9:#c92a2a;--mantine-color-pink-0:#fff0f6;--mantine-color-pink-1:#ffdeeb;--mantine-color-pink-2:#fcc2d7;--mantine-color-pink-3:#faa2c1;--mantine-color-pink-4:#f783ac;--mantine-color-pink-5:#f06595;--mantine-color-pink-6:#e64980;--mantine-color-pink-7:#d6336c;--mantine-color-pink-8:#c2255c;--mantine-color-pink-9:#a61e4d;--mantine-color-grape-0:#f8f0fc;--mantine-color-grape-1:#f3d9fa;--mantine-color-grape-2:#eebefa;--mantine-color-grape-3:#e599f7;--mantine-color-grape-4:#da77f2;--mantine-color-grape-5:#cc5de8;--mantine-color-grape-6:#be4bdb;--mantine-color-grape-7:#ae3ec9;--mantine-color-grape-8:#9c36b5;--mantine-color-grape-9:#862e9c;--mantine-color-violet-0:#f3f0ff;--mantine-color-violet-1:#e5dbff;--mantine-color-violet-2:#d0bfff;--mantine-color-violet-3:#b197fc;--mantine-color-violet-4:#9775fa;--mantine-color-violet-5:#845ef7;--mantine-color-violet-6:#7950f2;--mantine-color-violet-7:#7048e8;--mantine-color-violet-8:#6741d9;--mantine-color-violet-9:#5f3dc4;--mantine-color-indigo-0:#edf2ff;--mantine-color-indigo-1:#dbe4ff;--mantine-color-indigo-2:#bac8ff;--mantine-color-indigo-3:#91a7ff;--mantine-color-indigo-4:#748ffc;--mantine-color-indigo-5:#5c7cfa;--mantine-color-indigo-6:#4c6ef5;--mantine-color-indigo-7:#4263eb;--mantine-color-indigo-8:#3b5bdb;--mantine-color-indigo-9:#364fc7;--mantine-color-blue-0:#e7f5ff;--mantine-color-blue-1:#d0ebff;--mantine-color-blue-2:#a5d8ff;--mantine-color-blue-3:#74c0fc;--mantine-color-blue-4:#4dabf7;--mantine-color-blue-5:#339af0;--mantine-color-blue-6:#228be6;--mantine-color-blue-7:#1c7ed6;--mantine-color-blue-8:#1971c2;--mantine-color-blue-9:#1864ab;--mantine-color-cyan-0:#e3fafc;--mantine-color-cyan-1:#c5f6fa;--mantine-color-cyan-2:#99e9f2;--mantine-color-cyan-3:#66d9e8;--mantine-color-cyan-4:#3bc9db;--mantine-color-cyan-5:#22b8cf;--mantine-color-cyan-6:#15aabf;--mantine-color-cyan-7:#1098ad;--mantine-color-cyan-8:#0c8599;--mantine-color-cyan-9:#0b7285;--mantine-color-teal-0:#e6fcf5;--mantine-color-teal-1:#c3fae8;--mantine-color-teal-2:#96f2d7;--mantine-color-teal-3:#63e6be;--mantine-color-teal-4:#38d9a9;--mantine-color-teal-5:#20c997;--mantine-color-teal-6:#12b886;--mantine-color-teal-7:#0ca678;--mantine-color-teal-8:#099268;--mantine-color-teal-9:#087f5b;--mantine-color-green-0:#ebfbee;--mantine-color-green-1:#d3f9d8;--mantine-color-green-2:#b2f2bb;--mantine-color-green-3:#8ce99a;--mantine-color-green-4:#69db7c;--mantine-color-green-5:#51cf66;--mantine-color-green-6:#40c057;--mantine-color-green-7:#37b24d;--mantine-color-green-8:#2f9e44;--mantine-color-green-9:#2b8a3e;--mantine-color-lime-0:#f4fce3;--mantine-color-lime-1:#e9fac8;--mantine-color-lime-2:#d8f5a2;--mantine-color-lime-3:#c0eb75;--mantine-color-lime-4:#a9e34b;--mantine-color-lime-5:#94d82d;--mantine-color-lime-6:#82c91e;--mantine-color-lime-7:#74b816;--mantine-color-lime-8:#66a80f;--mantine-color-lime-9:#5c940d;--mantine-color-yellow-0:#fff9db;--mantine-color-yellow-1:#fff3bf;--mantine-color-yellow-2:#ffec99;--mantine-color-yellow-3:#ffe066;--mantine-color-yellow-4:#ffd43b;--mantine-color-yellow-5:#fcc419;--mantine-color-yellow-6:#fab005;--mantine-color-yellow-7:#f59f00;--mantine-color-yellow-8:#f08c00;--mantine-color-yellow-9:#e67700;--mantine-color-orange-0:#fff4e6;--mantine-color-orange-1:#ffe8cc;--mantine-color-orange-2:#ffd8a8;--mantine-color-orange-3:#ffc078;--mantine-color-orange-4:#ffa94d;--mantine-color-orange-5:#ff922b;--mantine-color-orange-6:#fd7e14;--mantine-color-orange-7:#f76707;--mantine-color-orange-8:#e8590c;--mantine-color-orange-9:#d9480f;--mantine-h1-font-size:calc(2.125rem * var(--mantine-scale));--mantine-h1-line-height:1.3;--mantine-h1-font-weight:700;--mantine-h2-font-size:calc(1.625rem * var(--mantine-scale));--mantine-h2-line-height:1.35;--mantine-h2-font-weight:700;--mantine-h3-font-size:calc(1.375rem * var(--mantine-scale));--mantine-h3-line-height:1.4;--mantine-h3-font-weight:700;--mantine-h4-font-size:calc(1.125rem * var(--mantine-scale));--mantine-h4-line-height:1.45;--mantine-h4-font-weight:700;--mantine-h5-font-size:calc(1rem * var(--mantine-scale));--mantine-h5-line-height:1.5;--mantine-h5-font-weight:700;--mantine-h6-font-size:calc(.875rem * var(--mantine-scale));--mantine-h6-line-height:1.5;--mantine-h6-font-weight:700}:root[data-mantine-color-scheme=dark],:host([data-mantine-color-scheme=dark]){--mantine-color-scheme:dark;--mantine-primary-color-contrast:var(--mantine-color-white);--mantine-color-bright:var(--mantine-color-white);--mantine-color-text:var(--mantine-color-dark-0);--mantine-color-body:var(--mantine-color-dark-7);--mantine-color-error:var(--mantine-color-red-8);--mantine-color-success:var(--mantine-color-teal-8);--mantine-color-placeholder:var(--mantine-color-dark-3);--mantine-color-anchor:var(--mantine-color-blue-4);--mantine-color-default:var(--mantine-color-dark-6);--mantine-color-default-hover:var(--mantine-color-dark-5);--mantine-color-default-color:var(--mantine-color-white);--mantine-color-default-border:var(--mantine-color-dark-4);--mantine-color-dimmed:var(--mantine-color-dark-2);--mantine-color-disabled:var(--mantine-color-dark-6);--mantine-color-disabled-color:var(--mantine-color-dark-3);--mantine-color-disabled-border:var(--mantine-color-dark-4);--mantine-color-dark-text:var(--mantine-color-dark-4);--mantine-color-dark-filled:var(--mantine-color-dark-8);--mantine-color-dark-filled-hover:var(--mantine-color-dark-9);--mantine-color-dark-light:#0a0a0a;--mantine-color-dark-light-hover:#0e0e0e;--mantine-color-dark-light-color:var(--mantine-color-dark-0);--mantine-color-dark-outline:var(--mantine-color-dark-4);--mantine-color-dark-outline-hover:#4242420d;--mantine-color-gray-text:var(--mantine-color-gray-4);--mantine-color-gray-filled:var(--mantine-color-gray-8);--mantine-color-gray-filled-hover:var(--mantine-color-gray-9);--mantine-color-gray-light:#111315;--mantine-color-gray-light-hover:#171a1d;--mantine-color-gray-light-color:var(--mantine-color-gray-0);--mantine-color-gray-outline:var(--mantine-color-gray-4);--mantine-color-gray-outline-hover:#ced4da0d;--mantine-color-red-text:var(--mantine-color-red-4);--mantine-color-red-filled:var(--mantine-color-red-8);--mantine-color-red-filled-hover:var(--mantine-color-red-9);--mantine-color-red-light:#651515;--mantine-color-red-light-hover:#8d1d1d;--mantine-color-red-light-color:var(--mantine-color-red-0);--mantine-color-red-outline:var(--mantine-color-red-4);--mantine-color-red-outline-hover:#ff87870d;--mantine-color-pink-text:var(--mantine-color-pink-4);--mantine-color-pink-filled:var(--mantine-color-pink-8);--mantine-color-pink-filled-hover:var(--mantine-color-pink-9);--mantine-color-pink-light:#530f27;--mantine-color-pink-light-hover:#741536;--mantine-color-pink-light-color:var(--mantine-color-pink-0);--mantine-color-pink-outline:var(--mantine-color-pink-4);--mantine-color-pink-outline-hover:#f783ac0d;--mantine-color-grape-text:var(--mantine-color-grape-4);--mantine-color-grape-filled:var(--mantine-color-grape-8);--mantine-color-grape-filled-hover:var(--mantine-color-grape-9);--mantine-color-grape-light:#43174e;--mantine-color-grape-light-hover:#5e206d;--mantine-color-grape-light-color:var(--mantine-color-grape-0);--mantine-color-grape-outline:var(--mantine-color-grape-4);--mantine-color-grape-outline-hover:#da77f20d;--mantine-color-violet-text:var(--mantine-color-violet-4);--mantine-color-violet-filled:var(--mantine-color-violet-8);--mantine-color-violet-filled-hover:var(--mantine-color-violet-9);--mantine-color-violet-light:#301f62;--mantine-color-violet-light-hover:#432b89;--mantine-color-violet-light-color:var(--mantine-color-violet-0);--mantine-color-violet-outline:var(--mantine-color-violet-4);--mantine-color-violet-outline-hover:#9775fa0d;--mantine-color-indigo-text:var(--mantine-color-indigo-4);--mantine-color-indigo-filled:var(--mantine-color-indigo-8);--mantine-color-indigo-filled-hover:var(--mantine-color-indigo-9);--mantine-color-indigo-light:#1b2864;--mantine-color-indigo-light-hover:#26378b;--mantine-color-indigo-light-color:var(--mantine-color-indigo-0);--mantine-color-indigo-outline:var(--mantine-color-indigo-4);--mantine-color-indigo-outline-hover:#748ffc0d;--mantine-color-blue-text:var(--mantine-color-blue-4);--mantine-color-blue-filled:var(--mantine-color-blue-8);--mantine-color-blue-filled-hover:var(--mantine-color-blue-9);--mantine-color-blue-light:#0c3256;--mantine-color-blue-light-hover:#114678;--mantine-color-blue-light-color:var(--mantine-color-blue-0);--mantine-color-blue-outline:var(--mantine-color-blue-4);--mantine-color-blue-outline-hover:#4dabf70d;--mantine-color-cyan-text:var(--mantine-color-cyan-4);--mantine-color-cyan-filled:var(--mantine-color-cyan-8);--mantine-color-cyan-filled-hover:var(--mantine-color-cyan-9);--mantine-color-cyan-light:#063943;--mantine-color-cyan-light-hover:#08505d;--mantine-color-cyan-light-color:var(--mantine-color-cyan-0);--mantine-color-cyan-outline:var(--mantine-color-cyan-4);--mantine-color-cyan-outline-hover:#3bc9db0d;--mantine-color-teal-text:var(--mantine-color-teal-4);--mantine-color-teal-filled:var(--mantine-color-teal-8);--mantine-color-teal-filled-hover:var(--mantine-color-teal-9);--mantine-color-teal-light:#04402e;--mantine-color-teal-light-hover:#065940;--mantine-color-teal-light-color:var(--mantine-color-teal-0);--mantine-color-teal-outline:var(--mantine-color-teal-4);--mantine-color-teal-outline-hover:#38d9a90d;--mantine-color-green-text:var(--mantine-color-green-4);--mantine-color-green-filled:var(--mantine-color-green-8);--mantine-color-green-filled-hover:var(--mantine-color-green-9);--mantine-color-green-light:#16451f;--mantine-color-green-light-hover:#1e612b;--mantine-color-green-light-color:var(--mantine-color-green-0);--mantine-color-green-outline:var(--mantine-color-green-4);--mantine-color-green-outline-hover:#69db7c0d;--mantine-color-lime-text:var(--mantine-color-lime-4);--mantine-color-lime-filled:var(--mantine-color-lime-8);--mantine-color-lime-filled-hover:var(--mantine-color-lime-9);--mantine-color-lime-light:#2e4a07;--mantine-color-lime-light-hover:#406809;--mantine-color-lime-light-color:var(--mantine-color-lime-0);--mantine-color-lime-outline:var(--mantine-color-lime-4);--mantine-color-lime-outline-hover:#a9e34b0d;--mantine-color-yellow-text:var(--mantine-color-yellow-4);--mantine-color-yellow-filled:var(--mantine-color-yellow-8);--mantine-color-yellow-filled-hover:var(--mantine-color-yellow-9);--mantine-color-yellow-light:#733c00;--mantine-color-yellow-light-hover:#a15300;--mantine-color-yellow-light-color:var(--mantine-color-yellow-0);--mantine-color-yellow-outline:var(--mantine-color-yellow-4);--mantine-color-yellow-outline-hover:#ffd43b0d;--mantine-color-orange-text:var(--mantine-color-orange-4);--mantine-color-orange-filled:var(--mantine-color-orange-8);--mantine-color-orange-filled-hover:var(--mantine-color-orange-9);--mantine-color-orange-light:#6d2408;--mantine-color-orange-light-hover:#98320b;--mantine-color-orange-light-color:var(--mantine-color-orange-0);--mantine-color-orange-outline:var(--mantine-color-orange-4);--mantine-color-orange-outline-hover:#ffa94d0d}:root[data-mantine-color-scheme=light],:host([data-mantine-color-scheme=light]){--mantine-color-scheme:light;--mantine-primary-color-contrast:var(--mantine-color-white);--mantine-color-bright:var(--mantine-color-black);--mantine-color-text:#000;--mantine-color-body:#fff;--mantine-color-error:var(--mantine-color-red-6);--mantine-color-success:var(--mantine-color-teal-8);--mantine-color-placeholder:var(--mantine-color-gray-5);--mantine-color-anchor:var(--mantine-color-blue-6);--mantine-color-default:var(--mantine-color-white);--mantine-color-default-hover:var(--mantine-color-gray-0);--mantine-color-default-color:var(--mantine-color-black);--mantine-color-default-border:var(--mantine-color-gray-4);--mantine-color-dimmed:var(--mantine-color-gray-6);--mantine-color-disabled:var(--mantine-color-gray-2);--mantine-color-disabled-color:var(--mantine-color-gray-5);--mantine-color-disabled-border:var(--mantine-color-gray-3);--mantine-color-dark-text:var(--mantine-color-dark-filled);--mantine-color-dark-filled:var(--mantine-color-dark-6);--mantine-color-dark-filled-hover:var(--mantine-color-dark-7);--mantine-color-dark-light:var(--mantine-color-dark-1);--mantine-color-dark-light-hover:var(--mantine-color-dark-2);--mantine-color-dark-light-color:var(--mantine-color-dark-9);--mantine-color-dark-outline:var(--mantine-color-dark-6);--mantine-color-dark-outline-hover:#2e2e2e0d;--mantine-color-gray-text:var(--mantine-color-gray-filled);--mantine-color-gray-filled:var(--mantine-color-gray-6);--mantine-color-gray-filled-hover:var(--mantine-color-gray-7);--mantine-color-gray-light:var(--mantine-color-gray-1);--mantine-color-gray-light-hover:var(--mantine-color-gray-2);--mantine-color-gray-light-color:var(--mantine-color-gray-9);--mantine-color-gray-outline:var(--mantine-color-gray-6);--mantine-color-gray-outline-hover:#868e960d;--mantine-color-red-text:var(--mantine-color-red-filled);--mantine-color-red-filled:var(--mantine-color-red-6);--mantine-color-red-filled-hover:var(--mantine-color-red-7);--mantine-color-red-light:var(--mantine-color-red-1);--mantine-color-red-light-hover:var(--mantine-color-red-2);--mantine-color-red-light-color:var(--mantine-color-red-9);--mantine-color-red-outline:var(--mantine-color-red-6);--mantine-color-red-outline-hover:#fa52520d;--mantine-color-pink-text:var(--mantine-color-pink-filled);--mantine-color-pink-filled:var(--mantine-color-pink-6);--mantine-color-pink-filled-hover:var(--mantine-color-pink-7);--mantine-color-pink-light:var(--mantine-color-pink-1);--mantine-color-pink-light-hover:var(--mantine-color-pink-2);--mantine-color-pink-light-color:var(--mantine-color-pink-9);--mantine-color-pink-outline:var(--mantine-color-pink-6);--mantine-color-pink-outline-hover:#e649800d;--mantine-color-grape-text:var(--mantine-color-grape-filled);--mantine-color-grape-filled:var(--mantine-color-grape-6);--mantine-color-grape-filled-hover:var(--mantine-color-grape-7);--mantine-color-grape-light:var(--mantine-color-grape-1);--mantine-color-grape-light-hover:var(--mantine-color-grape-2);--mantine-color-grape-light-color:var(--mantine-color-grape-9);--mantine-color-grape-outline:var(--mantine-color-grape-6);--mantine-color-grape-outline-hover:#be4bdb0d;--mantine-color-violet-text:var(--mantine-color-violet-filled);--mantine-color-violet-filled:var(--mantine-color-violet-6);--mantine-color-violet-filled-hover:var(--mantine-color-violet-7);--mantine-color-violet-light:var(--mantine-color-violet-1);--mantine-color-violet-light-hover:var(--mantine-color-violet-2);--mantine-color-violet-light-color:var(--mantine-color-violet-9);--mantine-color-violet-outline:var(--mantine-color-violet-6);--mantine-color-violet-outline-hover:#7950f20d;--mantine-color-indigo-text:var(--mantine-color-indigo-filled);--mantine-color-indigo-filled:var(--mantine-color-indigo-6);--mantine-color-indigo-filled-hover:var(--mantine-color-indigo-7);--mantine-color-indigo-light:var(--mantine-color-indigo-1);--mantine-color-indigo-light-hover:var(--mantine-color-indigo-2);--mantine-color-indigo-light-color:var(--mantine-color-indigo-9);--mantine-color-indigo-outline:var(--mantine-color-indigo-6);--mantine-color-indigo-outline-hover:#4c6ef50d;--mantine-color-blue-text:var(--mantine-color-blue-filled);--mantine-color-blue-filled:var(--mantine-color-blue-6);--mantine-color-blue-filled-hover:var(--mantine-color-blue-7);--mantine-color-blue-light:var(--mantine-color-blue-1);--mantine-color-blue-light-hover:var(--mantine-color-blue-2);--mantine-color-blue-light-color:var(--mantine-color-blue-9);--mantine-color-blue-outline:var(--mantine-color-blue-6);--mantine-color-blue-outline-hover:#228be60d;--mantine-color-cyan-text:var(--mantine-color-cyan-filled);--mantine-color-cyan-filled:var(--mantine-color-cyan-6);--mantine-color-cyan-filled-hover:var(--mantine-color-cyan-7);--mantine-color-cyan-light:var(--mantine-color-cyan-1);--mantine-color-cyan-light-hover:var(--mantine-color-cyan-2);--mantine-color-cyan-light-color:var(--mantine-color-cyan-9);--mantine-color-cyan-outline:var(--mantine-color-cyan-6);--mantine-color-cyan-outline-hover:#15aabf0d;--mantine-color-teal-text:var(--mantine-color-teal-filled);--mantine-color-teal-filled:var(--mantine-color-teal-6);--mantine-color-teal-filled-hover:var(--mantine-color-teal-7);--mantine-color-teal-light:var(--mantine-color-teal-1);--mantine-color-teal-light-hover:var(--mantine-color-teal-2);--mantine-color-teal-light-color:var(--mantine-color-teal-9);--mantine-color-teal-outline:var(--mantine-color-teal-6);--mantine-color-teal-outline-hover:#12b8860d;--mantine-color-green-text:var(--mantine-color-green-filled);--mantine-color-green-filled:var(--mantine-color-green-6);--mantine-color-green-filled-hover:var(--mantine-color-green-7);--mantine-color-green-light:var(--mantine-color-green-1);--mantine-color-green-light-hover:var(--mantine-color-green-2);--mantine-color-green-light-color:var(--mantine-color-green-9);--mantine-color-green-outline:var(--mantine-color-green-6);--mantine-color-green-outline-hover:#40c0570d;--mantine-color-lime-text:var(--mantine-color-lime-filled);--mantine-color-lime-filled:var(--mantine-color-lime-6);--mantine-color-lime-filled-hover:var(--mantine-color-lime-7);--mantine-color-lime-light:var(--mantine-color-lime-1);--mantine-color-lime-light-hover:var(--mantine-color-lime-2);--mantine-color-lime-light-color:var(--mantine-color-lime-9);--mantine-color-lime-outline:var(--mantine-color-lime-6);--mantine-color-lime-outline-hover:#82c91e0d;--mantine-color-yellow-text:var(--mantine-color-yellow-filled);--mantine-color-yellow-filled:var(--mantine-color-yellow-6);--mantine-color-yellow-filled-hover:var(--mantine-color-yellow-7);--mantine-color-yellow-light:var(--mantine-color-yellow-1);--mantine-color-yellow-light-hover:var(--mantine-color-yellow-2);--mantine-color-yellow-light-color:var(--mantine-color-yellow-9);--mantine-color-yellow-outline:var(--mantine-color-yellow-6);--mantine-color-yellow-outline-hover:#fab0050d;--mantine-color-orange-text:var(--mantine-color-orange-filled);--mantine-color-orange-filled:var(--mantine-color-orange-6);--mantine-color-orange-filled-hover:var(--mantine-color-orange-7);--mantine-color-orange-light:var(--mantine-color-orange-1);--mantine-color-orange-light-hover:var(--mantine-color-orange-2);--mantine-color-orange-light-color:var(--mantine-color-orange-9);--mantine-color-orange-outline:var(--mantine-color-orange-6);--mantine-color-orange-outline-hover:#fd7e140d}.m_d57069b5{--scrollarea-scrollbar-size:calc(.75rem * var(--mantine-scale));position:relative;overflow:hidden}.m_d57069b5:where([data-autosize]) .m_b1336c6{min-width:min-content}.m_c0783ff9{scrollbar-width:none;overscroll-behavior:var(--scrollarea-over-scroll-behavior);-ms-overflow-style:none;-webkit-overflow-scrolling:touch;width:100%;height:100%}.m_c0783ff9::-webkit-scrollbar{display:none}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=y]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=y],[data-offset-scrollbars=present]):where([data-vertical-hidden]){padding-inline:0}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=y]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=y],[data-offset-scrollbars=present]):not([data-vertical-hidden]){padding-inline-start:unset;padding-inline-end:var(--scrollarea-scrollbar-size)}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=y]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=y],[data-offset-scrollbars=present]):not([data-vertical-hidden]):where([data-vertical-scrollbar-position=left]){padding-inline-end:unset;padding-left:var(--scrollarea-scrollbar-size);padding-right:unset}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=y]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=y],[data-offset-scrollbars=present]):not([data-vertical-hidden]):where([data-vertical-scrollbar-position=right]){padding-inline-end:unset;padding-left:unset;padding-right:var(--scrollarea-scrollbar-size)}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=x]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=x],[data-offset-scrollbars=present]):where([data-horizontal-hidden]){padding-bottom:0}.m_c0783ff9:where([data-scrollbars=xy],[data-scrollbars=x]):where([data-offset-scrollbars=xy],[data-offset-scrollbars=x],[data-offset-scrollbars=present]):not([data-horizontal-hidden]){padding-bottom:var(--scrollarea-scrollbar-size)}.m_f8f631dd{min-width:100%;display:table}.m_c44ba933{-webkit-user-select:none;user-select:none;touch-action:none;box-sizing:border-box;padding:calc(var(--scrollarea-scrollbar-size) / 5);background-color:#0000;flex-direction:row;transition:background-color .15s,opacity .15s;display:flex}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_c44ba933:hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=light]) .m_c44ba933:hover>.m_d8b5e363{background-color:#00000080}:where([data-mantine-color-scheme=dark]) .m_c44ba933:hover{background-color:var(--mantine-color-dark-8)}:where([data-mantine-color-scheme=dark]) .m_c44ba933:hover>.m_d8b5e363{background-color:#ffffff80}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_c44ba933:active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=light]) .m_c44ba933:active>.m_d8b5e363{background-color:#00000080}:where([data-mantine-color-scheme=dark]) .m_c44ba933:active{background-color:var(--mantine-color-dark-8)}:where([data-mantine-color-scheme=dark]) .m_c44ba933:active>.m_d8b5e363{background-color:#ffffff80}}.m_c44ba933:where([data-hidden],[data-state=hidden]){display:none}.m_c44ba933:where([data-orientation=vertical]){width:var(--scrollarea-scrollbar-size);top:0;bottom:var(--sa-corner-width);inset-inline-end:0}.m_c44ba933:where([data-orientation=vertical]):where([data-vertical-scrollbar-position=left]){inset-inline-end:auto;left:0;right:auto}.m_c44ba933:where([data-orientation=vertical]):where([data-vertical-scrollbar-position=right]){inset-inline-end:auto;left:auto;right:0}.m_c44ba933:where([data-orientation=horizontal]){height:var(--scrollarea-scrollbar-size);bottom:0;flex-direction:column;inset-inline-start:0;inset-inline-end:var(--sa-corner-width)}.m_c44ba933:where([data-orientation=horizontal]):where([data-vertical-scrollbar-position=left]){inset-inline:auto;left:var(--sa-corner-width);right:0}.m_c44ba933:where([data-orientation=horizontal]):where([data-vertical-scrollbar-position=right]){inset-inline:auto;left:0;right:var(--sa-corner-width)}.m_d8b5e363{border-radius:var(--scrollarea-scrollbar-size);opacity:var(--thumb-opacity);flex:1;transition:background-color .15s;position:relative;overflow:hidden}.m_d8b5e363:before{content:"";width:100%;height:100%;min-width:calc(2.75rem * var(--mantine-scale));min-height:calc(2.75rem * var(--mantine-scale));position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}:where([data-mantine-color-scheme=light]) .m_d8b5e363{background-color:#0006}:where([data-mantine-color-scheme=dark]) .m_d8b5e363{background-color:#fff6}.m_21657268{opacity:0;inset-inline-end:0;transition:opacity .15s;display:block;position:absolute;bottom:0}.m_21657268:where([data-vertical-scrollbar-position=left]){inset-inline-end:auto;left:0;right:auto}.m_21657268:where([data-vertical-scrollbar-position=right]){inset-inline-end:auto;left:auto;right:0}:where([data-mantine-color-scheme=light]) .m_21657268{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_21657268{background-color:var(--mantine-color-dark-8)}.m_21657268:where([data-hovered]){opacity:1}.m_21657268:where([data-hidden]){display:none}.m_b1336c6{min-width:100%}.m_87cf2631{cursor:pointer;appearance:none;font-size:var(--mantine-font-size-md);text-align:start;color:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;background-color:#0000;border:0;padding:0;text-decoration:none}.m_515a97f8{clip:rect(0 0 0 0);height:calc(.0625rem * var(--mantine-scale));width:calc(.0625rem * var(--mantine-scale));margin:calc(-.0625rem * var(--mantine-scale));white-space:nowrap;border:0;padding:0;position:absolute;overflow:hidden}.m_1b7284a3{--paper-radius:var(--mantine-radius-default);-webkit-tap-highlight-color:transparent;touch-action:manipulation;border-radius:var(--paper-radius);box-shadow:var(--paper-shadow);background-color:var(--mantine-color-body);outline:0;text-decoration:none;display:block}[data-mantine-color-scheme=light] .m_1b7284a3{--paper-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m_1b7284a3{--paper-border-color:var(--mantine-color-dark-4)}.m_1b7284a3:where([data-with-border]){border:calc(.0625rem * var(--mantine-scale)) solid var(--paper-border-color)}.m_9814e45f{background:var(--overlay-bg,#0009);-webkit-backdrop-filter:var(--overlay-filter);backdrop-filter:var(--overlay-filter);border-radius:var(--overlay-radius,0);z-index:var(--overlay-z-index);position:absolute;inset:0}.m_9814e45f:where([data-fixed]){position:fixed}.m_9814e45f:where([data-center]){justify-content:center;align-items:center;display:flex}.m_38a85659{border:1px solid var(--popover-border-color);padding:var(--mantine-spacing-sm) var(--mantine-spacing-md);box-shadow:var(--popover-shadow,none);border-radius:var(--popover-radius,var(--mantine-radius-default));position:absolute}.m_38a85659:where([data-fixed]){position:fixed}.m_38a85659:focus{outline:none}:where([data-mantine-color-scheme=light]) .m_38a85659{--popover-border-color:var(--mantine-color-gray-2);background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_38a85659{--popover-border-color:var(--mantine-color-dark-4);background-color:var(--mantine-color-dark-6)}.m_a31dc6c1{background-color:inherit;border:1px solid var(--popover-border-color);z-index:1}.m_3d7bc908{position:fixed;inset:0}.m_5ae2e3c{--loader-size-xs:calc(1.125rem * var(--mantine-scale));--loader-size-sm:calc(1.375rem * var(--mantine-scale));--loader-size-md:calc(2.25rem * var(--mantine-scale));--loader-size-lg:calc(2.75rem * var(--mantine-scale));--loader-size-xl:calc(3.625rem * var(--mantine-scale));--loader-size:var(--loader-size-md);--loader-color:var(--mantine-primary-color-filled)}@keyframes m_5d2b3b9d{0%{opacity:0;transform:scale(.6)}50%,to{transform:scale(1)}}.m_7a2bd4cd{width:var(--loader-size);height:var(--loader-size);gap:calc(var(--loader-size) / 5);display:flex;position:relative}.m_870bb79{background:var(--loader-color);border-radius:calc(.125rem * var(--mantine-scale));flex:1;animation:1.2s cubic-bezier(0,.5,.5,1) infinite m_5d2b3b9d}.m_870bb79:first-of-type{animation-delay:-240ms}.m_870bb79:nth-of-type(2){animation-delay:-120ms}.m_870bb79:nth-of-type(3){animation-delay:0}@keyframes m_aac34a1{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.6)}}.m_4e3f22d7{justify-content:center;align-items:center;gap:calc(var(--loader-size) / 10);width:var(--loader-size);height:var(--loader-size);display:flex;position:relative}.m_870c4af{width:calc(var(--loader-size) / 3 - var(--loader-size) / 15);height:calc(var(--loader-size) / 3 - var(--loader-size) / 15);background:var(--loader-color);border-radius:50%;animation:.8s linear infinite m_aac34a1}.m_870c4af:nth-child(2){animation-delay:.4s}@keyframes m_f8e89c4b{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.m_b34414df{width:var(--loader-size);height:var(--loader-size);display:inline-block}.m_b34414df:after{content:"";width:var(--loader-size);height:var(--loader-size);border-radius:calc(625rem * var(--mantine-scale));border-width:calc(var(--loader-size) / 8);border-style:solid;border-color:var(--loader-color) var(--loader-color) var(--loader-color) transparent;animation:1.2s linear infinite m_f8e89c4b;display:block}.m_8d3f4000{--ai-size-xs:calc(1.125rem * var(--mantine-scale));--ai-size-sm:calc(1.375rem * var(--mantine-scale));--ai-size-md:calc(1.75rem * var(--mantine-scale));--ai-size-lg:calc(2.125rem * var(--mantine-scale));--ai-size-xl:calc(2.75rem * var(--mantine-scale));--ai-size-input-xs:calc(1.875rem * var(--mantine-scale));--ai-size-input-sm:calc(2.25rem * var(--mantine-scale));--ai-size-input-md:calc(2.625rem * var(--mantine-scale));--ai-size-input-lg:calc(3.125rem * var(--mantine-scale));--ai-size-input-xl:calc(3.75rem * var(--mantine-scale));--ai-size:var(--ai-size-md);--ai-color:var(--mantine-color-white);-webkit-user-select:none;user-select:none;width:var(--ai-size);height:var(--ai-size);min-width:var(--ai-size);min-height:var(--ai-size);border-radius:var(--ai-radius,var(--mantine-radius-default));background:var(--ai-bg,var(--mantine-primary-color-filled));color:var(--ai-color,var(--mantine-color-white));border:var(--ai-bd,calc(.0625rem * var(--mantine-scale)) solid transparent);cursor:pointer;justify-content:center;align-items:center;line-height:1;display:inline-flex;position:relative;overflow:hidden}@media (hover:hover){.m_8d3f4000:hover:where(:not([data-loading],:disabled,[data-disabled])){background-color:var(--ai-hover,var(--mantine-primary-color-filled-hover));color:var(--ai-hover-color,var(--ai-color))}}@media (hover:none){.m_8d3f4000:active:where(:not([data-loading],:disabled,[data-disabled])){background-color:var(--ai-hover,var(--mantine-primary-color-filled-hover));color:var(--ai-hover-color,var(--ai-color))}}.m_8d3f4000[data-loading]{cursor:not-allowed}.m_8d3f4000[data-loading] .m_8d3afb97{opacity:0;transform:translateY(100%)}.m_8d3f4000:where(:disabled:not([data-loading]),[data-disabled]:not([data-loading])){cursor:not-allowed;border:calc(.0625rem * var(--mantine-scale)) solid transparent;color:var(--mantine-color-disabled-color);background:var(--mantine-color-disabled)}.m_8d3f4000:where(:disabled:not([data-loading]),[data-disabled]:not([data-loading])):active{transform:none}.m_302b9fb1{inset:calc(-.0625rem * var(--mantine-scale));border-radius:var(--ai-radius,var(--mantine-radius-default));justify-content:center;align-items:center;display:flex;position:absolute}:where([data-mantine-color-scheme=light]) .m_302b9fb1{background-color:#ffffff26}:where([data-mantine-color-scheme=dark]) .m_302b9fb1{background-color:#00000026}.m_1a0f1b21{--ai-border-width:calc(.0625rem * var(--mantine-scale));display:flex}.m_1a0f1b21 :where(*):focus{z-index:1;position:relative}.m_1a0f1b21[data-orientation=horizontal]{flex-direction:row}.m_1a0f1b21[data-orientation=horizontal] .m_8d3f4000:not(:only-child):first-child,.m_1a0f1b21[data-orientation=horizontal] .m_437b6484:not(:only-child):first-child{border-inline-end-width:calc(var(--ai-border-width) / 2);border-start-end-radius:0;border-end-end-radius:0}.m_1a0f1b21[data-orientation=horizontal] .m_8d3f4000:not(:only-child):last-child,.m_1a0f1b21[data-orientation=horizontal] .m_437b6484:not(:only-child):last-child{border-inline-start-width:calc(var(--ai-border-width) / 2);border-start-start-radius:0;border-end-start-radius:0}.m_1a0f1b21[data-orientation=horizontal] .m_8d3f4000:not(:only-child):not(:first-child):not(:last-child),.m_1a0f1b21[data-orientation=horizontal] .m_437b6484:not(:only-child):not(:first-child):not(:last-child){border-inline-width:calc(var(--ai-border-width) / 2);border-radius:0}.m_1a0f1b21[data-orientation=vertical]{flex-direction:column}.m_1a0f1b21[data-orientation=vertical] .m_8d3f4000:not(:only-child):first-child,.m_1a0f1b21[data-orientation=vertical] .m_437b6484:not(:only-child):first-child{border-bottom-width:calc(var(--ai-border-width) / 2);border-end-end-radius:0;border-end-start-radius:0}.m_1a0f1b21[data-orientation=vertical] .m_8d3f4000:not(:only-child):last-child,.m_1a0f1b21[data-orientation=vertical] .m_437b6484:not(:only-child):last-child{border-top-width:calc(var(--ai-border-width) / 2);border-start-start-radius:0;border-start-end-radius:0}.m_1a0f1b21[data-orientation=vertical] .m_8d3f4000:not(:only-child):not(:first-child):not(:last-child),.m_1a0f1b21[data-orientation=vertical] .m_437b6484:not(:only-child):not(:first-child):not(:last-child){border-bottom-width:calc(var(--ai-border-width) / 2);border-top-width:calc(var(--ai-border-width) / 2);border-radius:0}.m_8d3afb97{justify-content:center;align-items:center;width:100%;height:100%;transition:transform .15s,opacity .1s;display:flex}.m_437b6484{--section-height-xs:calc(1.125rem * var(--mantine-scale));--section-height-sm:calc(1.375rem * var(--mantine-scale));--section-height-md:calc(1.75rem * var(--mantine-scale));--section-height-lg:calc(2.125rem * var(--mantine-scale));--section-height-xl:calc(2.75rem * var(--mantine-scale));--section-height-input-xs:calc(1.875rem * var(--mantine-scale));--section-height-input-sm:calc(2.25rem * var(--mantine-scale));--section-height-input-md:calc(2.625rem * var(--mantine-scale));--section-height-input-lg:calc(3.125rem * var(--mantine-scale));--section-height-input-xl:calc(3.75rem * var(--mantine-scale));--section-padding-x-xs:calc(.375rem * var(--mantine-scale));--section-padding-x-sm:calc(.5rem * var(--mantine-scale));--section-padding-x-md:calc(.625rem * var(--mantine-scale));--section-padding-x-lg:calc(.75rem * var(--mantine-scale));--section-padding-x-xl:calc(1rem * var(--mantine-scale));--section-height:var(--section-height-sm);--section-padding-x:var(--section-padding-x-sm);--section-color:var(--mantine-color-white);font-weight:var(--mantine-font-weight-medium);border-radius:var(--section-radius,var(--mantine-radius-default));width:auto;font-size:var(--section-fz,var(--mantine-font-size-sm));background:var(--section-bg,var(--mantine-primary-color-filled));border:var(--section-bd,calc(.0625rem * var(--mantine-scale)) solid transparent);color:var(--section-color,var(--mantine-color-white));height:var(--section-height,var(--section-height-sm));padding-inline:var(--section-padding-x,var(--section-padding-x-sm));vertical-align:middle;justify-content:center;align-items:center;line-height:1;display:inline-flex}.m_86a44da5{--cb-size-xs:calc(1.125rem * var(--mantine-scale));--cb-size-sm:calc(1.375rem * var(--mantine-scale));--cb-size-md:calc(1.75rem * var(--mantine-scale));--cb-size-lg:calc(2.125rem * var(--mantine-scale));--cb-size-xl:calc(2.75rem * var(--mantine-scale));--cb-size:var(--cb-size-md);--cb-icon-size:70%;--cb-radius:var(--mantine-radius-default);-webkit-user-select:none;user-select:none;width:var(--cb-size);height:var(--cb-size);min-width:var(--cb-size);min-height:var(--cb-size);border-radius:var(--cb-radius);justify-content:center;align-items:center;line-height:1;display:inline-flex;position:relative}:where([data-mantine-color-scheme=light]) .m_86a44da5{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_86a44da5{color:var(--mantine-color-dark-1)}.m_86a44da5[data-disabled],.m_86a44da5:disabled{cursor:not-allowed;opacity:.6}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_220c80f2:where(:not([data-disabled],:disabled)):hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_220c80f2:where(:not([data-disabled],:disabled)):hover{background-color:var(--mantine-color-dark-6)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_220c80f2:where(:not([data-disabled],:disabled)):active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_220c80f2:where(:not([data-disabled],:disabled)):active{background-color:var(--mantine-color-dark-6)}}.m_4081bf90{flex-direction:row;flex-wrap:var(--group-wrap,wrap);justify-content:var(--group-justify,flex-start);align-items:var(--group-align,center);gap:var(--group-gap,var(--mantine-spacing-md));display:flex}.m_4081bf90:where([data-grow])>*{max-width:var(--group-child-width);flex-grow:1}.m_615af6c9{line-height:1;font-weight:var(--mantine-font-weight-regular);font-size:var(--mantine-font-size-md);margin:0;padding:0}.m_b5489c3c{padding:var(--mb-padding,var(--mantine-spacing-md));background-color:var(--mantine-color-body);z-index:1000;min-height:calc(3.75rem * var(--mantine-scale));justify-content:space-between;align-items:center;padding-inline-end:calc(var(--mb-padding,var(--mantine-spacing-md)) - calc(.3125rem * var(--mantine-scale)));transition:padding-inline-end .1s;display:flex;position:sticky;top:0}.m_60c222c7{width:100%;z-index:var(--mb-z-index);pointer-events:none;position:fixed;top:0;bottom:0}.m_fd1ab0aa{pointer-events:all;box-shadow:var(--mb-shadow,var(--mantine-shadow-xl))}.m_fd1ab0aa [data-mantine-scrollbar]{z-index:1001}[data-offset-scrollbars] .m_fd1ab0aa:has([data-mantine-scrollbar]) .m_b5489c3c{padding-inline-end:calc(var(--mb-padding,var(--mantine-spacing-md)) + calc(.3125rem * var(--mantine-scale)))}.m_606cb269{margin-inline-start:auto}.m_5df29311{padding:var(--mb-padding,var(--mantine-spacing-md));padding-top:var(--mb-padding,var(--mantine-spacing-md))}.m_5df29311:where(:not(:only-child)){padding-top:0}.m_6c018570{margin-top:var(--input-margin-top,0rem);margin-bottom:var(--input-margin-bottom,0rem);--input-height-xs:calc(1.875rem * var(--mantine-scale));--input-height-sm:calc(2.25rem * var(--mantine-scale));--input-height-md:calc(2.625rem * var(--mantine-scale));--input-height-lg:calc(3.125rem * var(--mantine-scale));--input-height-xl:calc(3.75rem * var(--mantine-scale));--input-padding-y-xs:calc(.3125rem * var(--mantine-scale));--input-padding-y-sm:calc(.375rem * var(--mantine-scale));--input-padding-y-md:calc(.5rem * var(--mantine-scale));--input-padding-y-lg:calc(.625rem * var(--mantine-scale));--input-padding-y-xl:calc(.8125rem * var(--mantine-scale));--input-height:var(--input-height-sm);--input-radius:var(--mantine-radius-default);--input-cursor:text;--input-line-height:calc(var(--input-height) - calc(.125rem * var(--mantine-scale)));--input-padding:calc(var(--input-height) / 3);--input-padding-inline-start:var(--input-padding);--input-padding-inline-end:var(--input-padding);--input-placeholder-color:var(--mantine-color-placeholder);--input-color:var(--mantine-color-text);--input-disabled-bg:var(--mantine-color-disabled);--input-disabled-color:var(--mantine-color-disabled-color);--input-left-section-size:var(--input-left-section-width,calc(var(--input-height) - calc(.125rem * var(--mantine-scale))));--input-right-section-size:var(--input-right-section-width,calc(var(--input-height) - calc(.125rem * var(--mantine-scale))));--input-size:var(--input-height);--section-y:calc(.0625rem * var(--mantine-scale));--left-section-start:calc(.0625rem * var(--mantine-scale));--left-section-border-radius:var(--input-radius) 0 0 var(--input-radius);--right-section-end:calc(.0625rem * var(--mantine-scale));--right-section-border-radius:0 var(--input-radius) var(--input-radius) 0;position:relative}.m_6c018570[data-variant=unstyled]{--input-padding:0;--input-padding-y:0;--input-padding-inline-start:0;--input-padding-inline-end:0}.m_6c018570[data-pointer]{--input-cursor:pointer}.m_6c018570[data-with-bottom-section]{--input-bottom-section-height:calc(1.75rem * var(--mantine-scale))}.m_6c018570[data-multiline]{--input-padding-y-xs:calc(.28125rem * var(--mantine-scale));--input-padding-y-sm:calc(.34375rem * var(--mantine-scale));--input-padding-y-md:calc(.4375rem * var(--mantine-scale));--input-padding-y-lg:calc(.59375rem * var(--mantine-scale));--input-padding-y-xl:calc(.8125rem * var(--mantine-scale));--input-size:auto;--input-line-height:var(--mantine-line-height)}.m_6c018570[data-with-left-section]{--input-padding-inline-start:var(--input-left-section-size)}.m_6c018570[data-with-right-section]{--input-padding-inline-end:var(--input-right-section-size)}.m_6c018570[data-size=xs] .m_6c018570[data-with-right-section]:has([data-combined-clear-section]){--input-padding-inline-end:calc(2.5625rem * var(--mantine-scale))}.m_6c018570[data-size=sm] .m_6c018570[data-with-right-section]:has([data-combined-clear-section]){--input-padding-inline-end:calc(3.125rem * var(--mantine-scale))}.m_6c018570[data-size=md] .m_6c018570[data-with-right-section]:has([data-combined-clear-section]){--input-padding-inline-end:calc(3.75rem * var(--mantine-scale))}.m_6c018570[data-size=lg] .m_6c018570[data-with-right-section]:has([data-combined-clear-section]){--input-padding-inline-end:calc(4.5rem * var(--mantine-scale))}.m_6c018570[data-size=xl] .m_6c018570[data-with-right-section]:has([data-combined-clear-section]){--input-padding-inline-end:calc(5.5625rem * var(--mantine-scale))}[data-mantine-color-scheme=light] .m_6c018570[data-variant=default]{--input-bd:var(--mantine-color-gray-4);--input-bg:var(--mantine-color-white);--input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=light] .m_6c018570[data-variant=filled]{--input-bd:transparent;--input-bg:var(--mantine-color-gray-1);--input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=light] .m_6c018570[data-variant=unstyled]{--input-bd:transparent;--input-bg:transparent;--input-bd-focus:transparent}[data-mantine-color-scheme=dark] .m_6c018570[data-variant=default]{--input-bd:var(--mantine-color-dark-4);--input-bg:var(--mantine-color-dark-6);--input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=dark] .m_6c018570[data-variant=filled]{--input-bd:transparent;--input-bg:var(--mantine-color-dark-5);--input-bd-focus:var(--mantine-primary-color-filled)}[data-mantine-color-scheme=dark] .m_6c018570[data-variant=unstyled]{--input-bd:transparent;--input-bg:transparent;--input-bd-focus:transparent}[data-mantine-color-scheme] .m_6c018570[data-error]:not([data-variant=unstyled]){--input-bd:var(--mantine-color-error)}[data-mantine-color-scheme] .m_6c018570[data-error]{--input-color:var(--mantine-color-error);--input-placeholder-color:var(--mantine-color-error);--input-section-color:var(--mantine-color-error)}[data-mantine-color-scheme] .m_6c018570[data-success]:not([data-variant=unstyled]){--input-bd:var(--mantine-color-success)}[data-mantine-color-scheme] .m_6c018570[data-success]{--input-section-color:var(--mantine-color-success)}:where([dir=rtl]) .m_6c018570{--left-section-border-radius:0 var(--input-radius) var(--input-radius) 0;--right-section-border-radius:var(--input-radius) 0 0 var(--input-radius)}.m_6c018570[dir=ltr]{--left-section-border-radius:var(--input-radius) 0 0 var(--input-radius);--right-section-border-radius:0 var(--input-radius) var(--input-radius) 0}.m_8fb7ebe7{-webkit-tap-highlight-color:transparent;appearance:none;resize:var(--input-resize,none);width:100%;text-align:var(--input-text-align,start);color:var(--input-color);border:calc(.0625rem * var(--mantine-scale)) solid var(--input-bd);background-color:var(--input-bg);font-family:var(--input-font-family,var(--mantine-font-family));height:var(--input-size);min-height:var(--input-height);line-height:var(--input-line-height);font-size:var(--_input-fz,var(--input-fz,var(--mantine-font-size-md)));border-radius:var(--input-radius);padding-inline-start:var(--input-padding-inline-start);padding-inline-end:var(--input-padding-inline-end);padding-top:var(--input-padding-y,0rem);padding-bottom:var(--input-padding-y,0rem);cursor:var(--input-cursor);overflow:var(--input-overflow);transition:border-color .1s;display:block}.m_8fb7ebe7[data-no-overflow]{--input-overflow:hidden}.m_8fb7ebe7[data-monospace]{--input-font-family:var(--mantine-font-family-monospace);--_input-fz:calc(var(--input-fz) - calc(.125rem * var(--mantine-scale)))}.m_8fb7ebe7:focus,.m_8fb7ebe7:focus-within{--input-bd:var(--input-bd-focus);outline:none}.m_6c018570[data-error] .m_8fb7ebe7:focus,.m_6c018570[data-error] .m_8fb7ebe7:focus-within{--input-bd:var(--mantine-color-error)}.m_6c018570[data-success] .m_8fb7ebe7:focus,.m_6c018570[data-success] .m_8fb7ebe7:focus-within{--input-bd:var(--mantine-color-success)}.m_8fb7ebe7::placeholder{color:var(--input-placeholder-color);opacity:1}.m_8fb7ebe7::-webkit-inner-spin-button{appearance:none}.m_8fb7ebe7::-webkit-outer-spin-button{appearance:none}.m_8fb7ebe7::-webkit-search-decoration{appearance:none}.m_8fb7ebe7::-webkit-search-cancel-button{appearance:none}.m_8fb7ebe7::-webkit-search-results-button{appearance:none}.m_8fb7ebe7::-webkit-search-results-decoration{appearance:none}.m_8fb7ebe7[type=number]{-moz-appearance:textfield}.m_8fb7ebe7:disabled,.m_8fb7ebe7[data-disabled]{cursor:not-allowed;opacity:.6;background-color:var(--input-disabled-bg);color:var(--input-disabled-color)}.m_8fb7ebe7:has(input:disabled){cursor:not-allowed;opacity:.6;background-color:var(--input-disabled-bg);color:var(--input-disabled-color)}.m_8fb7ebe7[readonly]{caret-color:#0000}[data-with-bottom-section] .m_8fb7ebe7{padding-bottom:calc(var(--input-padding-y,0rem) + var(--input-bottom-section-height))}.m_93f4ed57{bottom:calc(.0625rem * var(--mantine-scale));left:calc(.0625rem * var(--mantine-scale));right:calc(.0625rem * var(--mantine-scale));height:var(--input-bottom-section-height);padding-inline:var(--input-padding);border-radius:0 0 var(--input-radius) var(--input-radius);pointer-events:all;color:var(--mantine-color-dimmed);font-size:var(--input-fz,var(--mantine-font-size-sm));justify-content:flex-start;align-items:center;display:flex;position:absolute}.m_82577fc2{pointer-events:var(--section-pointer-events);z-index:1;inset-inline-start:var(--section-start);inset-inline-end:var(--section-end);bottom:var(--section-y);top:var(--section-y);width:var(--section-size);border-radius:var(--section-border-radius);color:var(--input-section-color,var(--mantine-color-dimmed));justify-content:center;align-items:center;display:flex;position:absolute}.m_82577fc2[data-position=right]{--section-pointer-events:var(--input-right-section-pointer-events);--section-end:var(--right-section-end);--section-size:var(--input-right-section-size);--section-border-radius:var(--right-section-border-radius)}.m_6c018570[data-size=xs] .m_82577fc2[data-position=right]:has([data-combined-clear-section]){--section-size:calc(2.5625rem * var(--mantine-scale))}.m_6c018570[data-size=sm] .m_82577fc2[data-position=right]:has([data-combined-clear-section]){--section-size:calc(3.125rem * var(--mantine-scale))}.m_6c018570[data-size=md] .m_82577fc2[data-position=right]:has([data-combined-clear-section]){--section-size:calc(3.75rem * var(--mantine-scale))}.m_6c018570[data-size=lg] .m_82577fc2[data-position=right]:has([data-combined-clear-section]){--section-size:calc(4.5rem * var(--mantine-scale))}.m_6c018570[data-size=xl] .m_82577fc2[data-position=right]:has([data-combined-clear-section]){--section-size:calc(5.5625rem * var(--mantine-scale))}.m_82577fc2[data-position=left]{--section-pointer-events:var(--input-left-section-pointer-events);--section-start:var(--left-section-start);--section-size:var(--input-left-section-size);--section-border-radius:var(--left-section-border-radius)}.m_88bacfd0{color:var(--input-placeholder-color,var(--mantine-color-placeholder))}.m_6c018570[data-error] .m_88bacfd0{--input-placeholder-color:var(--input-color,var(--mantine-color-placeholder))}.m_46b77525{line-height:var(--mantine-line-height)}.m_8fdc1311{font-weight:var(--mantine-font-weight-medium);overflow-wrap:break-word;cursor:default;-webkit-tap-highlight-color:transparent;font-size:var(--input-label-size,var(--mantine-font-size-sm));display:inline-block}.m_78a94662{color:var(--input-asterisk-color,var(--mantine-color-error))}.m_8f816625,.m_9d9d40e0,.m_fe47ce59{word-wrap:break-word;margin:0;padding:0;line-height:1.2;display:block}.m_8f816625{color:var(--mantine-color-error);font-size:var(--input-error-size,calc(var(--mantine-font-size-sm) - calc(.125rem * var(--mantine-scale))))}.m_9d9d40e0{color:var(--mantine-color-success);font-size:var(--input-success-size,calc(var(--mantine-font-size-sm) - calc(.125rem * var(--mantine-scale))))}.m_fe47ce59{color:var(--mantine-color-dimmed);font-size:var(--input-description-size,calc(var(--mantine-font-size-sm) - calc(.125rem * var(--mantine-scale))))}.m_8bffd616{display:flex}.m_96b553a6{--transition-duration:.15s;z-index:0;transition-property:transform,width,height;transition-duration:0s;transition-timing-function:ease;position:absolute;top:0;left:0}.m_96b553a6:where([data-initialized]){transition-duration:var(--transition-duration)}.m_96b553a6:where([data-hidden]){display:none}.m_9bdbb667{--accordion-radius:var(--mantine-radius-default)}.m_df78851f{overflow-wrap:break-word}.m_4ba554d4{padding:var(--mantine-spacing-md);padding-top:calc(var(--mantine-spacing-xs) / 2)}.m_8fa820a0{width:100%;margin:0;padding:0}.m_4ba585b8{width:100%;padding-inline:var(--mantine-spacing-md);opacity:1;cursor:pointer;color:var(--mantine-color-bright);background-color:#0000;flex-direction:row-reverse;align-items:center;display:flex}.m_4ba585b8:where([data-chevron-position=left]){flex-direction:row;padding-inline-start:0}.m_4ba585b8:where(:disabled,[data-disabled]){opacity:.4;cursor:not-allowed}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_6939a5e9:where(:not(:disabled,[data-disabled])):hover,:where([data-mantine-color-scheme=light]) .m_4271d21b:where(:not(:disabled,[data-disabled])):hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_6939a5e9:where(:not(:disabled,[data-disabled])):hover,:where([data-mantine-color-scheme=dark]) .m_4271d21b:where(:not(:disabled,[data-disabled])):hover{background-color:var(--mantine-color-dark-6)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_6939a5e9:where(:not(:disabled,[data-disabled])):active,:where([data-mantine-color-scheme=light]) .m_4271d21b:where(:not(:disabled,[data-disabled])):active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_6939a5e9:where(:not(:disabled,[data-disabled])):active,:where([data-mantine-color-scheme=dark]) .m_4271d21b:where(:not(:disabled,[data-disabled])):active{background-color:var(--mantine-color-dark-6)}}.m_df3ffa0f{color:inherit;font-weight:var(--mantine-font-weight-regular);text-overflow:ellipsis;padding-top:var(--mantine-spacing-sm);padding-bottom:var(--mantine-spacing-sm);flex:1;overflow:hidden}.m_3f35ae96{transition:transform var(--accordion-transition-duration,.2s) ease;width:var(--accordion-chevron-size,calc(.9375rem * var(--mantine-scale)));min-width:var(--accordion-chevron-size,calc(.9375rem * var(--mantine-scale)));justify-content:flex-start;align-items:center;display:flex;transform:rotate(0)}.m_3f35ae96:where([data-rotate]){transform:rotate(180deg)}.m_3f35ae96:where([data-position=left]){margin-inline-start:var(--mantine-spacing-md);margin-inline-end:var(--mantine-spacing-md)}.m_9bd771fe{justify-content:center;align-items:center;margin-inline-end:var(--mantine-spacing-sm);display:flex}.m_9bd771fe:where([data-chevron-position=left]){margin-inline-start:var(--mantine-spacing-lg);margin-inline-end:0}:where([data-mantine-color-scheme=light]) .m_9bd7b098{--item-border-color:var(--mantine-color-gray-3);--item-filled-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_9bd7b098{--item-border-color:var(--mantine-color-dark-4);--item-filled-color:var(--mantine-color-dark-6)}.m_fe19b709{border-bottom:1px solid var(--item-border-color)}.m_1f921b3b{border:1px solid var(--item-border-color);transition:background-color .15s}.m_1f921b3b:where([data-active]){background-color:var(--item-filled-color)}.m_1f921b3b:first-of-type,.m_1f921b3b:first-of-type>[data-accordion-control]{border-start-start-radius:var(--accordion-radius);border-start-end-radius:var(--accordion-radius)}.m_1f921b3b:last-of-type,.m_1f921b3b:last-of-type>[data-accordion-control]{border-end-end-radius:var(--accordion-radius);border-end-start-radius:var(--accordion-radius)}.m_1f921b3b+.m_1f921b3b{border-top:0}.m_2cdf939a{border-radius:var(--accordion-radius)}.m_2cdf939a:where([data-active]){background-color:var(--item-filled-color)}.m_9f59b069{background-color:var(--item-filled-color);border-radius:var(--accordion-radius);border:calc(.0625rem * var(--mantine-scale)) solid transparent;transition:background-color .15s}.m_9f59b069[data-active]{border-color:var(--item-border-color)}:where([data-mantine-color-scheme=light]) .m_9f59b069[data-active]{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_9f59b069[data-active]{background-color:var(--mantine-color-dark-7)}.m_9f59b069+.m_9f59b069{margin-top:var(--mantine-spacing-md)}.m_7f854edf{z-index:var(--affix-z-index);inset-inline-start:var(--affix-left);inset-inline-end:var(--affix-right);top:var(--affix-top);bottom:var(--affix-bottom);position:fixed}.m_66836ed3{--alert-radius:var(--mantine-radius-default);--alert-bg:var(--mantine-primary-color-light);--alert-bd:calc(.0625rem * var(--mantine-scale)) solid transparent;--alert-color:var(--mantine-primary-color-light-color);padding:var(--mantine-spacing-md) var(--mantine-spacing-md);border-radius:var(--alert-radius);background-color:var(--alert-bg);border:var(--alert-bd);color:var(--alert-color);position:relative;overflow:hidden}.m_a5d60502{display:flex}.m_667c2793{gap:var(--mantine-spacing-xs);flex-direction:column;flex:1;display:flex}.m_6a03f287{font-size:var(--mantine-font-size-sm);font-weight:var(--mantine-font-weight-bold);justify-content:space-between;align-items:center;display:flex}.m_6a03f287:where([data-with-close-button]){padding-inline-end:var(--mantine-spacing-md)}.m_698f4f23{text-overflow:ellipsis;display:block;overflow:hidden}.m_667f2a6a{width:calc(1.25rem * var(--mantine-scale));height:calc(1.25rem * var(--mantine-scale));margin-inline-end:var(--mantine-spacing-md);margin-top:calc(.0625rem * var(--mantine-scale));justify-content:flex-start;align-items:center;line-height:1;display:flex}.m_7fa78076{text-overflow:ellipsis;font-size:var(--mantine-font-size-sm);overflow:hidden}:where([data-mantine-color-scheme=light]) .m_7fa78076{color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_7fa78076{color:var(--mantine-color-white)}.m_7fa78076:where([data-variant=filled]){color:var(--alert-color)}.m_7fa78076:where([data-variant=white]){color:var(--mantine-color-black)}.m_87f54839{width:calc(1.25rem * var(--mantine-scale));height:calc(1.25rem * var(--mantine-scale));color:var(--alert-color)}.m_b6d8b162{-webkit-tap-highlight-color:transparent;font-size:var(--text-fz,var(--mantine-font-size-md));line-height:var(--text-lh,var(--mantine-line-height-md));font-weight:var(--mantine-font-weight-regular);text-wrap:var(--text-text-wrap,var(--mantine-text-wrap));margin:0;padding:0;text-decoration:none}.m_b6d8b162:where([data-truncate]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.m_b6d8b162:where([data-truncate=start]){text-align:end;direction:rtl}:where([dir=rtl]) .m_b6d8b162:where([data-truncate=start]){text-align:start;direction:ltr}.m_b6d8b162:where([data-variant=gradient]){background-image:var(--text-gradient);-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text}.m_b6d8b162:where([data-line-clamp]){text-overflow:ellipsis;-webkit-line-clamp:var(--text-line-clamp);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.m_b6d8b162:where([data-inherit]){line-height:inherit;font-weight:inherit;font-size:inherit}.m_b6d8b162:where([data-inline]){line-height:1}.m_849cf0da{color:var(--mantine-color-anchor);appearance:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;text-decoration:none;display:inline}@media (hover:hover){.m_849cf0da:where([data-underline=hover]):hover{text-decoration:underline}}@media (hover:none){.m_849cf0da:where([data-underline=hover]):active{text-decoration:underline}}.m_849cf0da:where([data-underline=not-hover]){text-decoration:underline}@media (hover:hover){.m_849cf0da:where([data-underline=not-hover]):hover{text-decoration:none}}@media (hover:none){.m_849cf0da:where([data-underline=not-hover]):active{text-decoration:none}}.m_849cf0da:where([data-underline=always]){text-decoration:underline}.m_849cf0da:where([data-variant=gradient]),.m_849cf0da:where([data-variant=gradient]):hover{text-decoration:none}.m_849cf0da:where([data-line-clamp]){display:-webkit-box}.m_48204f9b{width:var(--slider-size);height:var(--slider-size);-webkit-user-select:none;user-select:none;border-radius:100%;justify-content:center;align-items:center;display:flex;position:relative}.m_48204f9b:focus-within{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_48204f9b{--slider-size:calc(3.75rem * var(--mantine-scale));--thumb-size:calc(var(--slider-size) / 5)}:where([data-mantine-color-scheme=light]) .m_48204f9b{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_48204f9b{background-color:var(--mantine-color-dark-5)}.m_bb9cdbad{inset:calc(.0625rem * var(--mantine-scale));border-radius:var(--slider-size);pointer-events:none;position:absolute}.m_481dd586{width:calc(.125rem * var(--mantine-scale));transform:rotate(var(--angle));position:absolute;top:0;bottom:0;left:calc(50% - 1px)}.m_481dd586:before{content:"";top:calc(var(--thumb-size) / 3);left:calc(.03125rem * var(--mantine-scale));width:calc(.0625rem * var(--mantine-scale));height:calc(var(--thumb-size) / 1.5);position:absolute;transform:translate(-50%,-50%)}:where([data-mantine-color-scheme=light]) .m_481dd586:before{background-color:var(--mantine-color-gray-4)}:where([data-mantine-color-scheme=dark]) .m_481dd586:before{background-color:var(--mantine-color-dark-3)}.m_481dd586[data-label]:after{min-width:calc(1.125rem * var(--mantine-scale));text-align:center;content:attr(data-label);top:calc(-1.5rem * var(--mantine-scale));left:calc(-.4375rem * var(--mantine-scale));transform:rotate(calc(360deg - var(--angle)));font-size:var(--mantine-font-size-xs);position:absolute}.m_bc02ba3d{height:100%;width:calc(.1875rem * var(--mantine-scale));pointer-events:none;outline:none;position:absolute;inset-block:0;inset-inline:calc(50% - 1.5px) 0}.m_bc02ba3d:before{content:"";height:min(var(--thumb-size), calc(var(--slider-size) / 2));width:calc(.1875rem * var(--mantine-scale));position:absolute;top:0;right:0}:where([data-mantine-color-scheme=light]) .m_bc02ba3d:before{background-color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_bc02ba3d:before{background-color:var(--mantine-color-dark-1)}.m_bb8e875b{font-size:var(--mantine-font-size-xs)}.m_89ab340[data-resizing]{--app-shell-transition-duration:0s!important}.m_89ab340[data-disabled]{--app-shell-header-offset:0rem!important;--app-shell-navbar-offset:0rem!important;--app-shell-aside-offset:0rem!important;--app-shell-footer-offset:0rem!important}.m_89ab340[data-mode=static]{grid-template-columns:var(--app-shell-navbar-width,0) 1fr var(--app-shell-aside-width,0);grid-template-rows:auto 1fr auto;height:100%;display:grid;position:relative;overflow:auto}[data-mantine-color-scheme=light] .m_89ab340{--app-shell-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m_89ab340{--app-shell-border-color:var(--mantine-color-dark-4)}.m_45252eee,.m_9cdde9a,.m_3b16f56b,.m_8983817,.m_3840c879{transition-duration:var(--app-shell-transition-duration);transition-timing-function:var(--app-shell-transition-timing-function)}.m_45252eee,.m_9cdde9a{top:var(--app-shell-header-offset,0rem);height:calc(100dvh - var(--app-shell-header-offset,0rem) - var(--app-shell-footer-offset,0rem));background-color:var(--mantine-color-body);flex-direction:column;transition-property:transform,top,height;display:flex;position:fixed}:where([data-mode=static]) .m_45252eee,:where([data-mode=static]) .m_9cdde9a{position:var(--app-shell-navbar-position,fixed);grid-row:var(--app-shell-navbar-grid-row,auto);height:100%}:where([data-layout=alt]) .m_45252eee,:where([data-layout=alt]) .m_9cdde9a{height:100dvh;top:0}:where([data-mode=static][data-layout=alt]) .m_45252eee,:where([data-mode=static][data-layout=alt]) .m_9cdde9a{grid-row:1/-1;height:100%}.m_45252eee{width:var(--app-shell-navbar-width);transform:var(--app-shell-navbar-transform);z-index:var(--app-shell-navbar-z-index);transition-property:transform,top,height;inset-inline-start:0}:where([data-mode=static]) .m_45252eee{grid-column:var(--app-shell-navbar-grid-column,auto);display:var(--app-shell-navbar-display,flex)}:where([dir=rtl]) .m_45252eee{transform:var(--app-shell-navbar-transform-rtl)}.m_45252eee:where([data-with-border]){border-inline-end:1px solid var(--app-shell-border-color)}.m_9cdde9a{width:var(--app-shell-aside-width);transform:var(--app-shell-aside-transform);z-index:var(--app-shell-aside-z-index);inset-inline-end:0}:where([data-mode=static]) .m_9cdde9a{position:var(--app-shell-aside-position,fixed);grid-column:var(--app-shell-aside-grid-column,auto);grid-row:var(--app-shell-aside-grid-row,auto);display:var(--app-shell-aside-display,flex)}:where([dir=rtl]) .m_9cdde9a{transform:var(--app-shell-aside-transform-rtl)}.m_9cdde9a:where([data-with-border]){border-inline-start:1px solid var(--app-shell-border-color)}:where([data-mode=static][data-layout=alt]) .m_9cdde9a{grid-row:1/-1}:where([data-scroll-locked]) .m_9cdde9a{visibility:var(--app-shell-aside-scroll-locked-visibility)}.m_8983817{padding-inline-start:calc(var(--app-shell-navbar-offset,0rem) + var(--app-shell-padding));padding-inline-end:calc(var(--app-shell-aside-offset,0rem) + var(--app-shell-padding));padding-top:calc(var(--app-shell-header-offset,0rem) + var(--app-shell-padding));padding-bottom:calc(var(--app-shell-footer-offset,0rem) + var(--app-shell-padding));min-height:100dvh;transition-property:padding}:where([data-mode=static]) .m_8983817{padding-inline-start:var(--app-shell-padding);padding-inline-end:var(--app-shell-padding);padding-top:var(--app-shell-padding);padding-bottom:var(--app-shell-padding);grid-column:var(--app-shell-main-column-start,1) / var(--app-shell-main-column-end,-1);grid-row:var(--app-shell-main-grid-row,2);min-height:auto}.m_3b16f56b,.m_3840c879{background-color:var(--mantine-color-body);transition-property:transform,margin-inline-start,margin-inline-end;position:fixed;inset-inline:0}:where([data-mode=static]) .m_3b16f56b,:where([data-mode=static]) .m_3840c879{position:var(--app-shell-header-position,fixed);grid-column:var(--app-shell-header-grid-column,auto)}:where([data-layout=alt]) .m_3b16f56b,:where([data-layout=alt]) .m_3840c879{margin-inline-start:var(--app-shell-navbar-offset,0rem);margin-inline-end:var(--app-shell-aside-offset,0rem)}:where([data-mode=static][data-layout=alt]) .m_3b16f56b,:where([data-mode=static][data-layout=alt]) .m_3840c879{grid-column:var(--app-shell-main-column-start,1) / var(--app-shell-main-column-end,-1);margin-inline:0}.m_3b16f56b{height:var(--app-shell-header-height);background-color:var(--mantine-color-body);transform:var(--app-shell-header-transform);z-index:var(--app-shell-header-z-index);top:0}:where([data-mode=static]) .m_3b16f56b{grid-row:var(--app-shell-header-grid-row,auto)}.m_3b16f56b:where([data-with-border]){border-bottom:1px solid var(--app-shell-border-color)}.m_3840c879{height:calc(var(--app-shell-footer-height) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);transform:var(--app-shell-footer-transform);z-index:var(--app-shell-footer-z-index);bottom:0}:where([data-mode=static]) .m_3840c879{position:var(--app-shell-footer-position,fixed);grid-column:var(--app-shell-footer-grid-column,auto);grid-row:var(--app-shell-footer-grid-row,auto)}:where([data-mode=static][data-layout=alt]) .m_3840c879{grid-column:var(--app-shell-main-column-start,1) / var(--app-shell-main-column-end,-1)}.m_3840c879:where([data-with-border]){border-top:1px solid var(--app-shell-border-color)}.m_6dcfc7c7{flex-grow:0}.m_6dcfc7c7:where([data-grow]){flex-grow:1}.m_71ac47fc{--ar-ratio:1;max-width:100%}.m_71ac47fc>:where(:not(style)){aspect-ratio:var(--ar-ratio);width:100%}.m_71ac47fc>:where(img,video){object-fit:cover}.m_88b62a41{--combobox-padding:calc(.25rem * var(--mantine-scale));padding:var(--combobox-padding)}.m_88b62a41:has([data-mantine-scrollbar]) .m_985517d8{max-width:calc(100% + var(--combobox-padding))}.m_88b62a41[data-composed]{padding-inline-end:0}.m_88b62a41[data-hidden]{display:none}.m_88b62a41[data-floating-height=viewport]:not([data-hidden]){--combobox-floating-options-max-height:calc(var(--combobox-floating-max-height,100vh) - var(--combobox-padding) * 2);max-height:var(--combobox-floating-max-height,none);overflow:hidden}.m_88b62a41,.m_b2821a6e{--combobox-option-padding-xs:calc(.25rem * var(--mantine-scale)) calc(.5rem * var(--mantine-scale));--combobox-option-padding-sm:calc(.375rem * var(--mantine-scale)) calc(.625rem * var(--mantine-scale));--combobox-option-padding-md:calc(.5rem * var(--mantine-scale)) calc(.75rem * var(--mantine-scale));--combobox-option-padding-lg:calc(.625rem * var(--mantine-scale)) calc(1rem * var(--mantine-scale));--combobox-option-padding-xl:calc(.875rem * var(--mantine-scale)) calc(1.25rem * var(--mantine-scale));--combobox-option-padding:var(--combobox-option-padding-sm)}.m_92253aa5{padding:var(--combobox-option-padding);font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));border-radius:var(--mantine-radius-default);color:inherit;cursor:pointer;overflow-wrap:break-word;background-color:#0000}.m_92253aa5:where([data-combobox-selected]){background-color:var(--mantine-primary-color-filled);color:var(--mantine-color-white)}.m_92253aa5:where([data-combobox-disabled]){cursor:not-allowed;opacity:.35}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_92253aa5:hover:where(:not([data-combobox-selected],[data-combobox-disabled])){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_92253aa5:hover:where(:not([data-combobox-selected],[data-combobox-disabled])){background-color:var(--mantine-color-dark-7)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_92253aa5:active:where(:not([data-combobox-selected],[data-combobox-disabled])){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_92253aa5:active:where(:not([data-combobox-selected],[data-combobox-disabled])){background-color:var(--mantine-color-dark-7)}}.m_985517d8{margin-inline:calc(var(--combobox-padding) * -1);margin-top:calc(var(--combobox-padding) * -1);width:calc(100% + var(--combobox-padding) * 2);border-top-width:0;margin-bottom:var(--combobox-padding);border-inline-width:0;border-end-end-radius:0;border-end-start-radius:0;position:relative}:where([data-mantine-color-scheme=light]) .m_985517d8,:where([data-mantine-color-scheme=light]) .m_985517d8:focus{border-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_985517d8,:where([data-mantine-color-scheme=dark]) .m_985517d8:focus{border-color:var(--mantine-color-dark-4)}:where([data-mantine-color-scheme=light]) .m_985517d8{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_985517d8{background-color:var(--mantine-color-dark-7)}.m_2530cd1d{font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));text-align:center;padding:var(--combobox-option-padding);color:var(--mantine-color-dimmed)}.m_858f94bd,.m_82b967cb{font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));margin-inline:calc(var(--combobox-padding) * -1);padding:var(--combobox-option-padding);border:0 solid #0000}:where([data-mantine-color-scheme=light]) .m_858f94bd,:where([data-mantine-color-scheme=light]) .m_82b967cb{border-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_858f94bd,:where([data-mantine-color-scheme=dark]) .m_82b967cb{border-color:var(--mantine-color-dark-4)}.m_82b967cb{border-top-width:calc(.0625rem * var(--mantine-scale));margin-top:var(--combobox-padding);margin-bottom:calc(var(--combobox-padding) * -1)}.m_858f94bd{border-bottom-width:calc(.0625rem * var(--mantine-scale));margin-bottom:var(--combobox-padding);margin-top:calc(var(--combobox-padding) * -1)}.m_254f3e4f:has(.m_2bb2e9e5:only-child){display:none}.m_2bb2e9e5{color:var(--mantine-color-dimmed);font-size:calc(var(--combobox-option-fz,var(--mantine-font-size-sm)) * .85);padding:var(--combobox-option-padding);font-weight:var(--mantine-font-weight-medium);align-items:center;display:flex;position:relative}.m_2bb2e9e5:after{content:"";height:calc(.0625rem * var(--mantine-scale));flex:1;margin-inline-start:var(--mantine-spacing-xs);inset-inline:0}:where([data-mantine-color-scheme=light]) .m_2bb2e9e5:after{background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_2bb2e9e5:after{background-color:var(--mantine-color-dark-4)}.m_2bb2e9e5:only-child{display:none}.m_2943220b{--combobox-chevron-size-xs:calc(.875rem * var(--mantine-scale));--combobox-chevron-size-sm:calc(1.125rem * var(--mantine-scale));--combobox-chevron-size-md:calc(1.25rem * var(--mantine-scale));--combobox-chevron-size-lg:calc(1.5rem * var(--mantine-scale));--combobox-chevron-size-xl:calc(1.75rem * var(--mantine-scale));--combobox-chevron-size:var(--combobox-chevron-size-sm)}:where([data-mantine-color-scheme=light]) .m_2943220b{--_combobox-chevron-color:var(--combobox-chevron-color,var(--mantine-color-gray-6))}:where([data-mantine-color-scheme=dark]) .m_2943220b{--_combobox-chevron-color:var(--combobox-chevron-color,var(--mantine-color-dark-3))}.m_2943220b{width:var(--combobox-chevron-size);height:var(--combobox-chevron-size);color:var(--_combobox-chevron-color)}.m_2943220b:where([data-error]){color:var(--combobox-chevron-color,var(--mantine-color-error))}.m_390b5f4{align-items:center;gap:calc(.5rem * var(--mantine-scale));display:flex}.m_390b5f4:where([data-reverse]){justify-content:space-between}.m_8ee53fc2{opacity:.4;width:.8em;min-width:.8em;height:.8em}:where([data-combobox-selected]) .m_8ee53fc2{opacity:1}.m_a530ee0a{width:.8em;min-width:.8em;height:.8em}.m_5f75b09e{--label-lh-xs:calc(1rem * var(--mantine-scale));--label-lh-sm:calc(1.25rem * var(--mantine-scale));--label-lh-md:calc(1.5rem * var(--mantine-scale));--label-lh-lg:calc(1.875rem * var(--mantine-scale));--label-lh-xl:calc(2.25rem * var(--mantine-scale));--label-lh:var(--label-lh-sm)}.m_5f75b09e[data-label-position=left]{--label-order:1;--label-offset-end:var(--mantine-spacing-sm);--label-offset-start:0}.m_5f75b09e[data-label-position=right]{--label-order:2;--label-offset-end:0;--label-offset-start:var(--mantine-spacing-sm)}.m_5f6e695e{-webkit-tap-highlight-color:transparent;display:flex}.m_d3ea56bb{--label-cursor:var(--mantine-cursor-type);-webkit-tap-highlight-color:transparent;font-size:var(--label-fz,var(--mantine-font-size-sm));line-height:var(--label-lh);cursor:var(--label-cursor);flex-direction:column;order:var(--label-order);display:inline-flex}fieldset:disabled .m_d3ea56bb,.m_d3ea56bb[data-disabled]{--label-cursor:not-allowed}.m_8ee546b8{cursor:var(--label-cursor);color:inherit;padding-inline-start:var(--label-offset-start);padding-inline-end:var(--label-offset-end)}fieldset:disabled .m_8ee546b8,.m_8ee546b8:where([data-disabled]){color:var(--mantine-color-disabled-color)}.m_328f68c0{margin-top:calc(var(--mantine-spacing-xs) / 2);cursor:default;padding-inline-start:var(--label-offset-start);padding-inline-end:var(--label-offset-end)}.m_8e8a99cc{margin-top:calc(var(--mantine-spacing-xs) / 2);padding-inline-start:var(--label-offset-start);padding-inline-end:var(--label-offset-end)}.m_26775b0a{--card-radius:var(--mantine-radius-default);border-radius:var(--card-radius);cursor:pointer;width:100%;display:block}.m_26775b0a :where(*){cursor:inherit}.m_26775b0a:where([data-with-border]){border:calc(.0625rem * var(--mantine-scale)) solid transparent}:where([data-mantine-color-scheme=light]) .m_26775b0a:where([data-with-border]){border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_26775b0a:where([data-with-border]){border-color:var(--mantine-color-dark-4)}.m_5e5256ee{--checkbox-size-xs:calc(1rem * var(--mantine-scale));--checkbox-size-sm:calc(1.25rem * var(--mantine-scale));--checkbox-size-md:calc(1.5rem * var(--mantine-scale));--checkbox-size-lg:calc(1.875rem * var(--mantine-scale));--checkbox-size-xl:calc(2.25rem * var(--mantine-scale));--checkbox-size:var(--checkbox-size-sm);--checkbox-color:var(--mantine-primary-color-filled)}.m_5e5256ee:where([data-variant=filled]){--checkbox-icon-color:var(--mantine-color-white)}.m_5e5256ee:where([data-variant=outline]){--checkbox-icon-color:var(--checkbox-color)}.m_5e5256ee{border:calc(.0625rem * var(--mantine-scale)) solid transparent;width:var(--checkbox-size);min-width:var(--checkbox-size);height:var(--checkbox-size);min-height:var(--checkbox-size);border-radius:var(--checkbox-radius,var(--mantine-radius-default));cursor:var(--mantine-cursor-type);-webkit-tap-highlight-color:transparent;justify-content:center;align-items:center;transition:border-color .1s,background-color .1s;display:flex;position:relative}:where([data-mantine-color-scheme=light]) .m_5e5256ee{background-color:var(--mantine-color-white);border-color:var(--mantine-color-gray-4)}:where([data-mantine-color-scheme=dark]) .m_5e5256ee{background-color:var(--mantine-color-dark-6);border-color:var(--mantine-color-dark-4)}.m_5e5256ee[data-indeterminate],.m_5e5256ee[data-checked]{background-color:var(--checkbox-color);border-color:var(--checkbox-color)}.m_5e5256ee[data-indeterminate]>.m_1b1c543a,.m_5e5256ee[data-checked]>.m_1b1c543a{opacity:1;color:var(--checkbox-icon-color);transform:none}.m_5e5256ee[data-disabled]{cursor:not-allowed;border-color:var(--mantine-color-disabled-border);background-color:var(--mantine-color-disabled)}[data-mantine-color-scheme=light] .m_5e5256ee[data-disabled][data-checked]>.m_1b1c543a{color:var(--mantine-color-gray-5)}[data-mantine-color-scheme=dark] .m_5e5256ee[data-disabled][data-checked]>.m_1b1c543a{color:var(--mantine-color-dark-3)}.m_76e20374[data-indeterminate]:not([data-disabled]),.m_76e20374[data-checked]:not([data-disabled]){border-color:var(--checkbox-color);background-color:#0000}.m_76e20374[data-indeterminate]:not([data-disabled])>.m_1b1c543a,.m_76e20374[data-checked]:not([data-disabled])>.m_1b1c543a{color:var(--checkbox-icon-color);opacity:1;transform:none}.m_1b1c543a{color:#0000;pointer-events:none;width:60%;transform:translateY(calc(.3125rem * var(--mantine-scale))) scale(.5);opacity:1;transition:transform .1s,opacity .1s;display:block}.m_bf2d988c{--checkbox-size-xs:calc(1rem * var(--mantine-scale));--checkbox-size-sm:calc(1.25rem * var(--mantine-scale));--checkbox-size-md:calc(1.5rem * var(--mantine-scale));--checkbox-size-lg:calc(1.875rem * var(--mantine-scale));--checkbox-size-xl:calc(2.25rem * var(--mantine-scale));--checkbox-size:var(--checkbox-size-sm);--checkbox-color:var(--mantine-primary-color-filled)}.m_bf2d988c:where([data-variant=filled]){--checkbox-icon-color:var(--mantine-color-white)}.m_bf2d988c:where([data-variant=outline]){--checkbox-icon-color:var(--checkbox-color)}.m_26062bec{width:var(--checkbox-size);height:var(--checkbox-size);order:1;position:relative}.m_26062bec:where([data-label-position=left]){order:2}.m_26063560{appearance:none;border:calc(.0625rem * var(--mantine-scale)) solid transparent;width:var(--checkbox-size);height:var(--checkbox-size);border-radius:var(--checkbox-radius,var(--mantine-radius-default));cursor:var(--mantine-cursor-type);-webkit-tap-highlight-color:transparent;margin:0;padding:0;transition:border-color .1s,background-color .1s;display:block}:where([data-mantine-color-scheme=light]) .m_26063560{background-color:var(--mantine-color-white);border-color:var(--mantine-color-gray-4)}:where([data-mantine-color-scheme=dark]) .m_26063560{background-color:var(--mantine-color-dark-6);border-color:var(--mantine-color-dark-4)}.m_26063560:where([data-with-error-styles][data-error]){border-color:var(--mantine-color-error)}.m_26063560[data-indeterminate],.m_26063560:checked{background-color:var(--checkbox-color);border-color:var(--checkbox-color)}.m_26063560[data-indeterminate]+.m_bf295423,.m_26063560:checked+.m_bf295423{opacity:1;transform:none}.m_26063560:disabled{cursor:not-allowed;border-color:var(--mantine-color-disabled-border);background-color:var(--mantine-color-disabled)}.m_26063560:disabled+.m_bf295423{color:var(--mantine-color-disabled-color)}.m_215c4542+.m_bf295423{color:var(--checkbox-color)}.m_215c4542[data-indeterminate]:not(:disabled),.m_215c4542:checked:not(:disabled){border-color:var(--checkbox-color);background-color:#0000}.m_215c4542[data-indeterminate]:not(:disabled)+.m_bf295423,.m_215c4542:checked:not(:disabled)+.m_bf295423{color:var(--checkbox-icon-color);opacity:1;transform:none}.m_bf295423{width:60%;color:var(--checkbox-icon-color);pointer-events:none;transform:translateY(calc(.3125rem * var(--mantine-scale))) scale(.5);opacity:0;margin:auto;transition:transform .1s,opacity .1s;position:absolute;inset:0}.m_11def92b{--ag-spacing:var(--mantine-spacing-sm);--ag-offset:calc(var(--ag-spacing) * -1);padding-inline-start:var(--ag-spacing);display:flex}.m_f85678b6{--avatar-size-xs:calc(1rem * var(--mantine-scale));--avatar-size-sm:calc(1.625rem * var(--mantine-scale));--avatar-size-md:calc(2.375rem * var(--mantine-scale));--avatar-size-lg:calc(3.5rem * var(--mantine-scale));--avatar-size-xl:calc(5.25rem * var(--mantine-scale));--avatar-size:var(--avatar-size-md);--avatar-radius:calc(62.5rem * var(--mantine-scale));--avatar-bg:var(--mantine-color-gray-light);--avatar-bd:calc(.0625rem * var(--mantine-scale)) solid transparent;--avatar-color:var(--mantine-color-gray-light-color);--avatar-placeholder-fz:calc(var(--avatar-size) / 2.5);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;border-radius:var(--avatar-radius);width:var(--avatar-size);height:var(--avatar-size);min-width:var(--avatar-size);padding:0;text-decoration:none;display:block;position:relative;overflow:hidden}.m_f85678b6:where([data-within-group]){border:2px solid var(--mantine-color-body);background:var(--mantine-color-body);margin-inline-start:var(--ag-offset)}.m_11f8ac07{object-fit:cover;width:100%;height:100%;display:block}.m_104cd71f{font-weight:var(--mantine-font-weight-bold);-webkit-user-select:none;user-select:none;border-radius:var(--avatar-radius);width:100%;height:100%;font-size:var(--avatar-placeholder-fz);background:var(--avatar-bg);border:var(--avatar-bd);color:var(--avatar-color);justify-content:center;align-items:center;display:flex}.m_104cd71f>[data-avatar-placeholder-icon]{width:70%;height:70%}.m_2ce0de02{border-radius:var(--bi-radius,0);background-position:50%;background-size:cover;border:0;width:100%;text-decoration:none;display:block}.m_347db0ec{--badge-height-xs:calc(1rem * var(--mantine-scale));--badge-height-sm:calc(1.125rem * var(--mantine-scale));--badge-height-md:calc(1.25rem * var(--mantine-scale));--badge-height-lg:calc(1.625rem * var(--mantine-scale));--badge-height-xl:calc(2rem * var(--mantine-scale));--badge-fz-xs:calc(.5625rem * var(--mantine-scale));--badge-fz-sm:calc(.625rem * var(--mantine-scale));--badge-fz-md:calc(.6875rem * var(--mantine-scale));--badge-fz-lg:calc(.8125rem * var(--mantine-scale));--badge-fz-xl:calc(1rem * var(--mantine-scale));--badge-padding-x-xs:calc(.375rem * var(--mantine-scale));--badge-padding-x-sm:calc(.5rem * var(--mantine-scale));--badge-padding-x-md:calc(.625rem * var(--mantine-scale));--badge-padding-x-lg:calc(.75rem * var(--mantine-scale));--badge-padding-x-xl:calc(1rem * var(--mantine-scale));--badge-height:var(--badge-height-md);--badge-fz:var(--badge-fz-md);--badge-padding-x:var(--badge-padding-x-md);--badge-radius:calc(62.5rem * var(--mantine-scale));--badge-lh:calc(var(--badge-height) - calc(.125rem * var(--mantine-scale)));--badge-color:var(--mantine-color-white);--badge-bg:var(--mantine-primary-color-filled);--badge-border-width:calc(.0625rem * var(--mantine-scale));--badge-bd:var(--badge-border-width) solid transparent;-webkit-tap-highlight-color:transparent;font-size:var(--badge-fz);border-radius:var(--badge-radius);height:var(--badge-height);line-height:var(--badge-lh);padding:0 var(--badge-padding-x);text-transform:uppercase;width:fit-content;font-weight:var(--mantine-font-weight-bold);letter-spacing:calc(.015625rem * var(--mantine-scale));cursor:default;text-overflow:ellipsis;color:var(--badge-color);background:var(--badge-bg);border:var(--badge-bd);justify-content:center;align-items:center;text-decoration:none;display:inline-grid;overflow:hidden}.m_347db0ec:where([data-with-left-section],[data-variant=dot]){grid-template-columns:auto 1fr}.m_347db0ec:where([data-with-right-section]){grid-template-columns:1fr auto}.m_347db0ec:where([data-with-left-section][data-with-right-section],[data-variant=dot][data-with-right-section]){grid-template-columns:auto 1fr auto}.m_347db0ec:where([data-block]){width:100%;display:flex}.m_347db0ec:where([data-circle]){padding-inline:calc(.125rem * var(--mantine-scale));width:var(--badge-height);display:flex}.m_fbd81e3d{--badge-dot-size:calc(var(--badge-height) / 3.4)}:where([data-mantine-color-scheme=light]) .m_fbd81e3d{background-color:var(--mantine-color-white);border-color:var(--mantine-color-gray-4);color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_fbd81e3d{background-color:var(--mantine-color-dark-5);border-color:var(--mantine-color-dark-5);color:var(--mantine-color-white)}.m_fbd81e3d:before{content:"";width:var(--badge-dot-size);height:var(--badge-dot-size);border-radius:var(--badge-dot-size);background-color:var(--badge-dot-color);margin-inline-end:var(--badge-dot-size);display:block}.m_5add502a{white-space:nowrap;text-overflow:ellipsis;text-align:center;cursor:inherit;overflow:hidden}.m_91fdda9b{--badge-section-margin:calc(var(--mantine-spacing-xs) / 2);max-height:calc(var(--badge-height) - var(--badge-border-width) * 2);justify-content:center;align-items:center;display:inline-flex}.m_91fdda9b:where([data-position=left]){margin-inline-end:var(--badge-section-margin)}.m_91fdda9b:where([data-position=right]){margin-inline-start:var(--badge-section-margin)}.m_ddec01c0{--blockquote-border:3px solid var(--bq-bd);text-wrap:var(--bq-text-wrap,var(--mantine-text-wrap));border-inline-start:var(--blockquote-border);padding:var(--mantine-spacing-xl) calc(2.375rem * var(--mantine-scale));border-start-end-radius:var(--bq-radius);border-end-end-radius:var(--bq-radius);margin:0;position:relative}:where([data-mantine-color-scheme=light]) .m_ddec01c0{background-color:var(--bq-bg-light)}:where([data-mantine-color-scheme=dark]) .m_ddec01c0{background-color:var(--bq-bg-dark)}.m_dde7bd57{--blockquote-icon-offset:calc(var(--bq-icon-size) / -2);color:var(--bq-bd);background-color:var(--mantine-color-body);top:var(--blockquote-icon-offset);width:var(--bq-icon-size);height:var(--bq-icon-size);border-radius:var(--bq-icon-size);justify-content:center;align-items:center;display:flex;position:absolute;inset-inline-start:var(--blockquote-icon-offset)}.m_dde51a35{margin-top:var(--mantine-spacing-md);opacity:.6;font-size:85%;display:block}.m_8b3717df{flex-wrap:wrap;align-items:center;display:flex}.m_f678d540{white-space:nowrap;-webkit-tap-highlight-color:transparent;line-height:1}.m_3b8f2208{margin-inline:var(--bc-separator-margin,var(--mantine-spacing-xs));justify-content:center;align-items:center;line-height:1;display:flex}:where([data-mantine-color-scheme=light]) .m_3b8f2208{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_3b8f2208{color:var(--mantine-color-dark-2)}.m_fea6bf1a{--burger-size-xs:calc(.75rem * var(--mantine-scale));--burger-size-sm:calc(1.125rem * var(--mantine-scale));--burger-size-md:calc(1.5rem * var(--mantine-scale));--burger-size-lg:calc(2.125rem * var(--mantine-scale));--burger-size-xl:calc(2.625rem * var(--mantine-scale));--burger-size:var(--burger-size-md);--burger-line-size:calc(var(--burger-size) / 12);width:calc(var(--burger-size) + var(--mantine-spacing-xs));height:calc(var(--burger-size) + var(--mantine-spacing-xs));padding:calc(var(--mantine-spacing-xs) / 2);cursor:pointer}:where([data-mantine-color-scheme=light]) .m_fea6bf1a{--burger-color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_fea6bf1a{--burger-color:var(--mantine-color-white)}.m_d4fb9cad{-webkit-user-select:none;user-select:none;position:relative}.m_d4fb9cad,.m_d4fb9cad:before,.m_d4fb9cad:after{width:var(--burger-size);height:var(--burger-line-size);background-color:var(--burger-color);outline:calc(.0625rem * var(--mantine-scale)) solid transparent;transition-property:background-color,transform;transition-duration:var(--burger-transition-duration,.3s);transition-timing-function:var(--burger-transition-timing-function,ease);display:block}.m_d4fb9cad:before,.m_d4fb9cad:after{content:"";position:absolute;inset-inline-start:0}.m_d4fb9cad:before{top:calc(var(--burger-size) / -3)}.m_d4fb9cad:after{top:calc(var(--burger-size) / 3)}.m_d4fb9cad[data-opened]{background-color:#0000}.m_d4fb9cad[data-opened]:before{transform:translateY(calc(var(--burger-size) / 3)) rotate(45deg)}.m_d4fb9cad[data-opened]:after{transform:translateY(calc(var(--burger-size) / -3)) rotate(-45deg)}.m_77c9d27d{--button-height-xs:calc(1.875rem * var(--mantine-scale));--button-height-sm:calc(2.25rem * var(--mantine-scale));--button-height-md:calc(2.625rem * var(--mantine-scale));--button-height-lg:calc(3.125rem * var(--mantine-scale));--button-height-xl:calc(3.75rem * var(--mantine-scale));--button-height-compact-xs:calc(1.375rem * var(--mantine-scale));--button-height-compact-sm:calc(1.625rem * var(--mantine-scale));--button-height-compact-md:calc(1.875rem * var(--mantine-scale));--button-height-compact-lg:calc(2.125rem * var(--mantine-scale));--button-height-compact-xl:calc(2.5rem * var(--mantine-scale));--button-padding-x-xs:calc(.875rem * var(--mantine-scale));--button-padding-x-sm:calc(1.125rem * var(--mantine-scale));--button-padding-x-md:calc(1.375rem * var(--mantine-scale));--button-padding-x-lg:calc(1.625rem * var(--mantine-scale));--button-padding-x-xl:calc(2rem * var(--mantine-scale));--button-padding-x-compact-xs:calc(.4375rem * var(--mantine-scale));--button-padding-x-compact-sm:calc(.5rem * var(--mantine-scale));--button-padding-x-compact-md:calc(.625rem * var(--mantine-scale));--button-padding-x-compact-lg:calc(.75rem * var(--mantine-scale));--button-padding-x-compact-xl:calc(.875rem * var(--mantine-scale));--button-height:var(--button-height-sm);--button-padding-x:var(--button-padding-x-sm);--button-color:var(--mantine-color-white);-webkit-user-select:none;user-select:none;font-weight:var(--mantine-font-weight-medium);text-align:center;cursor:pointer;border-radius:var(--button-radius,var(--mantine-radius-default));width:auto;line-height:1;font-size:var(--button-fz,var(--mantine-font-size-sm));background:var(--button-bg,var(--mantine-primary-color-filled));border:var(--button-bd,calc(.0625rem * var(--mantine-scale)) solid transparent);color:var(--button-color,var(--mantine-color-white));height:var(--button-height,var(--button-height-sm));padding-inline:var(--button-padding-x,var(--button-padding-x-sm));vertical-align:middle;display:inline-block;position:relative;overflow:hidden}.m_77c9d27d:where([data-block]){width:100%;display:block}.m_77c9d27d:where([data-with-left-section]){padding-inline-start:calc(var(--button-padding-x) / 1.5)}.m_77c9d27d:where([data-with-right-section]){padding-inline-end:calc(var(--button-padding-x) / 1.5)}.m_77c9d27d:where(:disabled:not([data-loading]),[data-disabled]:not([data-loading])){cursor:not-allowed;border:calc(.0625rem * var(--mantine-scale)) solid transparent;color:var(--mantine-color-disabled-color);background:var(--mantine-color-disabled);transform:none}.m_77c9d27d:before{content:"";pointer-events:none;inset:calc(-.0625rem * var(--mantine-scale));border-radius:var(--button-radius,var(--mantine-radius-default));opacity:0;filter:blur(12px);transition:transform .15s,opacity .1s;position:absolute;transform:translateY(-100%)}:where([data-mantine-color-scheme=light]) .m_77c9d27d:before{background-color:#ffffff26}:where([data-mantine-color-scheme=dark]) .m_77c9d27d:before{background-color:#00000026}.m_77c9d27d:where([data-loading]){cursor:not-allowed;transform:none}.m_77c9d27d:where([data-loading]):before{opacity:1;transform:translateY(0)}.m_77c9d27d:where([data-loading]) .m_80f1301b{opacity:0;transform:translateY(100%)}@media (hover:hover){.m_77c9d27d:hover:where(:not([data-loading],:disabled,[data-disabled])){background-color:var(--button-hover,var(--mantine-primary-color-filled-hover));color:var(--button-hover-color,var(--button-color))}}@media (hover:none){.m_77c9d27d:active:where(:not([data-loading],:disabled,[data-disabled])){background-color:var(--button-hover,var(--mantine-primary-color-filled-hover));color:var(--button-hover-color,var(--button-color))}}.m_80f1301b{align-items:center;justify-content:var(--button-justify,center);height:100%;transition:transform .15s,opacity .1s;display:flex;overflow:visible}.m_811560b9{white-space:nowrap;opacity:1;text-box-trim:trim-both;text-box-edge:cap alphabetic;align-items:center;height:100%;display:flex;overflow:hidden}.m_811560b9:where([data-loading]){opacity:.2}.m_a74036a{align-items:center;display:flex}.m_a74036a:where([data-position=left]){margin-inline-end:var(--mantine-spacing-xs)}.m_a74036a:where([data-position=right]){margin-inline-start:var(--mantine-spacing-xs)}.m_a25b86ee{position:absolute;top:50%;left:50%}.m_80d6d844{--button-border-width:calc(.0625rem * var(--mantine-scale));display:flex}.m_80d6d844 :where(.m_77c9d27d):focus{z-index:1;position:relative}.m_80d6d844[data-orientation=horizontal]{flex-direction:row}.m_80d6d844[data-orientation=horizontal] .m_77c9d27d:not(:only-child):first-child,.m_80d6d844[data-orientation=horizontal] .m_70be2a01:not(:only-child):first-child{border-inline-end-width:calc(var(--button-border-width) / 2);border-start-end-radius:0;border-end-end-radius:0}.m_80d6d844[data-orientation=horizontal] .m_77c9d27d:not(:only-child):last-child,.m_80d6d844[data-orientation=horizontal] .m_70be2a01:not(:only-child):last-child{border-inline-start-width:calc(var(--button-border-width) / 2);border-start-start-radius:0;border-end-start-radius:0}.m_80d6d844[data-orientation=horizontal] .m_77c9d27d:not(:only-child):not(:first-child):not(:last-child),.m_80d6d844[data-orientation=horizontal] .m_70be2a01:not(:only-child):not(:first-child):not(:last-child){border-inline-width:calc(var(--button-border-width) / 2);border-radius:0}.m_80d6d844[data-orientation=vertical]{flex-direction:column}.m_80d6d844[data-orientation=vertical] .m_77c9d27d:not(:only-child):first-child,.m_80d6d844[data-orientation=vertical] .m_70be2a01:not(:only-child):first-child{border-bottom-width:calc(var(--button-border-width) / 2);border-end-end-radius:0;border-end-start-radius:0}.m_80d6d844[data-orientation=vertical] .m_77c9d27d:not(:only-child):last-child,.m_80d6d844[data-orientation=vertical] .m_70be2a01:not(:only-child):last-child{border-top-width:calc(var(--button-border-width) / 2);border-start-start-radius:0;border-start-end-radius:0}.m_80d6d844[data-orientation=vertical] .m_77c9d27d:not(:only-child):not(:first-child):not(:last-child),.m_80d6d844[data-orientation=vertical] .m_70be2a01:not(:only-child):not(:first-child):not(:last-child){border-bottom-width:calc(var(--button-border-width) / 2);border-top-width:calc(var(--button-border-width) / 2);border-radius:0}.m_70be2a01{--section-height-xs:calc(1.875rem * var(--mantine-scale));--section-height-sm:calc(2.25rem * var(--mantine-scale));--section-height-md:calc(2.625rem * var(--mantine-scale));--section-height-lg:calc(3.125rem * var(--mantine-scale));--section-height-xl:calc(3.75rem * var(--mantine-scale));--section-height-compact-xs:calc(1.375rem * var(--mantine-scale));--section-height-compact-sm:calc(1.625rem * var(--mantine-scale));--section-height-compact-md:calc(1.875rem * var(--mantine-scale));--section-height-compact-lg:calc(2.125rem * var(--mantine-scale));--section-height-compact-xl:calc(2.5rem * var(--mantine-scale));--section-padding-x-xs:calc(.875rem * var(--mantine-scale));--section-padding-x-sm:calc(1.125rem * var(--mantine-scale));--section-padding-x-md:calc(1.375rem * var(--mantine-scale));--section-padding-x-lg:calc(1.625rem * var(--mantine-scale));--section-padding-x-xl:calc(2rem * var(--mantine-scale));--section-padding-x-compact-xs:calc(.4375rem * var(--mantine-scale));--section-padding-x-compact-sm:calc(.5rem * var(--mantine-scale));--section-padding-x-compact-md:calc(.625rem * var(--mantine-scale));--section-padding-x-compact-lg:calc(.75rem * var(--mantine-scale));--section-padding-x-compact-xl:calc(.875rem * var(--mantine-scale));--section-height:var(--section-height-sm);--section-padding-x:var(--section-padding-x-sm);--section-color:var(--mantine-color-white);font-weight:var(--mantine-font-weight-medium);border-radius:var(--section-radius,var(--mantine-radius-default));width:auto;font-size:var(--section-fz,var(--mantine-font-size-sm));background:var(--section-bg,var(--mantine-primary-color-filled));border:var(--section-bd,calc(.0625rem * var(--mantine-scale)) solid transparent);color:var(--section-color,var(--mantine-color-white));height:var(--section-height,var(--section-height-sm));padding-inline:var(--section-padding-x,var(--section-padding-x-sm));vertical-align:middle;justify-content:center;align-items:center;line-height:1;display:inline-flex}.m_e615b15f{--card-padding:var(--mantine-spacing-md);padding:var(--card-padding);color:var(--mantine-color-text);display:flex;position:relative;overflow:hidden}.m_e615b15f:where([data-orientation=horizontal]){flex-direction:row}.m_e615b15f:where([data-orientation=vertical]){flex-direction:column}:where([data-mantine-color-scheme=light]) .m_e615b15f{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_e615b15f{background-color:var(--mantine-color-dark-6)}.m_599a2148{margin-inline:calc(var(--card-padding) * -1);display:block}:where([data-mantine-color-scheme=light]) .m_599a2148{--border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_599a2148{--border-color:var(--mantine-color-dark-4)}.m_599a2148:where([data-orientation=vertical]):first-child{margin-top:calc(var(--card-padding) * -1);border-top:none!important}.m_599a2148:where([data-orientation=vertical]):last-child{margin-bottom:calc(var(--card-padding) * -1);border-bottom:none!important}.m_599a2148:where([data-orientation=vertical])[data-inherit-padding]{padding-inline:var(--card-padding)}.m_599a2148:where([data-orientation=vertical])[data-with-border]{border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color)}.m_599a2148:where([data-orientation=vertical])+.m_599a2148:where([data-orientation=vertical]){border-top:none!important}.m_599a2148:where([data-orientation=horizontal]){margin-block:calc(var(--card-padding) * -1);margin-inline:0}.m_599a2148:where([data-orientation=horizontal]):first-child{margin-inline-start:calc(var(--card-padding) * -1);border-inline-start:none!important}.m_599a2148:where([data-orientation=horizontal]):last-child{margin-inline-end:calc(var(--card-padding) * -1);border-inline-end:none!important}.m_599a2148:where([data-orientation=horizontal])[data-inherit-padding]{padding-block:var(--card-padding)}.m_599a2148:where([data-orientation=horizontal])[data-with-border]{border-inline-start:1px solid var(--border-color);border-inline-end:1px solid var(--border-color)}.m_599a2148:where([data-orientation=horizontal])+.m_599a2148:where([data-orientation=horizontal]){border-inline-start:none!important}.m_9a782f2c{--cascader-column-width:calc(12.5rem * var(--mantine-scale));flex-direction:row;align-items:stretch;display:flex}.m_4c5a03a5{width:var(--cascader-column-width);min-width:var(--cascader-column-width);border-inline-end:calc(.0625rem * var(--mantine-scale)) solid var(--popover-border-color,var(--mantine-color-default-border));flex-direction:column;display:flex}.m_4c5a03a5:where([data-last]){border-inline-end-color:#0000}.m_7f3ac6d2{padding:var(--combobox-padding);flex:1}.m_6b93b90{padding-inline:calc(var(--combobox-padding) / 2);color:var(--mantine-color-dimmed);cursor:pointer;border-inline-end:calc(.0625rem * var(--mantine-scale)) solid var(--popover-border-color,var(--mantine-color-default-border));justify-content:center;align-self:stretch;align-items:center;display:flex}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_6b93b90:hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_6b93b90:hover{background-color:var(--mantine-color-dark-7)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_6b93b90:active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_6b93b90:active{background-color:var(--mantine-color-dark-7)}}.m_6b93b90>svg{width:.9em;height:.9em;transform:rotate(90deg)}.m_6b93b90:where([data-position=start]){border-start-start-radius:var(--popover-radius,var(--mantine-radius-default));border-end-start-radius:var(--popover-radius,var(--mantine-radius-default))}.m_6b93b90:where([data-position=end]){border-inline-end-color:#0000;border-start-end-radius:var(--popover-radius,var(--mantine-radius-default));border-end-end-radius:var(--popover-radius,var(--mantine-radius-default))}.m_6b93b90:where([data-position=end])>svg,:where([dir=rtl]) .m_6b93b90>svg{transform:rotate(-90deg)}:where([dir=rtl]) .m_6b93b90:where([data-position=end])>svg{transform:rotate(90deg)}.m_791f687a{align-items:center;gap:var(--mantine-spacing-xs);width:100%;padding:var(--combobox-option-padding);font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));border-radius:var(--combobox-option-radius,var(--mantine-radius-default));color:var(--mantine-color-text);cursor:pointer;display:flex}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_791f687a:hover:where(:not([data-disabled],[data-active])){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_791f687a:hover:where(:not([data-disabled],[data-active])){background-color:var(--mantine-color-dark-7)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_791f687a:active:where(:not([data-disabled],[data-active])){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_791f687a:active:where(:not([data-disabled],[data-active])){background-color:var(--mantine-color-dark-7)}}:where([data-mantine-color-scheme=light]) .m_791f687a:where([data-in-path]){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_791f687a:where([data-in-path]){background-color:var(--mantine-color-dark-6)}.m_791f687a:where([data-active]){background-color:var(--mantine-primary-color-filled);color:var(--mantine-color-white)}@media (hover:hover){.m_791f687a:where([data-active]):hover{background-color:var(--mantine-primary-color-filled-hover)}}@media (hover:none){.m_791f687a:where([data-active]):active{background-color:var(--mantine-primary-color-filled-hover)}}.m_791f687a:where([data-disabled]){color:var(--mantine-color-dimmed);cursor:not-allowed;opacity:.5}.m_452a61d{align-items:center;gap:var(--mantine-spacing-xs);width:100%;display:flex}.m_aecd629a{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.m_92054c13{width:.9em;min-width:.9em;height:.9em;color:var(--mantine-color-dimmed);justify-content:center;align-items:center;display:flex;transform:rotate(-90deg)}:where([data-active]) .m_92054c13{color:inherit}:where([dir=rtl]) .m_92054c13{transform:rotate(90deg)}.m_ae51c8ae{opacity:.4;width:.8em;min-width:.8em;height:.8em}:where([data-active]) .m_ae51c8ae,:where([data-combobox-selected]) .m_ae51c8ae{opacity:1}.m_97ff10a8{padding:var(--combobox-option-padding);color:var(--mantine-color-dimmed);font-size:var(--combobox-option-fz,var(--mantine-font-size-sm));white-space:nowrap;justify-content:center;align-items:center;display:flex}.m_4451eb3a{justify-content:center;align-items:center;display:flex}.m_4451eb3a:where([data-inline]){display:inline-flex}.m_f59ffda3{--chip-size-xs:calc(1.4375rem * var(--mantine-scale));--chip-size-sm:calc(1.75rem * var(--mantine-scale));--chip-size-md:calc(2rem * var(--mantine-scale));--chip-size-lg:calc(2.25rem * var(--mantine-scale));--chip-size-xl:calc(2.5rem * var(--mantine-scale));--chip-icon-size-xs:calc(.5625rem * var(--mantine-scale));--chip-icon-size-sm:calc(.75rem * var(--mantine-scale));--chip-icon-size-md:calc(.875rem * var(--mantine-scale));--chip-icon-size-lg:calc(1rem * var(--mantine-scale));--chip-icon-size-xl:calc(1.125rem * var(--mantine-scale));--chip-padding-xs:calc(1rem * var(--mantine-scale));--chip-padding-sm:calc(1.25rem * var(--mantine-scale));--chip-padding-md:calc(1.5rem * var(--mantine-scale));--chip-padding-lg:calc(1.75rem * var(--mantine-scale));--chip-padding-xl:calc(2rem * var(--mantine-scale));--chip-checked-padding-xs:calc(.5125rem * var(--mantine-scale));--chip-checked-padding-sm:calc(.625rem * var(--mantine-scale));--chip-checked-padding-md:calc(.73125rem * var(--mantine-scale));--chip-checked-padding-lg:calc(.84375rem * var(--mantine-scale));--chip-checked-padding-xl:calc(.98125rem * var(--mantine-scale));--chip-spacing-xs:calc(.625rem * var(--mantine-scale));--chip-spacing-sm:calc(.75rem * var(--mantine-scale));--chip-spacing-md:calc(1rem * var(--mantine-scale));--chip-spacing-lg:calc(1.25rem * var(--mantine-scale));--chip-spacing-xl:calc(1.375rem * var(--mantine-scale));--chip-size:var(--chip-size-sm);--chip-icon-size:var(--chip-icon-size-sm);--chip-padding:var(--chip-padding-sm);--chip-spacing:var(--chip-spacing-sm);--chip-checked-padding:var(--chip-checked-padding-sm);--chip-bg:var(--mantine-primary-color-filled);--chip-hover:var(--mantine-primary-color-filled-hover);--chip-color:var(--mantine-color-white);--chip-bd:calc(.0625rem * var(--mantine-scale)) solid transparent}.m_be049a53{-webkit-user-select:none;user-select:none;border-radius:var(--chip-radius,1000rem);height:var(--chip-size);font-size:var(--chip-fz,var(--mantine-font-size-sm));line-height:calc(var(--chip-size) - calc(.125rem * var(--mantine-scale)));padding-inline:var(--chip-padding);cursor:pointer;white-space:nowrap;-webkit-tap-highlight-color:transparent;border:calc(.0625rem * var(--mantine-scale)) solid transparent;color:var(--mantine-color-text);text-box-trim:trim-both;text-box-edge:cap alphabetic;align-items:center;display:inline-flex}.m_be049a53:where([data-checked]){padding-inline:var(--chip-checked-padding)}.m_be049a53:where([data-disabled]){cursor:not-allowed;background-color:var(--mantine-color-disabled);color:var(--mantine-color-disabled-color)}:where([data-mantine-color-scheme=light]) .m_3904c1af:not([data-disabled]){background-color:var(--mantine-color-white);border:1px solid var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_3904c1af:not([data-disabled]){background-color:var(--mantine-color-dark-6);border:1px solid var(--mantine-color-dark-4)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_3904c1af:not([data-disabled]):hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_3904c1af:not([data-disabled]):hover{background-color:var(--mantine-color-dark-5)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_3904c1af:not([data-disabled]):active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_3904c1af:not([data-disabled]):active{background-color:var(--mantine-color-dark-5)}}.m_3904c1af:not([data-disabled]):where([data-checked]){--chip-icon-color:var(--chip-color);border:var(--chip-bd)}@media (hover:hover){.m_3904c1af:not([data-disabled]):where([data-checked]):hover{background-color:var(--chip-hover)}}@media (hover:none){.m_3904c1af:not([data-disabled]):where([data-checked]):active{background-color:var(--chip-hover)}}.m_fa109255:not([data-disabled]),.m_f7e165c3:not([data-disabled]){border:calc(.0625rem * var(--mantine-scale)) solid transparent;color:var(--mantine-color-text)}:where([data-mantine-color-scheme=light]) .m_fa109255:not([data-disabled]),:where([data-mantine-color-scheme=light]) .m_f7e165c3:not([data-disabled]){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_fa109255:not([data-disabled]),:where([data-mantine-color-scheme=dark]) .m_f7e165c3:not([data-disabled]){background-color:var(--mantine-color-dark-5)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_fa109255:not([data-disabled]):hover,:where([data-mantine-color-scheme=light]) .m_f7e165c3:not([data-disabled]):hover{background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_fa109255:not([data-disabled]):hover,:where([data-mantine-color-scheme=dark]) .m_f7e165c3:not([data-disabled]):hover{background-color:var(--mantine-color-dark-4)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_fa109255:not([data-disabled]):active,:where([data-mantine-color-scheme=light]) .m_f7e165c3:not([data-disabled]):active{background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_fa109255:not([data-disabled]):active,:where([data-mantine-color-scheme=dark]) .m_f7e165c3:not([data-disabled]):active{background-color:var(--mantine-color-dark-4)}}.m_fa109255:not([data-disabled]):where([data-checked]),.m_f7e165c3:not([data-disabled]):where([data-checked]){--chip-icon-color:var(--chip-color);color:var(--chip-color);background-color:var(--chip-bg)}@media (hover:hover){.m_fa109255:not([data-disabled]):where([data-checked]):hover,.m_f7e165c3:not([data-disabled]):where([data-checked]):hover{background-color:var(--chip-hover)}}@media (hover:none){.m_fa109255:not([data-disabled]):where([data-checked]):active,.m_f7e165c3:not([data-disabled]):where([data-checked]):active{background-color:var(--chip-hover)}}.m_9ac86df9{width:calc(var(--chip-icon-size) + (var(--chip-spacing) / 1.5));max-width:calc(var(--chip-icon-size) + (var(--chip-spacing) / 1.5));height:var(--chip-icon-size);align-items:center;display:flex;overflow:hidden}.m_d6d72580{width:var(--chip-icon-size);height:var(--chip-icon-size);color:var(--chip-icon-color,inherit);display:block}.m_bde07329{opacity:0;width:0;height:0;margin:0;padding:0}.m_bde07329:focus-visible+.m_be049a53{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_b183c0a2{font-family:var(--mantine-font-family-monospace);line-height:var(--mantine-line-height);padding:2px calc(var(--mantine-spacing-xs) / 2);border-radius:var(--mantine-radius-sm);font-size:var(--mantine-font-size-xs);margin:0;overflow:auto}:where([data-mantine-color-scheme=light]) .m_b183c0a2{background-color:var(--code-bg,var(--mantine-color-gray-0))}:where([data-mantine-color-scheme=dark]) .m_b183c0a2{background-color:var(--code-bg,var(--mantine-color-dark-6))}.m_b183c0a2[data-block]{padding:var(--mantine-spacing-xs)}.m_de3d2490{--cs-size:calc(1.75rem * var(--mantine-scale));--cs-radius:calc(62.5rem * var(--mantine-scale));-webkit-tap-highlight-color:transparent;appearance:none;width:var(--cs-size);height:var(--cs-size);min-width:var(--cs-size);min-height:var(--cs-size);border-radius:var(--cs-radius);color:inherit;border:none;line-height:1;text-decoration:none;display:block;position:relative}[data-mantine-color-scheme=light] .m_de3d2490{--alpha-overlay-color:var(--mantine-color-gray-3);--alpha-overlay-bg:var(--mantine-color-white)}[data-mantine-color-scheme=dark] .m_de3d2490{--alpha-overlay-color:var(--mantine-color-dark-4);--alpha-overlay-bg:var(--mantine-color-dark-7)}.m_862f3d1b{border-radius:var(--cs-radius);position:absolute;inset:0}.m_98ae7f22{border-radius:var(--cs-radius);z-index:1;box-shadow:#0000001a 0 0 0 calc(.0625rem * var(--mantine-scale)) inset, #00000026 0 0 calc(.25rem * var(--mantine-scale)) inset;position:absolute;inset:0}.m_95709ac0{border-radius:var(--cs-radius);background-size:calc(.5rem * var(--mantine-scale)) calc(.5rem * var(--mantine-scale));background-position:0 0, 0 calc(.25rem * var(--mantine-scale)), calc(.25rem * var(--mantine-scale)) calc(-.25rem * var(--mantine-scale)), calc(-.25rem * var(--mantine-scale)) 0;background-image:linear-gradient(45deg, var(--alpha-overlay-color) 25%, transparent 25%), linear-gradient(-45deg, var(--alpha-overlay-color) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--alpha-overlay-color) 75%), linear-gradient(-45deg, var(--alpha-overlay-bg) 75%, var(--alpha-overlay-color) 75%);position:absolute;inset:0}.m_93e74e3{border-radius:var(--cs-radius);z-index:2;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.m_fee9c77{--cp-width-xs:calc(11.25rem * var(--mantine-scale));--cp-width-sm:calc(12.5rem * var(--mantine-scale));--cp-width-md:calc(15rem * var(--mantine-scale));--cp-width-lg:calc(17.5rem * var(--mantine-scale));--cp-width-xl:calc(20rem * var(--mantine-scale));--cp-preview-size-xs:calc(1.625rem * var(--mantine-scale));--cp-preview-size-sm:calc(2.125rem * var(--mantine-scale));--cp-preview-size-md:calc(2.625rem * var(--mantine-scale));--cp-preview-size-lg:calc(3.125rem * var(--mantine-scale));--cp-preview-size-xl:calc(3.375rem * var(--mantine-scale));--cp-thumb-size-xs:calc(.5rem * var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem * var(--mantine-scale));--cp-thumb-size-md:calc(1rem * var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem * var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem * var(--mantine-scale));--cp-saturation-height-xs:calc(6.25rem * var(--mantine-scale));--cp-saturation-height-sm:calc(6.875rem * var(--mantine-scale));--cp-saturation-height-md:calc(7.5rem * var(--mantine-scale));--cp-saturation-height-lg:calc(8.75rem * var(--mantine-scale));--cp-saturation-height-xl:calc(10rem * var(--mantine-scale));--cp-preview-size:var(--cp-preview-size-sm);--cp-thumb-size:var(--cp-thumb-size-sm);--cp-saturation-height:var(--cp-saturation-height-sm);--cp-width:var(--cp-width-sm);--cp-body-spacing:var(--mantine-spacing-sm);width:var(--cp-width);padding:calc(.0625rem * var(--mantine-scale))}.m_fee9c77:where([data-full-width]){width:100%}.m_9dddfbac{width:var(--cp-preview-size);height:var(--cp-preview-size)}.m_bffecc3e{padding-top:calc(var(--cp-body-spacing) / 2);display:flex}.m_3283bb96{flex:1}.m_3283bb96:not(:only-child){margin-inline-end:var(--mantine-spacing-xs)}.m_40d572ba{border:2px solid var(--mantine-color-white);width:var(--cp-thumb-size);height:var(--cp-thumb-size);border-radius:var(--cp-thumb-size);left:calc(var(--thumb-x-offset) - var(--cp-thumb-size) / 2);top:calc(var(--thumb-y-offset) - var(--cp-thumb-size) / 2);position:absolute;overflow:hidden;box-shadow:0 0 1px #0009}.m_d8ee6fd8{margin:calc(.125rem * var(--mantine-scale));cursor:pointer;padding-bottom:calc(var(--cp-swatch-size) - calc(.25rem * var(--mantine-scale)));flex:0 0 calc(var(--cp-swatch-size) - calc(.25rem * var(--mantine-scale)));height:unset!important;width:unset!important;min-width:0!important;min-height:0!important}.m_5711e686{margin-top:calc(.3125rem * var(--mantine-scale));margin-inline:calc(-.125rem * var(--mantine-scale));flex-wrap:wrap;display:flex}.m_5711e686:only-child{margin-top:0}.m_202a296e{--cp-thumb-size-xs:calc(.5rem * var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem * var(--mantine-scale));--cp-thumb-size-md:calc(1rem * var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem * var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem * var(--mantine-scale));-webkit-tap-highlight-color:transparent;height:var(--cp-saturation-height);border-radius:var(--mantine-radius-sm);margin:calc(var(--cp-thumb-size) / 2);position:relative}.m_202a296e:where([data-focus-ring=auto]):focus:focus-visible .m_40d572ba,.m_202a296e:where([data-focus-ring=always]):focus .m_40d572ba{outline:2px solid var(--mantine-color-blue-filled)}.m_11b3db02{border-radius:var(--mantine-radius-sm);inset:calc(var(--cp-thumb-size) * -1 / 2 - calc(.0625rem * var(--mantine-scale)));position:absolute}.m_d856d47d{--cp-thumb-size-xs:calc(.5rem * var(--mantine-scale));--cp-thumb-size-sm:calc(.75rem * var(--mantine-scale));--cp-thumb-size-md:calc(1rem * var(--mantine-scale));--cp-thumb-size-lg:calc(1.25rem * var(--mantine-scale));--cp-thumb-size-xl:calc(1.375rem * var(--mantine-scale));--cp-thumb-size:var(--cp-thumb-size,calc(.75rem * var(--mantine-scale)));height:calc(var(--cp-thumb-size) + calc(.125rem * var(--mantine-scale)));margin-inline:calc(var(--cp-thumb-size) / 2);outline:none;position:relative}.m_d856d47d+.m_d856d47d{margin-top:calc(.375rem * var(--mantine-scale))}.m_d856d47d:where([data-focus-ring=auto]):focus:focus-visible .m_40d572ba,.m_d856d47d:where([data-focus-ring=always]):focus .m_40d572ba{outline:2px solid var(--mantine-color-blue-filled)}:where([data-mantine-color-scheme=light]) .m_d856d47d{--slider-checkers:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_d856d47d{--slider-checkers:var(--mantine-color-dark-4)}.m_8f327113{top:0;bottom:0;inset-inline:calc(var(--cp-thumb-size) * -1 / 2 - calc(.0625rem * var(--mantine-scale)));border-radius:10000rem;position:absolute}.m_b077c2bc{--ci-eye-dropper-icon-size-xs:calc(.875rem * var(--mantine-scale));--ci-eye-dropper-icon-size-sm:calc(1rem * var(--mantine-scale));--ci-eye-dropper-icon-size-md:calc(1.125rem * var(--mantine-scale));--ci-eye-dropper-icon-size-lg:calc(1.25rem * var(--mantine-scale));--ci-eye-dropper-icon-size-xl:calc(1.375rem * var(--mantine-scale));--ci-eye-dropper-icon-size:var(--ci-eye-dropper-icon-size-sm)}.m_66a028b5{--ci-button-size-xs:calc(1.375rem * var(--mantine-scale));--ci-button-size-sm:calc(1.625rem * var(--mantine-scale));--ci-button-size-md:calc(1.75rem * var(--mantine-scale));--ci-button-size-lg:calc(2rem * var(--mantine-scale));--ci-button-size-xl:calc(2.5rem * var(--mantine-scale));--ci-button-size:var(--ci-button-size-sm);width:var(--ci-button-size);height:var(--ci-button-size);min-width:var(--ci-button-size);min-height:var(--ci-button-size)}.m_c5ccdcab{--ci-preview-size-xs:calc(1rem * var(--mantine-scale));--ci-preview-size-sm:calc(1.125rem * var(--mantine-scale));--ci-preview-size-md:calc(1.375rem * var(--mantine-scale));--ci-preview-size-lg:calc(1.75rem * var(--mantine-scale));--ci-preview-size-xl:calc(2.25rem * var(--mantine-scale));--ci-preview-size:var(--ci-preview-size-sm)}.m_5ece2cd7{padding:calc(.5rem * var(--mantine-scale))}.m_7485cace{--container-size-xs:calc(33.75rem * var(--mantine-scale));--container-size-sm:calc(45rem * var(--mantine-scale));--container-size-md:calc(60rem * var(--mantine-scale));--container-size-lg:calc(71.25rem * var(--mantine-scale));--container-size-xl:calc(82.5rem * var(--mantine-scale));--container-size:var(--container-size-md)}.m_7485cace:where([data-strategy=block]){max-width:var(--container-size);padding-inline:var(--mantine-spacing-md);margin-inline:auto}.m_7485cace:where([data-strategy=block]):where([data-fluid]){max-width:100%}.m_7485cace:where([data-strategy=grid]){grid-template-columns:1fr min(100%, var(--container-size)) 1fr;margin-inline:auto;display:grid}.m_7485cace:where([data-strategy=grid])>*{grid-column:2}.m_7485cace:where([data-strategy=grid])>[data-breakout]{grid-column:1/-1}.m_7485cace:where([data-strategy=grid])>[data-breakout]>[data-container]{max-width:var(--container-size);margin-inline:auto}.m_f84d0407{--data-list-fz:var(--mantine-font-size-sm);--data-list-lh:var(--mantine-line-height-sm);--data-list-gap:var(--mantine-spacing-sm);--data-list-label-width:calc(7.5rem * var(--mantine-scale));gap:var(--data-list-gap);font-size:var(--data-list-fz);line-height:var(--data-list-lh);flex-direction:column;margin:0;padding:0;display:flex}.m_f84d0407:where([data-with-divider]){gap:0}.m_f848fe38{align-items:baseline;gap:var(--mantine-spacing-xs);flex-direction:row;display:flex}.m_f84d0407:where([data-orientation=vertical])>.m_f848fe38{flex-direction:column;gap:0}.m_c791b39c{color:var(--mantine-color-dimmed);font-size:var(--data-list-fz);line-height:var(--data-list-lh);min-width:var(--data-list-label-width);margin:0}.m_f84d0407:where([data-orientation=vertical]) .m_c791b39c{min-width:100%}.m_c81ec619{font-size:var(--data-list-fz);line-height:var(--data-list-lh);margin:0}.m_f84d0407:where([data-with-divider])>.m_f848fe38:where(:not(:first-of-type)){border-top:calc(.0625rem * var(--mantine-scale)) solid var(--mantine-color-default-border);padding-top:var(--data-list-gap);margin-top:var(--data-list-gap)}.m_e2125a27{--dialog-size-xs:calc(10rem * var(--mantine-scale));--dialog-size-sm:calc(12.5rem * var(--mantine-scale));--dialog-size-md:calc(21.25rem * var(--mantine-scale));--dialog-size-lg:calc(25rem * var(--mantine-scale));--dialog-size-xl:calc(31.25rem * var(--mantine-scale));--dialog-size:var(--dialog-size-md);width:var(--dialog-size);max-width:calc(100vw - var(--mantine-spacing-xl) * 2);min-height:calc(3.125rem * var(--mantine-scale));position:relative}.m_5abab665{top:calc(var(--mantine-spacing-md) / 2);position:absolute;inset-inline-end:calc(var(--mantine-spacing-md) / 2)}.m_3eebeb36{--divider-size-xs:calc(.0625rem * var(--mantine-scale));--divider-size-sm:calc(.125rem * var(--mantine-scale));--divider-size-md:calc(.1875rem * var(--mantine-scale));--divider-size-lg:calc(.25rem * var(--mantine-scale));--divider-size-xl:calc(.3125rem * var(--mantine-scale));--divider-size:var(--divider-size-xs)}:where([data-mantine-color-scheme=light]) .m_3eebeb36{--divider-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_3eebeb36{--divider-color:var(--mantine-color-dark-4)}.m_3eebeb36:where([data-orientation=horizontal]){border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color)}.m_3eebeb36:where([data-orientation=vertical]){border-inline-start:var(--divider-size) var(--divider-border-style,solid) var(--divider-color);align-self:stretch;height:auto}.m_3eebeb36:where([data-with-label]){border:0}.m_9e365f20{font-size:var(--mantine-font-size-xs);color:var(--mantine-color-dimmed);white-space:nowrap;align-items:center;display:flex}.m_9e365f20:where([data-position=left]):before,.m_9e365f20:where([data-position=right]):after{display:none}.m_9e365f20:before{content:"";height:calc(.0625rem * var(--mantine-scale));border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color);flex:1;margin-inline-end:var(--mantine-spacing-xs)}.m_9e365f20:after{content:"";height:calc(.0625rem * var(--mantine-scale));border-top:var(--divider-size) var(--divider-border-style,solid) var(--divider-color);flex:1;margin-inline-start:var(--mantine-spacing-xs)}.m_f11b401e{--drawer-size-xs:calc(20rem * var(--mantine-scale));--drawer-size-sm:calc(23.75rem * var(--mantine-scale));--drawer-size-md:calc(27.5rem * var(--mantine-scale));--drawer-size-lg:calc(38.75rem * var(--mantine-scale));--drawer-size-xl:calc(48.75rem * var(--mantine-scale));--drawer-size:var(--drawer-size-md);--drawer-offset:0rem}.m_5a7c2c9{z-index:1000}.m_b8a05bbd{flex:var(--drawer-flex,0 0 var(--drawer-size));height:var(--drawer-height,calc(100% - var(--drawer-offset) * 2));margin:var(--drawer-offset);max-width:calc(100% - var(--drawer-offset) * 2);max-height:calc(100% - var(--drawer-offset) * 2);overflow-y:auto}.m_b8a05bbd[data-hidden]{pointer-events:none;opacity:0!important}.m_31cd769a{justify-content:var(--drawer-justify,flex-start);align-items:var(--drawer-align,flex-start);display:flex}.m_7ffcadab{--empty-state-indicator-size-xs:calc(2rem * var(--mantine-scale));--empty-state-indicator-size-sm:calc(2.5rem * var(--mantine-scale));--empty-state-indicator-size-md:calc(3rem * var(--mantine-scale));--empty-state-indicator-size-lg:calc(3.75rem * var(--mantine-scale));--empty-state-indicator-size-xl:calc(4.5rem * var(--mantine-scale));--empty-state-gap-xs:calc(.375rem * var(--mantine-scale));--empty-state-gap-sm:calc(.5rem * var(--mantine-scale));--empty-state-gap-md:calc(.625rem * var(--mantine-scale));--empty-state-gap-lg:calc(.75rem * var(--mantine-scale));--empty-state-gap-xl:calc(1rem * var(--mantine-scale));--empty-state-title-fz-xs:var(--mantine-font-size-sm);--empty-state-title-fz-sm:var(--mantine-font-size-md);--empty-state-title-fz-md:var(--mantine-font-size-lg);--empty-state-title-fz-lg:var(--mantine-font-size-xl);--empty-state-title-fz-xl:calc(var(--mantine-font-size-xl) * 1.2);--empty-state-description-fz-xs:var(--mantine-font-size-xs);--empty-state-description-fz-sm:var(--mantine-font-size-sm);--empty-state-description-fz-md:var(--mantine-font-size-sm);--empty-state-description-fz-lg:var(--mantine-font-size-md);--empty-state-description-fz-xl:var(--mantine-font-size-lg);gap:var(--empty-state-gap,var(--empty-state-gap-md));display:flex}.m_7ffcadab[data-align=center]{flex-direction:column;align-items:center}.m_7ffcadab[data-align=left]{flex-direction:row;align-items:flex-start}.m_7ffcadab[data-align=right]{flex-direction:row-reverse;align-items:flex-start}.m_7ff5666b{gap:var(--empty-state-gap,var(--empty-state-gap-md));flex-direction:column;min-width:0;display:flex}[data-align=center]>.m_7ff5666b{text-align:center;align-items:center}[data-align=left]>.m_7ff5666b{text-align:left;align-items:flex-start}[data-align=right]>.m_7ff5666b{text-align:right;align-items:flex-end}.m_866226e6{color:var(--empty-state-indicator-color,var(--mantine-color-dimmed));font-size:var(--empty-state-indicator-size,var(--empty-state-indicator-size-md));flex-shrink:0;justify-content:center;align-items:center;line-height:1;display:flex}.m_866226e6>svg{width:1em;height:1em}[data-mantine-color-scheme=light] .m_866226e6[data-with-background]{--empty-state-indicator-default-bg:var(--mantine-color-gray-1)}[data-mantine-color-scheme=dark] .m_866226e6[data-with-background]{--empty-state-indicator-default-bg:var(--mantine-color-dark-6)}.m_866226e6[data-with-background]{border-radius:calc(62.5rem * var(--mantine-scale));background-color:var(--empty-state-indicator-bg,var(--empty-state-indicator-default-bg));width:2em;height:2em}.m_7fb28eaf{font-size:var(--empty-state-title-fz,var(--empty-state-title-fz-md));color:var(--mantine-color-bright);text-wrap:balance;margin:0;font-weight:600;line-height:1.3}.m_5f111313{font-size:var(--empty-state-description-fz,var(--empty-state-description-fz-md));color:var(--mantine-color-dimmed);text-wrap:pretty;max-width:32rem;margin:0;line-height:1.55}.m_65f4fb94{align-items:center;gap:var(--mantine-spacing-sm);flex-wrap:wrap;display:flex}.m_e9408a47{padding:var(--mantine-spacing-lg);padding-top:var(--mantine-spacing-xs);border-radius:var(--fieldset-radius,var(--mantine-radius-default));min-inline-size:auto}.m_84c9523a{border:calc(.0625rem * var(--mantine-scale)) solid}:where([data-mantine-color-scheme=light]) .m_84c9523a{border-color:var(--mantine-color-gray-3);background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_84c9523a{border-color:var(--mantine-color-dark-4);background-color:var(--mantine-color-dark-7)}.m_ef274e49{border:calc(.0625rem * var(--mantine-scale)) solid}:where([data-mantine-color-scheme=light]) .m_ef274e49{border-color:var(--mantine-color-gray-3);background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_ef274e49{border-color:var(--mantine-color-dark-4);background-color:var(--mantine-color-dark-6)}.m_eda993d3{border:0;border-radius:0;padding:0}.m_90794832{font-size:var(--mantine-font-size-sm)}.m_74ca27fe{margin-bottom:var(--mantine-spacing-sm);padding:0}.m_df020499{z-index:var(--floating-window-z-index);width:var(--floating-window-width,auto);height:var(--floating-window-height,auto);position:fixed}.m_8478a6da{container:mantine-grid/inline-size}.m_410352e9{--grid-overflow:visible;--grid-column-gap:var(--grid-gap);--grid-row-gap:var(--grid-gap);overflow:var(--grid-overflow)}.m_dee7bd2f{justify-content:var(--grid-justify);align-items:var(--grid-align);gap:var(--grid-row-gap) var(--grid-column-gap);flex-wrap:wrap;display:flex}.m_96bdd299{--col-flex-grow:0;--col-offset:0rem;flex-shrink:0;order:var(--col-order);flex-basis:var(--col-flex-basis);width:var(--col-width);max-width:var(--col-max-width);flex-grow:var(--col-flex-grow);align-self:var(--col-align-self);margin-inline-start:var(--col-offset)}.m_bcb3f3c2{color:var(--mantine-color-black)}:where([data-mantine-color-scheme=light]) .m_bcb3f3c2{background-color:var(--mark-bg-light)}:where([data-mantine-color-scheme=dark]) .m_bcb3f3c2{background-color:var(--mark-bg-dark)}.m_9e117634{object-fit:var(--image-object-fit,cover);border-radius:var(--image-radius,0);width:100%;display:block}@keyframes m_885901b1{0%{opacity:.6;transform:scale(0)}to{opacity:0;transform:scale(2.8)}}.m_e5262200{--indicator-size:calc(.625rem * var(--mantine-scale));--indicator-color:var(--mantine-primary-color-filled);display:block;position:relative}.m_e5262200:where([data-inline]){display:inline-block}.m_760d1fb1{top:var(--indicator-top);left:var(--indicator-left);right:var(--indicator-right);bottom:var(--indicator-bottom);transform:translate(var(--indicator-translate-x), var(--indicator-translate-y));min-width:var(--indicator-size);height:var(--indicator-size);border-radius:var(--indicator-radius,1000rem);z-index:var(--indicator-z-index,200);font-size:var(--mantine-font-size-xs);background-color:var(--indicator-color);color:var(--indicator-text-color,var(--mantine-color-white));white-space:nowrap;justify-content:center;align-items:center;display:flex;position:absolute}.m_760d1fb1:before{content:"";background-color:var(--indicator-color);border-radius:var(--indicator-radius,1000rem);z-index:-1;position:absolute;inset:0}.m_760d1fb1:where([data-with-label]){padding-inline:calc(var(--mantine-spacing-xs) / 2)}.m_760d1fb1:where([data-with-border]){border:2px solid var(--mantine-color-body)}.m_760d1fb1[data-processing]:before{animation:1s linear infinite m_885901b1}.m_dc6f14e2{--kbd-fz-xs:calc(.625rem * var(--mantine-scale));--kbd-fz-sm:calc(.75rem * var(--mantine-scale));--kbd-fz-md:calc(.875rem * var(--mantine-scale));--kbd-fz-lg:calc(1rem * var(--mantine-scale));--kbd-fz-xl:calc(1.25rem * var(--mantine-scale));--kbd-fz:var(--kbd-fz-sm);font-family:var(--mantine-font-family-monospace);line-height:var(--mantine-line-height);font-weight:var(--mantine-font-weight-bold);font-size:var(--kbd-fz);border-radius:var(--mantine-radius-sm);border:calc(.0625rem * var(--mantine-scale)) solid;border-bottom-width:calc(.1875rem * var(--mantine-scale));text-align:center;unicode-bidi:embed;padding:.12em .45em}:where([data-mantine-color-scheme=light]) .m_dc6f14e2{border-color:var(--mantine-color-gray-3);color:var(--mantine-color-gray-7);background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_dc6f14e2{border-color:var(--mantine-color-dark-4);color:var(--mantine-color-dark-0);background-color:var(--mantine-color-dark-6)}.m_abbac491{--list-fz:var(--mantine-font-size-md);--list-lh:var(--mantine-line-height-md);--list-marker-gap:var(--mantine-spacing-lg);font-size:var(--list-fz);line-height:var(--list-lh);margin:0;padding:0;padding-inline-start:var(--list-marker-gap);list-style-position:outside}.m_abbac491[data-type=none]{--list-marker-gap:0}.m_abbac491:where([data-with-padding]){padding-inline-start:calc(var(--list-marker-gap) + var(--mantine-spacing-md))}.m_abb6bec2{white-space:normal;line-height:var(--list-lh)}.m_abb6bec2:where([data-with-icon]){list-style:none}.m_abb6bec2:where([data-with-icon]) .m_75cd9f71{--li-direction:row;--li-align:center}.m_abb6bec2:where(:not(:first-of-type)){margin-top:var(--list-spacing,0)}.m_abb6bec2:where([data-centered]){line-height:1}.m_75cd9f71{flex-direction:var(--li-direction,column);align-items:var(--li-align,flex-start);white-space:normal;display:inline-flex}.m_60f83e5b{vertical-align:middle;margin-inline-end:var(--mantine-spacing-sm);display:inline-block}.m_6e45937b{z-index:var(--lo-z-index);justify-content:center;align-items:center;display:flex;position:absolute;inset:0;overflow:hidden}.m_e8eb006c{z-index:calc(var(--lo-z-index) + 1);position:relative}.m_df587f17{z-index:var(--lo-z-index)}@keyframes m_55dc625a{0%{transform:translate(0)}to{transform:translateX(calc(-100% / var(--marquee-repeat,4) - var(--marquee-gap,var(--mantine-spacing-md)) / var(--marquee-repeat,4)))}}@keyframes m_cdef532c{0%{transform:translateY(0)}to{transform:translateY(calc(-100% / var(--marquee-repeat,4) - var(--marquee-gap,var(--mantine-spacing-md)) / var(--marquee-repeat,4)))}}.m_7dc7d3cd{--_fade-color:var(--marquee-fade-color,var(--mantine-color-body));--_fade-size:var(--marquee-fade-size,5%);max-width:100%;max-height:100%;display:flex;position:relative;overflow:hidden}.m_7dc7d3cd:where([data-orientation=horizontal]){flex-direction:row}.m_7dc7d3cd:where([data-orientation=vertical]){flex-direction:column}.m_7dc7d3cd[data-fade-edges]:before,.m_7dc7d3cd[data-fade-edges]:after{content:"";z-index:1;pointer-events:none;position:absolute}.m_7dc7d3cd[data-orientation=horizontal][data-fade-edges]:before,.m_7dc7d3cd[data-orientation=horizontal][data-fade-edges]:after{width:var(--_fade-size);top:0;bottom:0}.m_7dc7d3cd[data-orientation=horizontal][data-fade-edges]:before{background:linear-gradient(to right, var(--_fade-color), transparent);left:0}.m_7dc7d3cd[data-orientation=horizontal][data-fade-edges]:after{background:linear-gradient(to left, var(--_fade-color), transparent);right:0}.m_7dc7d3cd[data-orientation=vertical][data-fade-edges]:before,.m_7dc7d3cd[data-orientation=vertical][data-fade-edges]:after{height:var(--_fade-size);left:0;right:0}.m_7dc7d3cd[data-orientation=vertical][data-fade-edges]:before{background:linear-gradient(to bottom, var(--_fade-color), transparent);top:0}.m_7dc7d3cd[data-orientation=vertical][data-fade-edges]:after{background:linear-gradient(to top, var(--_fade-color), transparent);bottom:0}.m_1f9675ae{gap:var(--marquee-gap,var(--mantine-spacing-md));animation-duration:var(--marquee-duration,40s);animation-timing-function:linear;animation-iteration-count:infinite;display:flex}.m_7dc7d3cd[data-orientation=horizontal]>.m_1f9675ae{flex-direction:row;animation-name:m_55dc625a}.m_7dc7d3cd[data-orientation=vertical]>.m_1f9675ae{flex-direction:column;animation-name:m_cdef532c}.m_7dc7d3cd[data-reverse]>.m_1f9675ae{animation-direction:reverse}.m_7dc7d3cd[data-pause-on-hover]:hover>.m_1f9675ae{animation-play-state:paused}.m_3a9900f4{gap:var(--marquee-gap,var(--mantine-spacing-md));flex-shrink:0;display:flex}.m_7dc7d3cd[data-orientation=horizontal] .m_3a9900f4{flex-direction:row}.m_7dc7d3cd[data-orientation=vertical] .m_3a9900f4{flex-direction:column}.m_dc9b7c9f{padding:calc(.25rem * var(--mantine-scale))}.m_9bfac126{color:var(--mantine-color-dimmed);font-weight:var(--mantine-font-weight-medium);font-size:var(--mantine-font-size-xs);padding:calc(var(--mantine-spacing-xs) / 2) var(--mantine-spacing-sm);cursor:default}.m_efdf90cb{margin-top:calc(.25rem * var(--mantine-scale));margin-bottom:calc(.25rem * var(--mantine-scale));border-top:calc(.0625rem * var(--mantine-scale)) solid}:where([data-mantine-color-scheme=light]) .m_efdf90cb{border-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_efdf90cb{border-color:var(--mantine-color-dark-4)}.m_99ac2aa1{font-size:var(--mantine-font-size-sm);width:100%;padding:calc(var(--mantine-spacing-xs) / 1.5) var(--mantine-spacing-sm);border-radius:var(--popover-radius,var(--mantine-radius-default));color:var(--menu-item-color,var(--mantine-color-text));-webkit-user-select:none;user-select:none;align-items:center;display:flex}.m_99ac2aa1:where([data-disabled],:disabled){color:var(--mantine-color-disabled-color);opacity:.6;cursor:not-allowed}:where([data-mantine-color-scheme=light]) .m_99ac2aa1:where(:hover,:focus,[data-menu-active]):where(:not(:disabled,[data-disabled])){background-color:var(--menu-item-hover,var(--mantine-color-gray-1))}:where([data-mantine-color-scheme=dark]) .m_99ac2aa1:where(:hover,:focus,[data-menu-active]):where(:not(:disabled,[data-disabled])){background-color:var(--menu-item-hover,var(--mantine-color-dark-4))}.m_99ac2aa1:where([data-sub-menu-item]){padding-inline-end:calc(.3125rem * var(--mantine-scale))}.m_ef8769b6{--menu-search-padding:var(--popover-padding,4px);margin-inline:calc(var(--menu-search-padding) * -1);margin-top:calc(var(--menu-search-padding) * -1);width:calc(100% + var(--menu-search-padding) * 2);border-top-width:0;margin-bottom:var(--menu-search-padding);border-inline-width:0;border-end-end-radius:0;border-end-start-radius:0}:where([data-mantine-color-scheme=light]) .m_ef8769b6,:where([data-mantine-color-scheme=light]) .m_ef8769b6:focus{border-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_ef8769b6,:where([data-mantine-color-scheme=dark]) .m_ef8769b6:focus{border-color:var(--mantine-color-dark-4)}:where([data-mantine-color-scheme=light]) .m_ef8769b6{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_ef8769b6{background-color:var(--mantine-color-dark-7)}.m_5476e0d3{flex:1}.m_8395186e{width:calc(.75rem * var(--mantine-scale));height:calc(.75rem * var(--mantine-scale));flex-shrink:0;justify-content:center;align-items:center;margin-inline-end:calc(.5rem * var(--mantine-scale));display:inline-flex}.m_8b75e504{justify-content:center;align-items:center;display:flex}.m_8b75e504:where([data-position=left]){margin-inline-end:var(--mantine-spacing-xs)}.m_8b75e504:where([data-position=right]){margin-inline-start:var(--mantine-spacing-xs)}.m_b85b0bed{transform:rotate(-90deg)}:where([dir=rtl]) .m_b85b0bed{transform:rotate(90deg)}.m_de2654db{align-items:center;display:flex}.m_f08a2b4a{font-size:var(--mantine-font-size-sm);padding:calc(var(--mantine-spacing-xs) / 1.5) var(--mantine-spacing-sm);border-radius:var(--mantine-radius-default);color:var(--mantine-color-text);-webkit-user-select:none;user-select:none;cursor:pointer;background-color:#0000;line-height:1}.m_f08a2b4a:where([data-disabled],:disabled){color:var(--mantine-color-disabled-color);opacity:.6;cursor:not-allowed}:where([data-mantine-color-scheme=light]) .m_f08a2b4a:where(:hover,:focus-visible,[data-expanded]):where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_f08a2b4a:where(:hover,:focus-visible,[data-expanded]):where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-dark-5)}.m_9df02822{--modal-size-xs:calc(20rem * var(--mantine-scale));--modal-size-sm:calc(23.75rem * var(--mantine-scale));--modal-size-md:calc(27.5rem * var(--mantine-scale));--modal-size-lg:calc(38.75rem * var(--mantine-scale));--modal-size-xl:calc(48.75rem * var(--mantine-scale));--modal-size:var(--modal-size-md);--modal-y-offset:5dvh;--modal-x-offset:5vw}.m_9df02822[data-full-screen]{--modal-border-radius:0!important}.m_9df02822[data-full-screen] .m_54c44539{--modal-content-flex:0 0 100%;--modal-content-max-height:auto;--modal-content-height:100dvh}.m_9df02822[data-full-screen] .m_1f958f16{--modal-inner-y-offset:0;--modal-inner-x-offset:0}.m_9df02822[data-centered] .m_1f958f16{--modal-inner-align:center}.m_d0e2b9cd{border-start-start-radius:var(--modal-radius,var(--mantine-radius-default));border-start-end-radius:var(--modal-radius,var(--mantine-radius-default))}.m_54c44539{flex:var(--modal-content-flex,0 0 var(--modal-size));max-width:100%;max-height:var(--modal-content-max-height,calc(100dvh - var(--modal-y-offset) * 2));height:var(--modal-content-height,auto);overflow-y:auto}.m_54c44539[data-full-screen]{border-radius:0}.m_54c44539[data-hidden]{pointer-events:none;opacity:0!important}.m_1f958f16{justify-content:center;align-items:var(--modal-inner-align,flex-start);padding-top:var(--modal-inner-y-offset,var(--modal-y-offset));padding-bottom:var(--modal-inner-y-offset,var(--modal-y-offset));padding-inline:var(--modal-inner-x-offset,var(--modal-x-offset));display:flex}.m_7cda1cd6{--pill-fz-xs:calc(.625rem * var(--mantine-scale));--pill-fz-sm:calc(.75rem * var(--mantine-scale));--pill-fz-md:calc(.875rem * var(--mantine-scale));--pill-fz-lg:calc(1rem * var(--mantine-scale));--pill-fz-xl:calc(1.125rem * var(--mantine-scale));--pill-height-xs:calc(1.125rem * var(--mantine-scale));--pill-height-sm:calc(1.375rem * var(--mantine-scale));--pill-height-md:calc(1.5625rem * var(--mantine-scale));--pill-height-lg:calc(1.75rem * var(--mantine-scale));--pill-height-xl:calc(2rem * var(--mantine-scale));--pill-fz:var(--pill-fz-sm);--pill-height:var(--pill-height-sm);font-size:var(--pill-fz);height:var(--pill-height);border-radius:var(--pill-radius,1000rem);white-space:nowrap;-webkit-user-select:none;user-select:none;flex:0;align-items:center;max-width:100%;padding-inline:.8em;line-height:1;display:inline-flex;position:relative}:where([data-mantine-color-scheme=dark]) .m_7cda1cd6{background-color:var(--mantine-color-dark-7);color:var(--mantine-color-dark-0)}:where([data-mantine-color-scheme=light]) .m_7cda1cd6{color:var(--mantine-color-black)}.m_7cda1cd6:where([data-with-remove]:not(:has(button:disabled))){padding-inline-end:0}.m_7cda1cd6:where([data-disabled],:has(button:disabled)){cursor:not-allowed}.m_7cda1cd6:where([draggable=true]){cursor:grab}.m_7cda1cd6:where([draggable=true]):focus-visible{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_7cda1cd6:where([data-dragging]){opacity:.4;cursor:grabbing}.m_7cda1cd6:where([data-drag-over=before]):before,.m_7cda1cd6:where([data-drag-over=after]):after{content:"";width:calc(.125rem * var(--mantine-scale));background-color:var(--mantine-primary-color-filled);pointer-events:none;z-index:1;position:absolute;top:0;bottom:0}.m_7cda1cd6:where([data-drag-over=before]):before{inset-inline-start:calc(-.25rem * var(--mantine-scale))}.m_7cda1cd6:where([data-drag-over=after]):after{inset-inline-end:calc(-.25rem * var(--mantine-scale))}:where([data-mantine-color-scheme=light]) .m_44da308b{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=light]) .m_44da308b:where([data-disabled],:has(button:disabled)){background-color:var(--mantine-color-disabled)}:where([data-mantine-color-scheme=light]) .m_e3a01f8{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=light]) .m_e3a01f8:where([data-disabled],:has(button:disabled)){background-color:var(--mantine-color-disabled)}.m_1e0e6180{cursor:inherit;height:100%;line-height:var(--pill-height);text-overflow:ellipsis;display:block;overflow:hidden}.m_ae386778{color:inherit;font-size:inherit;height:100%;min-height:unset;min-width:2em;width:unset;border-radius:0;border-start-end-radius:var(--pill-radius,50%);border-end-end-radius:var(--pill-radius,50%);flex:0;padding-inline:.1em .3em}.m_7cda1cd6[data-disabled]>.m_ae386778,.m_ae386778:disabled{cursor:not-allowed;background-color:#0000;width:.8em;min-width:.8em;padding:0;display:none}.m_7cda1cd6[data-disabled]>.m_ae386778>svg,.m_ae386778:disabled>svg{display:none}.m_ae386778>svg{pointer-events:none}.m_1dcfd90b{--pg-gap-xs:calc(.375rem * var(--mantine-scale));--pg-gap-sm:calc(.5rem * var(--mantine-scale));--pg-gap-md:calc(.625rem * var(--mantine-scale));--pg-gap-lg:calc(.75rem * var(--mantine-scale));--pg-gap-xl:calc(.75rem * var(--mantine-scale));--pg-gap:var(--pg-gap-sm);align-items:center;gap:var(--pg-gap);flex-wrap:wrap;display:flex}.m_45c4369d{appearance:none;min-width:calc(6.25rem * var(--mantine-scale));font-size:inherit;height:1.6em;color:inherit;background-color:#0000;border:0;flex:1;padding:0}.m_45c4369d::placeholder{color:var(--input-placeholder-color);opacity:1}.m_45c4369d:where([data-type=hidden],[data-type=auto]){height:calc(.0625rem * var(--mantine-scale));width:calc(.0625rem * var(--mantine-scale));pointer-events:none;opacity:0;position:absolute;top:0;left:0}.m_45c4369d:focus{outline:none}.m_45c4369d:where([data-type=auto]:focus){visibility:visible;opacity:1;height:1.6em;position:static}.m_45c4369d:where([data-pointer]:not([data-disabled],:disabled)){cursor:pointer}.m_45c4369d:where([data-disabled],:disabled){cursor:not-allowed}.m_f0824112{--nl-bg:var(--mantine-primary-color-light);--nl-hover:var(--mantine-primary-color-light-hover);--nl-color:var(--mantine-primary-color-light-color);width:100%;padding:8px var(--mantine-spacing-sm);-webkit-user-select:none;user-select:none;align-items:center;display:flex}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_f0824112:hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_f0824112:hover{background-color:var(--mantine-color-dark-6)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_f0824112:active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_f0824112:active{background-color:var(--mantine-color-dark-6)}}.m_f0824112:where([data-disabled]){opacity:.4;pointer-events:none}.m_f0824112:where([data-active],[aria-current=page]){background-color:var(--nl-bg);color:var(--nl-color)}@media (hover:hover){.m_f0824112:where([data-active],[aria-current=page]):hover{background-color:var(--nl-hover)}}@media (hover:none){.m_f0824112:where([data-active],[aria-current=page]):active{background-color:var(--nl-hover)}}.m_f0824112:where([data-active],[aria-current=page]) .m_57492dcc{--description-opacity:.9;--description-color:var(--nl-color)}.m_690090b5{justify-content:center;align-items:center;transition:transform .15s;display:flex}.m_690090b5>svg{display:block}.m_690090b5:where([data-position=left]){margin-inline-end:var(--mantine-spacing-sm)}.m_690090b5:where([data-position=right]){margin-inline-start:var(--mantine-spacing-sm)}.m_690090b5:where([data-rotate]){transform:rotate(90deg)}.m_1f6ac4c4{font-size:var(--mantine-font-size-sm)}.m_f07af9d2{text-overflow:ellipsis;flex:1;overflow:hidden}.m_f07af9d2:where([data-no-wrap]){white-space:nowrap}.m_57492dcc{font-size:var(--mantine-font-size-xs);opacity:var(--description-opacity,1);color:var(--description-color,var(--mantine-color-dimmed));text-overflow:ellipsis;display:block;overflow:hidden}:where([data-no-wrap]) .m_57492dcc{white-space:nowrap}.m_e17b862f{padding-inline-start:var(--nl-offset,var(--mantine-spacing-lg))}.m_1fd8a00b{transform:rotate(-90deg)}.m_a513464{--notification-radius:var(--mantine-radius-default);--notification-color:var(--mantine-primary-color-filled);box-sizing:border-box;padding-inline-start:calc(1.375rem * var(--mantine-scale));padding-inline-end:var(--mantine-spacing-xs);padding-top:var(--mantine-spacing-xs);padding-bottom:var(--mantine-spacing-xs);border-radius:var(--notification-radius);box-shadow:var(--mantine-shadow-lg);align-items:center;display:flex;position:relative;overflow:hidden}.m_a513464:before{content:"";width:calc(.375rem * var(--mantine-scale));top:var(--notification-radius);bottom:var(--notification-radius);border-radius:var(--notification-radius);background-color:var(--notification-color);display:block;position:absolute;inset-inline-start:calc(.25rem * var(--mantine-scale))}:where([data-mantine-color-scheme=light]) .m_a513464{background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_a513464{background-color:var(--mantine-color-dark-6)}.m_a513464:where([data-with-icon]):before{display:none}:where([data-mantine-color-scheme=light]) .m_a513464:where([data-with-border]){border:1px solid var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_a513464:where([data-with-border]){border:1px solid var(--mantine-color-dark-4)}.m_a4ceffb{box-sizing:border-box;width:calc(1.75rem * var(--mantine-scale));height:calc(1.75rem * var(--mantine-scale));border-radius:calc(1.75rem * var(--mantine-scale));background-color:var(--notification-color);color:var(--mantine-color-white);justify-content:center;align-items:center;margin-inline-end:var(--mantine-spacing-md);display:flex}.m_b0920b15{margin-inline-end:var(--mantine-spacing-md)}.m_a49ed24{flex:1;margin-inline-end:var(--mantine-spacing-xs);overflow:hidden}.m_3feedf16{margin-bottom:calc(.125rem * var(--mantine-scale));text-overflow:ellipsis;font-size:var(--mantine-font-size-sm);line-height:var(--mantine-line-height-sm);font-weight:var(--mantine-font-weight-medium);overflow:hidden}:where([data-mantine-color-scheme=light]) .m_3feedf16{color:var(--mantine-color-gray-9)}:where([data-mantine-color-scheme=dark]) .m_3feedf16{color:var(--mantine-color-white)}.m_3d733a3a{font-size:var(--mantine-font-size-sm);line-height:var(--mantine-line-height-sm);text-overflow:ellipsis;overflow:hidden}:where([data-mantine-color-scheme=light]) .m_3d733a3a{color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_3d733a3a{color:var(--mantine-color-dark-0)}:where([data-mantine-color-scheme=light]) .m_3d733a3a:where([data-with-title]){color:var(--mantine-color-gray-6)}:where([data-mantine-color-scheme=dark]) .m_3d733a3a:where([data-with-title]){color:var(--mantine-color-dark-2)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_919a4d88:hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_919a4d88:hover{background-color:var(--mantine-color-dark-8)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_919a4d88:active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_919a4d88:active{background-color:var(--mantine-color-dark-8)}}.m_e2f5cd4e{--ni-right-section-width-xs:calc(1.0625rem * var(--mantine-scale));--ni-right-section-width-sm:calc(1.5rem * var(--mantine-scale));--ni-right-section-width-md:calc(1.6875rem * var(--mantine-scale));--ni-right-section-width-lg:calc(1.9375rem * var(--mantine-scale));--ni-right-section-width-xl:calc(2.125rem * var(--mantine-scale))}.m_95e17d22{--ni-chevron-size-xs:calc(.625rem * var(--mantine-scale));--ni-chevron-size-sm:calc(.875rem * var(--mantine-scale));--ni-chevron-size-md:calc(1rem * var(--mantine-scale));--ni-chevron-size-lg:calc(1.125rem * var(--mantine-scale));--ni-chevron-size-xl:calc(1.25rem * var(--mantine-scale));--ni-chevron-size:var(--ni-chevron-size-sm);width:100%;height:calc(var(--input-height) - calc(.125rem * var(--mantine-scale)));max-width:calc(var(--ni-chevron-size) * 1.7);flex-direction:column;margin-inline-start:auto;display:flex}.m_80b4b171{--control-border:1px solid var(--input-bd);--control-radius:calc(var(--input-radius) - calc(.0625rem * var(--mantine-scale)));width:100%;height:calc(var(--input-height) / 2 - calc(.0625rem * var(--mantine-scale)));border-inline-start:var(--control-border);color:var(--mantine-color-text);cursor:pointer;background-color:#0000;flex:0 0 50%;justify-content:center;align-items:center;padding:0;display:flex}.m_80b4b171:where(:disabled){cursor:not-allowed;opacity:.6;color:var(--mantine-color-disabled-color);background-color:#0000}.m_e2f5cd4e[data-error] :where(.m_80b4b171){color:var(--mantine-color-error)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_80b4b171:hover{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_80b4b171:hover{background-color:var(--mantine-color-dark-4)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_80b4b171:active{background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_80b4b171:active{background-color:var(--mantine-color-dark-4)}}.m_80b4b171:where(:first-of-type){border-radius:0;border-start-end-radius:var(--control-radius)}.m_80b4b171:last-of-type{border-radius:0;border-end-end-radius:var(--control-radius)}.m_f62ab2af{contain:layout style;gap:var(--ol-gap,var(--mantine-spacing-xs));flex-wrap:wrap;display:flex}.m_4addd315{--pagination-control-size-xs:calc(1.375rem * var(--mantine-scale));--pagination-control-size-sm:calc(1.625rem * var(--mantine-scale));--pagination-control-size-md:calc(2rem * var(--mantine-scale));--pagination-control-size-lg:calc(2.375rem * var(--mantine-scale));--pagination-control-size-xl:calc(2.75rem * var(--mantine-scale));--pagination-control-size-input-xs:calc(1.875rem * var(--mantine-scale));--pagination-control-size-input-sm:calc(2.25rem * var(--mantine-scale));--pagination-control-size-input-md:calc(2.625rem * var(--mantine-scale));--pagination-control-size-input-lg:calc(3.125rem * var(--mantine-scale));--pagination-control-size-input-xl:calc(3.75rem * var(--mantine-scale));--pagination-control-size:var(--pagination-control-size-md);--pagination-control-fz:var(--mantine-font-size-md);--pagination-active-bg:var(--mantine-primary-color-filled)}.m_4addd315:where([data-layout=responsive]){container-type:inline-size}.m_326d024a{border:calc(.0625rem * var(--mantine-scale)) solid;cursor:pointer;color:var(--mantine-color-text);height:var(--pagination-control-size);min-width:var(--pagination-control-size);font-size:var(--pagination-control-fz);border-radius:var(--pagination-control-radius,var(--mantine-radius-default));justify-content:center;align-items:center;line-height:1;display:flex}.m_326d024a:where([data-with-padding]){padding:calc(var(--pagination-control-size) / 4)}.m_326d024a:where(:disabled,[data-disabled]){cursor:not-allowed;opacity:.4}:where([data-mantine-color-scheme=light]) .m_326d024a{border-color:var(--mantine-color-gray-4);background-color:var(--mantine-color-white)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_326d024a:hover:where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-gray-0)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_326d024a:active:where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-gray-0)}}:where([data-mantine-color-scheme=dark]) .m_326d024a{border-color:var(--mantine-color-dark-4);background-color:var(--mantine-color-dark-6)}@media (hover:hover){:where([data-mantine-color-scheme=dark]) .m_326d024a:hover:where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-dark-5)}}@media (hover:none){:where([data-mantine-color-scheme=dark]) .m_326d024a:active:where(:not(:disabled,[data-disabled])){background-color:var(--mantine-color-dark-5)}}.m_326d024a:where([data-active]){background-color:var(--pagination-active-bg);border-color:var(--pagination-active-bg);color:var(--pagination-active-color,var(--mantine-color-white))}@media (hover:hover){.m_326d024a:where([data-active]):hover{background-color:var(--pagination-active-bg)}}@media (hover:none){.m_326d024a:where([data-active]):active{background-color:var(--pagination-active-bg)}}.m_4ad7767d{height:var(--pagination-control-size);min-width:var(--pagination-control-size);pointer-events:none;justify-content:center;align-items:center;display:flex}.m_105fdbed{gap:inherit;align-items:center;display:flex}@container (width<=400px){.m_105fdbed{display:none}}.m_10817321{height:var(--pagination-control-size);font-size:var(--pagination-control-fz);white-space:nowrap;justify-content:center;align-items:center;display:none}@container (width<=400px){.m_10817321{display:flex}}.m_f61ca620{--psi-button-size-xs:calc(1.375rem * var(--mantine-scale));--psi-button-size-sm:calc(1.625rem * var(--mantine-scale));--psi-button-size-md:calc(1.75rem * var(--mantine-scale));--psi-button-size-lg:calc(2rem * var(--mantine-scale));--psi-button-size-xl:calc(2.5rem * var(--mantine-scale));--psi-icon-size-xs:calc(1rem * var(--mantine-scale));--psi-icon-size-sm:calc(1.25rem * var(--mantine-scale));--psi-icon-size-md:calc(1.375rem * var(--mantine-scale));--psi-icon-size-lg:calc(1.5rem * var(--mantine-scale));--psi-icon-size-xl:calc(1.75rem * var(--mantine-scale));--psi-button-size:var(--psi-button-size-sm);--psi-icon-size:var(--psi-icon-size-sm)}.m_ccf8da4c{position:relative;overflow:hidden}.m_f2d85dd2{font-family:var(--mantine-font-family);font-size:inherit;line-height:var(--mantine-line-height);width:100%;height:100%;color:inherit;background-color:#0000;border:0;outline:0;padding-inline-start:var(--input-padding-inline-start);padding-inline-end:var(--input-padding-inline-end);position:absolute;inset:0}.m_ccf8da4c[data-disabled] .m_f2d85dd2,.m_f2d85dd2:disabled{cursor:not-allowed}.m_f2d85dd2::placeholder{color:var(--input-placeholder-color);opacity:1}.m_f2d85dd2::-ms-reveal{display:none}.m_b1072d44{width:var(--psi-button-size);height:var(--psi-button-size);min-width:var(--psi-button-size);min-height:var(--psi-button-size)}.m_b1072d44:disabled{display:none}.m_f1cb205a{--pin-input-size-xs:calc(1.875rem * var(--mantine-scale));--pin-input-size-sm:calc(2.25rem * var(--mantine-scale));--pin-input-size-md:calc(2.625rem * var(--mantine-scale));--pin-input-size-lg:calc(3.125rem * var(--mantine-scale));--pin-input-size-xl:calc(3.75rem * var(--mantine-scale));--pin-input-size:var(--pin-input-size-sm)}.m_cb288ead{width:var(--pin-input-size);height:var(--pin-input-size)}@keyframes m_81a374bd{0%{background-position:0 0}to{background-position:calc(2.5rem * var(--mantine-scale)) 0}}@keyframes m_e0fb7a86{0%{background-position:0 0}to{background-position:0 calc(2.5rem * var(--mantine-scale))}}.m_db6d6462{--progress-radius:var(--mantine-radius-default);--progress-size:var(--progress-size-md);--progress-size-xs:calc(.1875rem * var(--mantine-scale));--progress-size-sm:calc(.3125rem * var(--mantine-scale));--progress-size-md:calc(.5rem * var(--mantine-scale));--progress-size-lg:calc(.75rem * var(--mantine-scale));--progress-size-xl:calc(1rem * var(--mantine-scale));height:var(--progress-size);border-radius:var(--progress-radius);display:flex;position:relative;overflow:hidden}:where([data-mantine-color-scheme=light]) .m_db6d6462{background-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_db6d6462{background-color:var(--mantine-color-dark-4)}.m_db6d6462:where([data-orientation=vertical]){height:auto;width:var(--progress-size);flex-direction:column-reverse}.m_2242eb65{background-color:var(--progress-section-color);height:100%;width:var(--progress-section-size);background-size:calc(1.25rem * var(--mantine-scale)) calc(1.25rem * var(--mantine-scale));transition:width var(--progress-transition-duration,.1s) ease;justify-content:center;align-items:center;display:flex;overflow:hidden}.m_2242eb65:where([data-striped]){background-image:linear-gradient(45deg,#ffffff26 25%,#0000 25% 50%,#ffffff26 50% 75%,#0000 75%,#0000)}.m_2242eb65:where([data-animated]){animation:1s linear infinite m_81a374bd}.m_2242eb65:where(:last-of-type){border-radius:0;border-start-end-radius:var(--progress-radius);border-end-end-radius:var(--progress-radius)}.m_2242eb65:where(:first-of-type){border-radius:0;border-start-start-radius:var(--progress-radius);border-end-start-radius:var(--progress-radius)}.m_db6d6462:where([data-orientation=vertical]) .m_2242eb65{width:100%;height:var(--progress-section-size);transition:height var(--progress-transition-duration,.1s) ease}.m_db6d6462:where([data-orientation=vertical]) .m_2242eb65:where([data-striped]){background-image:linear-gradient(135deg,#ffffff26 25%,#0000 25% 50%,#ffffff26 50% 75%,#0000 75%,#0000)}.m_db6d6462:where([data-orientation=vertical]) .m_2242eb65:where([data-animated]){animation:1s linear infinite m_e0fb7a86}.m_db6d6462:where([data-orientation=vertical]) .m_2242eb65:where(:last-of-type){border-radius:0;border-start-start-radius:var(--progress-radius);border-start-end-radius:var(--progress-radius)}.m_db6d6462:where([data-orientation=vertical]) .m_2242eb65:where(:first-of-type){border-radius:0;border-end-end-radius:var(--progress-radius);border-end-start-radius:var(--progress-radius)}.m_91e40b74{color:var(--progress-label-color,var(--mantine-color-white));-webkit-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;font-weight:700;font-size:min(calc(var(--progress-size) * .65), calc(1.125rem * var(--mantine-scale)));padding-inline:calc(.25rem * var(--mantine-scale));line-height:1;overflow:hidden}.m_db6d6462:where([data-orientation=vertical]) .m_91e40b74{writing-mode:vertical-rl}.m_9dc8ae12{--card-radius:var(--mantine-radius-default);border-radius:var(--card-radius);cursor:pointer;width:100%;display:block}.m_9dc8ae12 :where(*){cursor:inherit}.m_9dc8ae12:where([data-with-border]){border:calc(.0625rem * var(--mantine-scale)) solid transparent}:where([data-mantine-color-scheme=light]) .m_9dc8ae12:where([data-with-border]){border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_9dc8ae12:where([data-with-border]){border-color:var(--mantine-color-dark-4)}.m_717d7ff6{--radio-size-xs:calc(1rem * var(--mantine-scale));--radio-size-sm:calc(1.25rem * var(--mantine-scale));--radio-size-md:calc(1.5rem * var(--mantine-scale));--radio-size-lg:calc(1.875rem * var(--mantine-scale));--radio-size-xl:calc(2.25rem * var(--mantine-scale));--radio-icon-size-xs:calc(.375rem * var(--mantine-scale));--radio-icon-size-sm:calc(.5rem * var(--mantine-scale));--radio-icon-size-md:calc(.625rem * var(--mantine-scale));--radio-icon-size-lg:calc(.875rem * var(--mantine-scale));--radio-icon-size-xl:calc(1rem * var(--mantine-scale));--radio-icon-size:var(--radio-icon-size-sm);--radio-size:var(--radio-size-sm);--radio-color:var(--mantine-primary-color-filled);--radio-icon-color:var(--mantine-color-white);border:calc(.0625rem * var(--mantine-scale)) solid transparent;width:var(--radio-size);min-width:var(--radio-size);height:var(--radio-size);min-height:var(--radio-size);border-radius:var(--radio-radius,10000px);cursor:var(--mantine-cursor-type);-webkit-tap-highlight-color:transparent;justify-content:center;align-items:center;transition:border-color .1s,background-color .1s;display:flex;position:relative}:where([data-mantine-color-scheme=light]) .m_717d7ff6{background-color:var(--mantine-color-white);border-color:var(--mantine-color-gray-4)}:where([data-mantine-color-scheme=dark]) .m_717d7ff6{background-color:var(--mantine-color-dark-6);border-color:var(--mantine-color-dark-4)}.m_717d7ff6[data-checked]{background-color:var(--radio-color);border-color:var(--radio-color)}.m_717d7ff6[data-checked]>.m_3e4da632{opacity:1;color:var(--radio-icon-color);transform:none}.m_717d7ff6[data-disabled]{cursor:not-allowed;background-color:var(--mantine-color-disabled);border-color:var(--mantine-color-disabled-border)}.m_717d7ff6[data-disabled][data-checked]>.m_3e4da632{color:var(--mantine-color-disabled-color)}.m_2980836c[data-checked]:not([data-disabled]){border-color:var(--radio-color);background-color:#0000}.m_2980836c[data-checked]:not([data-disabled])>.m_3e4da632{color:var(--radio-color);opacity:1;transform:none}.m_3e4da632{width:var(--radio-icon-size);height:var(--radio-icon-size);color:#0000;pointer-events:none;transform:translateY(calc(.3125rem * var(--mantine-scale))) scale(.5);opacity:1;transition:transform .1s,opacity .1s;display:block}.m_f3f1af94{--radio-size-xs:calc(1rem * var(--mantine-scale));--radio-size-sm:calc(1.25rem * var(--mantine-scale));--radio-size-md:calc(1.5rem * var(--mantine-scale));--radio-size-lg:calc(1.875rem * var(--mantine-scale));--radio-size-xl:calc(2.25rem * var(--mantine-scale));--radio-size:var(--radio-size-sm);--radio-icon-size-xs:calc(.375rem * var(--mantine-scale));--radio-icon-size-sm:calc(.5rem * var(--mantine-scale));--radio-icon-size-md:calc(.625rem * var(--mantine-scale));--radio-icon-size-lg:calc(.875rem * var(--mantine-scale));--radio-icon-size-xl:calc(1rem * var(--mantine-scale));--radio-icon-size:var(--radio-icon-size-sm);--radio-icon-color:var(--mantine-color-white)}.m_89c4f5e4{width:var(--radio-size);height:var(--radio-size);order:1;position:relative}.m_89c4f5e4:where([data-label-position=left]){order:2}.m_f3ed6b2b{color:var(--radio-icon-color);opacity:var(--radio-icon-opacity,0);translate:-50% -50%;transform:var(--radio-icon-transform,scale(.2) translateY(calc(.625rem * var(--mantine-scale))));pointer-events:none;width:var(--radio-icon-size);height:var(--radio-icon-size);transition:opacity .1s,transform .2s;position:absolute;top:50%;left:50%}.m_8a3dbb89{border:calc(.0625rem * var(--mantine-scale)) solid;appearance:none;width:var(--radio-size);height:var(--radio-size);border-radius:var(--radio-radius,var(--radio-size));cursor:var(--mantine-cursor-type);-webkit-tap-highlight-color:transparent;justify-content:center;align-items:center;margin:0;transition-property:background-color,border-color;transition-duration:.1s;transition-timing-function:ease;display:flex;position:relative}:where([data-mantine-color-scheme=light]) .m_8a3dbb89{background-color:var(--mantine-color-white);border-color:var(--mantine-color-gray-4)}:where([data-mantine-color-scheme=dark]) .m_8a3dbb89{background-color:var(--mantine-color-dark-6);border-color:var(--mantine-color-dark-4)}.m_8a3dbb89:checked{background-color:var(--radio-color,var(--mantine-primary-color-filled));border-color:var(--radio-color,var(--mantine-primary-color-filled))}.m_8a3dbb89:checked+.m_f3ed6b2b{--radio-icon-opacity:1;--radio-icon-transform:scale(1)}.m_8a3dbb89:disabled{cursor:not-allowed;background-color:var(--mantine-color-disabled);border-color:var(--mantine-color-disabled-border)}.m_8a3dbb89:disabled+.m_f3ed6b2b{--radio-icon-color:var(--mantine-color-disabled-color)}.m_8a3dbb89:where([data-with-error-styles][data-error]){border-color:var(--mantine-color-error)}.m_1bfe9d39+.m_f3ed6b2b{--radio-icon-color:var(--radio-color)}.m_1bfe9d39:checked:not(:disabled){border-color:var(--radio-color);background-color:#0000}.m_1bfe9d39:checked:not(:disabled)+.m_f3ed6b2b{--radio-icon-color:var(--radio-color);--radio-icon-opacity:1;--radio-icon-transform:none}.m_f8d312f2{--rating-size-xs:calc(.875rem * var(--mantine-scale));--rating-size-sm:calc(1.125rem * var(--mantine-scale));--rating-size-md:calc(1.25rem * var(--mantine-scale));--rating-size-lg:calc(1.75rem * var(--mantine-scale));--rating-size-xl:calc(2rem * var(--mantine-scale));width:max-content;display:flex}.m_f8d312f2:where(:has(input:disabled)){pointer-events:none}.m_61734bb7{transition:transform .1s;position:relative}.m_61734bb7:where([data-active]){z-index:1;transform:scale(1.1)}.m_5662a89a{width:var(--rating-size);height:var(--rating-size);display:block}:where([data-mantine-color-scheme=light]) .m_5662a89a{fill:var(--mantine-color-gray-3);stroke:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_5662a89a{fill:var(--mantine-color-dark-3);stroke:var(--mantine-color-dark-3)}.m_5662a89a:where([data-filled]){fill:var(--rating-color);stroke:var(--rating-color)}.m_211007ba{white-space:nowrap;opacity:0;-webkit-tap-highlight-color:transparent;width:0;height:0;position:absolute;overflow:hidden}.m_211007ba:focus-visible+label{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_21342ee4{cursor:pointer;z-index:var(--rating-item-z-index,0);-webkit-tap-highlight-color:transparent;display:block;position:absolute;top:0;left:0}.m_21342ee4:where([data-read-only]){cursor:default}.m_21342ee4:where(:last-of-type){position:relative}.m_fae05d6a{clip-path:var(--rating-symbol-clip-path)}.m_47dd3981{align-items:baseline;display:inline-flex;position:relative;overflow:hidden}.m_47dd3981[data-tabular-numbers]{font-variant-numeric:tabular-nums}.m_ccf525bd{z-index:1;white-space:pre;color:#0000;forced-color-adjust:none;position:absolute;inset:0;overflow:hidden}.m_b301d46e{z-index:2;pointer-events:none;-webkit-user-select:none;user-select:none;width:1ch;height:1em;transition:width var(--rn-duration) var(--rn-timing-function), opacity var(--rn-duration) var(--rn-timing-function);line-height:1;display:inline-block;position:relative;overflow:hidden}.m_b301d46e[data-empty]{opacity:0;width:0}.m_8ae40964{animation:m_18d73873 var(--rn-duration) var(--rn-timing-function);flex-direction:column;display:flex}.m_8ae40964>span{justify-content:center;align-items:center;height:1em;display:flex}.m_47d64bf5{z-index:2;white-space:pre;pointer-events:none;-webkit-user-select:none;user-select:none;transition:opacity var(--rn-duration) var(--rn-timing-function);display:inline-block;position:relative;overflow:hidden}.m_47d64bf5[data-empty]{opacity:0;width:0}@keyframes m_18d73873{0%{transform:var(--rn-roll-from)}to{transform:var(--rn-roll-to)}}.m_1b3c8819{--tooltip-radius:var(--mantine-radius-default);padding:calc(var(--mantine-spacing-xs) / 2) var(--mantine-spacing-xs);pointer-events:none;font-size:var(--mantine-font-size-sm);white-space:nowrap;border-radius:var(--tooltip-radius);position:absolute}:where([data-mantine-color-scheme=light]) .m_1b3c8819{background-color:var(--tooltip-bg,var(--mantine-color-gray-9));color:var(--tooltip-color,var(--mantine-color-white))}:where([data-mantine-color-scheme=dark]) .m_1b3c8819{background-color:var(--tooltip-bg,var(--mantine-color-gray-2));color:var(--tooltip-color,var(--mantine-color-black))}.m_1b3c8819:where([data-multiline]){white-space:normal}.m_1b3c8819:where([data-fixed]){position:fixed}.m_1b3c8819:where([data-interactive]){pointer-events:auto}.m_f898399f{background-color:inherit;z-index:1;border:0}.m_b32e4812{width:var(--rp-size);height:var(--rp-size);min-width:var(--rp-size);min-height:var(--rp-size);--rp-transition-duration:0s;position:relative}.m_d43b5134{width:var(--rp-size);height:var(--rp-size);min-width:var(--rp-size);min-height:var(--rp-size);transform:rotate(calc(var(--rp-start-angle,270deg) - 360deg))}.m_b1ca1fbf{stroke:var(--curve-color,var(--rp-curve-root-color));transition:stroke-dashoffset var(--rp-transition-duration) ease, stroke-dasharray var(--rp-transition-duration) ease, stroke var(--rp-transition-duration)}[data-mantine-color-scheme=light] .m_b1ca1fbf{--rp-curve-root-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m_b1ca1fbf{--rp-curve-root-color:var(--mantine-color-dark-4)}.m_b23f9dc4{top:50%;inset-inline:var(--rp-label-offset);position:absolute;transform:translateY(-50%)}.m_bc8f275{--scroller-control-size:calc(3.125rem * var(--mantine-scale));--scroller-background-color:var(--mantine-color-body);align-items:center;max-width:100%;display:flex;position:relative;overflow:hidden}.m_ee44dece{scrollbar-width:none;-ms-overflow-style:none;-webkit-user-select:none;user-select:none;flex:1;overflow:auto hidden}.m_ee44dece::-webkit-scrollbar{display:none}.m_ee44dece[data-draggable]{cursor:grab}.m_53e4f606{white-space:nowrap;display:inline-flex}.m_47754fc8{width:var(--scroller-control-size);height:var(--scroller-control-size)}.m_53e526ea{width:var(--scroller-control-size);z-index:1;color:var(--mantine-color-dimmed);opacity:1;pointer-events:auto;align-items:center;transition:opacity .2s,color .15s;display:flex;position:absolute;top:0;bottom:0}.m_53e526ea:hover{color:var(--mantine-color-text)}.m_53e526ea:where([data-position=start]){background:linear-gradient(to right, var(--scroller-background-color) 40%, transparent);justify-content:flex-start;inset-inline-start:0}.m_53e526ea:where([data-position=start]) .m_47754fc8{transform:rotate(90deg)}.m_53e526ea:where([data-position=end]){background:linear-gradient(to left, var(--scroller-background-color) 40%, transparent);justify-content:flex-end;inset-inline-end:0}.m_53e526ea:where([data-position=end]) .m_47754fc8{transform:rotate(-90deg)}.m_53e526ea:where([data-hidden]){opacity:0;pointer-events:none}.m_cf365364{--sc-padding-xs:calc(.125rem * var(--mantine-scale)) calc(.375rem * var(--mantine-scale));--sc-padding-sm:calc(.1875rem * var(--mantine-scale)) calc(.625rem * var(--mantine-scale));--sc-padding-md:calc(.25rem * var(--mantine-scale)) calc(.875rem * var(--mantine-scale));--sc-padding-lg:calc(.4375rem * var(--mantine-scale)) calc(1rem * var(--mantine-scale));--sc-padding-xl:calc(.625rem * var(--mantine-scale)) calc(1.25rem * var(--mantine-scale));--sc-transition-duration:.2s;--sc-padding:var(--sc-padding-sm);--sc-transition-timing-function:ease;--sc-font-size:var(--mantine-font-size-sm);border-radius:var(--sc-radius,var(--mantine-radius-default));width:auto;padding:calc(.25rem * var(--mantine-scale));flex-direction:row;display:inline-flex;position:relative;overflow:hidden}.m_cf365364:where([data-full-width]){display:flex}.m_cf365364:where([data-orientation=vertical]){flex-direction:column;width:max-content;display:flex}.m_cf365364:where([data-orientation=vertical]):where([data-full-width]){width:auto}:where([data-mantine-color-scheme=light]) .m_cf365364{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_cf365364{background-color:var(--mantine-color-dark-8)}.m_9e182ccd{z-index:1;border-radius:max(calc(var(--sc-radius,var(--mantine-radius-default)) - 4px), calc(var(--sc-radius,var(--mantine-radius-default)) / 4));display:block;position:absolute}:where([data-mantine-color-scheme=light]) .m_9e182ccd{box-shadow:var(--sc-shadow,none);background-color:var(--sc-color,var(--mantine-color-white))}:where([data-mantine-color-scheme=dark]) .m_9e182ccd{box-shadow:none;background-color:var(--sc-color,var(--mantine-color-dark-5))}.m_1738fcb2{-webkit-tap-highlight-color:transparent;font-weight:var(--mantine-font-weight-medium);text-align:center;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;border-radius:calc(var(--sc-radius,var(--mantine-radius-default)) - 4px);font-size:var(--sc-font-size);padding:var(--sc-padding);transition:color var(--sc-transition-duration) var(--sc-transition-timing-function);cursor:pointer;outline:var(--segmented-control-outline,none);display:block;overflow:hidden}:where([data-mantine-color-scheme=light]) .m_1738fcb2{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_1738fcb2{color:var(--mantine-color-dark-1)}.m_1738fcb2:where([data-read-only]){cursor:default}fieldset:disabled .m_1738fcb2,.m_1738fcb2:where([data-disabled]){cursor:not-allowed;color:var(--mantine-color-disabled-color)}:where([data-mantine-color-scheme=light]) .m_1738fcb2:where([data-active]){color:var(--sc-label-color,var(--mantine-color-black))}:where([data-mantine-color-scheme=dark]) .m_1738fcb2:where([data-active]){color:var(--sc-label-color,var(--mantine-color-white))}.m_cf365364:where([data-initialized]) .m_1738fcb2:where([data-active]):before{display:none}.m_1738fcb2:where([data-active]):before{content:"";z-index:0;border-radius:calc(var(--sc-radius,var(--mantine-radius-default)) - 4px);position:absolute;inset:0}:where([data-mantine-color-scheme=light]) .m_1738fcb2:where([data-active]):before{box-shadow:var(--sc-shadow,none);background-color:var(--sc-color,var(--mantine-color-white))}:where([data-mantine-color-scheme=dark]) .m_1738fcb2:where([data-active]):before{box-shadow:none;background-color:var(--sc-color,var(--mantine-color-dark-5))}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_1738fcb2:where(:not([data-disabled],[data-active],[data-read-only])):hover{color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_1738fcb2:where(:not([data-disabled],[data-active],[data-read-only])):hover{color:var(--mantine-color-white)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_1738fcb2:where(:not([data-disabled],[data-active],[data-read-only])):active{color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_1738fcb2:where(:not([data-disabled],[data-active],[data-read-only])):active{color:var(--mantine-color-white)}}@media (hover:hover){fieldset:disabled .m_1738fcb2:hover{color:var(--mantine-color-disabled-color)!important}}@media (hover:none){fieldset:disabled .m_1738fcb2:active{color:var(--mantine-color-disabled-color)!important}}.m_1714d588{white-space:nowrap;opacity:0;width:0;height:0;position:absolute;overflow:hidden}.m_1714d588[data-focus-ring=auto]:focus:focus-visible+.m_1738fcb2,.m_1714d588[data-focus-ring=always]:focus+.m_1738fcb2{--segmented-control-outline:2px solid var(--mantine-primary-color-filled)}.m_69686b9b{z-index:2;transition:border-color var(--sc-transition-duration) var(--sc-transition-timing-function);flex:1;position:relative}.m_cf365364[data-with-items-borders] :where(.m_69686b9b):before{content:"";top:0;bottom:0;background-color:var(--separator-color);width:calc(.0625rem * var(--mantine-scale));transition:background-color var(--sc-transition-duration) var(--sc-transition-timing-function);position:absolute;inset-inline-start:0}.m_69686b9b[data-orientation=vertical]:before{top:0;inset-inline:0;height:calc(.0625rem * var(--mantine-scale));width:auto;bottom:auto}:where([data-mantine-color-scheme=light]) .m_69686b9b{--separator-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_69686b9b{--separator-color:var(--mantine-color-dark-4)}.m_69686b9b:first-of-type:before,[data-mantine-color-scheme] .m_69686b9b[data-active]:before,[data-mantine-color-scheme] .m_69686b9b[data-active]+.m_69686b9b:before{--separator-color:transparent}.m_78882f40{z-index:2;position:relative}.m_fa528724{--scp-filled-segment-color:var(--mantine-primary-color-filled);--scp-transition-duration:0s;--scp-thickness:calc(.75rem * var(--mantine-scale))}:where([data-mantine-color-scheme=light]) .m_fa528724{--scp-empty-segment-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_fa528724{--scp-empty-segment-color:var(--mantine-color-dark-4)}.m_fa528724{width:fit-content;position:relative}.m_62e9e7e2{transform:var(--scp-rotation);display:block;overflow:hidden}.m_c573fb6f{transition:stroke-dashoffset var(--scp-transition-duration) ease, stroke-dasharray var(--scp-transition-duration) ease, stroke-opacity var(--scp-transition-duration) ease, stroke var(--scp-transition-duration)}.m_4fa340f2{text-align:center;z-index:1;margin:0;padding:0;position:absolute;inset-inline:0}.m_4fa340f2:where([data-position=bottom]){padding-inline:calc(var(--scp-thickness) * 2);bottom:0}.m_4fa340f2:where([data-position=bottom]):where([data-orientation=down]){top:0;bottom:auto}.m_4fa340f2:where([data-position=center]){padding-inline:calc(var(--scp-thickness) * 3);top:50%;transform:translateY(-50%)}.m_925c2d2c{container:simple-grid/inline-size}.m_2415a157{grid-template-columns:repeat(var(--sg-cols), minmax(0, 1fr));grid-auto-rows:var(--sg-auto-rows,auto);gap:var(--sg-spacing-y) var(--sg-spacing-x);display:grid}.m_2415a157[data-auto-cols=auto-fill]{grid-template-columns:repeat(auto-fill, minmax(var(--sg-min-col-width), 1fr))}.m_2415a157[data-auto-cols=auto-fit]{grid-template-columns:repeat(auto-fit, minmax(var(--sg-min-col-width), 1fr))}@keyframes m_299c329c{0%,to{opacity:.4}50%{opacity:1}}.m_18320242{height:var(--skeleton-height,auto);width:var(--skeleton-width,100%);border-radius:var(--skeleton-radius,var(--mantine-radius-default));position:relative;transform:translateZ(0)}.m_18320242:where([data-animate]):after{animation:1.5s linear infinite m_299c329c}.m_18320242:where([data-visible]){overflow:hidden}.m_18320242:where([data-visible]):before{content:"";z-index:10;background-color:var(--mantine-color-body);position:absolute;inset:0}.m_18320242:where([data-visible]):after{content:"";z-index:11;position:absolute;inset:0}:where([data-mantine-color-scheme=light]) .m_18320242:where([data-visible]):after{background-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_18320242:where([data-visible]):after{background-color:var(--mantine-color-dark-4)}.m_dd36362e{--slider-size-xs:calc(.25rem * var(--mantine-scale));--slider-size-sm:calc(.375rem * var(--mantine-scale));--slider-size-md:calc(.5rem * var(--mantine-scale));--slider-size-lg:calc(.625rem * var(--mantine-scale));--slider-size-xl:calc(.75rem * var(--mantine-scale));--slider-size:var(--slider-size-md);--slider-radius:calc(62.5rem * var(--mantine-scale));--slider-color:var(--mantine-primary-color-filled);--slider-track-disabled-bg:var(--mantine-color-disabled);-webkit-tap-highlight-color:transparent;height:calc(var(--slider-size) * 2);padding-inline:var(--slider-size);touch-action:none;outline:none;flex-direction:column;align-items:center;display:flex;position:relative}[data-mantine-color-scheme=light] .m_dd36362e{--slider-track-bg:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m_dd36362e{--slider-track-bg:var(--mantine-color-dark-4)}.m_dd36362e[data-orientation=vertical]{width:calc(var(--slider-size) * 2);height:calc(12.5rem * var(--mantine-scale));padding-inline:0;padding-block:var(--slider-size)}.m_c9357328{top:calc(-2.25rem * var(--mantine-scale));font-size:var(--mantine-font-size-xs);color:var(--mantine-color-white);padding:calc(var(--mantine-spacing-xs) / 2);border-radius:var(--mantine-radius-sm);white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none;touch-action:none;position:absolute}:where([data-mantine-color-scheme=light]) .m_c9357328{background-color:var(--mantine-color-gray-9)}:where([data-mantine-color-scheme=dark]) .m_c9357328{background-color:var(--mantine-color-dark-4)}:where(.m_dd36362e[data-orientation=vertical]) .m_c9357328{top:auto;inset-inline-start:calc(100% + 8px)}.m_c9a9a60a{height:var(--slider-thumb-size);width:var(--slider-thumb-size);border:calc(.25rem * var(--mantine-scale)) solid;cursor:pointer;border-radius:var(--slider-radius);z-index:3;-webkit-user-select:none;user-select:none;touch-action:none;outline-offset:calc(.125rem * var(--mantine-scale));top:50%;left:var(--slider-thumb-offset);justify-content:center;align-items:center;transition:box-shadow .1s,transform .1s;display:flex;position:absolute;transform:translate(-50%,-50%)}:where([dir=rtl]) .m_c9a9a60a{left:auto;right:calc(var(--slider-thumb-offset) - var(--slider-thumb-size))}fieldset:disabled .m_c9a9a60a,.m_c9a9a60a:where([data-disabled]){display:none}.m_c9a9a60a:where([data-dragging]){box-shadow:var(--mantine-shadow-sm);transform:translate(-50%,-50%)scale(1.05)}:where([data-mantine-color-scheme=light]) .m_c9a9a60a{color:var(--slider-color);border-color:var(--slider-color);background-color:var(--mantine-color-white)}:where([data-mantine-color-scheme=dark]) .m_c9a9a60a{color:var(--mantine-color-white);border-color:var(--mantine-color-white);background-color:var(--slider-color)}:where(.m_dd36362e[data-orientation=vertical]) .m_c9a9a60a{top:auto;left:50%;right:auto;bottom:var(--slider-thumb-offset);transform:translate(-50%,50%)}:where(.m_dd36362e[data-orientation=vertical]) .m_c9a9a60a:where([data-dragging]){transform:translate(-50%,50%)scale(1.05)}:where([dir=rtl]) :where(.m_dd36362e[data-orientation=vertical]) .m_c9a9a60a{left:50%;right:auto}.m_a8645c2{width:100%;height:calc(var(--slider-size) * 2);cursor:pointer;align-items:center;display:flex}fieldset:disabled .m_a8645c2,.m_a8645c2:where([data-disabled]){cursor:not-allowed}:where(.m_dd36362e[data-orientation=vertical]) .m_a8645c2{width:calc(var(--slider-size) * 2);flex-direction:column;height:100%}.m_c9ade57f{width:100%;height:var(--slider-size);position:relative}.m_c9ade57f:where([data-inverted]:not([data-disabled])){--track-bg:var(--slider-color)}fieldset:disabled .m_c9ade57f:where([data-inverted]),.m_c9ade57f:where([data-inverted][data-disabled]){--track-bg:var(--slider-track-disabled-bg)}.m_c9ade57f:before{content:"";border-radius:var(--slider-radius);top:0;bottom:0;inset-inline:calc(var(--slider-size) * -1);background-color:var(--track-bg,var(--slider-track-bg));z-index:0;position:absolute}:where(.m_dd36362e[data-orientation=vertical]) .m_c9ade57f{width:var(--slider-size);height:100%}:where(.m_dd36362e[data-orientation=vertical]) .m_c9ade57f:before{inset-inline:0;top:calc(var(--slider-size) * -1);bottom:calc(var(--slider-size) * -1)}.m_38aeed47{z-index:1;background-color:var(--slider-color);border-radius:var(--slider-radius);width:var(--slider-bar-width);top:0;bottom:0;position:absolute;inset-inline-start:var(--slider-bar-offset)}.m_38aeed47:where([data-inverted]){background-color:var(--slider-track-bg)}fieldset:disabled .m_38aeed47:where(:not([data-inverted])),.m_38aeed47:where([data-disabled]:not([data-inverted])){background-color:var(--mantine-color-disabled-color)}:where(.m_dd36362e[data-orientation=vertical]) .m_38aeed47{top:auto;bottom:var(--slider-bar-offset);width:100%;height:var(--slider-bar-width);inset-inline-start:0}.m_b7b0423a{inset-inline-start:calc(var(--mark-offset) - var(--slider-size) / 2);z-index:2;pointer-events:none;height:0;position:absolute;top:0}:where(.m_dd36362e[data-orientation=vertical]) .m_b7b0423a{inset-inline-start:0;top:auto;bottom:calc(var(--mark-offset) + var(--slider-size) / 2);width:0;height:0}.m_dd33bc19{border:calc(.125rem * var(--mantine-scale)) solid;height:var(--slider-size);width:var(--slider-size);border-radius:calc(62.5rem * var(--mantine-scale));background-color:var(--mantine-color-white);pointer-events:none}:where([data-mantine-color-scheme=light]) .m_dd33bc19{border-color:var(--mantine-color-gray-2)}:where([data-mantine-color-scheme=dark]) .m_dd33bc19{border-color:var(--mantine-color-dark-4)}.m_dd33bc19:where([data-filled]){border-color:var(--slider-color)}.m_dd33bc19:where([data-filled]):where([data-disabled]){border-color:var(--mantine-color-disabled-border)}.m_68c77a5b{transform:translate(calc(-50% + var(--slider-size) / 2), calc(var(--mantine-spacing-xs) / 2));font-size:var(--mantine-font-size-sm);white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none}:where([dir=rtl]) .m_68c77a5b{transform:translate(calc(50% - var(--slider-size) / 2), calc(var(--mantine-spacing-xs) / 2))}:where([data-mantine-color-scheme=light]) .m_68c77a5b{color:var(--mantine-color-gray-6)}:where([data-mantine-color-scheme=dark]) .m_68c77a5b{color:var(--mantine-color-dark-2)}:where(.m_dd36362e[data-orientation=vertical]) .m_68c77a5b{transform:translate(calc(var(--slider-size) + var(--mantine-spacing-xs) / 2), calc(-50% - var(--slider-size) / 2))}.m_19e66008{display:flex}.m_19e66008:where([data-orientation=horizontal]){flex-direction:row}.m_19e66008:where([data-orientation=vertical]){flex-direction:column}.m_19e5428e{flex-grow:0;flex-shrink:1;overflow:auto}.m_27f81bce{flex:0 0 var(--splitter-line-size,calc(.125rem * var(--mantine-scale)));touch-action:none;background-color:var(--splitter-handle-color,var(--mantine-color-body));outline:none;justify-content:center;align-items:center;display:flex;position:relative}.m_27f81bce:where([data-orientation=horizontal]){cursor:col-resize}.m_27f81bce:where([data-orientation=vertical]){cursor:row-resize}.m_22feb770{z-index:1;border-radius:calc(62.5rem * var(--mantine-scale));color:var(--mantine-color-dimmed);justify-content:center;align-items:center;transition:color .1s;display:flex;position:absolute}:where([data-mantine-color-scheme=light]) .m_22feb770{background-color:var(--mantine-color-white);border:calc(.0625rem * var(--mantine-scale)) solid var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_22feb770{background-color:var(--mantine-color-dark-6);border:calc(.0625rem * var(--mantine-scale)) solid var(--mantine-color-dark-4)}.m_22feb770:where([data-orientation=horizontal]){width:calc(.75rem * var(--mantine-scale));height:calc(3.75rem * var(--mantine-scale))}.m_22feb770:where([data-orientation=vertical]){width:calc(3.75rem * var(--mantine-scale));height:calc(.75rem * var(--mantine-scale))}.m_22feb770>svg{width:100%;height:100%}.m_27f81bce:focus-visible .m_22feb770{box-shadow:0 0 0 calc(.125rem * var(--mantine-scale)) var(--mantine-primary-color-filled)}.m_559cce2d{position:relative}.m_559cce2d:where([data-has-spoiler]){margin-bottom:calc(1.5rem * var(--mantine-scale))}.m_b912df4e{transition:max-height var(--spoiler-transition-duration,.2s) ease;flex-direction:column;display:flex;overflow:hidden}.m_b9131032{inset-inline-start:0;height:calc(1.5rem * var(--mantine-scale));position:absolute;top:100%}.m_6d731127{align-items:var(--stack-align,stretch);justify-content:var(--stack-justify,flex-start);gap:var(--stack-gap,var(--mantine-spacing-md));flex-direction:column;display:flex}.m_cbb4ea7e{--stepper-icon-size-xs:calc(2.125rem * var(--mantine-scale));--stepper-icon-size-sm:calc(2.25rem * var(--mantine-scale));--stepper-icon-size-md:calc(2.625rem * var(--mantine-scale));--stepper-icon-size-lg:calc(3rem * var(--mantine-scale));--stepper-icon-size-xl:calc(3.25rem * var(--mantine-scale));--stepper-icon-size:var(--stepper-icon-size-md);--stepper-color:var(--mantine-primary-color-filled);--stepper-content-padding:var(--mantine-spacing-md);--stepper-spacing:var(--mantine-spacing-md);--stepper-radius:calc(62.5rem * var(--mantine-scale));--stepper-fz:var(--mantine-font-size-md);--stepper-outline-thickness:calc(.125rem * var(--mantine-scale))}[data-mantine-color-scheme=light] .m_cbb4ea7e{--stepper-outline-color:var(--mantine-color-gray-2)}[data-mantine-color-scheme=dark] .m_cbb4ea7e{--stepper-outline-color:var(--mantine-color-dark-5)}.m_aaf89d0b{flex-wrap:nowrap;align-items:center;display:flex}.m_aaf89d0b:where([data-wrap]){gap:var(--mantine-spacing-md) 0;flex-wrap:wrap}.m_aaf89d0b:where([data-orientation=vertical]){flex-direction:column}.m_aaf89d0b:where([data-orientation=vertical]):where([data-icon-position=left]){align-items:flex-start}.m_aaf89d0b:where([data-orientation=vertical]):where([data-icon-position=right]){align-items:flex-end}.m_aaf89d0b:where([data-orientation=horizontal]){flex-direction:row}.m_2a371ac9{height:var(--stepper-outline-thickness);margin-inline:var(--mantine-spacing-md);background-color:var(--stepper-outline-color);flex:1;transition:background-color .15s}.m_2a371ac9:where([data-active]){background-color:var(--stepper-color)}.m_78da155d{padding-top:var(--stepper-content-padding)}.m_cbb57068{--step-color:var(--stepper-color);cursor:default;display:flex}.m_cbb57068:where([data-allow-click]){cursor:pointer}.m_cbb57068:where([data-icon-position=left]){flex-direction:row}.m_cbb57068:where([data-icon-position=right]){flex-direction:row-reverse}.m_f56b1e2c{align-items:center}.m_833edb7e{--separator-spacing:calc(var(--mantine-spacing-xs) / 2);min-height:calc(var(--stepper-icon-size) + var(--mantine-spacing-xl) + var(--separator-spacing));margin-top:var(--separator-spacing);justify-content:flex-start;overflow:hidden}.m_833edb7e:where(:first-of-type){margin-top:0}.m_833edb7e:where(:last-of-type){min-height:auto}.m_833edb7e:where(:last-of-type) .m_6496b3f3{display:none}.m_818e70b{position:relative}.m_6496b3f3{top:calc(var(--stepper-icon-size) + var(--separator-spacing));border-inline-start:var(--stepper-outline-thickness) solid var(--stepper-outline-color);height:100vh;position:absolute;inset-inline-start:calc(var(--stepper-icon-size) / 2)}.m_6496b3f3:where([data-active]){border-color:var(--stepper-color)}.m_1959ad01{height:var(--stepper-icon-size);width:var(--stepper-icon-size);min-height:var(--stepper-icon-size);min-width:var(--stepper-icon-size);border-radius:var(--stepper-radius);font-size:var(--stepper-fz);border:var(--stepper-outline-thickness) solid var(--stepper-outline-color);background-color:var(--stepper-outline-color);justify-content:center;align-items:center;font-weight:700;transition:background-color .15s,border-color .15s;display:flex;position:relative}:where([data-mantine-color-scheme=light]) .m_1959ad01{color:var(--mantine-color-gray-7)}:where([data-mantine-color-scheme=dark]) .m_1959ad01{color:var(--mantine-color-dark-1)}.m_1959ad01:where([data-progress]){border-color:var(--step-color)}.m_1959ad01:where([data-completed]){color:var(--stepper-icon-color,var(--mantine-color-white));background-color:var(--step-color);border-color:var(--step-color)}.m_8faaac38{display:flex}.m_a79331dc{color:var(--stepper-icon-color,var(--mantine-color-white));justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.m_1956aa2a{flex-direction:column;display:flex}.m_1956aa2a:where([data-icon-position=left]){margin-inline-start:var(--mantine-spacing-sm)}.m_1956aa2a:where([data-icon-position=right]){text-align:end;margin-inline-end:var(--mantine-spacing-sm)}.m_12051f6c{font-weight:var(--mantine-font-weight-medium);font-size:var(--stepper-fz);line-height:1}.m_164eea74{margin-top:calc(var(--stepper-spacing) / 3);margin-bottom:calc(var(--stepper-spacing) / 3);font-size:calc(var(--stepper-fz) - calc(.125rem * var(--mantine-scale)));color:var(--mantine-color-dimmed);line-height:1}.m_5f93f3bb{--switch-height-xs:calc(1rem * var(--mantine-scale));--switch-height-sm:calc(1.25rem * var(--mantine-scale));--switch-height-md:calc(1.5rem * var(--mantine-scale));--switch-height-lg:calc(1.875rem * var(--mantine-scale));--switch-height-xl:calc(2.25rem * var(--mantine-scale));--switch-width-xs:calc(2rem * var(--mantine-scale));--switch-width-sm:calc(2.375rem * var(--mantine-scale));--switch-width-md:calc(2.875rem * var(--mantine-scale));--switch-width-lg:calc(3.5rem * var(--mantine-scale));--switch-width-xl:calc(4.5rem * var(--mantine-scale));--switch-thumb-size-xs:calc(.75rem * var(--mantine-scale));--switch-thumb-size-sm:calc(.875rem * var(--mantine-scale));--switch-thumb-size-md:calc(1.125rem * var(--mantine-scale));--switch-thumb-size-lg:calc(1.375rem * var(--mantine-scale));--switch-thumb-size-xl:calc(1.75rem * var(--mantine-scale));--switch-label-font-size-xs:calc(.3125rem * var(--mantine-scale));--switch-label-font-size-sm:calc(.375rem * var(--mantine-scale));--switch-label-font-size-md:calc(.4375rem * var(--mantine-scale));--switch-label-font-size-lg:calc(.5625rem * var(--mantine-scale));--switch-label-font-size-xl:calc(.6875rem * var(--mantine-scale));--switch-track-label-padding-xs:calc(.125rem * var(--mantine-scale));--switch-track-label-padding-sm:calc(.15625rem * var(--mantine-scale));--switch-track-label-padding-md:calc(.1875rem * var(--mantine-scale));--switch-track-label-padding-lg:calc(.1875rem * var(--mantine-scale));--switch-track-label-padding-xl:calc(.21875rem * var(--mantine-scale));--switch-height:var(--switch-height-sm);--switch-width:var(--switch-width-sm);--switch-thumb-size:var(--switch-thumb-size-sm);--switch-label-font-size:var(--switch-label-font-size-sm);--switch-track-label-padding:var(--switch-track-label-padding-sm);--switch-radius:calc(62.5rem * var(--mantine-scale));--switch-color:var(--mantine-primary-color-filled);--switch-disabled-color:var(--mantine-color-disabled);position:relative}.m_926b4011{opacity:0;white-space:nowrap;width:100%;height:100%;margin:0;padding:0;position:absolute;overflow:hidden}.m_9307d992{-webkit-tap-highlight-color:transparent;cursor:var(--switch-cursor,var(--mantine-cursor-type));border-radius:var(--switch-radius);background-color:var(--switch-bg);height:var(--switch-height);min-width:var(--switch-width);appearance:none;font-size:var(--switch-label-font-size);font-weight:var(--mantine-font-weight-medium);order:var(--switch-order,1);-webkit-user-select:none;user-select:none;z-index:0;color:var(--switch-text-color);align-items:center;margin:0;line-height:0;transition:background-color .15s,border-color .15s;display:flex;position:relative;overflow:hidden}.m_9307d992:where([data-without-labels]){width:var(--switch-width)}.m_926b4011:focus-visible+.m_9307d992{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_926b4011:checked+.m_9307d992{--switch-bg:var(--switch-color);--switch-text-color:var(--mantine-color-white)}.m_926b4011:disabled+.m_9307d992,.m_926b4011[data-disabled]+.m_9307d992{--switch-bg:var(--switch-disabled-color);--switch-cursor:not-allowed}[data-mantine-color-scheme=light] .m_9307d992{--switch-bg:var(--mantine-color-gray-3);--switch-text-color:var(--mantine-color-gray-6)}[data-mantine-color-scheme=dark] .m_9307d992{--switch-bg:var(--mantine-color-dark-5);--switch-text-color:var(--mantine-color-dark-1)}.m_9307d992[data-label-position=left]{--switch-order:2}.m_93039a1d{z-index:1;border-radius:var(--switch-radius);background-color:var(--switch-thumb-bg,var(--mantine-color-white));height:var(--switch-thumb-size);width:var(--switch-thumb-size);transition:inset-inline-start .15s;display:flex;position:absolute;inset-inline-start:var(--switch-thumb-start,var(--switch-track-label-padding))}.m_93039a1d:where([data-with-thumb-indicator]):before{content:"";background-color:var(--switch-bg);border-radius:var(--switch-radius);width:40%;height:40%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.m_93039a1d>*{margin:auto}.m_926b4011:checked+*>.m_93039a1d{--switch-thumb-start:calc(100% - var(--switch-thumb-size) - var(--switch-track-label-padding))}.m_926b4011:disabled+*>.m_93039a1d,.m_926b4011[data-disabled]+*>.m_93039a1d{--switch-thumb-bg:var(--switch-thumb-bg-disabled)}[data-mantine-color-scheme=light] .m_93039a1d{--switch-thumb-bg-disabled:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m_93039a1d{--switch-thumb-bg-disabled:var(--mantine-color-dark-3)}.m_8277e082{height:100%;min-width:calc(var(--switch-width) - var(--switch-thumb-size));padding-inline:var(--switch-track-label-padding);place-content:center;margin-inline-start:calc(var(--switch-thumb-size) + var(--switch-track-label-padding));transition:margin .15s;display:grid}.m_926b4011:checked+*>.m_8277e082{margin-inline-start:0;margin-inline-end:calc(var(--switch-thumb-size) + var(--switch-track-label-padding))}.m_b23fa0ef{border-collapse:collapse;border-spacing:0;width:100%;line-height:var(--mantine-line-height);font-size:var(--mantine-font-size-sm);table-layout:var(--table-layout,auto);caption-side:var(--table-caption-side,bottom);border:none}:where([data-mantine-color-scheme=light]) .m_b23fa0ef{--table-hover-color:var(--mantine-color-gray-1);--table-striped-color:var(--mantine-color-gray-0);--table-border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_b23fa0ef{--table-hover-color:var(--mantine-color-dark-5);--table-striped-color:var(--mantine-color-dark-6);--table-border-color:var(--mantine-color-dark-4)}.m_b23fa0ef:where([data-with-table-border]){border:calc(.0625rem * var(--mantine-scale)) solid var(--table-border-color)}.m_b23fa0ef:where([data-tabular-nums]){font-variant-numeric:tabular-nums}.m_b23fa0ef:where([data-variant=vertical]) :where(.m_4e7aa4f3){font-weight:var(--mantine-font-weight-medium)}:where([data-mantine-color-scheme=light]) .m_b23fa0ef:where([data-variant=vertical]) :where(.m_4e7aa4f3){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_b23fa0ef:where([data-variant=vertical]) :where(.m_4e7aa4f3){background-color:var(--mantine-color-dark-6)}.m_4e7aa4f3{text-align:start}.m_4e7aa4fd{background-color:#0000;border-bottom:none}@media (hover:hover){.m_4e7aa4fd:hover:where([data-hover]){background-color:var(--tr-hover-bg)}}@media (hover:none){.m_4e7aa4fd:active:where([data-hover]){background-color:var(--tr-hover-bg)}}.m_4e7aa4fd:where([data-with-row-border]){border-bottom:calc(.0625rem * var(--mantine-scale)) solid var(--table-border-color)}.m_4e7aa4ef,.m_4e7aa4f3{padding:var(--table-vertical-spacing) var(--table-horizontal-spacing,var(--mantine-spacing-xs))}.m_4e7aa4ef:where([data-with-column-border]:not(:first-child)),.m_4e7aa4f3:where([data-with-column-border]:not(:first-child)){border-inline-start:calc(.0625rem * var(--mantine-scale)) solid var(--table-border-color)}.m_4e7aa4ef:where([data-with-column-border]:not(:last-child)),.m_4e7aa4f3:where([data-with-column-border]:not(:last-child)){border-inline-end:calc(.0625rem * var(--mantine-scale)) solid var(--table-border-color)}.m_b2404537>:where(tr):where([data-with-row-border]:last-of-type){border-bottom:none}.m_b2404537>:where(tr):where([data-striped=odd]:nth-of-type(odd)),.m_b2404537>:where(tr):where([data-striped=even]:nth-of-type(2n)){background-color:var(--table-striped-color)}.m_b2404537>:where(tr)[data-hover]{--tr-hover-bg:var(--table-highlight-on-hover-color,var(--table-hover-color))}.m_b242d975{top:var(--table-sticky-header-offset,0);z-index:3}.m_b242d975:where([data-sticky]){position:sticky}.m_b242d975:where([data-sticky]) :where(.m_4e7aa4f3){top:var(--table-sticky-header-offset,0);background-color:var(--mantine-color-body);position:sticky}.m_b242d975:where([data-sticky]) :where(.m_4e7aa4fd[data-with-row-border]){border-bottom:none}.m_b242d975:where([data-sticky]) :where(.m_4e7aa4fd[data-with-row-border]) :where(.m_4e7aa4f3){box-shadow:inset 0 -1px 0 var(--table-border-color)}.m_b242d975:where([data-sticky]) :where(.m_4e7aa4f3[data-with-column-border]){border-inline:none}.m_b242d975:where([data-sticky]) :where(.m_4e7aa4f3[data-with-column-border]:not(:first-child)):before{content:"";width:calc(.0625rem * var(--mantine-scale));background-color:var(--table-border-color);position:absolute;inset-block:0;inset-inline-start:calc(-.03125rem * var(--mantine-scale))}:where([data-with-table-border]) .m_b242d975[data-sticky]{top:var(--table-sticky-header-offset,0);z-index:4;border-top:none;position:sticky}:where([data-with-table-border]) .m_b242d975[data-sticky]:before{content:"";left:0;top:calc(-.03125rem * var(--mantine-scale));width:100%;height:calc(.0625rem * var(--mantine-scale));background-color:var(--table-border-color);z-index:5;display:block;position:absolute}:where([data-with-table-border]) .m_b242d975[data-sticky] .m_4e7aa4f3:first-child{border-top:none}.m_9e5a3ac7{color:var(--mantine-color-dimmed)}.m_9e5a3ac7:where([data-side=top]){margin-bottom:var(--mantine-spacing-xs)}.m_9e5a3ac7:where([data-side=bottom]){margin-top:var(--mantine-spacing-xs)}.m_a100c15{overflow-x:var(--table-overflow)}.m_62259741{min-width:var(--table-min-width);max-height:var(--table-max-height)}.m_bcaa9990{--toc-depth-offset:.8em;flex-direction:column;display:flex}.m_375a65ef{font-size:var(--toc-size,var(--mantine-font-size-md));border-radius:var(--toc-radius,var(--mantine-radius-default));padding:.3em .8em;padding-left:max(calc(var(--depth-offset) * var(--toc-depth-offset)), .8em);display:block}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_375a65ef:where(:hover):where(:not([data-variant=none])){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_375a65ef:where(:hover):where(:not([data-variant=none])){background-color:var(--mantine-color-dark-5)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_375a65ef:where(:active):where(:not([data-variant=none])){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_375a65ef:where(:active):where(:not([data-variant=none])){background-color:var(--mantine-color-dark-5)}}.m_375a65ef:where([data-active]){background-color:var(--toc-bg);color:var(--toc-color)}[data-mantine-color-scheme=light] .m_89d60db1{--tab-border-color:var(--mantine-color-gray-3)}[data-mantine-color-scheme=dark] .m_89d60db1{--tab-border-color:var(--mantine-color-dark-4)}.m_89d60db1{display:var(--tabs-display);flex-direction:var(--tabs-flex-direction);--tabs-list-direction:row;--tabs-panel-grow:unset;--tabs-display:block;--tabs-flex-direction:row;--tabs-list-border-width:0;--tabs-list-border-size:0 0 var(--tabs-list-border-width) 0;--tabs-list-gap:unset;--tabs-list-line-bottom:0;--tabs-list-line-top:unset;--tabs-list-line-start:0;--tabs-list-line-end:0;--tab-radius:var(--tabs-radius) var(--tabs-radius) 0 0;--tab-border-width:0 0 var(--tabs-list-border-width) 0}.m_89d60db1[data-inverted]{--tabs-list-line-bottom:unset;--tabs-list-line-top:0;--tab-radius:0 0 var(--tabs-radius) var(--tabs-radius);--tab-border-width:var(--tabs-list-border-width) 0 0 0}.m_89d60db1[data-inverted] .m_576c9d4:before{top:0;bottom:unset}.m_89d60db1[data-orientation=vertical]{--tabs-list-line-start:unset;--tabs-list-line-end:0;--tabs-list-line-top:0;--tabs-list-line-bottom:0;--tabs-list-border-size:0 var(--tabs-list-border-width) 0 0;--tab-border-width:0 var(--tabs-list-border-width) 0 0;--tab-radius:var(--tabs-radius) 0 0 var(--tabs-radius);--tabs-list-direction:column;--tabs-panel-grow:1;--tabs-display:flex}[dir=rtl] .m_89d60db1[data-orientation=vertical]{--tabs-list-border-size:0 0 0 var(--tabs-list-border-width);--tab-border-width:0 0 0 var(--tabs-list-border-width);--tab-radius:0 var(--tabs-radius) var(--tabs-radius) 0}.m_89d60db1[data-orientation=vertical][data-placement=right]{--tabs-flex-direction:row-reverse;--tabs-list-line-start:0;--tabs-list-line-end:unset;--tabs-list-border-size:0 0 0 var(--tabs-list-border-width);--tab-border-width:0 0 0 var(--tabs-list-border-width);--tab-radius:0 var(--tabs-radius) var(--tabs-radius) 0}[dir=rtl] .m_89d60db1[data-orientation=vertical][data-placement=right]{--tabs-list-border-size:0 var(--tabs-list-border-width) 0 0;--tab-border-width:0 var(--tabs-list-border-width) 0 0;--tab-radius:var(--tabs-radius) 0 0 var(--tabs-radius)}.m_89d60db1[data-variant=default]{--tabs-list-border-width:calc(.125rem * var(--mantine-scale))}[data-mantine-color-scheme=light] .m_89d60db1[data-variant=default]{--tab-hover-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m_89d60db1[data-variant=default]{--tab-hover-color:var(--mantine-color-dark-6)}.m_89d60db1[data-variant=outline]{--tabs-list-border-width:calc(.0625rem * var(--mantine-scale))}.m_89d60db1[data-variant=pills]{--tabs-list-gap:calc(var(--mantine-spacing-sm) / 2)}[data-mantine-color-scheme=light] .m_89d60db1[data-variant=pills]{--tab-hover-color:var(--mantine-color-gray-0)}[data-mantine-color-scheme=dark] .m_89d60db1[data-variant=pills]{--tab-hover-color:var(--mantine-color-dark-6)}.m_89d33d6d{justify-content:var(--tabs-justify,flex-start);flex-wrap:wrap;flex-direction:var(--tabs-list-direction);gap:var(--tabs-list-gap);display:flex}.m_89d33d6d:where([data-grow]) .m_4ec4dce6{flex:1}.m_b0c91715{flex-grow:var(--tabs-panel-grow)}.m_4ec4dce6{padding:var(--mantine-spacing-xs) var(--mantine-spacing-md);font-size:var(--mantine-font-size-sm);white-space:nowrap;z-index:0;-webkit-user-select:none;user-select:none;align-items:center;line-height:1;display:flex;position:relative}.m_4ec4dce6:where(:disabled,[data-disabled]){opacity:.5;cursor:not-allowed}.m_4ec4dce6:focus{z-index:1}.m_fc420b1f{justify-content:center;align-items:center;display:flex}.m_fc420b1f:where([data-position=left]:not(:only-child)){margin-inline-end:var(--mantine-spacing-xs)}.m_fc420b1f:where([data-position=right]:not(:only-child)){margin-inline-start:var(--mantine-spacing-xs)}.m_42bbd1ae{text-align:center;flex:1}.m_576c9d4{position:relative}.m_576c9d4:before{content:"";border:1px solid var(--tab-border-color);bottom:var(--tabs-list-line-bottom);inset-inline-start:var(--tabs-list-line-start);inset-inline-end:var(--tabs-list-line-end);top:var(--tabs-list-line-top);position:absolute}.m_539e827b{border-radius:var(--tab-radius);border-width:var(--tab-border-width);background-color:#0000;border-style:solid;border-color:#0000}.m_539e827b:where([data-active]){border-color:var(--tabs-color)}@media (hover:hover){.m_539e827b:hover{background-color:var(--tab-hover-color)}.m_539e827b:hover:where(:not([data-active])){border-color:var(--tab-border-color)}}@media (hover:none){.m_539e827b:active{background-color:var(--tab-hover-color)}.m_539e827b:active:where(:not([data-active])){border-color:var(--tab-border-color)}}@media (hover:hover){.m_539e827b:disabled:hover,.m_539e827b[data-disabled]:hover{background-color:#0000}}@media (hover:none){.m_539e827b:disabled:active,.m_539e827b[data-disabled]:active{background-color:#0000}}.m_6772fbd5{position:relative}.m_6772fbd5:before{content:"";border-color:var(--tab-border-color);border-width:var(--tabs-list-border-size);bottom:var(--tabs-list-line-bottom);inset-inline-start:var(--tabs-list-line-start);inset-inline-end:var(--tabs-list-line-end);top:var(--tabs-list-line-top);border-style:solid;position:absolute}.m_b59ab47c{border-top:calc(.0625rem * var(--mantine-scale)) solid transparent;border-bottom:calc(.0625rem * var(--mantine-scale)) solid transparent;border-inline:calc(.0625rem * var(--mantine-scale)) solid transparent;border-top-color:var(--tab-border-top-color);border-bottom-color:var(--tab-border-bottom-color);border-radius:var(--tab-radius);--tab-border-bottom-color:transparent;--tab-border-top-color:transparent;--tab-border-inline-end-color:transparent;--tab-border-inline-start-color:transparent;position:relative}.m_b59ab47c:where([data-active]):before{content:"";background-color:var(--tab-border-color);bottom:var(--tab-before-bottom,calc(-.0625rem * var(--mantine-scale)));inset-inline-start:var(--tab-before-start,calc(-.0625rem * var(--mantine-scale)));inset-inline-end:var(--tab-before-end,auto);top:var(--tab-before-top,auto);width:calc(.0625rem * var(--mantine-scale));height:calc(.0625rem * var(--mantine-scale));position:absolute}.m_b59ab47c:where([data-active]):after{content:"";background-color:var(--tab-border-color);bottom:var(--tab-after-bottom,calc(-.0625rem * var(--mantine-scale)));inset-inline-start:var(--tab-after-start,auto);inset-inline-end:var(--tab-after-end,calc(-.0625rem * var(--mantine-scale)));top:var(--tab-after-top,auto);width:calc(.0625rem * var(--mantine-scale));height:calc(.0625rem * var(--mantine-scale));position:absolute}.m_b59ab47c:where([data-active]){border-top-color:var(--tab-border-top-color);border-bottom-color:var(--tab-border-bottom-color);border-inline-start-color:var(--tab-border-inline-start-color);border-inline-end-color:var(--tab-border-inline-end-color);--tab-border-top-color:var(--tab-border-color);--tab-border-inline-start-color:var(--tab-border-color);--tab-border-inline-end-color:var(--tab-border-color);--tab-border-bottom-color:var(--mantine-color-body)}.m_b59ab47c:where([data-active])[data-inverted]{--tab-border-bottom-color:var(--tab-border-color);--tab-border-top-color:var(--mantine-color-body);--tab-before-bottom:auto;--tab-before-top:calc(-.0625rem * var(--mantine-scale));--tab-after-bottom:auto;--tab-after-top:calc(-.0625rem * var(--mantine-scale))}.m_b59ab47c:where([data-active])[data-orientation=vertical][data-placement=left]{--tab-border-inline-end-color:var(--mantine-color-body);--tab-border-inline-start-color:var(--tab-border-color);--tab-border-bottom-color:var(--tab-border-color);--tab-before-end:calc(-.0625rem * var(--mantine-scale));--tab-before-start:auto;--tab-before-bottom:auto;--tab-before-top:calc(-.0625rem * var(--mantine-scale));--tab-after-start:auto;--tab-after-end:calc(-.0625rem * var(--mantine-scale))}.m_b59ab47c:where([data-active])[data-orientation=vertical][data-placement=right]{--tab-border-inline-start-color:var(--mantine-color-body);--tab-border-inline-end-color:var(--tab-border-color);--tab-border-bottom-color:var(--tab-border-color);--tab-before-start:calc(-.0625rem * var(--mantine-scale));--tab-before-end:auto;--tab-before-bottom:auto;--tab-before-top:calc(-.0625rem * var(--mantine-scale));--tab-after-end:auto;--tab-after-start:calc(-.0625rem * var(--mantine-scale))}.m_c3381914{border-radius:var(--tabs-radius);background-color:var(--tab-bg);color:var(--tab-color);--tab-bg:transparent;--tab-color:inherit}@media (hover:hover){.m_c3381914:not([data-disabled]):hover{--tab-bg:var(--tab-hover-color)}}@media (hover:none){.m_c3381914:not([data-disabled]):active{--tab-bg:var(--tab-hover-color)}}.m_c3381914[data-active][data-active]{--tab-bg:var(--tabs-color);--tab-color:var(--tabs-text-color,var(--mantine-color-white))}@media (hover:hover){.m_c3381914[data-active][data-active]:hover{--tab-bg:var(--tabs-color)}}@media (hover:none){.m_c3381914[data-active][data-active]:active{--tab-bg:var(--tabs-color)}}.m_7341320d{--ti-size-xs:calc(1.125rem * var(--mantine-scale));--ti-size-sm:calc(1.375rem * var(--mantine-scale));--ti-size-md:calc(1.75rem * var(--mantine-scale));--ti-size-lg:calc(2.125rem * var(--mantine-scale));--ti-size-xl:calc(2.75rem * var(--mantine-scale));--ti-size:var(--ti-size-md);-webkit-user-select:none;user-select:none;width:var(--ti-size);height:var(--ti-size);min-width:var(--ti-size);min-height:var(--ti-size);border-radius:var(--ti-radius,var(--mantine-radius-default));background:var(--ti-bg,var(--mantine-primary-color-filled));color:var(--ti-color,var(--mantine-color-white));border:var(--ti-bd,1px solid transparent);justify-content:center;align-items:center;line-height:1;display:inline-flex;position:relative}.m_43657ece{--offset:calc(var(--tl-bullet-size) / 2 + var(--tl-line-width) / 2);--tl-bullet-size:calc(1.25rem * var(--mantine-scale));--tl-line-width:calc(.25rem * var(--mantine-scale));--tl-radius:calc(62.5rem * var(--mantine-scale));--tl-color:var(--mantine-primary-color-filled)}.m_43657ece:where(:not([data-opposite])):where([data-align=left]){padding-inline-start:var(--offset)}.m_43657ece:where(:not([data-opposite])):where([data-align=right]){padding-inline-end:var(--offset)}.m_2ebe8099{font-weight:var(--mantine-font-weight-medium);margin-bottom:calc(var(--mantine-spacing-xs) / 2);line-height:1}.m_436178ff{--item-border:var(--tl-line-width) var(--tli-border-style,solid) var(--item-border-color);color:var(--mantine-color-text);position:relative}.m_436178ff:before{content:"";pointer-events:none;top:0;inset-inline-start:var(--timeline-line-start,0);inset-inline-end:var(--timeline-line-end,0);bottom:calc(var(--mantine-spacing-xl) * -1);border-inline-start:var(--item-border);display:var(--timeline-line-display,none);position:absolute}.m_43657ece:where(:not([data-opposite]))[data-align=left] .m_436178ff:before{--timeline-line-start:calc(var(--tl-line-width) * -1);--timeline-line-end:auto}.m_43657ece:where(:not([data-opposite]))[data-align=right] .m_436178ff:before{--timeline-line-start:auto;--timeline-line-end:calc(var(--tl-line-width) * -1)}.m_43657ece:where([data-opposite]) .m_436178ff:before{--timeline-line-start:calc(50% - var(--tl-line-width) / 2);--timeline-line-end:auto}.m_43657ece:where(:not([data-opposite])):where([data-align=left]) .m_436178ff{text-align:start;padding-inline-start:var(--offset)}.m_43657ece:where(:not([data-opposite])):where([data-align=right]) .m_436178ff{text-align:end;padding-inline-end:var(--offset)}.m_43657ece:where([data-opposite]) .m_436178ff{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);display:grid}:where([data-mantine-color-scheme=light]) .m_436178ff{--item-border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_436178ff{--item-border-color:var(--mantine-color-dark-4)}.m_436178ff:where([data-line-active]):before{border-color:var(--tli-color,var(--tl-color))}.m_436178ff:where(:not(:last-of-type)){--timeline-line-display:block}.m_436178ff:where(:not(:first-of-type)){margin-top:var(--mantine-spacing-xl)}.m_8affcee1{width:var(--tl-bullet-size);height:var(--tl-bullet-size);border-radius:var(--tli-radius,var(--tl-radius));border:var(--tl-line-width) solid;background-color:var(--mantine-color-body);color:var(--mantine-color-text);justify-content:center;align-items:center;display:flex;position:absolute;top:0}:where([data-mantine-color-scheme=light]) .m_8affcee1{border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_8affcee1{border-color:var(--mantine-color-dark-4)}.m_43657ece:where(:not([data-opposite])):where([data-align=left]) .m_8affcee1{inset-inline-start:calc((var(--tl-bullet-size) / 2 + var(--tl-line-width) / 2) * -1);inset-inline-end:auto}.m_43657ece:where(:not([data-opposite])):where([data-align=right]) .m_8affcee1{inset-inline-start:auto;inset-inline-end:calc((var(--tl-bullet-size) / 2 + var(--tl-line-width) / 2) * -1)}.m_43657ece:where([data-opposite]) .m_8affcee1{grid-area:1/2;position:relative;inset-inline-start:unset;inset-inline-end:unset}.m_8affcee1:where([data-with-child]){border-width:var(--tl-line-width)}:where([data-mantine-color-scheme=light]) .m_8affcee1:where([data-with-child]){background-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_8affcee1:where([data-with-child]){background-color:var(--mantine-color-dark-4)}.m_8affcee1:where([data-active]){border-color:var(--tli-color,var(--tl-color));background-color:var(--mantine-color-white);color:var(--tl-icon-color,var(--mantine-color-white))}.m_8affcee1:where([data-active]):where([data-with-child]){background-color:var(--tli-color,var(--tl-color));color:var(--tl-icon-color,var(--mantine-color-white))}.m_43657ece:where(:not([data-opposite])):where([data-align=left]) .m_540e8f41{text-align:start;padding-inline-start:var(--offset)}.m_43657ece:where(:not([data-opposite])):where([data-align=right]) .m_540e8f41{text-align:end;padding-inline-end:var(--offset)}.m_43657ece:where([data-opposite]):where([data-align=left]) .m_540e8f41{text-align:start;grid-area:1/3;padding-inline-start:var(--offset)}.m_43657ece:where([data-opposite]):where([data-align=right]) .m_540e8f41{text-align:end;grid-area:1/1;padding-inline-end:var(--offset)}.m_43657ece:where([data-opposite]):where([data-align=left]) .m_436178ff:where([data-alternate]) .m_540e8f41{text-align:end;grid-column:1;padding-inline-start:0;padding-inline-end:var(--offset)}.m_43657ece:where([data-opposite]):where([data-align=right]) .m_436178ff:where([data-alternate]) .m_540e8f41{text-align:start;grid-column:3;padding-inline-start:var(--offset);padding-inline-end:0}.m_43657ece:where([data-align=left]) .m_f3ba506{text-align:end;grid-area:1/1;padding-inline-end:var(--offset)}.m_43657ece:where([data-align=right]) .m_f3ba506{text-align:start;grid-area:1/3;padding-inline-start:var(--offset)}.m_43657ece:where([data-align=left]) .m_436178ff:where([data-alternate]) .m_f3ba506{text-align:start;grid-column:3;padding-inline-start:var(--offset);padding-inline-end:0}.m_43657ece:where([data-align=right]) .m_436178ff:where([data-alternate]) .m_f3ba506{text-align:end;grid-column:1;padding-inline-start:0;padding-inline-end:var(--offset)}.m_8a5d1357{font-weight:var(--title-fw);font-size:var(--title-fz);line-height:var(--title-lh);font-family:var(--mantine-font-family-headings);text-wrap:var(--title-text-wrap,var(--mantine-heading-text-wrap));margin:0}.m_8a5d1357:where([data-line-clamp]){text-overflow:ellipsis;-webkit-line-clamp:var(--title-line-clamp);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:where([data-tree-root]){--level-offset:var(--mantine-spacing-lg);--tree-line-width:calc(.0625rem * var(--mantine-scale));--tree-line-color:var(--mantine-color-default-border)}.m_f698e191{-webkit-user-select:none;user-select:none;margin:0;padding:0}.m_75f3ecf{margin:0;padding:0}.m_f6970eb1{cursor:pointer;outline:0;margin:0;padding:0;list-style:none}.m_f6970eb1:focus-visible>.m_dc283425,.m_f6970eb1[data-focus-ring]:focus>.m_dc283425{outline:2px solid var(--mantine-primary-color-filled);outline-offset:calc(.125rem * var(--mantine-scale))}.m_dc283425{padding-inline-start:var(--label-offset);position:relative}:where([data-mantine-color-scheme=light]) .m_dc283425:where([data-selected]){background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_dc283425:where([data-selected]){background-color:var(--mantine-color-dark-5)}.m_dc283425:where([data-dragging]){opacity:.4}.m_dc283425:where([data-drag-over=before]):before{content:"";top:calc(-.0625rem * var(--mantine-scale));height:calc(.125rem * var(--mantine-scale));background-color:var(--mantine-primary-color-filled);pointer-events:none;z-index:1;position:absolute;inset-inline-start:var(--label-offset,0);inset-inline-end:0}.m_dc283425:where([data-drag-over=after]):after{content:"";bottom:calc(-.0625rem * var(--mantine-scale));height:calc(.125rem * var(--mantine-scale));background-color:var(--mantine-primary-color-filled);pointer-events:none;z-index:1;position:absolute;inset-inline-start:var(--label-offset,0);inset-inline-end:0}.m_dc283425:where([data-drag-over=inside]){background-color:var(--mantine-primary-color-light)}:where([data-with-lines]) .m_f6970eb1{position:relative}:where([data-with-lines]) .m_f6970eb1:not([data-level="1"]):before{content:"";top:calc(.75rem * var(--mantine-scale));width:calc(var(--level-offset) / 2);border-top:var(--tree-line-width) solid var(--tree-line-color);pointer-events:none;z-index:1;height:0;position:absolute;inset-inline-start:calc(var(--label-offset) - var(--level-offset) / 2)}:where([data-with-lines]) .m_75f3ecf>.m_f6970eb1:after{content:"";top:0;bottom:0;border-inline-start:var(--tree-line-width) solid var(--tree-line-color);pointer-events:none;z-index:1;width:0;position:absolute;inset-inline-start:calc(var(--label-offset) - var(--level-offset) / 2)}:where([data-with-lines]) .m_75f3ecf>.m_f6970eb1:last-child:after{height:calc(.75rem * var(--mantine-scale));bottom:auto}:where([data-with-lines]) .m_f6970eb1:where([data-dragging]):before,:where([data-with-lines]) .m_f6970eb1:where([data-dragging]):after,:where([data-with-lines]) .m_f6970eb1:where([data-dragging]) .m_c03b303c{display:none}.m_c03b303c{width:0;top:0;bottom:0;border-inline-start:var(--tree-line-width) solid var(--tree-line-color);pointer-events:none;z-index:1;display:none;position:absolute;inset-inline-start:calc((var(--flat-line-column) - 1.5) * var(--level-offset))}:where([data-with-lines]) .m_c03b303c{display:block}.m_bf7448d9{height:calc(.75rem * var(--mantine-scale));bottom:auto}.m_529d33e8{--ts-level-offset:calc(1.25rem * var(--mantine-scale));--ts-line-width:calc(.0625rem * var(--mantine-scale));--ts-line-color:var(--mantine-color-default-border);--ts-option-padding-y:calc(.25rem * var(--mantine-scale));--ts-option-padding-x:calc(.5rem * var(--mantine-scale))}.m_28bb748{align-items:center;gap:calc(.375rem * var(--mantine-scale));padding:var(--ts-option-padding-y) var(--ts-option-padding-x);padding-inline-start:var(--ts-option-padding-x);display:flex;position:relative}.m_aa3e3f86{--_ts-expand-icon-size:calc(1.45 * var(--combobox-option-fz,var(--mantine-font-size-sm)));width:var(--_ts-expand-icon-size);min-width:var(--_ts-expand-icon-size);height:var(--_ts-expand-icon-size);border-radius:var(--mantine-radius-sm);cursor:pointer;color:var(--mantine-color-dimmed);justify-content:center;align-items:center;display:flex;transform:rotate(-90deg)}:where([data-combobox-selected]) .m_aa3e3f86{color:var(--mantine-color-white)}:where([dir=rtl]) .m_aa3e3f86{transform:rotate(90deg)}.m_aa3e3f86:where([data-expanded]){transform:rotate(0)}@media (hover:hover){:where([data-mantine-color-scheme=light]) .m_aa3e3f86:hover{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_aa3e3f86:hover{background-color:var(--mantine-color-dark-5)}}@media (hover:none){:where([data-mantine-color-scheme=light]) .m_aa3e3f86:active{background-color:var(--mantine-color-gray-1)}:where([data-mantine-color-scheme=dark]) .m_aa3e3f86:active{background-color:var(--mantine-color-dark-5)}}.m_eaa4cdee{opacity:.4;width:.8em;min-width:.8em;height:.8em;margin-inline-start:auto}:where([data-combobox-selected]) .m_eaa4cdee{opacity:1}.m_ffe3a9c1{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.m_57207d5d,.m_41b9db0b{border-inline-start:var(--ts-line-width) solid var(--ts-line-color);pointer-events:none;width:0;position:absolute;top:0;bottom:0}.m_41b9db0b:where([data-last]){height:50%;bottom:auto}.m_1246e79{border-top:var(--ts-line-width) solid var(--ts-line-color);pointer-events:none;height:0;position:absolute;top:50%}.m_d08caa0 :first-child{margin-top:0}.m_d08caa0 :last-child{margin-bottom:0}.m_d08caa0 :where(h1,h2,h3,h4,h5,h6){margin-bottom:var(--mantine-spacing-xs);text-wrap:var(--mantine-heading-text-wrap);font-family:var(--mantine-font-family-headings)}.m_d08caa0 :where(h1){margin-top:calc(1.5 * var(--mantine-spacing-xl));font-size:var(--mantine-h1-font-size);line-height:var(--mantine-h1-line-height);font-weight:var(--mantine-h1-font-weight)}.m_d08caa0 :where(h2){margin-top:var(--mantine-spacing-xl);font-size:var(--mantine-h2-font-size);line-height:var(--mantine-h2-line-height);font-weight:var(--mantine-h2-font-weight)}.m_d08caa0 :where(h3){margin-top:calc(.8 * var(--mantine-spacing-xl));font-size:var(--mantine-h3-font-size);line-height:var(--mantine-h3-line-height);font-weight:var(--mantine-h3-font-weight)}.m_d08caa0 :where(h4){margin-top:calc(.8 * var(--mantine-spacing-xl));font-size:var(--mantine-h4-font-size);line-height:var(--mantine-h4-line-height);font-weight:var(--mantine-h4-font-weight)}.m_d08caa0 :where(h5){margin-top:calc(.5 * var(--mantine-spacing-xl));font-size:var(--mantine-h5-font-size);line-height:var(--mantine-h5-line-height);font-weight:var(--mantine-h5-font-weight)}.m_d08caa0 :where(h6){margin-top:calc(.5 * var(--mantine-spacing-xl));font-size:var(--mantine-h6-font-size);line-height:var(--mantine-h6-line-height);font-weight:var(--mantine-h6-font-weight)}.m_d08caa0 :where(img){max-width:100%;margin-bottom:var(--mantine-spacing-xs)}.m_d08caa0 :where(p){margin-top:0;margin-bottom:var(--mantine-spacing-lg)}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(mark){background-color:var(--mantine-color-yellow-2);color:inherit}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(mark){background-color:var(--mantine-color-yellow-5);color:var(--mantine-color-black)}.m_d08caa0 :where(a){color:var(--mantine-color-anchor);text-decoration:none}@media (hover:hover){.m_d08caa0 :where(a):hover{text-decoration:underline}}@media (hover:none){.m_d08caa0 :where(a):active{text-decoration:underline}}.m_d08caa0 :where(hr){margin-top:var(--mantine-spacing-md);margin-bottom:var(--mantine-spacing-md);border:0;border-top:calc(.0625rem * var(--mantine-scale)) solid}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(hr){border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(hr){border-color:var(--mantine-color-dark-3)}.m_d08caa0 :where(pre){padding:var(--mantine-spacing-xs);line-height:var(--mantine-line-height);margin:0;margin-top:var(--mantine-spacing-md);margin-bottom:var(--mantine-spacing-md);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs);border-radius:var(--mantine-radius-sm);overflow-x:auto}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(pre){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(pre){background-color:var(--mantine-color-dark-8)}.m_d08caa0 :where(pre) :where(code){color:inherit;background-color:#0000;border:0;border-radius:0;padding:0}.m_d08caa0 :where(kbd){--kbd-fz:calc(.75rem * var(--mantine-scale));--kbd-padding:calc(.1875rem * var(--mantine-scale)) calc(.3125rem * var(--mantine-scale));font-family:var(--mantine-font-family-monospace);line-height:var(--mantine-line-height);font-weight:var(--mantine-font-weight-bold);padding:var(--kbd-padding);font-size:var(--kbd-fz);border-radius:var(--mantine-radius-sm);border:calc(.0625rem * var(--mantine-scale)) solid;border-bottom-width:calc(.1875rem * var(--mantine-scale))}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(kbd){border-color:var(--mantine-color-gray-3);color:var(--mantine-color-gray-7);background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(kbd){border-color:var(--mantine-color-dark-3);color:var(--mantine-color-dark-0);background-color:var(--mantine-color-dark-5)}.m_d08caa0 :where(code){line-height:var(--mantine-line-height);padding:calc(.0625rem * var(--mantine-scale)) calc(.3125rem * var(--mantine-scale));border-radius:var(--mantine-radius-sm);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-xs)}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(code){background-color:var(--mantine-color-gray-0);color:var(--mantine-color-black)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(code){background-color:var(--mantine-color-dark-5);color:var(--mantine-color-white)}.m_d08caa0 :where(ul,ol):not([data-type=taskList]){margin-bottom:var(--mantine-spacing-md);padding-inline-start:var(--mantine-spacing-xl);list-style-position:outside}.m_d08caa0 :where(table){border-collapse:collapse;caption-side:bottom;width:100%;margin-bottom:var(--mantine-spacing-md)}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(table){--table-border-color:var(--mantine-color-gray-3)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(table){--table-border-color:var(--mantine-color-dark-4)}.m_d08caa0 :where(table) :where(caption){margin-top:var(--mantine-spacing-xs);font-size:var(--mantine-font-size-sm);color:var(--mantine-color-dimmed)}.m_d08caa0 :where(table) :where(th){text-align:start;font-weight:700;font-size:var(--mantine-font-size-sm);padding:var(--mantine-spacing-xs) var(--mantine-spacing-sm)}.m_d08caa0 :where(table) :where(thead th){border-bottom:calc(.0625rem * var(--mantine-scale)) solid;border-color:var(--table-border-color)}.m_d08caa0 :where(table) :where(tfoot th){border-top:calc(.0625rem * var(--mantine-scale)) solid;border-color:var(--table-border-color)}.m_d08caa0 :where(table) :where(td){padding:var(--mantine-spacing-xs) var(--mantine-spacing-sm);border-bottom:calc(.0625rem * var(--mantine-scale)) solid;border-color:var(--table-border-color);font-size:var(--mantine-font-size-sm)}.m_d08caa0 :where(table) :where(tr:last-of-type td){border-bottom:0}.m_d08caa0 :where(blockquote){font-size:var(--mantine-font-size-lg);line-height:var(--mantine-line-height);margin:var(--mantine-spacing-md) 0;border-radius:var(--mantine-radius-sm);padding:var(--mantine-spacing-md) var(--mantine-spacing-lg)}:where([data-mantine-color-scheme=light]) .m_d08caa0 :where(blockquote){background-color:var(--mantine-color-gray-0)}:where([data-mantine-color-scheme=dark]) .m_d08caa0 :where(blockquote){background-color:var(--mantine-color-dark-8)}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal-BgDaEnEv.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2)format("woff2-variations");unicode-range:U+2000-2001,U+2004-2008,U+200A,U+23B8-23BD,U+2500-259F}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.react-grid-layout{transition:height .2s;position:relative}.react-grid-item{transition:left .2s,top .2s,width .2s,height .2s}.react-grid-item img{pointer-events:none;-webkit-user-select:none;user-select:none}.react-grid-item.cssTransforms{transition-property:transform,width,height}.react-grid-item.resizing{z-index:1;will-change:width, height;transition:none}.react-grid-item.react-draggable-dragging{z-index:3;will-change:transform;transition:none}.react-grid-item.dropping{visibility:hidden}.react-grid-item.react-grid-placeholder{opacity:.2;z-index:2;-webkit-user-select:none;user-select:none;background:red;transition-duration:.1s}.react-grid-item.react-grid-placeholder.placeholder-resizing{transition:none}.react-grid-item>.react-resizable-handle{opacity:0;width:20px;height:20px;position:absolute}.react-grid-item:hover>.react-resizable-handle{opacity:1}.react-grid-item>.react-resizable-handle:after{content:"";border-bottom:2px solid #0006;border-right:2px solid #0006;width:5px;height:5px;position:absolute;bottom:3px;right:3px}.react-resizable-hide>.react-resizable-handle{display:none}.react-grid-item>.react-resizable-handle.react-resizable-handle-sw{cursor:sw-resize;bottom:0;left:0;transform:rotate(90deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-se{cursor:se-resize;bottom:0;right:0}.react-grid-item>.react-resizable-handle.react-resizable-handle-nw{cursor:nw-resize;top:0;left:0;transform:rotate(180deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-ne{cursor:ne-resize;top:0;right:0;transform:rotate(270deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-w,.react-grid-item>.react-resizable-handle.react-resizable-handle-e{cursor:ew-resize;margin-top:-10px;top:50%}.react-grid-item>.react-resizable-handle.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-n,.react-grid-item>.react-resizable-handle.react-resizable-handle-s{cursor:ns-resize;margin-left:-10px;left:50%}.react-grid-item>.react-resizable-handle.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-grid-item>.react-resizable-handle.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.react-resizable{position:relative}.react-resizable-handle{box-sizing:border-box;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+);background-position:100% 100%;background-repeat:no-repeat;background-origin:content-box;width:20px;height:20px;padding:0 3px 3px 0;position:absolute}.react-resizable-handle-sw{cursor:sw-resize;bottom:0;left:0;transform:rotate(90deg)}.react-resizable-handle-se{cursor:se-resize;bottom:0;right:0}.react-resizable-handle-nw{cursor:nw-resize;top:0;left:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;top:0;right:0;transform:rotate(270deg)}.react-resizable-handle-w,.react-resizable-handle-e{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;margin-left:-10px;left:50%}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}html{background:#fcfcfc}html[data-mantine-color-scheme=dark]{background:#0b0e14}:where(.mantine-Title-root,h1,h2,h3,h4,h5,h6){letter-spacing:-.01em}body{font-variant-numeric:tabular-nums}html,body,#root{min-width:320px;min-height:100%}.dashboard-grid{min-height:420px}.chat-composer-field{background:var(--mantine-color-body);transition:border-color .15s,box-shadow .15s}.chat-composer-field:focus-within{border-color:var(--mantine-primary-color-filled);box-shadow:0 0 0 2px var(--mantine-primary-color-light)}.rail-row{border-radius:var(--mantine-radius-md);transition:background-color .12s}.rail-row:hover{background:var(--mantine-color-default-hover)}.rail-row[data-active]{background:var(--mantine-primary-color-light)}.rail-row-actions{opacity:0;transition:opacity .12s}.rail-row:hover .rail-row-actions,.rail-row:focus-within .rail-row-actions{opacity:1}@media (hover:none){.rail-row-actions{opacity:1}}.react-grid-item.react-grid-placeholder{border-radius:var(--mantine-radius-lg);background:var(--mantine-primary-color-filled);opacity:.14}.react-grid-item>.react-resizable-handle{opacity:0;transition:opacity .15s}.react-grid-item:hover>.react-resizable-handle,.react-grid-item:focus-within>.react-resizable-handle{opacity:.55}.chat-pane{height:calc(100dvh - var(--app-shell-header-offset,0px));flex-direction:column;display:flex}.chat-scroll{flex:1;min-height:0;overflow-y:auto}.chat-composer{padding-bottom:var(--mantine-spacing-sm);background:var(--mantine-color-body);flex:none}.chat-message-meta,.chat-code-actions{opacity:0;transition:opacity .12s}.chat-message:hover .chat-message-meta,.chat-message:focus-within .chat-message-meta,.chat-code:hover .chat-code-actions,.chat-code:focus-within .chat-code-actions{opacity:1}@media (hover:none){.chat-message-meta,.chat-code-actions{opacity:1}}.chat-markdown :where(h1,h2,h3,h4){font-size:var(--mantine-font-size-lg);margin-top:var(--mantine-spacing-md);margin-bottom:var(--mantine-spacing-xs)}.chat-markdown :where(p,ul,ol){margin-top:0;margin-bottom:var(--mantine-spacing-sm)}.chat-table{margin-bottom:var(--mantine-spacing-sm);overflow-x:auto}.chat-code pre{margin:0 0 var(--mantine-spacing-sm);padding:var(--mantine-spacing-sm) var(--mantine-spacing-md);border:1px solid var(--mantine-color-default-border);border-radius:var(--mantine-radius-md);background:var(--mantine-color-default);font-family:var(--mantine-font-family-monospace);font-size:var(--mantine-font-size-sm);overflow-x:auto}.chat-code pre code{color:inherit;font-size:inherit;background:0 0;border-radius:0;padding:0;font-family:inherit}.widget-card .widget-body{flex-direction:column;flex:1;min-height:0;display:flex}.widget-card .widget-body>*{flex:1;min-height:0}.widget-chart{flex:1;min-height:140px}.widget-actions{opacity:0;transition:opacity .12s}.widget-card:hover .widget-actions,.widget-card:focus-within .widget-actions,.widget-actions[data-open]{opacity:1}@media (hover:none){.widget-actions{opacity:1}} diff --git a/internal/ui/dist/assets/index-e7JI4Tgx.js b/internal/ui/dist/assets/index-e7JI4Tgx.js new file mode 100644 index 00000000..7c230dac --- /dev/null +++ b/internal/ui/dist/assets/index-e7JI4Tgx.js @@ -0,0 +1,97 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-Cjen0w58.js","assets/brand-CnsMBQCm.js","assets/auth-DmDDao4N.js","assets/settings-Bzn5FZaN.js","assets/Tooltip-DTTsbr27.js","assets/api-R4Y_TvpM.js","assets/WarningCircle.es-BNrNGQli.js","assets/chat.index-CDrUSu7Q.js","assets/chat-CDy0rSDz.js","assets/preload-helper-CT-UWP0u.js","assets/format-C4WhhFye.js","assets/chat._threadId-CDrUSu7Q.js","assets/dashboards.index-CsydfhAv.js","assets/dashboard-hW_vS0TR.js","assets/tokens-BZZ0emRD.js","assets/use-computed-color-scheme-B3cychmA.js","assets/dashboards._dashboardId-DTHMtzKv.js"])))=>i.map(i=>d[i]); +import{B as e,C as t,F as n,G as r,H as i,I as a,J as o,K as s,L as c,M as l,N as u,O as d,P as f,S as p,V as m,W as h,X as g,Y as _,_ as v,_t as y,a as b,at as ee,b as te,ct as x,d as S,dt as C,et as ne,f as re,ft as ie,gt as ae,h as oe,ht as se,j as ce,k as le,l as ue,mt as de,nt as fe,pt as pe,rt as me,s as he,st as ge,t as _e,u as ve,ut as ye,vt as be,x as xe,yt as Se}from"./brand-CnsMBQCm.js";import{a as Ce,d as we,f as Te,i as w,l as Ee,m as De,n as Oe,o as ke,r as Ae,t as je,u as Me}from"./auth-DmDDao4N.js";import{$ as Ne,A as Pe,B as Fe,C as Ie,F as Le,G as Re,H as ze,I as Be,J as Ve,K as He,L as Ue,M as We,N as Ge,P as Ke,Q as qe,R as Je,S as Ye,T as Xe,U as Ze,V as Qe,W as $e,X as et,Y as tt,Z as nt,_ as rt,a as it,at,b as ot,ct as st,d as ct,dt as lt,et as ut,g as dt,i as ft,it as pt,j as mt,k as ht,l as gt,lt as _t,m as vt,n as yt,nt as bt,o as xt,ot as St,q as Ct,r as wt,rt as Tt,s as Et,st as Dt,t as Ot,tt as kt,u as At,ut as jt,w as Mt,x as Nt,y as Pt,z as Ft}from"./tokens-BZZ0emRD.js";import{C as It,b as Lt,o as Rt,t as zt,w as Bt}from"./Tooltip-DTTsbr27.js";import{n as Vt,t as Ht}from"./use-computed-color-scheme-B3cychmA.js";import{A as Ut,C as Wt,D as Gt,E as Kt,F as qt,H as Jt,I as Yt,L as Xt,M as Zt,N as Qt,O as $t,P as en,R as tn,S as nn,_ as rn,a as an,b as T,c as on,d as sn,f as cn,g as ln,h as un,i as dn,j as fn,k as pn,l as mn,m as hn,n as gn,o as _n,p as vn,r as yn,t as bn,u as xn,v as Sn,x as Cn,y as wn}from"./api-R4Y_TvpM.js";import{i as Tn,n as En,o as Dn,r as On,s as kn,t as An}from"./preload-helper-CT-UWP0u.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var jn=y((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function ee(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,te||(te=!0,ie());else{var t=n(l);t!==null&&se(ee,t.startTime-e)}}}var te=!1,x=-1,S=5,C=-1;function ne(){return g?!0:!(e.unstable_now()-Ct&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&se(ee,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():te=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(t,n){x=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(x),x=-1):h=!0,se(ee,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,te||(te=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Mn=y(((e,t)=>{t.exports=jn()})),Nn=y((e=>{var t=Mn(),n=ae(),r=se();function i(e){var t=`https://react.dev/errors/`+e;if(1ke||(e.current=Oe[ke],Oe[ke]=null,ke--)}function Me(e,t){ke++,Oe[ke]=e.current,e.current=t}var Ne=Ae(null),Pe=Ae(null),Fe=Ae(null),Ie=Ae(null);function Le(e,t){switch(Me(Fe,t),Me(Pe,e),Me(Ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wp(t),e=Tp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}je(Ne),Me(Ne,e)}function Re(){je(Ne),je(Pe),je(Fe)}function ze(e){var t=e.memoizedState;t!==null&&(xh._currentValue=t.memoizedState,Me(Ie,e)),t=Ne.current;var n=Tp(t,e.type);t!==n&&(Me(Pe,e),Me(Ne,n))}function Be(e){Pe.current===e&&(je(Ne),je(Pe)),Ie.current===e&&(je(Ie),xh._currentValue=De)}var Ve,He;function Ue(e){if(Ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ve=t&&t[1]||``,He=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{We=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ue(n):``}function Ke(e,t){switch(e.tag){case 26:case 27:case 5:return Ue(e.type);case 16:return Ue(`Lazy`);case 13:return e.child!==t&&t!==null?Ue(`Suspense Fallback`):Ue(`Suspense`);case 19:return Ue(`SuspenseList`);case 0:case 15:return Ge(e.type,!1);case 11:return Ge(e.type.render,!1);case 1:return Ge(e.type,!0);case 31:return Ue(`Activity`);case 30:return Ue(`ViewTransition`);default:return``}}function qe(e){try{var t=``,n=null;do t+=Ke(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var Je=Object.prototype.hasOwnProperty,Ye=t.unstable_scheduleCallback,Xe=t.unstable_cancelCallback,Ze=t.unstable_shouldYield,Qe=t.unstable_requestPaint,$e=t.unstable_now,et=t.unstable_getCurrentPriorityLevel,tt=t.unstable_ImmediatePriority,nt=t.unstable_UserBlockingPriority,rt=t.unstable_NormalPriority,it=t.unstable_LowPriority,at=t.unstable_IdlePriority,ot=t.log,st=t.unstable_setDisableYieldValue,ct=null,lt=null;function ut(e){if(typeof ot==`function`&&st(e),lt&&typeof lt.setStrictMode==`function`)try{lt.setStrictMode(ct,e)}catch{}}var dt=Math.clz32?Math.clz32:mt,ft=Math.log,pt=Math.LN2;function mt(e){return e>>>=0,e===0?32:31-(ft(e)/pt|0)|0}var ht=256,gt=262144,_t=4194304;function vt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function yt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=vt(n))):i=vt(o):i=vt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=vt(n))):i=vt(o)):i=vt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function bt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function xt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function Tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Et(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=Er),kr=` `,Ar=!1;function jr(e,t){switch(e){case`keyup`:return wr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Mr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Nr=!1;function Pr(e,t){switch(e){case`compositionend`:return Mr(t);case`keypress`:return t.which===32?(Ar=!0,kr):null;case`textInput`:return e=t.data,e===kr&&Ar?null:e;default:return null}}function Fr(e,t){if(Nr)return e===`compositionend`||!Tr&&jr(e,t)?(e=qn(),Kn=Gn=Wn=null,Nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=ii(n)}}function oi(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oi(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function si(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ri(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=ri(e.document)}return t}function ci(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var li=Vn&&`documentMode`in document&&11>=document.documentMode,ui=null,di=null,fi=null,pi=!1;function mi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;pi||ui==null||ui!==ri(r)||(r=ui,`selectionStart`in r&&ci(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),fi&&ni(fi,r)||(fi=r,r=sp(di,`onSelect`),0>=o,i-=o,ca=1<<32-dt(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),O&&ua(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),O&&ua(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return O&&ua(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),O&&ua(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ie&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ne:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ie){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),xo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===he&&mo(l)===r.type){n(e,r.sibling),c=a(r,o.props),xo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ie?(c=D(o.props.children,e.mode,c,o.key),xo(c,o),c.return=e,e=c):(c=E(o.type,o.key,o.props,null,e.mode,c),xo(c,o),c.return=e,e=c)}return s(e);case re:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Qi(o,e.mode,c),c.return=e,e=c}return s(e);case he:return o=mo(o),_(e,r,o,c)}if(Te(o))return h(e,r,o,c);if(Se(o)){if(l=Se(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,bo(o),c);if(o.$$typeof===ue)return _(e,r,Ra(e,o),c);So(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Xi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{yo=0;var i=_(e,t,n,r);return vo=null,i}catch(t){if(t===so||t===lo)throw t;var a=Ki(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var wo=Co(!0),To=Co(!1),Eo=!1;function Do(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ko(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ao(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ud&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ui(e),Hi(e,null,n),t}return zi(e,r,t,n),Ui(e)}function jo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ot(e,n)}}function Mo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var No=!1;function Po(){if(No){var e=Qa;if(e!==null)throw e}}function Fo(e,t,n,r){No=!1;var i=e.updateQueue;Eo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(L&f)===f:(r&f)===f){f!==0&&f===Za&&(No=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=S({},d,f);break a;case 2:Eo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),vd|=o,e.lanes=o,e.memoizedState=d}}function Io(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Lo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=w.T,s={};s.types=o===null?null:o.types,w.T=s,Sc(e,!1,t,n);try{var c=i(),l=w.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?xc(e,t,to(c,r),Ud(e)):xc(e,t,r,Ud(e))}catch(n){xc(e,t,{then:function(){},status:`rejected`,reason:n},Ud())}finally{Ee.p=a,o!==null&&s.types!==null&&(o.types=s.types),w.T=o}}function dc(){}function fc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=pc(e).queue;uc(e,a,t,De,n===null?dc:function(){return mc(e),n(r)})}function pc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:De,baseState:De,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:De},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function mc(e){var t=pc(e);t.next===null&&(t=e.alternate.memoizedState),xc(e,t.next.queue,{},Ud())}function hc(){return La(xh)}function gc(){return j().memoizedState}function _c(){return j().memoizedState}function vc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ud();e=ko(n);var r=Ao(t,e,n);r!==null&&(Kd(r,t,n),jo(r,t,n)),t={cache:Wa()},e.payload=t;return}t=t.return}}function yc(e,t,n){var r=Ud();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cc(e)?wc(t,n):(n=Bi(e,t,n,r),n!==null&&(Kd(n,e,r),Tc(n,t,r)))}function bc(e,t,n){xc(e,t,n,Ud())}function xc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cc(e))wc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,ti(s,o))return zi(e,t,i,0),dd===null&&Ri(),!1}catch{}if(n=Bi(e,t,i,r),n!==null)return Kd(n,e,r),Tc(n,t,r),!0}return!1}function Sc(e,t,n,r){if(r={lane:2,revertLane:qf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Cc(e)){if(t)throw Error(i(479))}else t=Bi(e,n,r,2),t!==null&&Kd(t,e,2)}function Cc(e){var t=e.alternate;return e===k||t!==null&&t===k}function wc(e,t){is=rs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Tc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ot(e,n)}}var Ec={readContext:La,use:xs,useCallback:us,useContext:us,useEffect:us,useImperativeHandle:us,useLayoutEffect:us,useInsertionEffect:us,useMemo:us,useReducer:us,useRef:us,useState:us,useDebugValue:us,useDeferredValue:us,useTransition:us,useSyncExternalStore:us,useId:us,useHostTransitionStatus:us,useFormState:us,useActionState:us,useOptimistic:us,useMemoCache:us,useCacheRefresh:us,useEffectEvent:us},Dc={readContext:La,use:xs,useCallback:function(e,t){return vs().memoizedState=[e,t===void 0?null:t],e},useContext:La,useEffect:Zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ys(4194308,4,rc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ys(4194308,4,e,t)},useInsertionEffect:function(e,t){Ys(4,2,e,t)},useMemo:function(e,t){var n=vs();t=t===void 0?null:t;var r=e();if(as){ut(!0);try{e()}finally{ut(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=vs();if(n!==void 0){var i=n(t);if(as){ut(!0);try{n(t)}finally{ut(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=yc.bind(null,k,e),[r.memoizedState,e]},useRef:function(e){var t=vs();return e={current:e},t.memoizedState=e},useState:function(e){e=Ns(e);var t=e.queue,n=bc.bind(null,k,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ac,useDeferredValue:function(e,t){return cc(vs(),e,t)},useTransition:function(){var e=Ns(!1);return e=uc.bind(null,k,e.queue,!0,!1),vs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=k,a=vs();if(O){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),dd===null)throw Error(i(349));L&127||Os(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Zs(As.bind(null,r,o,e),[e]),r.flags|=2048,qs(9,{destroy:void 0},ks.bind(null,r,o,n,t),null),n},useId:function(){var e=vs(),t=dd.identifierPrefix;if(O){var n=la,r=ca;n=(r&~(1<<32-dt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=os++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ft]=t,o[It]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(gp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Tl(t)}}return Al(t),t.subtreeFlags&=-33554433,El(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Tl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Fe.current,Ca(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ha,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||pp(e.nodeValue,n)),e||ba(t,!0)}else e=Cp(e).createTextNode(r),e[Ft]=t,t.stateNode=e}return Al(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ca(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ft]=t}else wa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Al(t),e=!1}else n=Ta(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Yo(t),t):(Yo(t),null);if(t.flags&128)throw Error(i(558))}return Al(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ca(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ft]=t}else wa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Al(t),a=!1}else a=Ta(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Yo(t),t):(Yo(t),null)}return Yo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ol(t,t.updateQueue),Al(t),null);case 4:return Re(),e===null&&rp(t.stateNode.containerInfo),t.flags|=67108864,Al(t),null;case 10:return ja(t.type),Al(t),null;case 19:if(Qo(t),r=t.memoizedState,r===null)return Al(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)kl(r,!1);else{if(_d!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=$o(e),o!==null){for(t.flags|=128,kl(r,!1),e=o.updateQueue,t.updateQueue=e,Ol(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Yi(n,e),n=n.sibling;return Zo(t,Xo.current&1|2),O&&ua(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&$e()>Od&&(t.flags|=128,a=!0,kl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=$o(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ol(t,e),kl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!O)return Al(t),null}else 2*$e()-r.renderingStartTime>Od&&n!==536870912&&(t.flags|=128,a=!0,kl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=$e(),e.sibling=null,o=Xo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||O?Zo(t,o):(n=o,Me(Uo,t),Me(Xo,n),Wo===null&&(Wo=t)),O&&ua(t,r.treeForkCount),e}return Al(t),null;case 22:case 23:return Yo(t),Ho(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Al(t),t.subtreeFlags&6&&(t.flags|=8192)):Al(t),n=t.updateQueue,n!==null&&Ol(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&je(ro),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ja(Ua),Al(t),null;case 25:return null;case 30:return t.flags|=33554432,Al(t),null}throw Error(i(156,t.tag))}function Ml(e,t){switch(pa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ja(Ua),Re(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Be(t),null;case 31:if(t.memoizedState!==null){if(Yo(t),t.alternate===null)throw Error(i(340));wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Yo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Re(),null;case 10:return ja(t.type),null;case 22:case 23:return Yo(t),Ho(),e!==null&&je(ro),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ja(Ua),null;case 25:return null;default:return null}}function Nl(e,t){switch(pa(t),t.tag){case 3:ja(Ua),Re();break;case 26:case 27:case 5:Be(t);break;case 4:Re();break;case 31:t.memoizedState!==null&&Yo(t);break;case 13:Yo(t);break;case 19:Qo(t);break;case 10:ja(t.type);break;case 22:case 23:Yo(t),Ho(),e!==null&&je(ro);break;case 24:ja(Ua)}}function Pl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ef(t,t.return,e)}}function Fl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ef(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ef(t,t.return,e)}}function Il(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Lo(t,n)}catch(t){Ef(e,e.return,t)}}}function Ll(e,t,n){n.props=Pc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ef(e,t,n)}}function Rl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=ji(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Jp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Yp(e);f(e.child,!1,fm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ef(e,t,n)}}function M(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Ef(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ef(e,t,n)}else n.current=null}}function N(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),gp(r,t,n),r[Ft]=e,Yt(r),t=r;break a;case`link`:if(o=ah(`link`,`href`,a).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=ai(s,h),v=ai(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,w.T=null,n=Id,Id=null;var o=Md,s=Pd;if(jd=0,Nd=Md=null,Pd=0,ud&6)throw Error(i(331));var c=ud;if(ud|=4,od(o.current),Qu(o,o.current,s,n),ud=c,Bf(0,!1),lt&&typeof lt.onPostCommitFiberRoot==`function`)try{lt.onPostCommitFiberRoot(ct,o)}catch{}return!0}finally{Ee.p=a,w.T=r,Sf(e,t)}}function Tf(e,t,n){t=ea(n,t),t=Bc(e.stateNode,t,2),e=Ao(e,t,2),e!==null&&(Tt(e,2),zf(e))}function Ef(e,t,n){if(e.tag===3)Tf(e,e,n);else for(;t!==null;){if(t.tag===3){Tf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Ad===null||!Ad.has(r))){e=ea(n,e),n=Vc(2),r=Ao(t,n,2),r!==null&&(Hc(n,r,t,e),Tt(r,2),zf(r));break}}t=t.return}}function Df(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ld;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(hd=!0,i.add(n),e=Of.bind(null,e,t,n),t.then(e,e))}function Of(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,dd===e&&(L&n)===n&&(_d===4||_d===3&&(L&62914560)===L&&300>$e()-Ed?ud&2?bd|=n:$d(e,0):bd|=n,Sd===L&&(Sd=0)),zf(e)}function kf(e,t){t===0&&(t=Ct()),e=Vi(e,t),e!==null&&(Tt(e,t),zf(e))}function Af(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),kf(e,n)}function jf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),kf(e,n)}function Mf(e,t){return Ye(e,t)}var Nf=null,Pf=null,Ff=!1,If=!1,Lf=!1,Rf=0;function zf(e){e!==Pf&&e.next===null&&(Pf===null?Nf=Pf=e:Pf=Pf.next=e),If=!0,Ff||(Ff=!0,Kf())}function Bf(e,t){if(!Lf&&If){Lf=!0;do for(var n=!1,r=Nf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-dt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Gf(r,a))}else a=L,a=yt(r,r===dd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||bt(r,a)||(n=!0,Gf(r,a))}r=r.next}while(n);Lf=!1}}function Vf(){Hf()}function Hf(){If=Ff=!1;var e=0;Rf!==0&&kp()&&(e=Rf);for(var t=$e(),n=null,r=Nf;r!==null;){var i=r.next,a=Uf(r,t);a===0?(r.next=null,n===null?Nf=i:n.next=i,i===null&&(Pf=n)):(n=r,(e!==0||a&3)&&(If=!0)),r=i}jd!==0&&jd!==5||Bf(e,!1),Rf!==0&&(Rf=0)}function Uf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&yp(d)&&(c=c.responseEnd,o+=u*(cph){s.length=o;break}f=new Promise(Gp.bind(f)),s.push(f)}}}if(0`u`?null:document;function zm(e,t,n){var r=Rm;if(r&&typeof t==`string`&&t){var i=gn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Nm.has(i)||(Nm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),gp(t,`link`,e),Yt(t),r.head.appendChild(t)))}}function Bm(e){Fm.D(e),zm(`dns-prefetch`,e,null)}function Vm(e,t){Fm.C(e,t),zm(`preconnect`,e,t)}function Hm(e,t,n){Fm.L(e,t,n);var r=Rm;if(r&&e&&t){var i=`link[rel="preload"][as="`+gn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+gn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+gn(n.imageSizes)+`"]`)):i+=`[href="`+gn(e)+`"]`;var a=i;switch(t){case`style`:a=Jm(e);break;case`script`:a=Qm(e)}if(!(Mm.has(a)||(e=S({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Mm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Ym(a))||t===`script`&&r.querySelector($m(a))))){var o=r.createElement(`link`);gp(o,`link`,e),t===`style`&&(o[Ut]=!0,o.onload=o.onerror=function(){Xt(o)}),Yt(o),r.head.appendChild(o)}}}function Um(e,t){Fm.m(e,t);var n=Rm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+gn(r)+`"][href="`+gn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Qm(e)}if(!Mm.has(a)&&(e=S({rel:`modulepreload`,href:e},t),Mm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector($m(a)))return}r=n.createElement(`link`),gp(r,`link`,e),Yt(r),n.head.appendChild(r)}}}function Wm(e,t,n){Fm.S(e,t,n);var r=Rm;if(r&&e){var i=Jt(r).hoistableStyles,a=Jm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Ym(a)))s.loading=5;else{e=S({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Mm.get(a))&&nh(e,n);var c=o=r.createElement(`link`);Yt(c),gp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,th(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Gm(e,t){Fm.X(e,t);var n=Rm;if(n&&e){var r=Jt(n).hoistableScripts,i=Qm(e),a=r.get(i);a||(a=n.querySelector($m(i)),a||(e=S({src:e,async:!0},t),(t=Mm.get(i))&&rh(e,t),a=n.createElement(`script`),Yt(a),gp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Km(e,t){Fm.M(e,t);var n=Rm;if(n&&e){var r=Jt(n).hoistableScripts,i=Qm(e),a=r.get(i);a||(a=n.querySelector($m(i)),a||(e=S({src:e,async:!0,type:`module`},t),(t=Mm.get(i))&&rh(e,t),a=n.createElement(`script`),Yt(a),gp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function qm(e,t,n,r){var a=(a=Fe.current)?Pm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Jm(n.href),t=Jt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Jm(n.href);var o=Jt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Ym(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Mm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Mm.set(e,o)),Zm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Qm(n),t=Jt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Jm(e){return`href="`+gn(e)+`"`}function Ym(e){return`link[rel="stylesheet"][`+e+`]`}function Xm(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function Zm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Ut]){r.loading=1;return}}else t=e.createElement(`link`),t[Ut]=!0,t.onload=t.onerror=Xt.bind(null,t),gp(t,`link`,n),Yt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Qm(e){return`[src="`+gn(e)+`"]`}function $m(e){return`script[async]`+e}function eh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+gn(n.href)+`"]`);if(r)return t.instance=r,Yt(r),r;var a=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Yt(r),gp(r,`style`,a),th(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Jm(n.href);var o=e.querySelector(Ym(a));if(o)return t.state.loading|=4,t.instance=o,Yt(o),o;r=Xm(n),(a=Mm.get(a))&&nh(r,a),o=(e.ownerDocument||e).createElement(`link`),Yt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),gp(o,`link`,r),t.state.loading|=4,th(o,n.precedence,e),t.instance=o;case`script`:return o=Qm(n.src),(a=e.querySelector($m(o)))?(t.instance=a,Yt(a),a):(r=n,(a=Mm.get(o))&&(r=S({},n),rh(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Yt(a),gp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,th(r,n.precedence,e));return t.instance}function th(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function sh(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ch(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function lh(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function uh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function dh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=uh(t),e.suspenseyImages.push(t)),e=_h.bind(e),t.decode().then(e,e))}function fh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Jm(r.href),a=t.querySelector(Ym(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=gh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Yt(a);return}a=t.ownerDocument||t,r=Xm(r),(i=Mm.get(i))&&nh(r,i),a=a.createElement(`link`),Yt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),gp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=gh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ph=0;function mh(e,t){return e.stylesheets&&e.count===0&&yh(e,e.stylesheets),0ph?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function hh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)yh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function gh(){this.count--,hh(this)}function _h(){this.imgCount--,hh(this)}var vh=null;function yh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,vh=new Map,t.forEach(bh,e),vh=null,gh.call(e))}function bh(e,t){if(!(t.state.loading&4)){var n=vh.get(e);if(n)var r=n.get(null);else{n=new Map,vh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Nn()}));function Fn(e){return e?.isNotFound===!0}function In(){try{return sessionStorage}catch{return}}var Ln=`tsr-scroll-restoration-v1_3`,Rn=In();function zn(){try{return JSON.parse(Rn?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var Bn=zn(),Vn=`data-scroll-restoration-id`,Hn=e=>e.state.__TSR_key||e.href;function Un(e){let t=e.getAttribute(Vn);if(t)return`[${Vn}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Wn=!1,Gn=`window`;function Kn(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function qn(e){let t=new Set;for(let n of e){if(n===Gn)continue;let e=Kn(n);e&&t.add(e)}return t}function Jn(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||Hn,a=new Set,o=e=>{let t=Bn[e]||={};for(let e of a)e===document?t[Gn]={scrollX,scrollY}:e.isConnected&&(t[Un(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,Wn=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Wn||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{Rn?.setItem(Ln,JSON.stringify(Bn))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=Bn[d];if(e){let t=Bn[u];for(let n in e){if(n===Gn){if(s)continue}else{let e=Kn(n);if(!e||s&&o&&(l??=qn(o),l.has(e)))continue}t||=Bn[u]={},t[n]??=e[n]}}}Wn=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=qn(o));let t=e&&i&&c,s=r.e?Bn[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Gn){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Kn(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Wn=!1}}))}function Yn(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function Xn(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Zn(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Xn(r):Array.isArray(t)?t.push(Xn(r)):n[e]=[t,Xn(r)]}return n}var Qn=/^(?:\s|["[{\d-]|fa|nu|tr)/,$n=tr(JSON.parse),er=nr(JSON.stringify,JSON.parse);function tr(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=Zn(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!Qn.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function nr(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!Qn.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Yn(e,r);return t?`?${t}`:``}}function rr(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var ir=4,ar=5;function or(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function sr(e,t,n){let r=e.substring(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.substring(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=ur(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;ee.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ir)>(e.node.kind===ir)||t.node.kind===ir==(e.node.kind===ir)&&t.node.depth>e.node.depth)))}function Tr(e,t,n){let r=Ve(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=$e(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Er(n,s.input({url:e})),output:({url:e})=>s.output({url:Dr(n,e)})}:s}function Er(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Dr(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Or(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{qe(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var kr=`__TSR_index`,Ar=`popstate`,jr=`beforeunload`,Mr=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Nr(e){let t=Mr.exec(e);return t?`/`+e.slice(t[0].length):e}function Pr(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>` +\r`.includes(e)?``:encodeURIComponent(e))),Nr(e)}function Fr(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Rr(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[kr];i=Ir(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[kr];i=Ir(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[kr]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function Ir(e,t){let n=zr();return{...t,key:n,__TSR_key:n,[kr]:e}}function Lr(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>Pr(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Rr(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=zr();t.history.replaceState({[kr]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(te._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),te._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Rr(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),te.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[kr]-l.state[kr],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),te.notify(u);return}}}l=c(),te.notify(u)},ee=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},te=Fr({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(jr,ee,{capture:!0}),t.removeEventListener(Ar,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return te._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(jr,ee,{capture:!0}),t.addEventListener(Ar,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return te._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return te._ignoreSubscribers||y(`REPLACE`),n},te}function Rr(e,t){let n=Pr(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=zr();t={[kr]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function zr(){return(Math.random()+1).toString(36).substring(7)}function Br(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Vr(e){return e.pathname+e.search+e.hash}function Hr(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Ur(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Wr({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Gr(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Kr(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var qr=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Lr()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&Ve(n)?Tr(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Or(this.latestLocation,e),Jn(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=hr(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&dr(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:rr(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:ut(e),external:!1,searchStr:o,search:_t(t?.search,i),hash:ut(r.slice(1)),state:lt(t?.state,a)}}let o=Er(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:ut(Nr(o.pathname)),external:!!this.rewrite&&Br(o,this.origin),searchStr:c,search:_t(t?.search,s),hash:ut(o.hash.slice(1)),state:lt(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=mr(tt(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Rr(n.href,{});n={...n,to:Er(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=n._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>(t=!0,i??=this.matchRoutesLightweight(r)),s=n.to?`${n.to}`:`.`,c=Ct(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[tt(c)],u=c.includes(`$`),d;if(l)d=l._branch??=vr(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??cr(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=Qr(n.params,e),!at(p))break;p===e&&(p=Object.assign(Ne(),p));try{Object.assign(p,t(p))}catch{}}}p??=Qr(n.params,$r(n.params,f)?o()[3]:ei);let m=e.leaveParams?c:Nr(ut(f?He(c,f,p,this.pathParamsDecoder):c)),h=ti(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,Zr(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?ni(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||ei,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,ee=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:ei,te=`${m}${v}${b}`,x,S,C=!1;if(this.rewrite){let e=new URL(te,this.origin),t=e.origin,n=Dr(this.rewrite,e);x=Vr(e),Br(n,t)?(S=n.href,C=!0):S=Nr(Vr(n))}else x=bt(te),S=x;return{publicHref:S,href:x,pathname:m,search:_,searchStr:v,state:ee,hash:y??``,external:C,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=fr(r.pathname,this.processedTree);if(t){let i=Object.assign(Ne(),t.rawParams),{from:a,params:o,...s}=t.route,c=Qr(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&!r.maskedLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return Jr(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=tt(this.latestLocation.href)===tt(n.href)&&kt(Wr(n.state),Wr(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?pt(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return Jr(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Ji(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Ur(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Hr(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(jt.test(n)||(r=pt(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:Br(e,this.origin)||(n=Vr(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=si,this.preloadRoute=e=>Yi(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?Ct(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=pr(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!kt(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?kt(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Re(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??er,parseSearch:e.parseSearch??$n,protocolAllowlist:e.protocolAllowlist??nt}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=cr(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:tt(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?ri(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;ntypeof t!=`string`&&!St.call(e,t[1]))}var ei=Object.freeze({});function ti(e,t){let n=[];for(let r=0;r{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=Zr(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function ni(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=Tt(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function ri(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return Ze}function ii(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function ai(e,t){return e.options[t]?.preload?.()}function oi(e,t){let n=ai(e,`component`),r=ai(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function si(e,t,n){let r=()=>t===!1?void 0:t?ai(e,t):oi(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function ci(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function gi(e,t){return e.routesById[t.routeId]}function _i(e,t,n){return ze(e)?[fi,e]:Fn(e)?(e.routeId||=n,[di,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[ui,e]):[li,e]}function vi(e,t){let n=_i(t,!0,e.id);if(n[0]!==ui)return n;try{e.options.onError?.(n[1])}catch(t){n=_i(t,!0,e.id)}return n}function yi(e,t,n,r,i){return i[0].signal.aborted?pi:Fi(e,t,n,vi(n,r),i)}async function bi(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;ie.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Si(e,r),[i,yi(e,t,u,a,n)]}if(c.aborted)return[i,pi];let p=r.paramsError??r.searchError;if(p!==void 0)return Si(e,r),[i,yi(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Ti(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?hi(a,c):a);if(c.aborted)return[i,pi];let s=Fi(e,t,u,_i(o,!1,u.id),n);if(s[0]!==li)return Si(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Si(e,r),[i,yi(e,t,u,a,n)]}finally{r.status=h,Ti(e,r,!1,n[0])}}i()}function xi(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Si(e,t){let n=t._flight;t._flight=void 0,xi(e,t,n)?.abort()}function Ci(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=xi(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function wi(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Ti(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Ei(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Di(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return pi;if(!i)return[li,void 0];let l=n._flight;Ti(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Ei(e,t,n,r,s,a,!!o[3]))).then(e=>_i(e,!1,r.id),e=>_i(e,!0,r.id)).then(t=>(t[0]!==li&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===ui&&l[2]?vi(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Fi(e,t,r,await hi(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Si(e,n),pi}finally{Ti(e,n,!1,s)}}function Oi(e,t,n){t[0]!==fi&&(e.status=`success`,e.error=void 0,t[0]===li?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function ki(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Si(e,r)}function Ai(e,t){return t[0]===ui||t[0]===di?{...e,status:t[0]===ui?`error`:`notFound`,error:t[1],_flight:void 0}:e}function ji(e,t,n,r,i,a,o){let s=t[1][n],c=gi(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Ei(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=pi)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,Si(e,s),p=yi(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,ee=b&&!y&&(s.status!==`success`||!!m),te=n>=o?a[7]:void 0,x=c.lazyFn&&c._lazy!==!0?te:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,ee){let t=s._flight;s._flight=v,xi(e,s,t)?.abort(),n>=o&&(s.status=`pending`),te?.()}b||(s.isFetching=!1);let S=!p&&ee?Di(e,t,s,c,g,i,a).then(t=>(Oi(s,t,l),t[0]===li&&(m&&!a[0].signal.aborted&&ki(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[li,s.loaderData]),C=(async()=>{try{let e=si(c,void 0,x);e&&await hi(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,yi(e,t,c,r,a)]}let r=await S;ee&&r[0]===li&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,te?.())})();if(r.push([n,S,C]),!y)return S.then(e=>Ai(s,e));let ne={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let re=Di(e,t,ne,c,g,i,a).then(e=>(s.isFetching=!1,Oi(ne,e,!1),e));return(t[2]??=[]).push([n,re,C,ne]),re.then(e=>Ai(ne,e))}async function Mi(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=gi(e,t[n]);try{let e=si(i,!1);e&&await hi(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Ni(e,t){t[2]&&=(Ci(e,t[2].map(e=>e[3])),void 0)}async function Pi(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=fi)throw[a,t];!i&&t[0]!==li&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===fi)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Fi(e,t,n,r,i,a){for(;r[0]===fi;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[fi,t]:[fi,t,a]}return[fi,o,n]}catch(e){r=a?[ui,e]:vi(n,e),a=!0}}return r}async function Ii(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===di?Mi(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=fi)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==li&&t[0]=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=fi){let n=s[1];if(n[0]!==fi||n[1].options.reloadDocument||n[2])return Ni(e,t),n;c=!0,s=[0,[ui,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===ui?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=gi(e,u);try{await hi(i?Promise.resolve().then(()=>si(m,l===ui?`errorComponent`:`notFoundComponent`)):Promise.all([si(m),si(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Ni(e,t),pi}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Ni(e,t),Ci(e,o),p()):u.status=`success`}return t}async function Li(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;te._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Mi(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l{for(let t=d;t=fi&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Ii(e,i,u,r[0],Pi(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Pi(i[2],void 0,void 0,h.then(e=>mi(e)?0:ci(n).length,()=>0))),o=await h}catch(t){if(Ni(e,i),t===a&&a.aborted)return pi;throw t}return mi(o)?o:Li(e,o,a,r[6]===n.length?r[6]:0)}function zi(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a0){i[3]=setTimeout(()=>zi(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function Bi(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function Vi(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!ci(t[3]).some(e=>e.id===n[1]))return;let i;try{await hi(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Hi(e,t){e._committed=t,e.stores.setMatches(t)}function Ui(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=ci(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Gr(n);Hi(e,n),Ci(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Kr(e,i,n,a,l,t)}async function Wi(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Gi(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function Ki(e,t,n,r,i){let a=n.map(e=>({...e}));wi(a);for(let t of r)Si(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Ii(e,o,r,t[0],i)}catch(t){throw Ci(e,a),t}if(mi(s)){Ci(e,a),s[0]===fi&&e._tx===t&&e._committed===n&&await Gi(e,t,s);return}if(await Li(e,s,t[0].signal),e._tx!==t||e._committed!==n){Ci(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Si(e,n))}Hi(e,a),Ci(e,n,a)}async function qi(e,t,n,r,i,a){let o=await Ri(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(mi(o)){let n=o[0]===fi&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Bi(e,t),Ci(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Bi(e,t);return}await Gi(e,t,o);return}let s=o[1];if(e._tx===t&&await Vi(e,t),e._tx!==t){Bi(e,t),Ci(e,s),Ni(e,o);return}let c=t[2],l=Ur(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Vi(e,t),e._tx!==t){Bi(e,t),Ci(e,s),Ni(e,o);return}let n=await e.startTransition(()=>{Bi(e,t),Ui(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){Ni(e,o);return}u?.length&&Ki(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function Ji(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Ur(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Wi(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});wi(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Ci(e,m),await Wi(e,n);return}e._preflight=void 0;let g,_=()=>qi(e,y,f,()=>zi(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>Wi(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Ti(e,t,!1)}n[0].abort(),Ci(e,n[3],y[3],!0)}if(e._tx!==y){Ci(e,y[3]),y[3]=[],g?.(),await Wi(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&zi(e,y),g?.(_()),await y[5]}async function Yi(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),wi(a),o=(e._preloads??=new Map).set(i,a),s=await Ri(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Ci(e,a)),i.abort()}if(!mi(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Fn(e)||console.error(e);return}}}var E=Se(ae(),1),D=de(),Xi=class extends E.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?E.createElement(this.props.errorComponent??Zi,{error:e[0],reset:this.reset}):this.props.children}};function Zi({error:e}){let[t,n]=E.useState(!1);return(0,D.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,D.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,D.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,D.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,D.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,D.jsx)(`div`,{children:(0,D.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,D.jsx)(`code`,{children:e.message}):null})}):null]})}function Qi({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function $i(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var ea=[],ta=0,{link:na,unlink:ra,propagate:ia,checkDirty:aa,shallowPropagate:oa}=Qi({update(e){return e._update()},notify(e){ea[ca++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,fa(e))}}),sa=0,ca=0,la,ua=0;function da(e){try{++ua,e()}finally{--ua||pa()}}function fa(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=ra(n,e)}function pa(){if(!(ua>0)){for(;sa{i.get(),n.current?(la=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=la,o=t?.compare??Object.is;if(n)la=i,++ta,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{la=a,n&&(i.flags&=-5),fa(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&aa(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&oa(e)}}else e&32&&(i.flags=e&-33);return la!==void 0&&na(i,la,ta),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(ia(e),oa(e),pa())}},i}function ha(e){let t=()=>{let t=la;la=n,++ta,n.depsTail=void 0,n.flags=6;try{return e()}finally{la=t,n.flags&=-5,fa(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&aa(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,fa(this)}};return t(),n}function ga(e){let t=we(),n=`not-found-${Ft(t.stores.location,e=>e.pathname)}-${Ft(t.stores.status)}`;return(0,D.jsx)(Xi,{getResetKey:()=>n,onCatch:(t,n)=>{if(Fn(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Fn(t))return e.fallback?.(t);throw t},children:e.children})}function O(){return(0,D.jsx)(`p`,{children:`Not Found`})}function _a(e,t,n){return t.options.notFoundComponent?(0,D.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,D.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,D.jsx)(O,{})}function va(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,D.jsx)(n,{}):null}var ya=(e,t)=>e[0]===t[0]&&e[1]===t[1],ba=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,xa=E.memo(function({routeId:e}){let t=we();return(0,D.jsx)(Sa,{router:t,match:Ft(t.stores.getMatchStore(e))})});function Sa({router:e,match:t}){let n=e.routesById[t.routeId],r=va(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=ba(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,D.jsx)(Ca,{match:t});s&&(l=(0,D.jsx)(Qe,{fallback:r,children:l})),o&&(l=(0,D.jsx)(ga,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return E.createElement(o,e)},children:l})),i&&(l=(0,D.jsx)(Xi,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Fn(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,D.jsx)(E.Suspense,{fallback:r,children:l}));let u=n.isRoot?n.options.shellComponent:void 0;return(0,D.jsx)(Fe.Provider,{value:t.routeId,children:u?(0,D.jsxs)(u,{children:[l,null]}):(0,D.jsxs)(D.Fragment,{children:[l,null]})})}var Ca=E.memo(function({match:e}){let t=we(),n=e.routeId,r=t.routesById[n],i=E.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=E.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,D.jsx)(e,{},i):(0,D.jsx)(wa,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!ba(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return va(t,r)}if(e.status===`notFound`)return _a(t,r,e.error);if(e.status===`error`)throw e.error;return a}),wa=E.memo(function(){let e=we(),t=E.useContext(Fe),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Ft(a,e=>[!!e._notFound,e.error],{compare:ya}),i=Ft(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return _a(e,e.routesById[t],r);if(!i)return null;let a=(0,D.jsx)(xa,{routeId:i});return t===`__root__`?(0,D.jsx)(E.Suspense,{fallback:va(e),children:a}):a});function Ta(e,t){let n=e[1];e.length=0,n?.(t)}function Ea({t:e}){let t=we(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Ta(n,!1),n.push(i,a),e(t),E.startTransition(r)}),De(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(tt(r.publicHref)!==tt(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Ur(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Da(){let e=we(),t=e.routesById[Ze],n=va(e,t),r=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Ea,{t:E.useState()[1]}),e.ssr?(0,D.jsx)(Oa,{}):(0,D.jsx)(E.Suspense,{fallback:n,children:(0,D.jsx)(Oa,{})})]});return e.options.InnerWrap?(0,D.jsx)(e.options.InnerWrap,{children:r}):r}function Oa(){let e=we(),t=e._rendered,n=Ft(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;De(()=>{t[0]===n&&Ta(t,!0)},[t,n]);let a=i?(0,D.jsx)(xa,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,D.jsx)(Xi,{getResetKey:()=>r,onCatch:void 0,children:a})}var ka=e=>({createMutableStore:ma,createReadonlyStore:ma,batch:da}),Aa=e=>new ja(e),ja=class extends qr{constructor(e){super(e,ka)}};function Ma({router:e,children:t,...n}){at(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,D.jsx)(Te.Provider,{value:e,children:t});return e.options.Wrap?(0,D.jsx)(e.options.Wrap,{children:r}):r}function Na({router:e,...t}){return(0,D.jsx)(Ma,{router:e,...t,children:(0,D.jsx)(Da,{})})}function Pa(e){let t=we({warn:e?.router===void 0}),n=e?.router||t;return Ft(n.stores.__store,Je(e,n))}function Fa(e,t,n={leading:!1}){let[r,i]=(0,E.useState)(e),a=(0,E.useRef)(!1),o=(0,E.useRef)(null),s=(0,E.useRef)(!1),c=(0,E.useRef)(e);c.current=e;let l=(0,E.useCallback)(()=>{window.clearTimeout(o.current),o.current=null},[]),u=(0,E.useCallback)(()=>{l(),s.current=!1},[]),d=(0,E.useCallback)(()=>{o.current&&(u(),s.current=!1,i(c.current))},[]);return(0,E.useEffect)(()=>{a.current&&(l(),!s.current&&n.leading?(s.current=!0,i(e),o.current=window.setTimeout(()=>{s.current=!1},t)):o.current=window.setTimeout(()=>{s.current=!1,i(e)},t))},[e,n.leading,t]),(0,E.useEffect)(()=>(a.current=!0,u),[]),[r,u,{cancel:u,flush:d}]}function Ia(e=!1,t={}){let[n,r]=(0,E.useState)(e),i=(0,E.useCallback)(()=>{r(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),a=(0,E.useCallback)(()=>{r(e=>e&&(t.onClose?.(),!1))},[t.onClose]);return[n,{open:i,close:a,toggle:(0,E.useCallback)(()=>{n?a():i()},[a,i,n]),set:r}]}function La(e){return e===`auto`||e===`dark`||e===`light`}function Ra({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return La(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&La(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function za(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function Ba({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,E.useRef)(null),[a,o]=(0,E.useState)(()=>e.get(t)),s=r||a,c=(0,E.useCallback)(t=>{r||(za(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,E.useCallback)(()=>{o(t),za(t,n),e.clear()},[e.clear,t]);return(0,E.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),fe(()=>{za(e.get(t),n)},[]),(0,E.useEffect)(()=>{if(r)return za(r,n),()=>{};r===void 0&&za(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&za(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}function Va(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function Ha(e,t){let n=t?[t]:[`:root`,`:host`],r=Va(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=Va(e.dark),o=Va(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function Ua({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:a=!0}){if(!e.colors[t])return{};if(n===`light`){let n=o(e,`light`),s={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:i(e.colors[t][n],.05)};return a?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...s}:s}let s=o(e,`dark`),c={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${s})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${s===9?8:s+1})`,[`--mantine-color-${r}-light`]:h(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:h(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(s-4,0)})`,[`--mantine-color-${r}-outline-hover`]:i(e.colors[t][Math.max(s-4,0)],.05)};return a?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...c}:c}function Wa(e,t,n){pe(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var Ga=e=>{let t=o(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:C(e.defaultRadius),i={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":ht(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":ht(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};Wa(i.variables,e.breakpoints,`breakpoint`),Wa(i.variables,e.spacing,`spacing`),Wa(i.variables,e.fontSizes,`font-size`),Wa(i.variables,e.lineHeights,`line-height`),Wa(i.variables,e.shadows,`shadow`),Wa(i.variables,e.radius,`radius`),Wa(i.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{i.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),pe(e.colors).forEach(t=>{let n=e.colors[t];if(r(n)){Object.assign(i.light,Ua({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(i.dark,Ua({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),i.light[`--mantine-color-${n.name}-contrast`]=Pe(n,e,`light`),i.dark[`--mantine-color-${n.name}-contrast`]=Pe(n,e,`dark`);return}n.forEach((e,n)=>{i.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(i.light,Ua({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(i.dark,Ua({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let a=e.headings.sizes;return pe(a).forEach(t=>{i.variables[`--mantine-${t}-font-size`]=a[t].fontSize,i.variables[`--mantine-${t}-line-height`]=a[t].lineHeight,i.variables[`--mantine-${t}-font-weight`]=a[t].fontWeight||e.headings.fontWeight}),i};function Ka(){let t=u(),n=e(),r=pe(t.breakpoints).reduce((e,n)=>{let r=t.breakpoints[n].includes(`px`),i=Ge(t.breakpoints[n]);return`${e}@media (max-width: ${r?`${i-.1}px`:ye(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:ye(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,D.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function qa({theme:e,generator:t}){let n=Ga(e),r=t?.(e);return r?ie(n,r):n}var Ja=Ga(f);function Ya(e){let t={variables:{},light:{},dark:{}};return pe(e.variables).forEach(n=>{Ja.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),pe(e.light).forEach(n=>{Ja.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),pe(e.dark).forEach(n=>{Ja.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function Xa(e){return Ha({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function Za({cssVariablesSelector:t,deduplicateCssVariables:n}){let r=u(),i=e(),a=qa({theme:r,generator:c()}),o=(t===void 0||t===`:root`||t===`:host`)&&n,s=Ha(o?Ya(a):a,t);return s?(0,D.jsx)(`style`,{"data-mantine-styles":!0,nonce:i?.(),dangerouslySetInnerHTML:{__html:`${s}${o?``:Xa(t)}`}}):null}Za.displayName=`@mantine/CssVariables`;function Qa({respectReducedMotion:e,getRootElement:t}){fe(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function $a({theme:e,children:t,getStyleNonce:r,withStaticClasses:i=!0,withGlobalClasses:a=!0,deduplicateCssVariables:o=!0,withCssVariables:s=!0,cssVariablesSelector:c,classNamesPrefix:u=`mantine`,colorSchemeManager:d=Ra(),defaultColorScheme:f=`light`,getRootElement:p=()=>document.documentElement,cssVariablesResolver:m,forceColorScheme:h,stylesTransform:g,env:_,deduplicateInlineStyles:v=!1}){let{colorScheme:y,setColorScheme:b,clearColorScheme:ee}=Ba({defaultColorScheme:f,forceColorScheme:h,manager:d,getRootElement:p});return Qa({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:p}),(0,D.jsx)(n,{value:{colorScheme:y,setColorScheme:b,clearColorScheme:ee,getRootElement:p,classNamesPrefix:u,getStyleNonce:r,cssVariablesResolver:m,cssVariablesSelector:c??`:root`,withStaticClasses:i,stylesTransform:g,env:_,deduplicateInlineStyles:v},children:(0,D.jsxs)(l,{theme:e,children:[s&&(0,D.jsx)(Za,{cssVariablesSelector:c,deduplicateCssVariables:o}),a&&(0,D.jsx)(Ka,{}),t]})})}$a.displayName=`@mantine/core/MantineProvider`;function eo(e){return e}var[to,no]=Bt(`AppShell was not found in tree`),ro={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},io=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ce(`AppShellAside`,null,e),d=no();return d.disabled?null:(0,D.jsx)(xe,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:_({[tn.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});io.classes=ro,io.displayName=`@mantine/core/AppShellAside`;var ao=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ce(`AppShellFooter`,null,e),d=no();return d.disabled?null:(0,D.jsx)(xe,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:_({[tn.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});ao.classes=ro,ao.displayName=`@mantine/core/AppShellFooter`;var oo=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ce(`AppShellHeader`,null,e),d=no();return d.disabled?null:(0,D.jsx)(xe,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:_({[tn.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});oo.classes=ro,oo.displayName=`@mantine/core/AppShellHeader`;var so=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ce(`AppShellMain`,null,e),s=no();return(0,D.jsx)(xe,{component:`main`,...s.getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});so.classes=ro,so.displayName=`@mantine/core/AppShellMain`;var co=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ce(`AppShellNavbar`,null,e),d=no();return d.disabled?null:(0,D.jsx)(xe,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});co.classes=ro,co.displayName=`@mantine/core/AppShellNavbar`;var lo=p(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=ce(`AppShellSection`,null,e),l=no();return(0,D.jsx)(xe,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});lo.classes=ro,lo.displayName=`@mantine/core/AppShellSection`;function uo(e){return typeof e==`object`?e.base:e}function fo(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function po(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function mo({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),fo(o)){let t=C(uo(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(po(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=C(o.base),e[`--app-shell-aside-offset`]=C(o.base)),pe(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=C(o[e]),t[e][`--app-shell-aside-offset`]=C(o[e]))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=We(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function ho({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),fo(i)){let t=C(uo(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}po(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=C(i.base),a&&(e[`--app-shell-footer-offset`]=C(i.base))),pe(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=C(i[e]),a&&(t[e][`--app-shell-footer-offset`]=C(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function go({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),fo(i)){let t=C(uo(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}po(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=C(i.base),a&&(e[`--app-shell-header-offset`]=C(i.base))),pe(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=C(i[e]),a&&(t[e][`--app-shell-header-offset`]=C(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function _o({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),fo(o)){let t=C(uo(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(po(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=C(o.base),e[`--app-shell-navbar-offset`]=C(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=C(o.base))),pe(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=C(o[e]),t[e][`--app-shell-navbar-offset`]=C(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=C(o[e])))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=We(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function vo(e){return Number(e)===0?`0px`:x(e)}function yo({padding:e,baseStyles:t,minMediaStyles:n}){fo(e)&&(t[`--app-shell-padding`]=vo(uo(e))),po(e)&&(e.base&&(t[`--app-shell-padding`]=vo(e.base)),pe(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=vo(e[t]))}))}function bo({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),_o({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),mo({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),go({baseStyles:l,minMediaStyles:s,header:t,mode:o}),ho({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),yo({baseStyles:l,minMediaStyles:s,padding:i});let u=mt(pe(s),a.breakpoints).map(e=>({query:`(min-width: ${ye(e.px)})`,styles:s[e.value]})),d=mt(pe(c),a.breakpoints).map(e=>({query:`(max-width: ${ye(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function xo({navbar:e,header:t,aside:n,footer:r,padding:i,mode:o,selector:s}){let c=u(),l=a(),{media:f,baseStyles:p}=bo({navbar:e,header:t,footer:r,aside:n,padding:i,theme:c,mode:o});return(0,D.jsx)(d,{media:f,styles:p,selector:s||l.cssVariablesSelector})}function So({transitionDuration:e,disabled:t}){let[n,r]=(0,E.useState)(!0),i=(0,E.useRef)(-1),a=(0,E.useRef)(-1);return Jt(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,E.startTransition)(()=>{r(!1)}),200)}),fe(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,E.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var Co={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:It(`app`),mode:`fixed`},wo=g((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),To=t(e=>{let t=ce(`AppShell`,Co,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:ee,attributes:te,id:x,...S}=t,C=le({name:`AppShell`,classes:ro,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:te,vars:s,varsResolver:wo}),re=So({disabled:g,transitionDuration:d}),ie=ne(x);return(0,D.jsxs)(to,{value:{getStyles:C,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,D.jsx)(xo,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${ie}`:void 0}),(0,D.jsx)(xe,{...C(`root`),id:ie,mod:[{resizing:re,layout:h,disabled:g,mode:b},ee],...S})]})});To.classes=ro,To.varsResolver=wo,To.displayName=`@mantine/core/AppShell`,To.Navbar=co,To.Header=oo,To.Main=so,To.Aside=io,To.Footer=ao,To.Section=lo;var Eo={group:`m_11def92b`,root:`m_f85678b6`,image:`m_11f8ac07`,placeholder:`m_104cd71f`},Do=(0,E.createContext)({withinGroup:!1}),Oo=g((e,{spacing:t})=>({group:{"--ag-spacing":x(t)}})),ko=t(e=>{let t=ce(`AvatarGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,spacing:c,attributes:l,...u}=t,d=le({name:`AvatarGroup`,classes:Eo,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:Oo,rootSelector:`group`});return(0,D.jsx)(Do,{value:{withinGroup:!0},children:(0,D.jsx)(xe,{...d(`group`),...u})})});ko.classes=Eo,ko.varsResolver=Oo,ko.displayName=`@mantine/core/AvatarGroup`;function Ao(e){return(0,D.jsx)(`svg`,{...e,"data-avatar-placeholder-icon":!0,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,D.jsx)(`path`,{d:`M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function jo(e){let t=0;for(let n=0;ne[0]).slice(0,t).join(``).toUpperCase()}var Fo=g((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o,name:s,allowedInitialsColors:c})=>{let l=a===`initials`&&typeof s==`string`?No(s,c):a,u=e.variantColorResolver({color:l||`gray`,theme:e,gradient:i,variant:r||`light`,autoContrast:o});return{root:{"--avatar-size":ge(t,`avatar-size`),"--avatar-radius":n===void 0?void 0:ee(n),"--avatar-bg":l||r?u.background:void 0,"--avatar-color":l||r?u.color:void 0,"--avatar-bd":l||r?u.border:void 0}}}),Io=p(e=>{let t=ce(`Avatar`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,src:c,alt:l,radius:u,color:d,gradient:f,imageProps:p,children:m,autoContrast:h,mod:g,name:_,allowedInitialsColors:v,attributes:y,...b}=t,ee=(0,E.use)(Do),[te,x]=(0,E.useState)(!c),S=le({name:`Avatar`,props:t,classes:Eo,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:Fo});return(0,E.useEffect)(()=>x(!c),[c]),(0,D.jsx)(xe,{...S(`root`),mod:[{"within-group":ee.withinGroup},g],...b,children:te||!c?(0,D.jsx)(`span`,{...S(`placeholder`),title:l,children:m||typeof _==`string`&&Po(_)||(0,D.jsx)(Ao,{})}):(0,D.jsx)(`img`,{...p,...S(`image`),src:c,alt:l,onError:e=>{x(!0),p?.onError?.(e)}})})});Io.classes=Eo,Io.varsResolver=Fo,Io.displayName=`@mantine/core/Avatar`,Io.Group=ko;var Lo={root:`m_fea6bf1a`,burger:`m_d4fb9cad`},Ro=g((e,{color:t,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:a})=>({root:{"--burger-color":t?s(t,e):void 0,"--burger-size":ge(n,`burger-size`),"--burger-line-size":r?C(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":a}})),zo=t(e=>{let t=ce(`Burger`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,children:l,transitionDuration:u,transitionTimingFunction:d,lineSize:f,attributes:p,...m}=t,h=le({name:`Burger`,classes:Lo,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:Ro});return(0,D.jsxs)(te,{...h(`root`),...m,children:[(0,D.jsx)(xe,{mod:[`reduce-motion`,{opened:c}],...h(`burger`)}),l]})});zo.classes=Lo,zo.varsResolver=Ro,zo.displayName=`@mantine/core/Burger`;var[Bo,Vo]=Bt(`Drawer component was not found in tree`),Ho={root:`m_f11b401e`,header:`m_5a7c2c9`,content:`m_b8a05bbd`,inner:`m_31cd769a`},Uo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ce(`DrawerBody`,null,e),s=Vo();return(0,D.jsx)(Yt,{...s.getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Uo.classes=Ho,Uo.displayName=`@mantine/core/DrawerBody`;var Wo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ce(`DrawerCloseButton`,null,e),s=Vo();return(0,D.jsx)(qt,{...s.getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});Wo.classes=Ho,Wo.displayName=`@mantine/core/DrawerCloseButton`;var Go=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,radius:s,__hidden:c,...l}=ce(`DrawerContent`,null,e),u=Vo(),d=u.scrollAreaComponent||Ut;return(0,D.jsx)(en,{...u.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:u.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),...l,radius:s||u.radius||0,"data-hidden":c||void 0,children:(0,D.jsx)(d,{style:{height:`calc(100vh - var(--drawer-offset) * 2)`},children:o})})});Go.classes=Ho,Go.displayName=`@mantine/core/DrawerContent`;var Ko=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ce(`DrawerHeader`,null,e),s=Vo();return(0,D.jsx)(Qt,{...s.getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Ko.classes=Ho,Ko.displayName=`@mantine/core/DrawerHeader`;var qo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ce(`DrawerOverlay`,null,e),s=Vo();return(0,D.jsx)(Zt,{...s.getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});qo.classes=Ho,qo.displayName=`@mantine/core/DrawerOverlay`;function Jo(e){switch(e){case`top`:return`flex-start`;case`bottom`:return`flex-end`;default:return}}function Yo(e){if(e===`top`||e===`bottom`)return`0 0 calc(100% - var(--drawer-offset, 0rem) * 2)`}var Xo={top:`slide-down`,bottom:`slide-up`,left:`slide-right`,right:`slide-left`},Zo={top:`slide-down`,bottom:`slide-up`,right:`slide-right`,left:`slide-left`},Qo={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:It(`modal`),position:`left`},$o=g((e,{position:t,size:n,offset:r})=>({root:{"--drawer-size":ge(n,`drawer-size`),"--drawer-flex":Yo(t),"--drawer-height":t===`left`||t===`right`?void 0:`var(--drawer-size)`,"--drawer-align":Jo(t),"--drawer-justify":t===`right`?`flex-end`:void 0,"--drawer-offset":C(r)}})),es=t(e=>{let t=ce(`DrawerRoot`,Qo,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,scrollAreaComponent:c,position:l,transitionProps:u,radius:d,attributes:f,...p}=t,{dir:m}=Lt(),h=le({name:`Drawer`,classes:Ho,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:$o}),g=(m===`rtl`?Zo:Xo)[l];return(0,D.jsx)(Bo,{value:{scrollAreaComponent:c,getStyles:h,radius:d},children:(0,D.jsx)(Xt,{...h(`root`),transitionProps:{transition:g,...u},"data-offset-scrollbars":c===Rt.Autosize||void 0,unstyled:o,...p})})});es.classes=Ho,es.varsResolver=$o,es.displayName=`@mantine/core/DrawerRoot`;var k=(0,E.createContext)(null);function ts({children:e}){let[t,n]=(0,E.useState)([]),[r,i]=(0,E.useState)(It(`modal`)),[a]=(0,E.useState)(()=>new WeakSet);return(0,D.jsx)(k,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r,handledEscapeEvents:a},children:e})}ts.displayName=`@mantine/core/DrawerStack`;var ns=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ce(`DrawerTitle`,null,e),s=Vo();return(0,D.jsx)(fn,{...s.getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});ns.classes=Ho,ns.displayName=`@mantine/core/DrawerTitle`;var rs={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:It(`modal`),withOverlay:!0,withCloseButton:!0},is=t(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,opened:s,stackId:c,zIndex:l,...u}=ce(`Drawer`,rs,e),d=(0,E.use)(k),f=!!t||i,p=d&&c?{closeOnEscape:d.currentId===c,trapFocus:d.currentId===c,zIndex:d.getZIndex(c),__handledEscapeEvents:d.handledEscapeEvents}:{},m=n===!1?!1:c&&d?d.currentId===c:s;return(0,E.useEffect)(()=>{d&&c&&(s?d.addModal(c,l||It(`modal`)):d.removeModal(c))},[s,c,l]),(0,D.jsxs)(es,{opened:s,zIndex:d&&c?d.getZIndex(c):l,...u,...p,children:[n&&(0,D.jsx)(qo,{visible:m,transitionProps:d&&c?{duration:0}:void 0,...r}),(0,D.jsxs)(Go,{__hidden:d&&c&&s?c!==d.currentId:!1,children:[f&&(0,D.jsxs)(Ko,{children:[t&&(0,D.jsx)(ns,{children:t}),i&&(0,D.jsx)(Wo,{...a})]}),(0,D.jsx)(Uo,{children:o})]})]})});is.classes=Ho,is.displayName=`@mantine/core/Drawer`,is.Root=es,is.Overlay=qo,is.Content=Go,is.Body=Uo,is.Header=Ko,is.Title=ns,is.CloseButton=Wo,is.Stack=ts;var as={root:`m_dc6f14e2`},os=g((e,{size:t})=>({root:{"--kbd-fz":ge(t,`kbd-fz`)}})),ss=t(e=>{let t=ce(`Kbd`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t,u=le({name:`Kbd`,classes:as,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:os});return(0,D.jsx)(xe,{component:`kbd`,...u(`root`),...l})});ss.classes=as,ss.varsResolver=os,ss.displayName=`@mantine/core/Kbd`;var cs=[];for(let e=0;e<256;++e)cs.push((e+256).toString(16).slice(1));function ls(e,t=0){return(cs[e[t+0]]+cs[e[t+1]]+cs[e[t+2]]+cs[e[t+3]]+`-`+cs[e[t+4]]+cs[e[t+5]]+`-`+cs[e[t+6]]+cs[e[t+7]]+`-`+cs[e[t+8]]+cs[e[t+9]]+`-`+cs[e[t+10]]+cs[e[t+11]]+cs[e[t+12]]+cs[e[t+13]]+cs[e[t+14]]+cs[e[t+15]]).toLowerCase()}var us,ds=new Uint8Array(16);function fs(){if(!us){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);us=crypto.getRandomValues.bind(crypto)}return us(ds)}var ps={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ms(e,t,n){if(ps.randomUUID&&!t&&!e)return ps.randomUUID();e||={};let r=e.random??e.rng?.()??fs();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return ls(r)}var hs=Pn(),A=function(e){return e.TEXT_MESSAGE_START=`TEXT_MESSAGE_START`,e.TEXT_MESSAGE_CONTENT=`TEXT_MESSAGE_CONTENT`,e.TEXT_MESSAGE_END=`TEXT_MESSAGE_END`,e.TEXT_MESSAGE_CHUNK=`TEXT_MESSAGE_CHUNK`,e.TOOL_CALL_START=`TOOL_CALL_START`,e.TOOL_CALL_ARGS=`TOOL_CALL_ARGS`,e.TOOL_CALL_END=`TOOL_CALL_END`,e.TOOL_CALL_CHUNK=`TOOL_CALL_CHUNK`,e.TOOL_CALL_RESULT=`TOOL_CALL_RESULT`,e.STATE_SNAPSHOT=`STATE_SNAPSHOT`,e.STATE_DELTA=`STATE_DELTA`,e.MESSAGES_SNAPSHOT=`MESSAGES_SNAPSHOT`,e.ACTIVITY_SNAPSHOT=`ACTIVITY_SNAPSHOT`,e.ACTIVITY_DELTA=`ACTIVITY_DELTA`,e.RAW=`RAW`,e.CUSTOM=`CUSTOM`,e.RUN_STARTED=`RUN_STARTED`,e.RUN_FINISHED=`RUN_FINISHED`,e.RUN_ERROR=`RUN_ERROR`,e.STEP_STARTED=`STEP_STARTED`,e.STEP_FINISHED=`STEP_FINISHED`,e.REASONING_START=`REASONING_START`,e.REASONING_MESSAGE_START=`REASONING_MESSAGE_START`,e.REASONING_MESSAGE_CONTENT=`REASONING_MESSAGE_CONTENT`,e.REASONING_MESSAGE_END=`REASONING_MESSAGE_END`,e.REASONING_MESSAGE_CHUNK=`REASONING_MESSAGE_CHUNK`,e.REASONING_END=`REASONING_END`,e.REASONING_ENCRYPTED_VALUE=`REASONING_ENCRYPTED_VALUE`,e.SUBAGENT_STARTED=`SUBAGENT_STARTED`,e.SUBAGENT_FINISHED=`SUBAGENT_FINISHED`,e.SUBAGENT_ERROR=`SUBAGENT_ERROR`,e}({}),gs={TextMessageStartEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`,`role`,`name`],fields:{}},TextMessageContentEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},TextMessageEndEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},TextMessageChunkEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`,`messageId`,`role`,`delta`,`name`],fields:{}},ToolCallStartEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`,`parentMessageId`],fields:{}},ToolCallArgsEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},ToolCallEndEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},ToolCallChunkEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`,`toolCallId`,`toolCallName`,`parentMessageId`,`delta`],fields:{}},TextPart:{optional:[`id`,`metadata`],fields:{}},DataSource:{optional:[],fields:{}},UrlSource:{optional:[`mimeType`],fields:{}},FileSource:{optional:[`provider`,`mimeType`],fields:{}},PartSource:{discriminator:`type`,variants:{data:`DataSource`,url:`UrlSource`,file:`FileSource`}},ImagePart:{optional:[`id`,`metadata`],fields:{source:`PartSource`}},AudioPart:{optional:[`id`,`metadata`],fields:{source:`PartSource`}},VideoPart:{optional:[`id`,`metadata`],fields:{source:`PartSource`}},DocumentPart:{optional:[`id`,`metadata`],fields:{source:`PartSource`}},ContentPart:{discriminator:`type`,variants:{text:`TextPart`,image:`ImagePart`,audio:`AudioPart`,video:`VideoPart`,document:`DocumentPart`}},ToolCallResultEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`,`role`],fields:{content:{array:`ContentPart`}}},StateSnapshotEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},AddOperation:{optional:[],fields:{}},RemoveOperation:{optional:[],fields:{}},ReplaceOperation:{optional:[],fields:{}},MoveOperation:{optional:[],fields:{}},CopyOperation:{optional:[],fields:{}},TestOperation:{optional:[],fields:{}},JsonPatchOperation:{discriminator:`op`,variants:{add:`AddOperation`,remove:`RemoveOperation`,replace:`ReplaceOperation`,move:`MoveOperation`,copy:`CopyOperation`,test:`TestOperation`}},StateDeltaEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{delta:{array:`JsonPatchOperation`}}},DeveloperMessage:{optional:[`subagentRunId`,`name`,`encryptedValue`,`metadata`],fields:{}},SystemMessage:{optional:[`subagentRunId`,`name`,`encryptedValue`,`metadata`],fields:{}},FunctionCall:{optional:[],fields:{}},ToolCall:{optional:[`encryptedValue`,`metadata`],fields:{function:`FunctionCall`}},AssistantMessage:{optional:[`subagentRunId`,`name`,`encryptedValue`,`metadata`,`content`,`toolCalls`],fields:{toolCalls:{array:`ToolCall`}}},UserMessage:{optional:[`subagentRunId`,`name`,`encryptedValue`,`metadata`],fields:{content:{array:`ContentPart`}}},ToolMessage:{optional:[`subagentRunId`,`error`,`encryptedValue`,`metadata`],fields:{content:{array:`ContentPart`}}},ActivityMessage:{optional:[`subagentRunId`,`metadata`],fields:{}},ReasoningMessage:{optional:[`subagentRunId`,`encryptedValue`,`metadata`],fields:{}},Message:{discriminator:`role`,variants:{developer:`DeveloperMessage`,system:`SystemMessage`,assistant:`AssistantMessage`,user:`UserMessage`,tool:`ToolMessage`,activity:`ActivityMessage`,reasoning:`ReasoningMessage`}},MessagesSnapshotEvent:{optional:[`timestamp`,`rawEvent`,`metadata`],fields:{messages:{array:`Message`}}},ActivitySnapshotEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`,`replace`],fields:{}},ActivityDeltaEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{patch:{array:`JsonPatchOperation`}}},RawEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`,`source`],fields:{}},CustomEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},Tool:{optional:[`parameters`,`metadata`],fields:{}},Context:{optional:[],fields:{}},ResumeEntry:{optional:[`payload`,`metadata`],fields:{}},RunAgentInput:{optional:[`protocolVersion`,`parentRunId`,`state`,`tools`,`context`,`forwardedProps`,`resume`],fields:{messages:{array:`Message`},tools:{array:`Tool`},context:{array:`Context`},resume:{array:`ResumeEntry`}}},RunStartedEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`protocolVersion`,`parentRunId`,`input`],fields:{input:`RunAgentInput`}},RunFinishedSuccessOutcome:{optional:[`pendingToolCallIds`],fields:{}},Interrupt:{optional:[`subagentRunId`,`message`,`toolCallId`,`responseSchema`,`expiresAt`,`metadata`],fields:{}},RunFinishedInterruptOutcome:{optional:[],fields:{interrupts:{array:`Interrupt`}}},RunFinishedCancelledOutcome:{optional:[],fields:{}},RunFinishedOutcome:{discriminator:`type`,variants:{success:`RunFinishedSuccessOutcome`,interrupt:`RunFinishedInterruptOutcome`,cancelled:`RunFinishedCancelledOutcome`}},TokenUsage:{optional:[`provider`,`model`,`inputTokens`,`outputTokens`,`totalTokens`,`reasoningTokens`,`cachedInputTokens`,`cacheWriteInputTokens`],fields:{}},RunFinishedEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`result`,`outcome`,`usage`],fields:{outcome:`RunFinishedOutcome`,usage:{array:`TokenUsage`}}},RunErrorEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`code`,`usage`],fields:{usage:{array:`TokenUsage`}}},StepStartedEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},StepFinishedEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},ReasoningStartEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},ReasoningMessageStartEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},ReasoningMessageContentEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},ReasoningMessageEndEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},ReasoningMessageChunkEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`,`messageId`,`delta`],fields:{}},ReasoningEndEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},ReasoningEncryptedValueEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`subagentRunId`],fields:{}},SubagentStartedEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`description`,`parentSubagentRunId`,`parentToolCallId`,`parentMessageId`],fields:{}},SubagentFinishedSuccessOutcome:{optional:[],fields:{}},SubagentFinishedSuspendedOutcome:{optional:[`interruptIds`],fields:{}},SubagentFinishedOutcome:{discriminator:`type`,variants:{success:`SubagentFinishedSuccessOutcome`,suspended:`SubagentFinishedSuspendedOutcome`}},SubagentFinishedEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`result`,`outcome`],fields:{outcome:`SubagentFinishedOutcome`}},SubagentErrorEvent:{optional:[`timestamp`,`rawEvent`,`metadata`,`code`],fields:{}},Event:{discriminator:`type`,variants:{TEXT_MESSAGE_START:`TextMessageStartEvent`,TEXT_MESSAGE_CONTENT:`TextMessageContentEvent`,TEXT_MESSAGE_END:`TextMessageEndEvent`,TEXT_MESSAGE_CHUNK:`TextMessageChunkEvent`,TOOL_CALL_START:`ToolCallStartEvent`,TOOL_CALL_ARGS:`ToolCallArgsEvent`,TOOL_CALL_END:`ToolCallEndEvent`,TOOL_CALL_CHUNK:`ToolCallChunkEvent`,TOOL_CALL_RESULT:`ToolCallResultEvent`,STATE_SNAPSHOT:`StateSnapshotEvent`,STATE_DELTA:`StateDeltaEvent`,MESSAGES_SNAPSHOT:`MessagesSnapshotEvent`,ACTIVITY_SNAPSHOT:`ActivitySnapshotEvent`,ACTIVITY_DELTA:`ActivityDeltaEvent`,RAW:`RawEvent`,CUSTOM:`CustomEvent`,RUN_STARTED:`RunStartedEvent`,RUN_FINISHED:`RunFinishedEvent`,RUN_ERROR:`RunErrorEvent`,STEP_STARTED:`StepStartedEvent`,STEP_FINISHED:`StepFinishedEvent`,REASONING_START:`ReasoningStartEvent`,REASONING_MESSAGE_START:`ReasoningMessageStartEvent`,REASONING_MESSAGE_CONTENT:`ReasoningMessageContentEvent`,REASONING_MESSAGE_END:`ReasoningMessageEndEvent`,REASONING_MESSAGE_CHUNK:`ReasoningMessageChunkEvent`,REASONING_END:`ReasoningEndEvent`,REASONING_ENCRYPTED_VALUE:`ReasoningEncryptedValueEvent`,SUBAGENT_STARTED:`SubagentStartedEvent`,SUBAGENT_FINISHED:`SubagentFinishedEvent`,SUBAGENT_ERROR:`SubagentErrorEvent`}},SubagentInfo:{optional:[`description`],fields:{}},IdentityCapabilities:{optional:[`name`,`type`,`description`,`version`,`provider`,`documentationUrl`,`metadata`],fields:{}},TransportCapabilities:{optional:[`streaming`,`websocket`,`httpBinary`,`pushNotifications`,`resumable`],fields:{}},ToolsCapabilities:{optional:[`supported`,`items`,`parallelCalls`,`clientProvided`],fields:{items:{array:`Tool`}}},OutputCapabilities:{optional:[`structuredOutput`,`supportedMimeTypes`],fields:{}},StateCapabilities:{optional:[`snapshots`,`deltas`,`memory`,`persistentState`],fields:{}},MultiAgentCapabilities:{optional:[`supported`,`delegation`,`handoffs`,`subagents`],fields:{subagents:{array:`SubagentInfo`}}},ReasoningCapabilities:{optional:[`supported`,`streaming`,`encrypted`],fields:{}},MultimodalInputCapabilities:{optional:[`image`,`audio`,`video`,`pdf`,`file`],fields:{}},MultimodalOutputCapabilities:{optional:[`image`,`audio`],fields:{}},MultimodalCapabilities:{optional:[`input`,`output`],fields:{input:`MultimodalInputCapabilities`,output:`MultimodalOutputCapabilities`}},ExecutionCapabilities:{optional:[`codeExecution`,`sandboxed`,`maxIterations`,`maxExecutionTime`],fields:{}},HumanInTheLoopCapabilities:{optional:[`supported`,`approvals`,`interventions`,`feedback`,`interrupts`,`approveWithEdits`],fields:{}},AgentCapabilities:{optional:[`identity`,`transport`,`tools`,`output`,`state`,`multiAgent`,`reasoning`,`multimodal`,`execution`,`humanInTheLoop`,`custom`],fields:{identity:`IdentityCapabilities`,transport:`TransportCapabilities`,tools:`ToolsCapabilities`,output:`OutputCapabilities`,state:`StateCapabilities`,multiAgent:`MultiAgentCapabilities`,reasoning:`ReasoningCapabilities`,multimodal:`MultimodalCapabilities`,execution:`ExecutionCapabilities`,humanInTheLoop:`HumanInTheLoopCapabilities`}}};function _s(e,t){if(typeof t==`string`)return _s(e,gs[t]);if(`array`in t){if(!Array.isArray(e))return e;let n=e.map(e=>_s(e,t.array));return n.every((t,n)=>t===e[n])?e:n}if(typeof e!=`object`||!e||Array.isArray(e))return e;let n=e;if(`discriminator`in t){let r=n[t.discriminator];return typeof r==`string`&&Object.prototype.hasOwnProperty.call(t.variants,r)?_s(e,t.variants[r]):e}let r=n;for(let e of t.optional)Object.prototype.hasOwnProperty.call(n,e)&&n[e]===null&&(r===n&&(r={...n}),delete r[e]);for(let[e,i]of Object.entries(t.fields)){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let t=_s(r[e],i);t!==r[e]&&(r===n&&(r={...n}),r[e]=t)}return r}function vs(e,t){return _s(e,t)}var j=class extends Error{constructor(e){super(e)}},ys=class extends j{constructor(){super(`Connect not implemented. This method is not supported by the current agent.`)}};function bs(e,t){return t===void 0?e:e===void 0?{...t}:{...e,...t}}function xs(e){return e===void 0?``:typeof e==`string`?e:e.filter(e=>e.type===`text`).map(e=>e.text).join(``)}function Ss(e){return Array.isArray(e)&&e.some(e=>e.type!==`text`)}var Cs=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),ws=Object.prototype.hasOwnProperty;function Ts(e,t){return ws.call(e,t)}function Es(e){if(Array.isArray(e)){for(var t=Array(e.length),n=0;n=48&&r<=57){t++;continue}return!1}return!0}function ks(e){return e.indexOf(`/`)===-1&&e.indexOf(`~`)===-1?e:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function As(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function js(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;tFs,_areEquals:()=>Gs,applyOperation:()=>Bs,applyPatch:()=>Vs,applyReducer:()=>Hs,deepClone:()=>Is,getValueByPointer:()=>zs,validate:()=>Ws,validator:()=>Us}),Fs=Ns,Is=Ds,Ls={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=zs(n,this.path);r&&=Ds(r);var i=Bs(n,{op:`remove`,path:this.from}).removed;return Bs(n,{op:`add`,path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=zs(n,this.from);return Bs(n,{op:`add`,path:this.path,value:Ds(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:Gs(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},Rs={add:function(e,t,n){return Os(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:Ls.move,copy:Ls.copy,test:Ls.test,_get:Ls._get};function zs(e,t){if(t==``)return e;var n={op:`_get`,path:t};return Bs(e,n),n.value}function Bs(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n==`function`?n(t,0,e,t.path):Us(t,0)),t.path===``){var o={newDocument:e};if(t.op===`add`)return o.newDocument=t.value,o;if(t.op===`replace`)return o.newDocument=t.value,o.removed=e,o;if(t.op===`move`||t.op===`copy`)return o.newDocument=zs(e,t.from),t.op===`move`&&(o.removed=e),o;if(t.op===`test`){if(o.test=Gs(e,t.value),o.test===!1)throw new Fs(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o.newDocument=e,o}if(t.op===`remove`)return o.removed=e,o.newDocument=null,o;if(t.op===`_get`)return t.value=e,o;if(n)throw new Fs("Operation `op` property is not one of operations defined in RFC-6902",`OPERATION_OP_INVALID`,a,t,e);return o}r||(e=Ds(e));var s=(t.path||``).split(`/`),c=e,l=1,u=s.length,d=void 0,f=void 0,p=void 0;for(p=typeof n==`function`?n:Us;;){if(f=s[l],f&&f.indexOf(`~`)!=-1&&(f=As(f)),i&&(f==`__proto__`||f==`prototype`&&l>0&&s[l-1]==`constructor`))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(c[f]===void 0?d=s.slice(0,l).join(`/`):l==u-1&&(d=t.path),d!==void 0&&p(t,0,e,d)),l++,Array.isArray(c)){if(f===`-`)f=c.length;else if(n&&!Os(f))throw new Fs(`Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index`,`OPERATION_PATH_ILLEGAL_ARRAY_INDEX`,a,t,e);else Os(f)&&(f=~~f);if(l>=u){if(n&&t.op===`add`&&f>c.length)throw new Fs(`The specified index MUST NOT be greater than the number of elements in the array`,`OPERATION_VALUE_OUT_OF_BOUNDS`,a,t,e);var o=Rs[t.op].call(t,c,f,e);if(o.test===!1)throw new Fs(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}}else if(l>=u){var o=Ls[t.op].call(t,c,f,e);if(o.test===!1)throw new Fs(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}if(c=c[f],n&&l0)throw new Fs('Operation `path` property must start with "/"',`OPERATION_PATH_INVALID`,t,e,n);if((e.op===`move`||e.op===`copy`)&&typeof e.from!=`string`)throw new Fs("Operation `from` property is not present (applicable in `move` and `copy` operations)",`OPERATION_FROM_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&e.value===void 0)throw new Fs("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&js(e.value))throw new Fs("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED`,t,e,n);if(n){if(e.op==`add`){var i=e.path.split(`/`).length,a=r.split(`/`).length;if(i!==a+1&&i!==a)throw new Fs("Cannot perform an `add` operation at the desired path",`OPERATION_PATH_CANNOT_ADD`,t,e,n)}else if(e.op===`replace`||e.op===`remove`||e.op===`_get`){if(e.path!==r)throw new Fs(`Cannot perform the operation at a path that does not exist`,`OPERATION_PATH_UNRESOLVABLE`,t,e,n)}else if(e.op===`move`||e.op===`copy`){var o=Ws([{op:`_get`,path:e.from,value:void 0}],n);if(o&&o.name===`OPERATION_PATH_UNRESOLVABLE`)throw new Fs(`Cannot perform the operation from a path that does not exist`,`OPERATION_FROM_UNRESOLVABLE`,t,e,n)}}}function Ws(e,t,n){try{if(!Array.isArray(e))throw new Fs(`Patch sequence must be an array`,`SEQUENCE_NOT_AN_ARRAY`);if(t)Vs(Ds(t),Ds(e),n||!0);else{n||=Us;for(var r=0;rrc,generate:()=>tc,observe:()=>ec,unobserve:()=>$s}),qs=new WeakMap,Js=function(){function e(e){this.observers=new Map,this.obj=e}return e}(),Ys=function(){function e(e,t){this.callback=e,this.observer=t}return e}();function Xs(e){return qs.get(e)}function Zs(e,t){return e.observers.get(t)}function Qs(e,t){e.observers.delete(t.callback)}function $s(e,t){t.unobserve()}function ec(e,t){var n=[],r,i=Xs(e);if(!i)i=new Js(e),qs.set(e,i);else{var a=Zs(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=Ds(e),t){r.callback=t,r.next=null;var o=function(){tc(r)},s=function(){clearTimeout(r.next),r.next=setTimeout(o)};typeof window<`u`&&(window.addEventListener(`mouseup`,s),window.addEventListener(`keyup`,s),window.addEventListener(`mousedown`,s),window.addEventListener(`keydown`,s),window.addEventListener(`change`,s))}return r.patches=n,r.object=e,r.unobserve=function(){tc(r),clearTimeout(r.next),Qs(i,r),typeof window<`u`&&(window.removeEventListener(`mouseup`,s),window.removeEventListener(`keyup`,s),window.removeEventListener(`mousedown`,s),window.removeEventListener(`keydown`,s),window.removeEventListener(`change`,s))},i.observers.set(t,new Ys(t,r)),r}function tc(e,t){t===void 0&&(t=!1);var n=qs.get(e.object);nc(n.value,e.object,e.patches,``,t),e.patches.length&&Vs(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function nc(e,t,n,r,i){if(t!==e){typeof t.toJSON==`function`&&(t=t.toJSON());for(var a=Es(t),o=Es(e),s=!1,c=o.length-1;c>=0;c--){var l=o[c],u=e[l];if(Ts(t,l)&&(t[l]!==void 0||u===void 0||Array.isArray(t)!==!1)){var d=t[l];typeof u==`object`&&u&&typeof d==`object`&&d&&Array.isArray(u)===Array.isArray(d)?nc(u,d,n,r+`/`+ks(l),i):u!==d&&(i&&n.push({op:`test`,path:r+`/`+ks(l),value:Ds(u)}),n.push({op:`replace`,path:r+`/`+ks(l),value:Ds(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:`test`,path:r+`/`+ks(l),value:Ds(u)}),n.push({op:`remove`,path:r+`/`+ks(l)}),s=!0):(i&&n.push({op:`test`,path:r,value:e}),n.push({op:`replace`,path:r,value:t}))}if(s||a.length!=o.length)for(var c=0;c0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function uc(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function dc(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof fc?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function mc(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof lc==`function`?lc(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function hc(e){return typeof e==`function`}function gc(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var _c=gc(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription: +`+t.map(function(e,t){return t+1+`) `+e.toString()}).join(` + `):``,this.name=`UnsubscriptionError`,this.errors=t}});function vc(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var yc=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=lc(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(hc(c))try{c()}catch(e){i=e instanceof _c?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=lc(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{Sc(f)}catch(e){i??=[],e instanceof _c?i=dc(dc([],uc(i)),uc(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new _c(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)Sc(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&vc(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&vc(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),bc=yc.EMPTY;function xc(e){return e instanceof yc||e&&`closed`in e&&hc(e.remove)&&hc(e.add)&&hc(e.unsubscribe)}function Sc(e){hc(e)?e():e.unsubscribe()}var Cc={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},wc={setTimeout:function(e,t){var n=[...arguments].slice(2),r=wc.delegate;return r?.setTimeout?r.setTimeout.apply(r,dc([e,t],uc(n))):setTimeout.apply(void 0,dc([e,t],uc(n)))},clearTimeout:function(e){return(wc.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Tc(e){wc.setTimeout(function(){var t=Cc.onUnhandledError;if(t)t(e);else throw e})}function Ec(){}var Dc=(function(){return Ac(`C`,void 0,void 0)})();function Oc(e){return Ac(`E`,void 0,e)}function kc(e){return Ac(`N`,e,void 0)}function Ac(e,t,n){return{kind:e,value:t,error:n}}var jc=null;function Mc(e){if(Cc.useDeprecatedSynchronousErrorHandling){var t=!jc;if(t&&(jc={errorThrown:!1,error:null}),e(),t){var n=jc,r=n.errorThrown,i=n.error;if(jc=null,r)throw i}}else e()}function Nc(e){Cc.useDeprecatedSynchronousErrorHandling&&jc&&(jc.errorThrown=!0,jc.error=e)}var Pc=function(e){oc(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,xc(t)&&t.add(n)):n.destination=Hc,n}return t.create=function(e,t,n){return new Rc(e,t,n)},t.prototype.next=function(e){this.isStopped?Vc(kc(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?Vc(Oc(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?Vc(Dc,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(yc),Fc=Function.prototype.bind;function Ic(e,t){return Fc.call(e,t)}var Lc=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){zc(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){zc(e)}else zc(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){zc(e)}},e}(),Rc=function(e){oc(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(hc(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&Cc.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Ic(t.next,o),error:t.error&&Ic(t.error,o),complete:t.complete&&Ic(t.complete,o)}):a=t}return i.destination=new Lc(a),i}return t}(Pc);function zc(e){Cc.useDeprecatedSynchronousErrorHandling?Nc(e):Tc(e)}function Bc(e){throw e}function Vc(e,t){var n=Cc.onStoppedNotification;n&&wc.setTimeout(function(){return n(e,t)})}var Hc={closed:!0,next:Ec,error:Bc,complete:Ec},Uc=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Wc(e){return e}function Gc(){return Kc([...arguments])}function Kc(e){return e.length===0?Wc:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var qc=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Xc(e)?e:new Rc(e,t,n);return Mc(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Jc(t),new t(function(t,r){var i=new Rc({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[Uc]=function(){return this},e.prototype.pipe=function(){return Kc([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Jc(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Jc(e){return e??Cc.Promise??Promise}function Yc(e){return e&&hc(e.next)&&hc(e.error)&&hc(e.complete)}function Xc(e){return e&&e instanceof Pc||Yc(e)&&xc(e)}function Zc(e){return hc(e?.lift)}function Qc(e){return function(t){if(Zc(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function $c(e,t,n,r,i){return new el(e,t,n,r,i)}var el=function(e){oc(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(Pc),tl=gc(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),nl=function(e){oc(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new rl(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new tl},t.prototype.next=function(e){var t=this;Mc(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=lc(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;Mc(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;Mc(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?bc:(this.currentObservers=null,a.push(e),new yc(function(){t.currentObservers=null,vc(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new qc;return e.source=this,e},t.create=function(e,t){return new rl(e,t)},t}(qc),rl=function(e){oc(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??bc},t}(nl),il={now:function(){return(il.delegate||Date).now()},delegate:void 0},al=function(e){oc(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=il);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a=0}function tu(e){for(var t=[`topLevel`],n=0,r,i,a,o=function(e){return t.push(e)},s=function(e){return t[t.length-1]=e},c=function(e){r??(r=n,i=t.length,a=e)},l=function(e){e===a&&(r=void 0,i=void 0,a=void 0)},u=function(){return t.pop()},d=function(){return n--},f=function(e){if(`0`<=e&&e<=`9`){o(`number`);return}switch(e){case`"`:o(`string`);return;case`-`:o(`numberNeedsDigit`);return;case`t`:o(`true`);return;case`f`:o(`false`);return;case`n`:o(`null`);return;case`[`:o(`arrayNeedsValue`);return;case`{`:o(`objectNeedsKey`);return}},p=e.length;n`9`)&&(d(),u());break;case`numberNeedsDigit`:s(`number`);break;case`numberNeedsExponent`:s(m===`+`||m===`-`?`numberNeedsDigit`:`number`);break;case`true`:case`false`:case`null`:(m<`a`||m>`z`)&&(d(),u());break;case`arrayNeedsValue`:m===`]`?u():eu(m)||(l(`collectionItem`),s(`arrayNeedsComma`),f(m));break;case`arrayNeedsComma`:m===`]`?u():m===`,`&&(c(`collectionItem`),s(`arrayNeedsValue`));break;case`objectNeedsKey`:m===`}`?u():m===`"`&&(c(`collectionItem`),s(`objectNeedsColon`),o(`string`));break;case`objectNeedsColon`:m===`:`&&s(`objectNeedsValue`);break;case`objectNeedsValue`:eu(m)||(l(`collectionItem`),s(`objectNeedsComma`),f(m));break;case`objectNeedsComma`:m===`}`?u():m===`,`&&(c(`collectionItem`),s(`objectNeedsKey`))}}i!=null&&(t.length=i);for(var h=[r==null?e:e.slice(0,r)],g=function(t){return h.push(t.slice(e.length-e.lastIndexOf(t[0])))},_=t.length-1;_>=0;_--)switch(t[_]){case`string`:h.push(`"`);break;case`numberNeedsDigit`:case`numberNeedsExponent`:h.push(`0`);break;case`true`:g(`true`);break;case`false`:g(`false`);break;case`null`:g(`null`);break;case`arrayNeedsValue`:case`arrayNeedsComma`:h.push(`]`);break;case`objectNeedsKey`:case`objectNeedsColon`:case`objectNeedsValue`:case`objectNeedsComma`:h.push(`}`)}return h.join(``)}function nu(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ru(e,t=`|`){return e.map(e=>Au(e)).join(t)}function iu(e,t){return typeof t==`bigint`?t.toString():t}var au=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function ou(e){return new au(e)}function su(e){return e==null}function cu(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function lu(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r){let e=t._zod.def.shape[a];return r?r(e,a):e}):gu(e,a,r?r(n.value,a):n.value))}}function vu(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?hu(e,n,()=>t[n]):gu(e,n,r.value))}}function yu(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function bu(e){return JSON.stringify(e)}function xu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Su=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Cu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var wu=ou(()=>{if(_d.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Tu(e){if(Cu(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Cu(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Eu(e){return Tu(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Du=new Set([`string`,`number`,`symbol`]);function Ou(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ku(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function P(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Au(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ju(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Mu={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Nu={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Pu(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return _u(i,e,Fu(e,t)),ku(e,yu(n,{shape:i,checks:[]}))}function Fu(e,t){let n=mu(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Iu(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Fu(e,t)),a={};return _u(a,e,Reflect.ownKeys(mu(e)).filter(e=>!i.has(e))),ku(e,yu(n,{shape:a,checks:[]}))}function Lu(e,t){if(!Tu(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=mu(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ku(e,yu(e._zod.def,{shape:Ru(e,t)}))}function Ru(e,t){let n={};return _u(n,e,Reflect.ownKeys(mu(e))),vu(n,t),n}function zu(e,t){if(!Tu(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ku(e,yu(e._zod.def,{shape:Ru(e,t)}))}function Bu(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return _u(n,e,Reflect.ownKeys(mu(e))),_u(n,t,Reflect.ownKeys(mu(t))),ku(e,yu(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Vu(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Fu(t,n)):void 0,o={};return _u(o,t,Reflect.ownKeys(mu(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),ku(t,yu(t._zod.def,{shape:o,checks:[]}))}function Hu(e,t,n){let r=n?new Set(Fu(t,n)):void 0,i={};return _u(i,t,Reflect.ownKeys(mu(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),ku(t,yu(t._zod.def,{shape:i}))}function Uu(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ku(e){return typeof e==`string`?e:e?.message}function qu(e,t,n){var r;for(let i=t;ie;return t[ud]=!0,t}var I,L=Object.freeze({status:`aborted`}),fd={value:void 0,enumerable:!1},pd=`captureStackTrace`in Error?Error:null;function md(e){let t=pd;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return pd=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function R(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){fd.value=new a(r);try{Object.defineProperty(n,"_zod",fd)}finally{fd.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),ed(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?md(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var hd=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},gd=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(I=globalThis).__zod_globalConfig??(I.__zod_globalConfig={});var _d=globalThis.__zod_globalConfig;function vd(e){return e&&Object.assign(_d,e),_d}function yd(){let e=this._zod;return e.message??=JSON.stringify(e.def,iu,2),e.message}function bd(e){this._zod.message=e}var xd={get:yd,set:bd,enumerable:!0,configurable:!0},Sd={value:void 0,enumerable:!1},Cd=new WeakSet([Object.prototype,Error.prototype]),wd=(e,t)=>{e.name=`$ZodError`,Sd.value=t,Object.defineProperty(e,"issues",Sd),Sd.value=void 0,Object.defineProperty(e,"message",xd);let n=Object.getPrototypeOf(e);Cd.has(n)||(Cd.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Td=R(`$ZodError`,wd);R(`$ZodError`,wd,void 0,{Parent:Error});function Ed(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Dd(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Ed(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Od(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new hd;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ju(e,o,vd())));throw Su(n,a?.callee??t),n}return s.value};return t},jd=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ju(e,o,vd())));throw Su(n,a?.callee??t),n}return s.value};return t},Md=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new hd;return a.issues.length?Nd(e,a.issues,i):{success:!0,data:a.value}};function Nd(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ju(e,n,vd()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Pd=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Nd(e,a.issues,i):{success:!0,data:a.value}},Fd=Symbol.for(`zod.compile.invalid`),Id=Symbol.for(`zod.compile.fallback`),Ld=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Fd)return!0;if(r.definite===!0&&n===void 0)return!1}return Rd(e,t,n)});function Rd(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Id]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new hd;return a.issues.length===0}var zd=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Bd=e=>{let t=Ad(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,kd(n,a))};return n},Vd=e=>{let t=Ad(e),n=(e,r,i,a)=>t(e,r,i,kd(n,a));return n},Hd=e=>{let t=jd(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,kd(n,a))};return n},Ud=e=>{let t=jd(e),n=async(e,r,i,a)=>await t(e,r,i,kd(n,a));return n},Wd=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Md(e)(t,n,i)},Gd=e=>(t,n,r)=>Md(e)(t,n,r),Kd=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Pd(e)(t,n,i)},qd=e=>async(t,n,r)=>Pd(e)(t,n,r),Jd=/^[cC][0-9a-z]{6,}$/,Yd=/^[0-9a-z]+$/,Xd=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Zd=/^[0-9a-vA-V]{20}$/,Qd=/^[A-Za-z0-9]{27}$/,$d=/^[a-zA-Z0-9_-]{21}$/;function ef(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var tf=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nf=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,rf=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,af=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,of=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function sf(){return new RegExp(of,`u`)}var cf=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,lf=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,uf=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,df=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ff=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pf=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,mf=/^https?$/,hf=/^\+[1-9]\d{6,14}$/,gf=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function _f(e){return RegExp(`^${e}$`)}var vf=_f(gf);function yf(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function bf(e){return RegExp(`^${yf(e)}$`)}function xf(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${yf({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${yf({precision:e.precision})}`:n;return RegExp(`^${gf}T(?:${r})$`)}var Sf=/^[\s\S]{0,}$/,Cf=/^-?\d+$/,wf=/^-?\d+(?:\.\d+)?$/,Tf=/^(?:true|false)$/i,Ef=/^null$/i,Df=/^undefined$/i,Of=/^[^A-Z]*$/,kf=/^[^a-z]*$/,Af=R(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),jf=e=>{let t=e.value;return!su(t)&&t.length!==void 0},Mf={number:`number`,bigint:`bigint`,object:`date`},Nf=R(`$ZodCheckLessThan`,(e,t)=>{Af.init(e,t);let n=Mf[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value{Af.init(e,t);let n=Mf[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Mf[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ff=R(`$ZodCheckMultipleOf`,(e,t)=>{Af.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):lu(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),If=R(`$ZodCheckNumberFormat`,(e,t)=>{Af.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Mu[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Lf=R(`$ZodCheckMaxLength`,(e,t)=>{var n;Af.init(e,t),(n=e._zod.def).when??(n.when=jf),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Xu(r):i)<=t.maximum)return;let a=Zu(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Rf=R(`$ZodCheckMinLength`,(e,t)=>{var n;Af.init(e,t),(n=e._zod.def).when??(n.when=jf),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=Zu(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zf=R(`$ZodCheckLengthEquals`,(e,t)=>{var n;Af.init(e,t),(n=e._zod.def).when??(n.when=jf),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Xu(r):i;if(a===t.length)return;let o=Zu(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Bf=R(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Af.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Vf=R(`$ZodCheckRegex`,(e,t)=>{Bf.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Hf=R(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Of,Bf.init(e,t)}),Uf=R(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=kf,Bf.init(e,t)}),Wf=R(`$ZodCheckIncludes`,(e,t)=>{Af.init(e,t);let n=Ou(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Gf=R(`$ZodCheckStartsWith`,(e,t)=>{Af.init(e,t);let n=RegExp(`^${Ou(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Kf=R(`$ZodCheckEndsWith`,(e,t)=>{Af.init(e,t);let n=RegExp(`.*${Ou(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),qf=R(`$ZodCheckOverwrite`,(e,t)=>{Af.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Jf=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` +`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` +`)}\n};`)(...Object.values(this.closed))}},Yf={major:4,minor:6,patch:5},Xf=R(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Yf;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Uu(t),a;for(let o of n){if(o._zod.def.when){if(Wu(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new hd;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(qu(t.issues,n,e),i||=Uu(t,n))});else{if(t.issues.length===n)continue;qu(t.issues,n,e),i||=Uu(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Uu(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new hd;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new hd;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return nd(this,`~standard`,$f(this))},set"~standard"(e){td(this,`~standard`,e)}}),Zf=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ju(e,t,vd()))}:{value:e.value};async function Qf(e,t){let n={async:!0};return Zf(await e._zod.run({value:t,issues:[]},n),n)}function $f(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Zf(r,n)}catch{}return Qf(e,t)},vendor:`zod`,version:1}}var ep=R(`$ZodString`,(e,t)=>{Xf.init(e,t),e._zod.pattern=t.pattern??Sf,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),z=R(`$ZodStringFormat`,(e,t)=>{Bf.init(e,t),ep.init(e,t)}),tp=R(`$ZodGUID`,(e,t)=>{t.pattern??=nf,z.init(e,t)}),np=R(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=rf(e)}else t.pattern??=rf();z.init(e,t)}),rp=R(`$ZodEmail`,(e,t)=>{t.pattern??=af,z.init(e,t)});function ip(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function ap(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?ip(e)||2:op(e,t)}function op(e,t){if(!t.normalize&&t.protocol?.source===mf.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var sp=/[\t\n\r]/g;function cp(e){return e.replace(sp,``)}function lp(e,t){return t.lastIndex=0,t.test(e.hostname)}function up(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var dp=R(`$ZodURL`,(e,t)=>{z.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=ap(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=cp(r);return}t.hostname&&!lp(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!up(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:cp(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),fp=R(`$ZodEmoji`,(e,t)=>{t.pattern??=sf(),z.init(e,t)}),pp=R(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?$d:ef(t.length),z.init(e,t)}),mp=R(`$ZodCUID`,(e,t)=>{t.pattern??=Jd,z.init(e,t)}),hp=R(`$ZodCUID2`,(e,t)=>{t.pattern??=Yd,z.init(e,t)}),gp=R(`$ZodULID`,(e,t)=>{t.pattern??=Xd,z.init(e,t)}),_p=R(`$ZodXID`,(e,t)=>{t.pattern??=Zd,z.init(e,t)}),vp=R(`$ZodKSUID`,(e,t)=>{t.pattern??=Qd,z.init(e,t)}),yp=R(`$ZodISODateTime`,(e,t)=>{t.pattern??=xf(t),z.init(e,t)}),bp=R(`$ZodISODate`,(e,t)=>{t.pattern??=vf,z.init(e,t)}),xp=R(`$ZodISOTime`,(e,t)=>{t.pattern??=bf(t),z.init(e,t)}),Sp=R(`$ZodISODuration`,(e,t)=>{t.pattern??=tf,z.init(e,t)}),Cp=R(`$ZodIPv4`,(e,t)=>{t.pattern??=cf,z.init(e,t)}),wp=/^[0-9a-fA-F:.]+$/;function Tp(e){return wp.test(e)?ip(`http://[${e}]`):!1}var Ep=R(`$ZodIPv6`,(e,t)=>{t.pattern??=lf,z.init(e,t),e._zod.check=n=>{Tp(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Dp=R(`$ZodCIDRv4`,(e,t)=>{t.pattern??=uf,z.init(e,t)});function Op(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Tp(n)}var kp=R(`$ZodCIDRv6`,(e,t)=>{t.pattern??=df,z.init(e,t),e._zod.check=n=>{Op(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Ap(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var jp=/^[0-9a-zA-Z+/]*={0,2}$/,Mp=R(`$ZodBase64`,(e,t)=>{t.pattern??=jp,z.init(e,t),e._zod.check=n=>{Ap(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Np=/^[A-Za-z0-9_-]*$/;function Pp(e){if(!Np.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Ap(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Fp=R(`$ZodBase64URL`,(e,t)=>{t.pattern??=Np,z.init(e,t),e._zod.check=n=>{Pp(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Ip=R(`$ZodE164`,(e,t)=>{t.pattern??=hf,z.init(e,t)});function Lp(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Rp=R(`$ZodJWT`,(e,t)=>{z.init(e,t),e._zod.check=n=>{Lp(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),zp=R(`$ZodNumber`,(e,t)=>{Xf.init(e,t),e._zod.pattern=wf,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Bp=R(`$ZodNumberFormat`,(e,t)=>{If.init(e,t),zp.init(e,t)}),Vp=R(`$ZodBoolean`,(e,t)=>{Xf.init(e,t),e._zod.pattern=Tf,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Hp=R(`$ZodUndefined`,(e,t)=>{Xf.init(e,t),e._zod.pattern=Df,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Up=R(`$ZodNull`,(e,t)=>{Xf.init(e,t),e._zod.pattern=Ef,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Wp=R(`$ZodAny`,(e,t)=>{Xf.init(e,t),e._zod.parse=e=>e}),Gp=R(`$ZodUnknown`,(e,t)=>{Xf.init(e,t),e._zod.parse=e=>e}),Kp=R(`$ZodNever`,(e,t)=>{Xf.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function qp(e,t,n){e.issues.length&&t.issues.push(...Gu(n,e.issues)),t.value[n]=e.value}var Jp=R(`$ZodArray`,(e,t)=>{Xf.init(e,t);let n=_d.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;eqp(t,r,e)));else if(qp(c,r,e),s&&c.issues.length!==0&&Uu(c))break}return o.length?Promise.all(o).then(()=>r):r}});function Yp(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Gu(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Xp=[];function Zp(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Xp,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ju(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Qp(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Uu(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Yp(e,n,i,t,d,f))):Yp(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var $p=R(`$ZodObject`,(e,t)=>{Xf.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=ou(()=>Zp(t));F(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||fu(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Cu,o=t.catchall,s,c=_d.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Uu(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Yp(n,t,e,r,a,o))):Yp(s,t,e,r,a,o)}return o?Qp(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),em=R(`$ZodObjectJIT`,(e,t)=>{$p.init(e,t);let n=e._zod.parse,r=ou(()=>Zp(t)),i=_d.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Jf([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` + let ${e}_ab = false; + for (let i = 0; i < ${e}.issues.length; i++) { + const iss = ${e}.issues[i]; + iss.path = iss.path ? [${t}, ...iss.path] : [${t}]; + payload.issues.push(iss); + if (iss.continue !== true) ${e}_ab = true; + } + if (${e}_ab && ctx && ctx.abortEarly) { + payload.value = newResult; + return payload; + }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:bu(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(` + const ${n}_present = ${i}; + if (!${n}.issues.length || ${n}_present) { + if (${n}.issues.length) {${c(n,r)} + } + + if (${e}) { + newResult[${r}] = ${n}.value; + } + } + + `)}else f?(o.write(` + if (${n}.issues.length) {${c(n,r)} + } + `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(` + if (${n}.value !== undefined || ${i}) { + newResult[${r}] = ${n}.value; + } + `)):o.write(` + const ${n}_present = ${i}; + if (${n}.issues.length) {${c(n,r)} + } + if (!${n}_present && !${n}.issues.length) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: undefined, + path: [${r}] + }); + if (ctx && ctx.abortEarly) { + payload.value = newResult; + return payload; + } + } + + if (${n}_present) { + newResult[${r}] = ${n}.value; + } + + `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Cu,c=!_d.jitless,l=c&&wu.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Qp([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function tm(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Uu(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ju(e,r,vd())))}),t)}var nm=R(`$ZodUnion`,(e,t)=>{Xf.init(e,t),F(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),F(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),F(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),F(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>cu(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>tm(t,r,e,i)):tm(o,r,e,i)}});function rm(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var im=R(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,nm.init(e,t);let n=e._zod.parse;F(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||fu(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=pu(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=ou(()=>rm(t));e._zod.parse=(i,a)=>{let o=i.value;if(!Cu(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),am=R(`$ZodIntersection`,(e,t)=>{Xf.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>sm(e,t,n)):sm(e,i,a)}});function om(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Tu(e)&&Tu(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=om(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=om(t.value,n.value);if(!c.valid){if(Uu(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var cm=R(`$ZodRecord`,(e,t)=>{Xf.init(e,t);let n=_d.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Tu(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ju(e,i,vd())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Gu(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Gu(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&wf.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Ju(e,i,vd())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Gu(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Gu(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),lm=R(`$ZodEnum`,(e,t)=>{Xf.init(e,t);let n=nu(t.entries),r=new Set(n);e._zod.values=r,F(e,`pattern`,e=>{let t=nu(e.def.entries).filter(e=>Du.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Ou(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),um=R(`$ZodLiteral`,(e,t)=>{Xf.init(e,t);let n=new Set(t.values);e._zod.values=n,F(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Ou(e):e?Ou(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),dm=R(`$ZodTransform`,(e,t)=>{Xf.init(e,t),e._zod.optin=`optional`,_d.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new gd(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new hd;return n.value=i,n}});function fm(e,t){return e.value=t.issues.length?void 0:t.value,e}var pm=R(`$ZodOptional`,(e,t)=>{Xf.init(e,t),F(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,F(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),F(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${cu(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>fm(e,t)):fm(e,r)}return t.innerType._zod.run(e,n)}}),mm=R(`$ZodExactOptional`,(e,t)=>{pm.init(e,t),F(e,`values`,e=>e.def.innerType._zod.values),F(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),hm=R(`$ZodNullable`,(e,t)=>{Xf.init(e,t),F(e,`optin`,e=>e.def.innerType._zod.optin),F(e,`optout`,e=>e.def.innerType._zod.optout),F(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${cu(t.source)}|null)$`):void 0}),F(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),gm=R(`$ZodDefault`,(e,t)=>{Xf.init(e,t),e._zod.optin=`defaulted`,F(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>_m(e,t)):_m(r,t)}});function _m(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var vm=R(`$ZodPrefault`,(e,t)=>{Xf.init(e,t),e._zod.optin=`defaulted`,F(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ym=R(`$ZodNonOptional`,(e,t)=>{Xf.init(e,t),F(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>bm(t,e)):bm(i,e)}});function bm(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function xm(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ju(e,r,vd()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Sm=R(`$ZodCatch`,(e,t)=>{Xf.init(e,t),F(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),F(e,`optout`,e=>e.def.innerType._zod.optout),F(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>xm(e,r,t,n)):xm(e,r,t,n)}}),Cm=R(`$ZodPipe`,(e,t)=>{Xf.init(e,t),F(e,`values`,e=>e.def.in._zod.values),F(e,`optin`,e=>e.def.in._zod.optin),F(e,`optout`,e=>e.def.out._zod.optout),F(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>wm(e,t.in,n)):wm(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>wm(e,t.out,n)):wm(r,t.out,n)}});function wm(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Tm=R(`$ZodPreprocess`,(e,t)=>{Cm.init(e,t)}),Em=R(`$ZodReadonly`,(e,t)=>{Xf.init(e,t),F(e,`propValues`,e=>e.def.innerType._zod.propValues),F(e,`values`,e=>e.def.innerType._zod.values),F(e,`optin`,e=>e.def.innerType?._zod?.optin),F(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Dm):Dm(r)}});function Dm(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Om=R(`$ZodLazy`,(e,t)=>{Xf.init(e,t),du(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),F(e,`pattern`,e=>e.innerType?._zod?.pattern),F(e,`propValues`,e=>e.innerType?._zod?.propValues),F(e,`optin`,e=>e.innerType?._zod?.optin??void 0),F(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),km=R(`$ZodCustom`,(e,t)=>{Af.init(e,t),Xf.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Am(t,n,r,e));Am(i,n,r,e)}});function Am(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push($u(e))}}var jm=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Mm=`~memo`,Nm=[];function Pm(e){return typeof e==`object`&&!!e}function Fm(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Im=new WeakMap,Lm=0,Rm=1,zm=2;function Bm(e,t,n){let r=Im.get(e);if(r!==void 0)return r?zm:Lm;if(t.has(e))return zm;t.add(e);let i=Lm,a=e=>{if(i!==zm&&e?._zod){let r=Bm(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Lm;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Rm:o.value?._zod?Bm(o.value,t,n):Lm;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=pu(c);s(e?o(e,!0):Rm),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Bm(r,t,!1):Rm);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Vm(e,i)}function Vm(e,t){return t!==Rm&&Im.set(e,t===zm),t}function Hm(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Um,Wm=[],Gm={alloc(e,t,n){let r=Um;if(!r)return n;Um=void 0;let i={value:n,issues:null};return r.set(t.value,i),Wm.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&qm(n,e.value))throw new jm;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Bm(e,new Set,!1);if(i===Lm)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===zm||r?n=!0:r=!0}let l=s.value;if(!Pm(l))return t(s,c);let u=c[Mm];u||(u={buckets:new WeakMap,backEdges:void 0},c[Mm]=u);let d;i===c?d=a:(d=Hm(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Fm(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Um=d;let p=Wm.length,m=t(s,c);Um=void 0;let h=Wm.length>p?Wm.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Fm(e.issues):Nm),e)):(h&&(h.issues=m.issues.length?Fm(m.issues):Nm),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Km(){return Gm}function qm(e,t){let n=e[Mm]?.backEdges;return n!==void 0&&Pm(t)&&n.has(t)}var Jm=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Qu(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Au(e.values[0])}`:`Invalid option: expected one of ${ru(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${ru(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Ym(){return{localeError:Jm()}}var Xm,Zm=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Qm(){return new Zm}(Xm=globalThis).__zod_globalRegistry??(Xm.__zod_globalRegistry=Qm());var $m=globalThis.__zod_globalRegistry;function eh(e){return e.checks&&=[...e.checks],e}function th(e,t){return new e(eh({type:`string`,...P(t)}))}function nh(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...P(t)})}function rh(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...P(t)})}function ih(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...P(t)})}function ah(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...P(t)})}function oh(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...P(t)})}function sh(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...P(t)})}function ch(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...P(t)})}function lh(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...P(t)})}function uh(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...P(t)})}function dh(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...P(t)})}function fh(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...P(t)})}function ph(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...P(t)})}function mh(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...P(t)})}function hh(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...P(t)})}function gh(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...P(t)})}function _h(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...P(t)})}function vh(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...P(t)})}function yh(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...P(t)})}function bh(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...P(t)})}function xh(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...P(t)})}function Sh(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...P(t)})}function Ch(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...P(t)})}function wh(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...P(t)})}function Th(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...P(t)})}function Eh(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...P(t)})}function Dh(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...P(t)})}function Oh(e,t){return new e(eh({type:`number`,checks:[],...P(t)}))}function kh(e,t){return new e(eh({type:`number`,coerce:!0,checks:[],...P(t)}))}function Ah(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...P(t)})}function jh(e,t){return new e({type:`boolean`,...P(t)})}function Mh(e,t){return new e({type:`undefined`,...P(t)})}function Nh(e,t){return new e({type:`null`,...P(t)})}function Ph(e){return new e({type:`any`})}function Fh(e){return new e({type:`unknown`})}function Ih(e,t){return new e({type:`never`,...P(t)})}function Lh(e,t){return new Nf({check:`less_than`,...P(t),value:e,inclusive:!1})}function Rh(e,t){return new Nf({check:`less_than`,...P(t),value:e,inclusive:!0})}function zh(e,t){return new Pf({check:`greater_than`,...P(t),value:e,inclusive:!1})}function Bh(e,t){return new Pf({check:`greater_than`,...P(t),value:e,inclusive:!0})}function Vh(e,t){return new Ff({check:`multiple_of`,...P(t),value:e})}function Hh(e,t){return new Lf({check:`max_length`,...P(t),maximum:e})}function Uh(e,t){return new Rf({check:`min_length`,...P(t),minimum:e})}function Wh(e,t){return new zf({check:`length_equals`,...P(t),length:e})}function Gh(e,t){return new Vf({check:`string_format`,format:`regex`,...P(t),pattern:e})}function Kh(e){return new Hf({check:`string_format`,format:`lowercase`,...P(e)})}function qh(e){return new Uf({check:`string_format`,format:`uppercase`,...P(e)})}function Jh(e,t){return new Wf({check:`string_format`,format:`includes`,...P(t),includes:e})}function Yh(e,t){return new Gf({check:`string_format`,format:`starts_with`,...P(t),prefix:e})}function Xh(e,t){return new Kf({check:`string_format`,format:`ends_with`,...P(t),suffix:e})}function Zh(e){return new qf({check:`overwrite`,tx:e})}function Qh(e){return Zh(t=>t.normalize(e))}function $h(){return Zh(e=>e.trim())}function eg(){return Zh(e=>e.toLowerCase())}function tg(){return Zh(e=>e.toUpperCase())}function ng(){return Zh(e=>xu(e))}function rg(e,t,n){return new e({type:`array`,element:t,...P(n)})}function ig(e,t,n){let r=P(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function ag(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...P(n)})}function og(e,t){let n=sg(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push($u(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push($u(r))}},e(t.value,t)),t);return n}function sg(e,t){let n=new Af({check:`custom`,...P(t)});return n._zod.check=e,n}function cg(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&fu(e,t,n[t]);return e}function lg(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??$m,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function ug(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function dg(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,dg(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&cg(o.schema,c),t.io===`input`&&xg(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function fg(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function pg(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${fg(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+fg(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function mg(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;mg(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var hg=new Set([`type`,`properties`,`required`,`additionalProperties`]),gg=[`oneOf`,`anyOf`];function _g(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function vg(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!hg.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??_g(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}fu(n,r,e.length===1?e[0]:vg(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=_g(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function yg(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of hg)if(t in e)return;let n=t.filter(e=>gg.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=vg(t);else{let e=n[0],i=gg.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>vg([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,cg(e,r))}function bg(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):cg(i,s),cg(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())mg(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])yg(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}cg(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,fu(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Cg(t,`input`,e.processors),output:Cg(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function xg(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return xg(r.element,n);if(r.type===`set`)return xg(r.valueType,n);if(r.type===`lazy`)return xg(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return xg(r.innerType,n);if(r.type===`intersection`)return xg(r.left,n)||xg(r.right,n);if(r.type===`record`||r.type===`map`)return xg(r.keyType,n)||xg(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:xg(r.in,n)||xg(r.out,n);if(r.type===`object`){for(let e in r.shape)if(xg(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(xg(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(xg(e,n))return!0;return!!(r.rest&&xg(r.rest,n))}return!1}var Sg=(e,t={})=>n=>{let r=lg({...n,processors:t});return dg(e,r),pg(r,e),bg(r,e)},Cg=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=lg({...i??{},target:a,io:t,processors:n});return dg(e,o),pg(o,e),bg(o,e)},wg=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Tg=(e,t,n)=>{(e[t]===void 0||n{wg(e,`minimum`,t),Tg(e,`maximum`,t)},Dg=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Og=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},kg=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Ag=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},jg=(e,t)=>wg(e,`minimum`,t.minimum),Mg=(e,t)=>Tg(e,`maximum`,t.maximum),Ng=e=>(t,n)=>{Ag(t,n.format);let[r,i]=e[n.format];wg(t,`minimum`,r),Tg(t,`maximum`,i)},Pg={greater_than:(e,t)=>wg(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Tg(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Dg(e,t.value),number_format:Ng(Mu),bigint_format:Ng(Nu),min_length:jg,max_length:Mg,length_equals:(e,t)=>Eg(e,t.length),min_size:jg,max_size:Mg,size_equals:(e,t)=>Eg(e,t.size),string_format:(e,t)=>{Ag(e,t.format),t.pattern&&Og(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>kg(e,t.mime)};function Fg(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Pg[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&wg(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&wg(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Tg(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Tg(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Dg(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&kg(t,i.mime);for(let e of i.patterns??[])Og(t,e);return t}var Ig={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Lg=new Map([[jp,ff],[Np,pf]]),Rg=e=>Lg.get(e)??e,zg=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Fg(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Ig[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Rg);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Bg=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Fg(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):ug(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Vg=(e,t,n,r)=>{n.type=`boolean`},Hg=(e,t,n,r)=>{ug(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Ug=(e,t,n,r)=>{ug(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},Wg=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Gg=(e,t,n,r)=>{ug(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Kg=(e,t,n,r)=>{ug(e,t,n,r,`Void cannot be represented in JSON Schema`)},qg=(e,t,n,r)=>{n.not={}},Jg=(e,t,n,r)=>{},Yg=(e,t,n,r)=>{},Xg=(e,t,n,r)=>{ug(e,t,n,r,`Date cannot be represented in JSON Schema`)},Zg=(e,t,n,r)=>{let i=e._zod.def,a=nu(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Qg=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(ug(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(ug(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},$g=(e,t,n,r)=>{ug(e,t,n,r,`NaN cannot be represented in JSON Schema`)},e_=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},t_=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=Fg(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},n_=(e,t,n,r)=>{n.type=`boolean`},r_=(e,t,n,r)=>{ug(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},i_=(e,t,n,r)=>{ug(e,t,n,r,`Function types cannot be represented in JSON Schema`)},a_=(e,t,n,r)=>{ug(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},o_=(e,t,n,r)=>{ug(e,t,n,r,`Map cannot be represented in JSON Schema`)},s_=(e,t,n,r)=>{ug(e,t,n,r,`Set cannot be represented in JSON Schema`)},c_=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Fg(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=dg(a.element,t,{...r,path:[...r.path,`items`]})};function l_(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?l_(t.out):t.type===`catch`?l_(t.innerType):e._zod.optin}var u_=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&ug(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)fu(i.properties,e,dg(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?l_(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=dg(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},d_=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>dg(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},f_=(e,t,n,r)=>{let i=e._zod.def,a=dg(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=dg(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},p_=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>dg(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?dg(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?l_(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=Fg(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function m_(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=m_(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>m_(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?wf:Cf).source),p):p}var h_=new WeakMap;function g_(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of h_.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=m_(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var __=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Fg(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=dg(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)fu(i.patternProperties,Rg(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=dg(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=h_.get(t);n||(n=[],h_.set(t,n),t.deferred.push(()=>g_(t))),n.push(e)}i.additionalProperties=dg(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&l_(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},v_=(e,t,n,r)=>{let i=e._zod.def,a=dg(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},y_=(e,t,n,r)=>{let i=e._zod.def;dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},b_=Symbol();function x_(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(ug(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),b_):JSON.parse(o)}var S_=(e,t,n,r)=>{let i=e._zod.def;dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=x_(i.defaultValue,e,t,n,r);o!==b_&&(n.default=o)},C_=(e,t,n,r)=>{let i=e._zod.def;dg(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=x_(i.defaultValue,e,t,n,r);o!==b_&&(n._prefault=o)},w_=(e,t,n,r)=>{let i=e._zod.def;dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{ug(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},T_=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;dg(o,t,r);let s=t.seen.get(e);s.ref=o},E_=(e,t,n,r)=>{let i=e._zod.def;dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},D_=(e,t,n,r)=>{let i=e._zod.def;dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},O_=(e,t,n,r)=>{let i=e._zod.def;dg(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},k_=(e,t,n,r)=>{let i=e._zod.innerType;dg(i,t,r);let a=t.seen.get(e);a.ref=i},A_={string:zg,number:Bg,boolean:Vg,bigint:Hg,symbol:Ug,null:Wg,undefined:Gg,void:Kg,never:qg,any:Jg,unknown:Yg,date:Xg,enum:Zg,literal:Qg,nan:$g,template_literal:e_,file:t_,success:n_,custom:r_,function:i_,transform:a_,map:o_,set:s_,array:c_,object:u_,union:d_,intersection:f_,tuple:p_,record:__,nullable:v_,nonoptional:y_,default:S_,prefault:C_,catch:w_,pipe:T_,readonly:E_,promise:D_,optional:O_,lazy:k_};function j_(e,t){if(`_idmap`in e){let n=e,r=lg({...t,processors:A_}),i={};for(let e of n._idmap.entries()){let[t,n]=e;dg(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;pg(r,n),fu(a,t,bg(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=lg({...t,processors:A_});return dg(e,n),pg(n,e),bg(n,e)}var M_=new WeakSet([Object.prototype,Error.prototype]);function N_(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var P_=R(`ZodError`,(e,t)=>{Td.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);M_.has(n)||(M_.add(n),N_(n,`format`,e=>t=>Od(e,t)),N_(n,`flatten`,e=>t=>Dd(e,t)),N_(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,iu,2)}),N_(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,iu,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),F_=Ad(P_),I_=jd(P_),L_=Md(P_),R_=Pd(P_),z_=Bd(P_),B_=Vd(P_),V_=Hd(P_),H_=Ud(P_),U_=Wd(P_),W_=Gd(P_),G_=Kd(P_),K_=qd(P_);function q_(){_d.localeError||vd(Ym())}function J_(){_d.memoizer||vd({memoizer:Km()})}var Y_=R(`ZodType`,(e,t)=>(q_(),Xf.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(yu(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return ku(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Cy(e,t))},superRefine(e,t){return this.check(wy(e,t))},overwrite(e){return this.check(Zh(e))},optional(){return ty(this)},exactOptional(){return ry(this)},nullable(){return ay(this)},nullish(){return ty(ay(this))},nonoptional(e){return dy(this,e)},array(){return Rv(this)},or(e){return Hv([this,e])},and(e){return Kv(this,e)},transform(e){return hy(this,$v(e))},default(e){return sy(this,e)},prefault(e){return ly(this,e)},catch(e){return py(this,e)},pipe(e){return hy(this,e)},readonly(){return vy(this)},describe(e){let t=this.clone();return $m.add(t,{description:e}),t},meta(...e){if(e.length===0)return $m.get(this);let t=this.clone();return $m.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return nd(this,`~standard`,{...$f(this),jsonSchema:{input:Cg(this,`input`),output:Cg(this,`output`)}})},set"~standard"(e){td(this,`~standard`,e)},parse:function e(t,n){return F_(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await I_(this,t,n,{callee:e})},safeParse(e,t){return L_(this,e,t)},async safeParseAsync(e,t){return R_(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){td(this,`spa`,e)},validate(e,t){return Ld(this,e,t)},validateAsync(e,t){return zd(this,e,t)},encode:function e(t,n){return z_(this,t,n,{callee:e})},decode:function e(t,n){return B_(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await V_(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await H_(this,t,n,{callee:e})},safeEncode(e,t){return U_(this,e,t)},safeDecode(e,t){return W_(this,e,t)},async safeEncodeAsync(e,t){return G_(this,e,t)},async safeDecodeAsync(e,t){return K_(this,e,t)},toJSONSchema(e){return Sg(this,{})(e)},get description(){return $m.get(this)?.description},get _def(){return this._zod.def}}),X_=R(`_ZodString`,(e,t)=>{ep.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zg(e,t,n,r)},rd({format:e=>Fg(e).format??null,minLength:e=>Fg(e).minimum??null,maxLength:e=>Fg(e).maximum??null},{regex(...e){return this.check(Gh(...e))},includes(...e){return this.check(Jh(...e))},startsWith(...e){return this.check(Yh(...e))},endsWith(...e){return this.check(Xh(...e))},min(...e){return this.check(Uh(...e))},max(...e){return this.check(Hh(...e))},length(...e){return this.check(Wh(...e))},nonempty(...e){return this.check(Uh(1,...e))},lowercase(e){return this.check(Kh(e))},uppercase(e){return this.check(qh(e))},trim(){return this.check($h())},normalize(...e){return this.check(Qh(...e))},toLowerCase(){return this.check(eg())},toUpperCase(){return this.check(tg())},slugify(){return this.check(ng())}})),Z_=R(`ZodString`,(e,t)=>{ep.init(e,t),X_.init(e,t)},{email(e){return this.check(nh(rv,e))},url(e){return this.check(ch(sv,e))},jwt(e){return this.check(Ch(Cv,e))},emoji(e){return this.check(lh(lv,e))},guid(e){return this.check(rh(av,e))},uuid(e){return this.check(ih(ov,e))},uuidv4(e){return this.check(ah(ov,e))},uuidv6(e){return this.check(oh(ov,e))},uuidv7(e){return this.check(sh(ov,e))},nanoid(e){return this.check(uh(uv,e))},cuid(e){return this.check(dh(dv,e))},cuid2(e){return this.check(fh(fv,e))},ulid(e){return this.check(ph(pv,e))},base64(e){return this.check(bh(bv,e))},base64url(e){return this.check(xh(xv,e))},xid(e){return this.check(mh(mv,e))},ksuid(e){return this.check(hh(hv,e))},ipv4(e){return this.check(gh(gv,e))},ipv6(e){return this.check(_h(_v,e))},cidrv4(e){return this.check(vh(vv,e))},cidrv6(e){return this.check(yh(yv,e))},e164(e){return this.check(Sh(Sv,e))},datetime(e){return this.check(wh($_,e))},date(e){return this.check(Th(ev,e))},time(e){return this.check(Eh(tv,e))},duration(e){return this.check(Dh(nv,e))}});function B(e){return th(Z_,e)}var Q_=R(`ZodStringFormat`,(e,t)=>{z.init(e,t),X_.init(e,t)}),$_=R(`ZodISODateTime`,(e,t)=>{yp.init(e,t),Q_.init(e,t)}),ev=R(`ZodISODate`,(e,t)=>{bp.init(e,t),Q_.init(e,t)}),tv=R(`ZodISOTime`,(e,t)=>{xp.init(e,t),Q_.init(e,t)}),nv=R(`ZodISODuration`,(e,t)=>{Sp.init(e,t),Q_.init(e,t)}),rv=R(`ZodEmail`,(e,t)=>{rp.init(e,t),Q_.init(e,t)});function iv(e){return nh(rv,e)}var av=R(`ZodGUID`,(e,t)=>{tp.init(e,t),Q_.init(e,t)}),ov=R(`ZodUUID`,(e,t)=>{np.init(e,t),Q_.init(e,t)}),sv=R(`ZodURL`,(e,t)=>{dp.init(e,t),Q_.init(e,t)});function cv(e){return ch(sv,e)}var lv=R(`ZodEmoji`,(e,t)=>{fp.init(e,t),Q_.init(e,t)}),uv=R(`ZodNanoID`,(e,t)=>{pp.init(e,t),Q_.init(e,t)}),dv=R(`ZodCUID`,(e,t)=>{mp.init(e,t),Q_.init(e,t)}),fv=R(`ZodCUID2`,(e,t)=>{hp.init(e,t),Q_.init(e,t)}),pv=R(`ZodULID`,(e,t)=>{gp.init(e,t),Q_.init(e,t)}),mv=R(`ZodXID`,(e,t)=>{_p.init(e,t),Q_.init(e,t)}),hv=R(`ZodKSUID`,(e,t)=>{vp.init(e,t),Q_.init(e,t)}),gv=R(`ZodIPv4`,(e,t)=>{Cp.init(e,t),Q_.init(e,t)}),_v=R(`ZodIPv6`,(e,t)=>{Ep.init(e,t),Q_.init(e,t)}),vv=R(`ZodCIDRv4`,(e,t)=>{Dp.init(e,t),Q_.init(e,t)}),yv=R(`ZodCIDRv6`,(e,t)=>{kp.init(e,t),Q_.init(e,t)}),bv=R(`ZodBase64`,(e,t)=>{Mp.init(e,t),Q_.init(e,t)}),xv=R(`ZodBase64URL`,(e,t)=>{Fp.init(e,t),Q_.init(e,t)}),Sv=R(`ZodE164`,(e,t)=>{Ip.init(e,t),Q_.init(e,t)}),Cv=R(`ZodJWT`,(e,t)=>{Rp.init(e,t),Q_.init(e,t)}),wv=R(`ZodNumber`,(e,t)=>{zp.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bg(e,t,n,r),e.isFinite=!0},rd({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Fg(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Fg(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Fg(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Fg(e).format??null},{gt(e,t){return this.check(zh(e,t))},gte(e,t){return this.check(Bh(e,t))},min(e,t){return this.check(Bh(e,t))},lt(e,t){return this.check(Lh(e,t))},lte(e,t){return this.check(Rh(e,t))},max(e,t){return this.check(Rh(e,t))},int(e){return this.check(V(e))},safe(e){return this.check(V(e))},positive(e){return this.check(zh(0,e))},nonnegative(e){return this.check(Bh(0,e))},negative(e){return this.check(Lh(0,e))},nonpositive(e){return this.check(Rh(0,e))},multipleOf(e,t){return this.check(Vh(e,t))},step(e,t){return this.check(Vh(e,t))},finite(){return this}}));function Tv(e){return Oh(wv,e)}var Ev=R(`ZodNumberFormat`,(e,t)=>{Bp.init(e,t),wv.init(e,t)});function V(e){return Ah(Ev,e)}var Dv=R(`ZodBoolean`,(e,t)=>{Vp.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vg(e,t,n,r)});function H(e){return jh(Dv,e)}var Ov=R(`ZodUndefined`,(e,t)=>{Hp.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gg(e,t,n,r)});function kv(e){return Mh(Ov,e)}var Av=R(`ZodNull`,(e,t)=>{Up.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wg(e,t,n,r)});function jv(e){return Nh(Av,e)}var Mv=R(`ZodAny`,(e,t)=>{Wp.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function U(){return Ph(Mv)}var Nv=R(`ZodUnknown`,(e,t)=>{Gp.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Pv(){return Fh(Nv)}var Fv=R(`ZodNever`,(e,t)=>{Kp.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qg(e,t,n,r)});function Iv(e){return Ih(Fv,e)}var Lv=R(`ZodArray`,(e,t)=>{J_(),Jp.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c_(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Uh(e,t))},nonempty(e){return this.check(Uh(1,e))},max(e,t){return this.check(Hh(e,t))},length(e,t){return this.check(Wh(e,t))},unwrap(){return this.element}});function Rv(e,t){return rg(Lv,e,t)}var zv=R(`ZodObject`,(e,t)=>{J_(),em.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u_(e,t,n,r),ld(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Xv(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(yu(this._zod.def,{catchall:e}))},passthrough(){return this.clone(yu(this._zod.def,{catchall:Pv()}))},loose(){return this.clone(yu(this._zod.def,{catchall:Pv()}))},strict(){return this.clone(yu(this._zod.def,{catchall:Iv()}))},strip(){return this.clone(yu(this._zod.def,{catchall:void 0}))},extend(e){return Lu(this,e)},safeExtend(e){return zu(this,e)},merge(e){return Bu(this,e)},pick(e){return Pu(this,e)},omit(e){return Iu(this,e)},partial(...e){return Vu(ey,this,e[0])},exactPartial(...e){return Vu(ny,this,e[0],`exactPartial`)},required(...e){return Hu(uy,this,e[0])}});function Bv(e,t){return new zv({type:`object`,shape:e??{},...P(t)})}function W(e,t){return new zv({type:`object`,shape:e,catchall:Pv(),...P(t)})}var Vv=R(`ZodUnion`,(e,t)=>{nm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d_(e,t,n,r),e.options=t.options});function Hv(e,t){return new Vv({type:`union`,options:e,...P(t)})}var Uv=R(`ZodDiscriminatedUnion`,(e,t)=>{Vv.init(e,t),im.init(e,t)});function Wv(e,t,n){return new Uv({type:`union`,options:t,discriminator:e,...P(n)})}var Gv=R(`ZodIntersection`,(e,t)=>{am.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>f_(e,t,n,r)});function Kv(e,t){return new Gv({type:`intersection`,left:e,right:t})}var qv=R(`ZodRecord`,(e,t)=>{J_(),cm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>__(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Jv(e,t,n){return!t||!t._zod?new qv({type:`record`,keyType:B(),valueType:e,...P(t)}):new qv({type:`record`,keyType:e,valueType:t,...P(n)})}var Yv=R(`ZodEnum`,(e,t)=>{lm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zg(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Yv({...t,checks:[],...P(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Yv({...t,checks:[],...P(r),entries:i})}});function Xv(e,t){return new Yv({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...P(t)})}var Zv=R(`ZodLiteral`,(e,t)=>{um.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qg(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function G(e,t){return new Zv({type:`literal`,values:Array.isArray(e)?e:[e],...P(t)})}var Qv=R(`ZodTransform`,(e,t)=>{J_(),dm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a_(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new gd(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push($u(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push($u(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function $v(e){return new Qv({type:`transform`,transform:e})}var ey=R(`ZodOptional`,(e,t)=>{pm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>O_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ty(e){return new ey({type:`optional`,innerType:e})}var ny=R(`ZodExactOptional`,(e,t)=>{mm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>O_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ry(e){return new ny({type:`optional`,innerType:e})}var iy=R(`ZodNullable`,(e,t)=>{hm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>v_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ay(e){return new iy({type:`nullable`,innerType:e})}var oy=R(`ZodDefault`,(e,t)=>{gm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>S_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sy(e,t){return new oy({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Eu(t)}})}var cy=R(`ZodPrefault`,(e,t)=>{vm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>C_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ly(e,t){return new cy({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Eu(t)}})}var uy=R(`ZodNonOptional`,(e,t)=>{ym.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>y_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function dy(e,t){return new uy({type:`nonoptional`,innerType:e,...P(t)})}var fy=R(`ZodCatch`,(e,t)=>{Sm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function py(e,t){return new fy({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:dd(t)})}var my=R(`ZodPipe`,(e,t)=>{Cm.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>T_(e,t,n,r),e.in=t.in,e.out=t.out});function hy(e,t){return new my({type:`pipe`,in:e,out:t})}var gy=R(`ZodPreprocess`,(e,t)=>{my.init(e,t),Tm.init(e,t)}),_y=R(`ZodReadonly`,(e,t)=>{Em.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>E_(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vy(e){return new _y({type:`readonly`,innerType:e})}var yy=R(`ZodLazy`,(e,t)=>{Om.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>k_(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function by(e){return new yy({type:`lazy`,getter:e})}var xy=R(`ZodCustom`,(e,t)=>{km.init(e,t),Y_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r_(e,t,n,r)});function Sy(e,t){return ig(xy,e??(()=>!0),t)}function Cy(e,t={}){return ag(xy,e,t)}function wy(e,t){return og(e,t)}function Ty(e,t){return new gy({type:`pipe`,in:$v(e),out:t})}var Ey=Xv(A),K=Sy(e=>typeof e==`object`&&!!e&&!Array.isArray(e)),q=B(),Dy=Xv([`developer`,`system`,`assistant`,`user`]),Oy=W({type:G(A.TEXT_MESSAGE_START),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B(),role:Dy.optional(),name:B().optional()}),ky=W({type:G(A.TEXT_MESSAGE_CONTENT),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B(),delta:B()}),Ay=W({type:G(A.TEXT_MESSAGE_END),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B()}),jy=W({type:G(A.TEXT_MESSAGE_CHUNK),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B().optional(),role:Dy.optional(),delta:B().optional(),name:B().optional()}),My=W({type:G(A.TOOL_CALL_START),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),toolCallId:B(),toolCallName:B(),parentMessageId:B().optional()}),Ny=W({type:G(A.TOOL_CALL_ARGS),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),toolCallId:B(),delta:B()}),Py=W({type:G(A.TOOL_CALL_END),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),toolCallId:B()}),Fy=W({type:G(A.TOOL_CALL_CHUNK),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),toolCallId:B().optional(),toolCallName:B().optional(),parentMessageId:B().optional(),delta:B().optional()}),Iy=W({type:G(`text`),id:B().optional(),text:B(),metadata:U().refine(e=>e!==null).optional()}),Ly=Wv(`type`,[W({type:G(`data`),value:B(),mimeType:B()}),W({type:G(`url`),value:B(),mimeType:B().optional()}),W({type:G(`file`),value:B(),provider:B().optional(),mimeType:B().optional()})]),Ry=Wv(`type`,[Iy,W({type:G(`image`),id:B().optional(),source:Ly,metadata:U().refine(e=>e!==null).optional()}),W({type:G(`audio`),id:B().optional(),source:Ly,metadata:U().refine(e=>e!==null).optional()}),W({type:G(`video`),id:B().optional(),source:Ly,metadata:U().refine(e=>e!==null).optional()}),W({type:G(`document`),id:B().optional(),source:Ly,metadata:U().refine(e=>e!==null).optional()})]),zy=W({type:G(A.TOOL_CALL_RESULT),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B(),toolCallId:B(),content:Hv([B(),Rv(Ry)]),role:G(`tool`).optional()}),By=U(),Vy=W({type:G(A.STATE_SNAPSHOT),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),snapshot:By.refine(e=>e!==void 0)}),Hy=B().regex(RegExp(`^(/([^/~]|~[01])*)*$`)),Uy=Rv(Wv(`op`,[W({op:G(`add`),path:Hy,value:U().refine(e=>e!==void 0)}).meta({specOpen:!0}),W({op:G(`remove`),path:Hy}).meta({specOpen:!0}),W({op:G(`replace`),path:Hy,value:U().refine(e=>e!==void 0)}).meta({specOpen:!0}),W({op:G(`move`),from:Hy,path:Hy}).meta({specOpen:!0}),W({op:G(`copy`),from:Hy,path:Hy}).meta({specOpen:!0}),W({op:G(`test`),path:Hy,value:U().refine(e=>e!==void 0)}).meta({specOpen:!0})])),Wy=W({type:G(A.STATE_DELTA),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),delta:Uy}),Gy=W({subagentRunId:q.optional(),id:B(),role:G(`developer`),name:B().optional(),encryptedValue:B().optional(),metadata:K.optional(),content:B()}),Ky=W({subagentRunId:q.optional(),id:B(),role:G(`system`),name:B().optional(),encryptedValue:B().optional(),metadata:K.optional(),content:B()}),qy=W({name:B(),arguments:B()}),Jy=W({id:B(),type:G(`function`),function:qy,encryptedValue:B().optional(),metadata:K.optional()}),Yy=Wv(`role`,[Gy,Ky,W({subagentRunId:q.optional(),id:B(),role:G(`assistant`),name:B().optional(),encryptedValue:B().optional(),metadata:K.optional(),content:B().optional(),toolCalls:Rv(Jy).optional()}),W({subagentRunId:q.optional(),id:B(),role:G(`user`),name:B().optional(),encryptedValue:B().optional(),metadata:K.optional(),content:Hv([B(),Rv(Ry)])}),W({subagentRunId:q.optional(),id:B(),role:G(`tool`),content:Hv([B(),Rv(Ry)]),toolCallId:B(),error:B().optional(),encryptedValue:B().optional(),metadata:K.optional()}),W({subagentRunId:q.optional(),id:B(),role:G(`activity`),activityType:B(),content:Sy(e=>typeof e==`object`&&!!e&&!Array.isArray(e)),metadata:K.optional()}),W({subagentRunId:q.optional(),id:B(),role:G(`reasoning`),content:B(),encryptedValue:B().optional(),metadata:K.optional()})]),Xy=W({type:G(A.MESSAGES_SNAPSHOT),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),messages:Rv(Yy)}),Zy=W({type:G(A.ACTIVITY_SNAPSHOT),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B(),activityType:B(),content:Sy(e=>typeof e==`object`&&!!e&&!Array.isArray(e)),replace:H().optional()}),Qy=W({type:G(A.ACTIVITY_DELTA),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B(),activityType:B(),patch:Uy}),$y=W({type:G(A.RAW),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),event:U().refine(e=>e!==void 0),source:B().optional()}),eb=W({type:G(A.CUSTOM),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),name:B(),value:U().refine(e=>e!==void 0)}),tb=W({name:B(),description:B(),parameters:U().refine(e=>e!==null).optional(),metadata:K.optional()}),nb=W({description:B(),value:B()}),rb=W({interruptId:B(),status:Xv([`resolved`,`cancelled`]),payload:U().refine(e=>e!==null).optional(),metadata:K.optional()}),ib=W({threadId:B(),runId:B(),protocolVersion:B().optional(),parentRunId:B().optional(),state:By.refine(e=>e!==null).nullable().transform(e=>e??void 0).optional(),messages:Rv(Yy),tools:Rv(tb).default(()=>[]),context:Rv(nb).default(()=>[]),forwardedProps:U().refine(e=>e!==null).optional(),resume:Rv(rb).optional()}),ab=W({type:G(A.RUN_STARTED),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),threadId:B(),runId:B(),protocolVersion:B().optional(),parentRunId:B().optional(),input:ib.optional()}),ob=W({type:G(`success`),pendingToolCallIds:Rv(B()).optional()}),sb=W({subagentRunId:q.optional(),id:B(),reason:B(),message:B().optional(),toolCallId:B().optional(),responseSchema:Sy(e=>typeof e==`object`&&!!e&&!Array.isArray(e)).optional(),expiresAt:B().optional(),metadata:K.optional()}),cb=Wv(`type`,[ob,W({type:G(`interrupt`),interrupts:Rv(sb).min(1)}),W({type:G(`cancelled`)})]),lb=W({provider:B().optional(),model:B().optional(),inputTokens:V().min(0).max(9007199254740991).optional(),outputTokens:V().min(0).max(9007199254740991).optional(),totalTokens:V().min(0).max(9007199254740991).optional(),reasoningTokens:V().min(0).max(9007199254740991).optional(),cachedInputTokens:V().min(0).max(9007199254740991).optional(),cacheWriteInputTokens:V().min(0).max(9007199254740991).optional()}),ub=W({type:G(A.RUN_FINISHED),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),threadId:B(),runId:B(),result:U().refine(e=>e!==null).optional(),outcome:cb.optional(),usage:Rv(lb).optional()}),db=W({type:G(A.RUN_ERROR),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),message:B(),code:B().optional(),usage:Rv(lb).optional()}),fb=W({type:G(A.STEP_STARTED),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),stepName:B()}),pb=W({type:G(A.STEP_FINISHED),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),stepName:B()}),mb=W({type:G(A.REASONING_START),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B()}),hb=W({type:G(A.REASONING_MESSAGE_START),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B(),role:G(`reasoning`)}),gb=W({type:G(A.REASONING_MESSAGE_CONTENT),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B(),delta:B()}),_b=W({type:G(A.REASONING_MESSAGE_END),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B()}),vb=W({type:G(A.REASONING_MESSAGE_CHUNK),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B().optional(),delta:B().optional()}),yb=W({type:G(A.REASONING_END),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),messageId:B()}),bb=Xv([`tool-call`,`message`]),xb=W({type:G(A.REASONING_ENCRYPTED_VALUE),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q.optional(),subtype:bb,entityId:B(),encryptedValue:B()}),Sb=W({type:G(A.SUBAGENT_STARTED),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q,name:B(),description:B().optional(),parentSubagentRunId:q.optional(),parentToolCallId:B().optional(),parentMessageId:B().optional()}),Cb=Wv(`type`,[W({type:G(`success`)}),W({type:G(`suspended`),interruptIds:Rv(B()).optional()})]),wb=Wv(`type`,[Oy,ky,Ay,jy,My,Ny,Py,Fy,zy,Vy,Wy,Xy,Zy,Qy,$y,eb,ab,ub,db,fb,pb,mb,hb,gb,_b,vb,yb,xb,Sb,W({type:G(A.SUBAGENT_FINISHED),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q,result:U().refine(e=>e!==null).optional(),outcome:Cb.optional()}),W({type:G(A.SUBAGENT_ERROR),timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional(),subagentRunId:q,message:B(),code:B().optional()})]);Xv([`developer`,`system`,`assistant`,`user`,`tool`,`activity`,`reasoning`]);var Tb=W({name:B(),description:B().optional()}),Eb=W({name:B().optional(),type:B().optional(),description:B().optional(),version:B().optional(),provider:B().optional(),documentationUrl:B().optional(),metadata:K.optional()}),Db=W({streaming:H().optional(),websocket:H().optional(),httpBinary:H().optional(),pushNotifications:H().optional(),resumable:H().optional()}),Ob=W({supported:H().optional(),items:Rv(tb).optional(),parallelCalls:H().optional(),clientProvided:H().optional()}),kb=W({structuredOutput:H().optional(),supportedMimeTypes:Rv(B()).optional()}),Ab=W({snapshots:H().optional(),deltas:H().optional(),memory:H().optional(),persistentState:H().optional()}),jb=W({supported:H().optional(),delegation:H().optional(),handoffs:H().optional(),subagents:Rv(Tb).optional()}),Mb=W({supported:H().optional(),streaming:H().optional(),encrypted:H().optional()}),Nb=W({image:H().optional(),audio:H().optional(),video:H().optional(),pdf:H().optional(),file:H().optional()}),Pb=W({image:H().optional(),audio:H().optional()}),Fb=W({input:Nb.optional(),output:Pb.optional()}),Ib=W({codeExecution:H().optional(),sandboxed:H().optional(),maxIterations:V().min(0).max(9007199254740991).optional(),maxExecutionTime:V().min(0).max(9007199254740991).optional()}),Lb=W({supported:H().optional(),approvals:H().optional(),interventions:H().optional(),feedback:H().optional(),interrupts:H().optional(),approveWithEdits:H().optional()});W({identity:Eb.optional(),transport:Db.optional(),tools:Ob.optional(),output:kb.optional(),state:Ab.optional(),multiAgent:jb.optional(),reasoning:Mb.optional(),multimodal:Fb.optional(),execution:Ib.optional(),humanInTheLoop:Lb.optional(),custom:Sy(e=>typeof e==`object`&&!!e&&!Array.isArray(e)).optional()}),W({subagentRunId:q.optional()}),W({type:Ey,timestamp:V().min(-9007199254740991).max(9007199254740991).optional(),rawEvent:U().refine(e=>e!==null).optional(),metadata:K.optional()}),W({subagentRunId:q.optional(),id:B(),role:B(),name:B().optional(),encryptedValue:B().optional(),metadata:K.optional()}),K.optional();function Rb(){let e=this.buf,t=this.pos,n=0,r=0;for(let i=0;i<28;i+=7){let a=e[t++];if(n|=(a&127)<>4,!(i&128)){this.pos=t,this.assertBounds(),this.varint64Lo=n,this.varint64Hi=r;return}for(let i=3;i<=31;i+=7){let a=e[t++];if(r|=(a&127)<=zb&&(i+=r/zb|0,r%=zb)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?Gb(r,i):Wb(r,i)}function Vb(e,t){let n=Wb(e,t),r=n.hi&2147483648;r&&(n=Gb(n.lo,n.hi));let i=Hb(n.lo,n.hi);return r?`-`+i:i}function Hb(e,t){if({lo:e,hi:t}=Ub(e,t),t<=2097151)return String(zb*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,s=i*2,c=1e7;return a>=c&&(o+=Math.floor(a/c),a%=c),o>=c&&(s+=Math.floor(o/c),o%=c),s.toString()+Kb(o)+Kb(a)}function Ub(e,t){return{lo:e>>>0,hi:t>>>0}}function Wb(e,t){return{lo:e|0,hi:t|0}}function Gb(e,t){return t=~t,e?e=~e+1:t+=1,Wb(e,t)}var Kb=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function qb(){let e=this.buf[this.pos++];if(!(e&128))return this.assertBounds(),e;let t=e&127;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}var Jb=Yb();function Yb(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt==`function`&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`&&(globalThis.Deno||globalThis.Bun||typeof process!=`object`||{}.BUF_BIGINT_DISABLE!==`1`)){let t=BigInt(`-9223372036854775808`),n=BigInt(`9223372036854775807`),r=BigInt(`0`),i=BigInt(`18446744073709551615`);return{zero:BigInt(0),supported:!0,parse(e){let r=typeof e==`bigint`?e:BigInt(e);if(r>n||ri||ta.call(e)),$b(i)}return Qb}function tx(e){return(t,n)=>{let r=e(t);return n.set(r),{written:r.byteLength}}}var nx;(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(nx||={});var J=class{constructor(e){this.stackPos=[],this.encodeUtf8Into=e?tx(e):ex().encodeUtf8Into,this.buffer=ax,this.viewCache=ox,this.pos=0}ensureCapacity(e){let t=this.pos+e;if(t>this.buffer.length){let e=this.buffer.length||rx;for(;e0&&n.set(this.buffer),this.buffer=n}}view(){let e=this.buffer,t=this.viewCache;if(t.byteLength===e.byteLength)return t;let n=new DataView(e.buffer);return this.viewCache=n,n}finish(){let e=this.buffer.slice(0,this.pos);return this.pos=0,this.stackPos=[],e}fork(){return this.stackPos.push(this.pos),this.ensureCapacity(ix),this.buffer[this.pos++]=0,this}join(){let e=this.stackPos.pop();if(e===void 0)throw Error(`invalid state, fork stack empty`);let t=this.pos-e-ix,n=cx(t);return n>ix&&(this.ensureCapacity(n-ix),this.buffer.copyWithin(e+n,e+ix,this.pos)),this.pos=e,this.uint32(t),this.pos+=t,this}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.ensureCapacity(e.length),this.buffer.set(e,this.pos),this.pos+=e.length,this}uint32(e){if(ux(e),this.ensureCapacity(5),e<128)return this.buffer[this.pos++]=e,this;for(;e>127;)this.buffer[this.pos++]=e&127|128,e>>>=7;return this.buffer[this.pos++]=e,this}int32(e){if(lx(e),e>=0)return this.uint32(e);this.ensureCapacity(10);for(let t=0;t<9;t++)this.buffer[this.pos++]=e&127|128,e>>=7;return this.buffer[this.pos++]=1,this}bool(e){return this.ensureCapacity(1),this.buffer[this.pos++]=+!!e,this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){typeof e!=`string`&&(e=String(e));let t=e.length;if(t<=sx){this.ensureCapacity(t+1);let n=this.buffer,r=this.pos;n[r++]=t;let i=0;for(;i127)break;n[r++]=t}if(i==t)return this.pos=r,this}this.ensureCapacity(t*3+5);let n=cx(t),r=this.buffer,i=this.pos,{written:a}=this.encodeUtf8Into(e,r.subarray(i+n)),o=cx(a);return o!=n&&r.copyWithin(i+o,i+n,i+n+a),this.uint32(a),this.pos+=a,this}float(e){return dx(e),this.ensureCapacity(4),this.view().setFloat32(this.pos,e,!0),this.pos+=4,this}double(e){return this.ensureCapacity(8),this.view().setFloat64(this.pos,e,!0),this.pos+=8,this}fixed32(e){return ux(e),this.ensureCapacity(4),this.view().setUint32(this.pos,e,!0),this.pos+=4,this}sfixed32(e){return lx(e),this.ensureCapacity(4),this.view().setInt32(this.pos,e,!0),this.pos+=4,this}sint32(e){return lx(e),this.uint32((e<<1^e>>31)>>>0)}sfixed64(e){let t=Jb.enc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}fixed64(e){let t=Jb.uEnc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}int64(e){let t=Jb.enc(e);return this.writeVarint64(t.lo,t.hi)}sint64(e){let t=Jb.enc(e),n=t.hi>>31,r=t.lo<<1^n,i=(t.hi<<1|t.lo>>>31)^n;return this.writeVarint64(r,i)}uint64(e){let t=Jb.uEnc(e);return this.writeVarint64(t.lo,t.hi)}writeVarint64(e,t){this.ensureCapacity(10);let n=this.buffer,r=this.pos;for(let i=0;i<28;i+=7){let a=e>>>i,o=!(!(a>>>7)&&t==0);if(n[r++]=(o?a|128:a)&255,!o)return this.pos=r,this}let i=e>>>28&15|(t&7)<<4,a=!!(t>>3);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this;for(let e=3;e<31;e+=7){let i=t>>>e,a=!!(i>>>7);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this}return n[r++]=t>>>31&1,this.pos=r,this}},rx=128,ix=1,ax=new Uint8Array,ox=new DataView(ax.buffer),sx=32;function cx(e){return e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5}var Y=class{constructor(e,t=ex().decodeUtf8){this.decodeUtf8=t,this.varint64Lo=0,this.varint64Hi=0,this.varint64=Rb,this.uint32=qb,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,t=this.uint32(),n=this.pos-e;if(n>5||n==5&&this.buf[this.pos-1]>15)throw Error(`illegal tag: varint overflows uint32`);let r=t>>>3,i=t&7;if(r<=0||i>5)throw Error(`illegal tag: field no `+r+` wire type `+i);return[r,i]}skip(e,t,n=100){let r=this.pos;switch(e){case nx.Varint:for(;this.buf[this.pos++]&128;);break;case nx.Bit64:this.pos+=4;case nx.Bit32:this.pos+=4;break;case nx.LengthDelimited:let r=this.uint32();this.pos+=r;break;case nx.StartGroup:if(n<=0)throw Error(`maximum recursion depth reached`);for(;;){let[e,r]=this.tag();if(r===nx.EndGroup){if(t!==void 0&&e!==t)throw Error(`invalid end group tag`);break}this.skip(r,e,n-1)}break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return this.varint64(),Jb.dec(this.varint64Lo,this.varint64Hi)}uint64(){return this.varint64(),Jb.uDec(this.varint64Lo,this.varint64Hi)}sint64(){this.varint64();let e=this.varint64Lo,t=this.varint64Hi,n=-(e&1);return e=(e>>>1|(t&1)<<31)^n,t=t>>>1^n,Jb.dec(e,t)}bool(){let e=this.buf[this.pos];return e<128?(this.pos++,e!==0):(this.varint64(),this.varint64Lo!==0||this.varint64Hi!==0)}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Jb.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Jb.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(e){let t=this.bytes(),n=t.length;if(n<=sx){let r=Array(n);for(let i=0;i127)return this.decodeUtf8(t,e);r[i]=n}return String.fromCharCode.apply(String,r)}return this.decodeUtf8(t,e)}};function lx(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid int32: `+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error(`invalid int32: `+e)}function ux(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid uint32: `+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error(`invalid uint32: `+e)}function dx(e){if(typeof e==`string`){let t=e;if(e=Number(e),Number.isNaN(e)&&t!==`NaN`)throw Error(`invalid float32: `+t)}else if(typeof e!=`number`)throw Error(`invalid float32: `+typeof e);if(!Number.isFinite(Math.fround(e))&&Number.isFinite(e))throw Error(`invalid float32: `+e)}var fx=function(e){return e[e.NULL_VALUE=0]=`NULL_VALUE`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function px(){return{fields:{}}}var mx={encode(e,t=new J){return Object.entries(e.fields).forEach(([e,n])=>{n!==void 0&&gx.encode({key:e,value:n},t.uint32(10).fork()).join()}),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=px();for(;n.pos>>3){case 1:{if(e!==10)break;let t=gx.decode(n,n.uint32());t.value!==void 0&&(i.fields[t.key]=t.value);continue}}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mx.fromPartial(e??{})},fromPartial(e){let t=px();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,n])=>(n!==void 0&&(e[t]=n),e),{}),t},wrap(e){let t=px();if(e!==void 0)for(let n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){let t={};if(e.fields)for(let n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function hx(){return{key:``,value:void 0}}var gx={encode(e,t=new J){return e.key!==``&&t.uint32(10).string(e.key),e.value!==void 0&&X.encode(X.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=hx();for(;n.pos>>3){case 1:if(e!==10)break;i.key=n.string();continue;case 2:if(e!==18)break;i.value=X.unwrap(X.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return gx.fromPartial(e??{})},fromPartial(e){let t=hx();return t.key=e.key??``,t.value=e.value??void 0,t}};function _x(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var X={encode(e,t=new J){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&mx.encode(mx.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&yx.encode(yx.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=_x();for(;n.pos>>3){case 1:if(e!==8)break;i.nullValue=n.int32();continue;case 2:if(e!==17)break;i.numberValue=n.double();continue;case 3:if(e!==26)break;i.stringValue=n.string();continue;case 4:if(e!==32)break;i.boolValue=n.bool();continue;case 5:if(e!==42)break;i.structValue=mx.unwrap(mx.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.listValue=yx.unwrap(yx.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return X.fromPartial(e??{})},fromPartial(e){let t=_x();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=_x();if(e===null)t.nullValue=fx.NULL_VALUE;else if(typeof e==`boolean`)t.boolValue=e;else if(typeof e==`number`)t.numberValue=e;else if(typeof e==`string`)t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e==`object`)t.structValue=e;else if(e!==void 0)throw new globalThis.Error(`Unsupported any value type: `+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function vx(){return{values:[]}}var yx={encode(e,t=new J){for(let n of e.values)X.encode(X.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=vx();for(;n.pos>>3){case 1:if(e!==10)break;i.values.push(X.unwrap(X.decode(n,n.uint32())));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return yx.fromPartial(e??{})},fromPartial(e){let t=vx();return t.values=e.values?.map(e=>e)||[],t},wrap(e){let t=vx();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty(`values`)&&globalThis.Array.isArray(e.values)?e.values:e}},bx=function(e){return e[e.ADD=0]=`ADD`,e[e.REMOVE=1]=`REMOVE`,e[e.REPLACE=2]=`REPLACE`,e[e.MOVE=3]=`MOVE`,e[e.COPY=4]=`COPY`,e[e.TEST=5]=`TEST`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function xx(){return{op:0,path:``,from:void 0,value:void 0}}var Sx={encode(e,t=new J){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==``&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&X.encode(X.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=xx();for(;n.pos>>3){case 1:if(e!==8)break;i.op=n.int32();continue;case 2:if(e!==18)break;i.path=n.string();continue;case 3:if(e!==26)break;i.from=n.string();continue;case 4:if(e!==34)break;i.value=X.unwrap(X.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Sx.fromPartial(e??{})},fromPartial(e){let t=xx();return t.op=e.op??0,t.path=e.path??``,t.from=e.from??void 0,t.value=e.value??void 0,t}};function Cx(){return{text:``,id:void 0,metadata:void 0}}var wx={encode(e,t=new J){return e.text!==``&&t.uint32(10).string(e.text),e.id!==void 0&&t.uint32(18).string(e.id),e.metadata!==void 0&&X.encode(X.wrap(e.metadata),t.uint32(26).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Cx();for(;n.pos>>3){case 1:if(e!==10)break;i.text=n.string();continue;case 2:if(e!==18)break;i.id=n.string();continue;case 3:if(e!==26)break;i.metadata=X.unwrap(X.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return wx.fromPartial(e??{})},fromPartial(e){let t=Cx();return t.text=e.text??``,t.id=e.id??void 0,t.metadata=e.metadata??void 0,t}};function Tx(){return{source:void 0,metadata:void 0,id:void 0}}var Ex={encode(e,t=new J){return e.source!==void 0&&Px.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&X.encode(X.wrap(e.metadata),t.uint32(18).fork()).join(),e.id!==void 0&&t.uint32(26).string(e.id),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Tx();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Px.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=X.unwrap(X.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.id=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Ex.fromPartial(e??{})},fromPartial(e){let t=Tx();return t.source=e.source!==void 0&&e.source!==null?Px.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t.id=e.id??void 0,t}};function Dx(){return{value:``,mimeType:``}}var Ox={encode(e,t=new J){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==``&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Dx();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Ox.fromPartial(e??{})},fromPartial(e){let t=Dx();return t.value=e.value??``,t.mimeType=e.mimeType??``,t}};function kx(){return{value:``,mimeType:void 0}}var Ax={encode(e,t=new J){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==void 0&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=kx();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Ax.fromPartial(e??{})},fromPartial(e){let t=kx();return t.value=e.value??``,t.mimeType=e.mimeType??void 0,t}};function jx(){return{value:``,provider:void 0,mimeType:void 0}}var Mx={encode(e,t=new J){return e.value!==``&&t.uint32(10).string(e.value),e.provider!==void 0&&t.uint32(18).string(e.provider),e.mimeType!==void 0&&t.uint32(26).string(e.mimeType),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=jx();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.provider=n.string();continue;case 3:if(e!==26)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Mx.fromPartial(e??{})},fromPartial(e){let t=jx();return t.value=e.value??``,t.provider=e.provider??void 0,t.mimeType=e.mimeType??void 0,t}};function Nx(){return{data:void 0,url:void 0,file:void 0}}var Px={encode(e,t=new J){return e.data!==void 0&&Ox.encode(e.data,t.uint32(10).fork()).join(),e.url!==void 0&&Ax.encode(e.url,t.uint32(18).fork()).join(),e.file!==void 0&&Mx.encode(e.file,t.uint32(26).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Nx();for(;n.pos>>3){case 1:if(e!==10)break;i.data=Ox.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.url=Ax.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.file=Mx.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Px.fromPartial(e??{})},fromPartial(e){let t=Nx();return t.data=e.data!==void 0&&e.data!==null?Ox.fromPartial(e.data):void 0,t.url=e.url!==void 0&&e.url!==null?Ax.fromPartial(e.url):void 0,t.file=e.file!==void 0&&e.file!==null?Mx.fromPartial(e.file):void 0,t}};function Fx(){return{source:void 0,metadata:void 0,id:void 0}}var Ix={encode(e,t=new J){return e.source!==void 0&&Px.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&X.encode(X.wrap(e.metadata),t.uint32(18).fork()).join(),e.id!==void 0&&t.uint32(26).string(e.id),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Fx();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Px.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=X.unwrap(X.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.id=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Ix.fromPartial(e??{})},fromPartial(e){let t=Fx();return t.source=e.source!==void 0&&e.source!==null?Px.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t.id=e.id??void 0,t}};function Lx(){return{source:void 0,metadata:void 0,id:void 0}}var Rx={encode(e,t=new J){return e.source!==void 0&&Px.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&X.encode(X.wrap(e.metadata),t.uint32(18).fork()).join(),e.id!==void 0&&t.uint32(26).string(e.id),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Lx();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Px.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=X.unwrap(X.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.id=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Rx.fromPartial(e??{})},fromPartial(e){let t=Lx();return t.source=e.source!==void 0&&e.source!==null?Px.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t.id=e.id??void 0,t}};function zx(){return{source:void 0,metadata:void 0,id:void 0}}var Bx={encode(e,t=new J){return e.source!==void 0&&Px.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&X.encode(X.wrap(e.metadata),t.uint32(18).fork()).join(),e.id!==void 0&&t.uint32(26).string(e.id),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=zx();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Px.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=X.unwrap(X.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.id=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Bx.fromPartial(e??{})},fromPartial(e){let t=zx();return t.source=e.source!==void 0&&e.source!==null?Px.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t.id=e.id??void 0,t}};function Vx(){return{text:void 0,image:void 0,audio:void 0,video:void 0,document:void 0}}var Hx={encode(e,t=new J){return e.text!==void 0&&wx.encode(e.text,t.uint32(10).fork()).join(),e.image!==void 0&&Ex.encode(e.image,t.uint32(18).fork()).join(),e.audio!==void 0&&Ix.encode(e.audio,t.uint32(26).fork()).join(),e.video!==void 0&&Rx.encode(e.video,t.uint32(34).fork()).join(),e.document!==void 0&&Bx.encode(e.document,t.uint32(42).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Vx();for(;n.pos>>3){case 1:if(e!==10)break;i.text=wx.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.image=Ex.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.audio=Ix.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.video=Rx.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.document=Bx.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Hx.fromPartial(e??{})},fromPartial(e){let t=Vx();return t.text=e.text!==void 0&&e.text!==null?wx.fromPartial(e.text):void 0,t.image=e.image!==void 0&&e.image!==null?Ex.fromPartial(e.image):void 0,t.audio=e.audio!==void 0&&e.audio!==null?Ix.fromPartial(e.audio):void 0,t.video=e.video!==void 0&&e.video!==null?Rx.fromPartial(e.video):void 0,t.document=e.document!==void 0&&e.document!==null?Bx.fromPartial(e.document):void 0,t}};function Ux(){return{id:``,type:``,function:void 0,metadata:void 0,encryptedValue:void 0}}var Wx={encode(e,t=new J){return e.id!==``&&t.uint32(10).string(e.id),e.type!==``&&t.uint32(18).string(e.type),e.function!==void 0&&Kx.encode(e.function,t.uint32(26).fork()).join(),e.metadata!==void 0&&mx.encode(mx.wrap(e.metadata),t.uint32(34).fork()).join(),e.encryptedValue!==void 0&&t.uint32(42).string(e.encryptedValue),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Ux();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.type=n.string();continue;case 3:if(e!==26)break;i.function=Kx.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.metadata=mx.unwrap(mx.decode(n,n.uint32()));continue;case 5:if(e!==42)break;i.encryptedValue=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Wx.fromPartial(e??{})},fromPartial(e){let t=Ux();return t.id=e.id??``,t.type=e.type??``,t.function=e.function!==void 0&&e.function!==null?Kx.fromPartial(e.function):void 0,t.metadata=e.metadata??void 0,t.encryptedValue=e.encryptedValue??void 0,t}};function Gx(){return{name:``,arguments:``}}var Kx={encode(e,t=new J){return e.name!==``&&t.uint32(10).string(e.name),e.arguments!==``&&t.uint32(18).string(e.arguments),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Gx();for(;n.pos>>3){case 1:if(e!==10)break;i.name=n.string();continue;case 2:if(e!==18)break;i.arguments=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Kx.fromPartial(e??{})},fromPartial(e){let t=Gx();return t.name=e.name??``,t.arguments=e.arguments??``,t}};function qx(){return{id:``,role:``,content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[],metadata:void 0,subagentRunId:void 0,encryptedValue:void 0,activityType:void 0,activityContent:void 0}}var Jx={encode(e,t=new J){e.id!==``&&t.uint32(10).string(e.id),e.role!==``&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(let n of e.toolCalls)Wx.encode(n,t.uint32(42).fork()).join();e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error);for(let n of e.contentParts)Hx.encode(n,t.uint32(66).fork()).join();return e.metadata!==void 0&&mx.encode(mx.wrap(e.metadata),t.uint32(74).fork()).join(),e.subagentRunId!==void 0&&t.uint32(82).string(e.subagentRunId),e.encryptedValue!==void 0&&t.uint32(90).string(e.encryptedValue),e.activityType!==void 0&&t.uint32(98).string(e.activityType),e.activityContent!==void 0&&mx.encode(mx.wrap(e.activityContent),t.uint32(106).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=qx();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.role=n.string();continue;case 3:if(e!==26)break;i.content=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.toolCalls.push(Wx.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.toolCallId=n.string();continue;case 7:if(e!==58)break;i.error=n.string();continue;case 8:if(e!==66)break;i.contentParts.push(Hx.decode(n,n.uint32()));continue;case 9:if(e!==74)break;i.metadata=mx.unwrap(mx.decode(n,n.uint32()));continue;case 10:if(e!==82)break;i.subagentRunId=n.string();continue;case 11:if(e!==90)break;i.encryptedValue=n.string();continue;case 12:if(e!==98)break;i.activityType=n.string();continue;case 13:if(e!==106)break;i.activityContent=mx.unwrap(mx.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Jx.fromPartial(e??{})},fromPartial(e){let t=qx();return t.id=e.id??``,t.role=e.role??``,t.content=e.content??void 0,t.name=e.name??void 0,t.toolCalls=e.toolCalls?.map(e=>Wx.fromPartial(e))||[],t.toolCallId=e.toolCallId??void 0,t.error=e.error??void 0,t.contentParts=e.contentParts?.map(e=>Hx.fromPartial(e))||[],t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t.encryptedValue=e.encryptedValue??void 0,t.activityType=e.activityType??void 0,t.activityContent=e.activityContent??void 0,t}};function Yx(){return{name:``,description:``,parameters:void 0,metadata:void 0}}var Xx={encode(e,t=new J){return e.name!==``&&t.uint32(10).string(e.name),e.description!==``&&t.uint32(18).string(e.description),e.parameters!==void 0&&X.encode(X.wrap(e.parameters),t.uint32(26).fork()).join(),e.metadata!==void 0&&mx.encode(mx.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Yx();for(;n.pos>>3){case 1:if(e!==10)break;i.name=n.string();continue;case 2:if(e!==18)break;i.description=n.string();continue;case 3:if(e!==26)break;i.parameters=X.unwrap(X.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.metadata=mx.unwrap(mx.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Xx.fromPartial(e??{})},fromPartial(e){let t=Yx();return t.name=e.name??``,t.description=e.description??``,t.parameters=e.parameters??void 0,t.metadata=e.metadata??void 0,t}};function Zx(){return{description:``,value:``}}var Qx={encode(e,t=new J){return e.description!==``&&t.uint32(10).string(e.description),e.value!==``&&t.uint32(18).string(e.value),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=Zx();for(;n.pos>>3){case 1:if(e!==10)break;i.description=n.string();continue;case 2:if(e!==18)break;i.value=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Qx.fromPartial(e??{})},fromPartial(e){let t=Zx();return t.description=e.description??``,t.value=e.value??``,t}};function $x(){return{interruptId:``,status:``,payload:void 0,metadata:void 0}}var eS={encode(e,t=new J){return e.interruptId!==``&&t.uint32(10).string(e.interruptId),e.status!==``&&t.uint32(18).string(e.status),e.payload!==void 0&&X.encode(X.wrap(e.payload),t.uint32(26).fork()).join(),e.metadata!==void 0&&mx.encode(mx.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=$x();for(;n.pos>>3){case 1:if(e!==10)break;i.interruptId=n.string();continue;case 2:if(e!==18)break;i.status=n.string();continue;case 3:if(e!==26)break;i.payload=X.unwrap(X.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.metadata=mx.unwrap(mx.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return eS.fromPartial(e??{})},fromPartial(e){let t=$x();return t.interruptId=e.interruptId??``,t.status=e.status??``,t.payload=e.payload??void 0,t.metadata=e.metadata??void 0,t}};function tS(){return{threadId:``,runId:``,parentRunId:void 0,state:void 0,messages:[],tools:[],context:[],forwardedProps:void 0,resume:[],protocolVersion:void 0}}var nS={encode(e,t=new J){e.threadId!==``&&t.uint32(10).string(e.threadId),e.runId!==``&&t.uint32(18).string(e.runId),e.parentRunId!==void 0&&t.uint32(26).string(e.parentRunId),e.state!==void 0&&X.encode(X.wrap(e.state),t.uint32(34).fork()).join();for(let n of e.messages)Jx.encode(n,t.uint32(42).fork()).join();for(let n of e.tools)Xx.encode(n,t.uint32(50).fork()).join();for(let n of e.context)Qx.encode(n,t.uint32(58).fork()).join();e.forwardedProps!==void 0&&X.encode(X.wrap(e.forwardedProps),t.uint32(66).fork()).join();for(let n of e.resume)eS.encode(n,t.uint32(74).fork()).join();return e.protocolVersion!==void 0&&t.uint32(82).string(e.protocolVersion),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=tS();for(;n.pos>>3){case 1:if(e!==10)break;i.threadId=n.string();continue;case 2:if(e!==18)break;i.runId=n.string();continue;case 3:if(e!==26)break;i.parentRunId=n.string();continue;case 4:if(e!==34)break;i.state=X.unwrap(X.decode(n,n.uint32()));continue;case 5:if(e!==42)break;i.messages.push(Jx.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.tools.push(Xx.decode(n,n.uint32()));continue;case 7:if(e!==58)break;i.context.push(Qx.decode(n,n.uint32()));continue;case 8:if(e!==66)break;i.forwardedProps=X.unwrap(X.decode(n,n.uint32()));continue;case 9:if(e!==74)break;i.resume.push(eS.decode(n,n.uint32()));continue;case 10:if(e!==82)break;i.protocolVersion=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return nS.fromPartial(e??{})},fromPartial(e){let t=tS();return t.threadId=e.threadId??``,t.runId=e.runId??``,t.parentRunId=e.parentRunId??void 0,t.state=e.state??void 0,t.messages=e.messages?.map(e=>Jx.fromPartial(e))||[],t.tools=e.tools?.map(e=>Xx.fromPartial(e))||[],t.context=e.context?.map(e=>Qx.fromPartial(e))||[],t.forwardedProps=e.forwardedProps??void 0,t.resume=e.resume?.map(e=>eS.fromPartial(e))||[],t.protocolVersion=e.protocolVersion??void 0,t}};function rS(){return{id:``,reason:``,message:void 0,toolCallId:void 0,responseSchema:void 0,expiresAt:void 0,metadata:void 0,subagentRunId:void 0}}var iS={encode(e,t=new J){return e.id!==``&&t.uint32(10).string(e.id),e.reason!==``&&t.uint32(18).string(e.reason),e.message!==void 0&&t.uint32(26).string(e.message),e.toolCallId!==void 0&&t.uint32(34).string(e.toolCallId),e.responseSchema!==void 0&&X.encode(X.wrap(e.responseSchema),t.uint32(42).fork()).join(),e.expiresAt!==void 0&&t.uint32(50).string(e.expiresAt),e.metadata!==void 0&&X.encode(X.wrap(e.metadata),t.uint32(58).fork()).join(),e.subagentRunId!==void 0&&t.uint32(66).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=rS();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.reason=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.toolCallId=n.string();continue;case 5:if(e!==42)break;i.responseSchema=X.unwrap(X.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.expiresAt=n.string();continue;case 7:if(e!==58)break;i.metadata=X.unwrap(X.decode(n,n.uint32()));continue;case 8:if(e!==66)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return iS.fromPartial(e??{})},fromPartial(e){let t=rS();return t.id=e.id??``,t.reason=e.reason??``,t.message=e.message??void 0,t.toolCallId=e.toolCallId??void 0,t.responseSchema=e.responseSchema??void 0,t.expiresAt=e.expiresAt??void 0,t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}},aS=function(e){return e[e.TEXT_MESSAGE_START=0]=`TEXT_MESSAGE_START`,e[e.TEXT_MESSAGE_CONTENT=1]=`TEXT_MESSAGE_CONTENT`,e[e.TEXT_MESSAGE_END=2]=`TEXT_MESSAGE_END`,e[e.TOOL_CALL_START=3]=`TOOL_CALL_START`,e[e.TOOL_CALL_ARGS=4]=`TOOL_CALL_ARGS`,e[e.TOOL_CALL_END=5]=`TOOL_CALL_END`,e[e.STATE_SNAPSHOT=6]=`STATE_SNAPSHOT`,e[e.STATE_DELTA=7]=`STATE_DELTA`,e[e.MESSAGES_SNAPSHOT=8]=`MESSAGES_SNAPSHOT`,e[e.RAW=9]=`RAW`,e[e.CUSTOM=10]=`CUSTOM`,e[e.RUN_STARTED=11]=`RUN_STARTED`,e[e.RUN_FINISHED=12]=`RUN_FINISHED`,e[e.RUN_ERROR=13]=`RUN_ERROR`,e[e.STEP_STARTED=14]=`STEP_STARTED`,e[e.STEP_FINISHED=15]=`STEP_FINISHED`,e[e.SUBAGENT_STARTED=16]=`SUBAGENT_STARTED`,e[e.SUBAGENT_FINISHED=17]=`SUBAGENT_FINISHED`,e[e.SUBAGENT_ERROR=18]=`SUBAGENT_ERROR`,e[e.TEXT_MESSAGE_CHUNK=19]=`TEXT_MESSAGE_CHUNK`,e[e.TOOL_CALL_CHUNK=20]=`TOOL_CALL_CHUNK`,e[e.TOOL_CALL_RESULT=21]=`TOOL_CALL_RESULT`,e[e.ACTIVITY_SNAPSHOT=22]=`ACTIVITY_SNAPSHOT`,e[e.ACTIVITY_DELTA=23]=`ACTIVITY_DELTA`,e[e.REASONING_START=24]=`REASONING_START`,e[e.REASONING_MESSAGE_START=25]=`REASONING_MESSAGE_START`,e[e.REASONING_MESSAGE_CONTENT=26]=`REASONING_MESSAGE_CONTENT`,e[e.REASONING_MESSAGE_END=27]=`REASONING_MESSAGE_END`,e[e.REASONING_MESSAGE_CHUNK=28]=`REASONING_MESSAGE_CHUNK`,e[e.REASONING_END=29]=`REASONING_END`,e[e.REASONING_ENCRYPTED_VALUE=30]=`REASONING_ENCRYPTED_VALUE`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function oS(){return{type:0,timestamp:void 0,rawEvent:void 0,metadata:void 0}}var Z={encode(e,t=new J){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&X.encode(X.wrap(e.rawEvent),t.uint32(26).fork()).join(),e.metadata!==void 0&&mx.encode(mx.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=oS();for(;n.pos>>3){case 1:if(e!==8)break;i.type=n.int32();continue;case 2:if(e!==16)break;i.timestamp=yC(n.int64());continue;case 3:if(e!==26)break;i.rawEvent=X.unwrap(X.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.metadata=mx.unwrap(mx.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Z.fromPartial(e??{})},fromPartial(e){let t=oS();return t.type=e.type??0,t.timestamp=e.timestamp??void 0,t.rawEvent=e.rawEvent??void 0,t.metadata=e.metadata??void 0,t}};function sS(){return{baseEvent:void 0,messageId:``,role:void 0,name:void 0,subagentRunId:void 0}}var cS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.name!==void 0&&t.uint32(34).string(e.name),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=sS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return cS.fromPartial(e??{})},fromPartial(e){let t=sS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.role=e.role??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function lS(){return{baseEvent:void 0,messageId:``,delta:``,subagentRunId:void 0}}var uS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=lS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return uS.fromPartial(e??{})},fromPartial(e){let t=lS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function dS(){return{baseEvent:void 0,messageId:``,subagentRunId:void 0}}var fS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=dS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return fS.fromPartial(e??{})},fromPartial(e){let t=dS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function pS(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0,subagentRunId:void 0}}var mS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),e.name!==void 0&&t.uint32(42).string(e.name),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=pS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.delta=n.string();continue;case 5:if(e!==42)break;i.name=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mS.fromPartial(e??{})},fromPartial(e){let t=pS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??void 0,t.role=e.role??void 0,t.delta=e.delta??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function hS(){return{baseEvent:void 0,toolCallId:``,toolCallName:``,parentMessageId:void 0,subagentRunId:void 0}}var gS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.toolCallName!==``&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=hS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return gS.fromPartial(e??{})},fromPartial(e){let t=hS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.toolCallName=e.toolCallName??``,t.parentMessageId=e.parentMessageId??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function _S(){return{baseEvent:void 0,toolCallId:``,delta:``,subagentRunId:void 0}}var vS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=_S();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return vS.fromPartial(e??{})},fromPartial(e){let t=_S();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function yS(){return{baseEvent:void 0,toolCallId:``,subagentRunId:void 0}}var bS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=yS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return bS.fromPartial(e??{})},fromPartial(e){let t=yS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function xS(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0,subagentRunId:void 0}}var SS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=xS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.delta=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return SS.fromPartial(e??{})},fromPartial(e){let t=xS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??void 0,t.toolCallName=e.toolCallName??void 0,t.parentMessageId=e.parentMessageId??void 0,t.delta=e.delta??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function CS(){return{baseEvent:void 0,subagentRunId:void 0,messageId:``,toolCallId:``,content:void 0,role:void 0,contentParts:[]}}var wS={encode(e,t=new J){e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==void 0&&t.uint32(18).string(e.subagentRunId),e.messageId!==``&&t.uint32(26).string(e.messageId),e.toolCallId!==``&&t.uint32(34).string(e.toolCallId),e.content!==void 0&&t.uint32(42).string(e.content),e.role!==void 0&&t.uint32(50).string(e.role);for(let n of e.contentParts)Hx.encode(n,t.uint32(58).fork()).join();return t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=CS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.messageId=n.string();continue;case 4:if(e!==34)break;i.toolCallId=n.string();continue;case 5:if(e!==42)break;i.content=n.string();continue;case 6:if(e!==50)break;i.role=n.string();continue;case 7:if(e!==58)break;i.contentParts.push(Hx.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return wS.fromPartial(e??{})},fromPartial(e){let t=CS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??void 0,t.messageId=e.messageId??``,t.toolCallId=e.toolCallId??``,t.content=e.content??void 0,t.role=e.role??void 0,t.contentParts=e.contentParts?.map(e=>Hx.fromPartial(e))||[],t}};function TS(){return{baseEvent:void 0,snapshot:void 0,subagentRunId:void 0}}var ES={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&X.encode(X.wrap(e.snapshot),t.uint32(18).fork()).join(),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=TS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.snapshot=X.unwrap(X.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return ES.fromPartial(e??{})},fromPartial(e){let t=TS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.snapshot=e.snapshot??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function DS(){return{baseEvent:void 0,delta:[],subagentRunId:void 0}}var OS={encode(e,t=new J){e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.delta)Sx.encode(n,t.uint32(18).fork()).join();return e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=DS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.delta.push(Sx.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return OS.fromPartial(e??{})},fromPartial(e){let t=DS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.delta=e.delta?.map(e=>Sx.fromPartial(e))||[],t.subagentRunId=e.subagentRunId??void 0,t}};function kS(){return{baseEvent:void 0,messages:[]}}var AS={encode(e,t=new J){e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.messages)Jx.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=kS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messages.push(Jx.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return AS.fromPartial(e??{})},fromPartial(e){let t=kS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.messages=e.messages?.map(e=>Jx.fromPartial(e))||[],t}};function jS(){return{baseEvent:void 0,subagentRunId:void 0,messageId:``,activityType:``,content:void 0,replace:void 0}}var MS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==void 0&&t.uint32(18).string(e.subagentRunId),e.messageId!==``&&t.uint32(26).string(e.messageId),e.activityType!==``&&t.uint32(34).string(e.activityType),e.content!==void 0&&mx.encode(mx.wrap(e.content),t.uint32(42).fork()).join(),e.replace!==void 0&&t.uint32(48).bool(e.replace),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=jS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.messageId=n.string();continue;case 4:if(e!==34)break;i.activityType=n.string();continue;case 5:if(e!==42)break;i.content=mx.unwrap(mx.decode(n,n.uint32()));continue;case 6:if(e!==48)break;i.replace=n.bool();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return MS.fromPartial(e??{})},fromPartial(e){let t=jS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??void 0,t.messageId=e.messageId??``,t.activityType=e.activityType??``,t.content=e.content??void 0,t.replace=e.replace??void 0,t}};function NS(){return{baseEvent:void 0,subagentRunId:void 0,messageId:``,activityType:``,patch:[]}}var PS={encode(e,t=new J){e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==void 0&&t.uint32(18).string(e.subagentRunId),e.messageId!==``&&t.uint32(26).string(e.messageId),e.activityType!==``&&t.uint32(34).string(e.activityType);for(let n of e.patch)Sx.encode(n,t.uint32(42).fork()).join();return t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=NS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.messageId=n.string();continue;case 4:if(e!==34)break;i.activityType=n.string();continue;case 5:if(e!==42)break;i.patch.push(Sx.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return PS.fromPartial(e??{})},fromPartial(e){let t=NS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??void 0,t.messageId=e.messageId??``,t.activityType=e.activityType??``,t.patch=e.patch?.map(e=>Sx.fromPartial(e))||[],t}};function FS(){return{baseEvent:void 0,event:void 0,source:void 0,subagentRunId:void 0}}var IS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&X.encode(X.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=FS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.event=X.unwrap(X.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.source=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return IS.fromPartial(e??{})},fromPartial(e){let t=FS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.event=e.event??void 0,t.source=e.source??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function LS(){return{baseEvent:void 0,name:``,value:void 0,subagentRunId:void 0}}var RS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==``&&t.uint32(18).string(e.name),e.value!==void 0&&X.encode(X.wrap(e.value),t.uint32(26).fork()).join(),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=LS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.name=n.string();continue;case 3:if(e!==26)break;i.value=X.unwrap(X.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return RS.fromPartial(e??{})},fromPartial(e){let t=LS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.name=e.name??``,t.value=e.value??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function zS(){return{baseEvent:void 0,threadId:``,runId:``,parentRunId:void 0,input:void 0,protocolVersion:void 0}}var BS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),e.parentRunId!==void 0&&t.uint32(34).string(e.parentRunId),e.input!==void 0&&nS.encode(e.input,t.uint32(42).fork()).join(),e.protocolVersion!==void 0&&t.uint32(50).string(e.protocolVersion),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=zS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue;case 4:if(e!==34)break;i.parentRunId=n.string();continue;case 5:if(e!==42)break;i.input=nS.decode(n,n.uint32());continue;case 6:if(e!==50)break;i.protocolVersion=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return BS.fromPartial(e??{})},fromPartial(e){let t=zS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t.parentRunId=e.parentRunId??void 0,t.input=e.input!==void 0&&e.input!==null?nS.fromPartial(e.input):void 0,t.protocolVersion=e.protocolVersion??void 0,t}};function VS(){return{baseEvent:void 0,threadId:``,runId:``,result:void 0,outcome:``,interrupts:[],usage:[],pendingToolCallIds:[]}}var HS={encode(e,t=new J){e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),e.result!==void 0&&X.encode(X.wrap(e.result),t.uint32(34).fork()).join(),e.outcome!==``&&t.uint32(42).string(e.outcome);for(let n of e.interrupts)iS.encode(n,t.uint32(50).fork()).join();for(let n of e.usage)vC.encode(n,t.uint32(58).fork()).join();for(let n of e.pendingToolCallIds)t.uint32(66).string(n);return t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=VS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue;case 4:if(e!==34)break;i.result=X.unwrap(X.decode(n,n.uint32()));continue;case 5:if(e!==42)break;i.outcome=n.string();continue;case 6:if(e!==50)break;i.interrupts.push(iS.decode(n,n.uint32()));continue;case 7:if(e!==58)break;i.usage.push(vC.decode(n,n.uint32()));continue;case 8:if(e!==66)break;i.pendingToolCallIds.push(n.string());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return HS.fromPartial(e??{})},fromPartial(e){let t=VS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interrupts=e.interrupts?.map(e=>iS.fromPartial(e))||[],t.usage=e.usage?.map(e=>vC.fromPartial(e))||[],t.pendingToolCallIds=e.pendingToolCallIds?.map(e=>e)||[],t}};function US(){return{baseEvent:void 0,code:void 0,message:``,usage:[]}}var WS={encode(e,t=new J){e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==``&&t.uint32(26).string(e.message);for(let n of e.usage)vC.encode(n,t.uint32(34).fork()).join();return t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=US();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.code=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.usage.push(vC.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return WS.fromPartial(e??{})},fromPartial(e){let t=US();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.code=e.code??void 0,t.message=e.message??``,t.usage=e.usage?.map(e=>vC.fromPartial(e))||[],t}};function GS(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var KS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=GS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return KS.fromPartial(e??{})},fromPartial(e){let t=GS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function qS(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var JS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=qS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return JS.fromPartial(e??{})},fromPartial(e){let t=qS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function YS(){return{baseEvent:void 0,subagentRunId:void 0,messageId:``}}var XS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==void 0&&t.uint32(18).string(e.subagentRunId),e.messageId!==``&&t.uint32(26).string(e.messageId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=YS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.messageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return XS.fromPartial(e??{})},fromPartial(e){let t=YS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??void 0,t.messageId=e.messageId??``,t}};function ZS(){return{baseEvent:void 0,subagentRunId:void 0,messageId:``,role:``}}var QS={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==void 0&&t.uint32(18).string(e.subagentRunId),e.messageId!==``&&t.uint32(26).string(e.messageId),e.role!==``&&t.uint32(34).string(e.role),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=ZS();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.messageId=n.string();continue;case 4:if(e!==34)break;i.role=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return QS.fromPartial(e??{})},fromPartial(e){let t=ZS();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??void 0,t.messageId=e.messageId??``,t.role=e.role??``,t}};function $S(){return{baseEvent:void 0,subagentRunId:void 0,messageId:``,delta:``}}var eC={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==void 0&&t.uint32(18).string(e.subagentRunId),e.messageId!==``&&t.uint32(26).string(e.messageId),e.delta!==``&&t.uint32(34).string(e.delta),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=$S();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.messageId=n.string();continue;case 4:if(e!==34)break;i.delta=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return eC.fromPartial(e??{})},fromPartial(e){let t=$S();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??void 0,t.messageId=e.messageId??``,t.delta=e.delta??``,t}};function tC(){return{baseEvent:void 0,subagentRunId:void 0,messageId:``}}var nC={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==void 0&&t.uint32(18).string(e.subagentRunId),e.messageId!==``&&t.uint32(26).string(e.messageId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=tC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.messageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return nC.fromPartial(e??{})},fromPartial(e){let t=tC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??void 0,t.messageId=e.messageId??``,t}};function rC(){return{baseEvent:void 0,subagentRunId:void 0,messageId:void 0,delta:void 0}}var iC={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==void 0&&t.uint32(18).string(e.subagentRunId),e.messageId!==void 0&&t.uint32(26).string(e.messageId),e.delta!==void 0&&t.uint32(34).string(e.delta),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=rC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.messageId=n.string();continue;case 4:if(e!==34)break;i.delta=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return iC.fromPartial(e??{})},fromPartial(e){let t=rC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??void 0,t.messageId=e.messageId??void 0,t.delta=e.delta??void 0,t}};function aC(){return{baseEvent:void 0,subagentRunId:void 0,messageId:``}}var oC={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==void 0&&t.uint32(18).string(e.subagentRunId),e.messageId!==``&&t.uint32(26).string(e.messageId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=aC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.messageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return oC.fromPartial(e??{})},fromPartial(e){let t=aC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??void 0,t.messageId=e.messageId??``,t}};function sC(){return{baseEvent:void 0,subagentRunId:void 0,subtype:``,entityId:``,encryptedValue:``}}var cC={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==void 0&&t.uint32(18).string(e.subagentRunId),e.subtype!==``&&t.uint32(26).string(e.subtype),e.entityId!==``&&t.uint32(34).string(e.entityId),e.encryptedValue!==``&&t.uint32(42).string(e.encryptedValue),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=sC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.subtype=n.string();continue;case 4:if(e!==34)break;i.entityId=n.string();continue;case 5:if(e!==42)break;i.encryptedValue=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return cC.fromPartial(e??{})},fromPartial(e){let t=sC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??void 0,t.subtype=e.subtype??``,t.entityId=e.entityId??``,t.encryptedValue=e.encryptedValue??``,t}};function lC(){return{baseEvent:void 0,subagentRunId:``,name:``,description:void 0,parentSubagentRunId:void 0,parentToolCallId:void 0,parentMessageId:void 0}}var uC={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.name!==``&&t.uint32(26).string(e.name),e.description!==void 0&&t.uint32(34).string(e.description),e.parentSubagentRunId!==void 0&&t.uint32(42).string(e.parentSubagentRunId),e.parentToolCallId!==void 0&&t.uint32(50).string(e.parentToolCallId),e.parentMessageId!==void 0&&t.uint32(58).string(e.parentMessageId),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=lC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.name=n.string();continue;case 4:if(e!==34)break;i.description=n.string();continue;case 5:if(e!==42)break;i.parentSubagentRunId=n.string();continue;case 6:if(e!==50)break;i.parentToolCallId=n.string();continue;case 7:if(e!==58)break;i.parentMessageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return uC.fromPartial(e??{})},fromPartial(e){let t=lC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.name=e.name??``,t.description=e.description??void 0,t.parentSubagentRunId=e.parentSubagentRunId??void 0,t.parentToolCallId=e.parentToolCallId??void 0,t.parentMessageId=e.parentMessageId??void 0,t}};function dC(){return{baseEvent:void 0,subagentRunId:``,result:void 0,outcome:``,interruptIds:[]}}var fC={encode(e,t=new J){e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.result!==void 0&&X.encode(X.wrap(e.result),t.uint32(26).fork()).join(),e.outcome!==``&&t.uint32(34).string(e.outcome);for(let n of e.interruptIds)t.uint32(42).string(n);return t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=dC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.result=X.unwrap(X.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.outcome=n.string();continue;case 5:if(e!==42)break;i.interruptIds.push(n.string());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return fC.fromPartial(e??{})},fromPartial(e){let t=dC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interruptIds=e.interruptIds?.map(e=>e)||[],t}};function pC(){return{baseEvent:void 0,subagentRunId:``,message:``,code:void 0}}var mC={encode(e,t=new J){return e.baseEvent!==void 0&&Z.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.message!==``&&t.uint32(26).string(e.message),e.code!==void 0&&t.uint32(34).string(e.code),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=pC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=Z.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.code=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mC.fromPartial(e??{})},fromPartial(e){let t=pC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?Z.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.message=e.message??``,t.code=e.code??void 0,t}};function hC(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0,subagentStarted:void 0,subagentFinished:void 0,subagentError:void 0,toolCallResult:void 0,activitySnapshot:void 0,activityDelta:void 0,reasoningStart:void 0,reasoningMessageStart:void 0,reasoningMessageContent:void 0,reasoningMessageEnd:void 0,reasoningMessageChunk:void 0,reasoningEnd:void 0,reasoningEncryptedValue:void 0}}var gC={encode(e,t=new J){return e.textMessageStart!==void 0&&cS.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&uS.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&fS.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&gS.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&vS.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&bS.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&ES.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&OS.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&AS.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&IS.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&RS.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&BS.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&HS.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&WS.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&KS.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&JS.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&mS.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&SS.encode(e.toolCallChunk,t.uint32(146).fork()).join(),e.subagentStarted!==void 0&&uC.encode(e.subagentStarted,t.uint32(154).fork()).join(),e.subagentFinished!==void 0&&fC.encode(e.subagentFinished,t.uint32(162).fork()).join(),e.subagentError!==void 0&&mC.encode(e.subagentError,t.uint32(170).fork()).join(),e.toolCallResult!==void 0&&wS.encode(e.toolCallResult,t.uint32(178).fork()).join(),e.activitySnapshot!==void 0&&MS.encode(e.activitySnapshot,t.uint32(186).fork()).join(),e.activityDelta!==void 0&&PS.encode(e.activityDelta,t.uint32(194).fork()).join(),e.reasoningStart!==void 0&&XS.encode(e.reasoningStart,t.uint32(202).fork()).join(),e.reasoningMessageStart!==void 0&&QS.encode(e.reasoningMessageStart,t.uint32(210).fork()).join(),e.reasoningMessageContent!==void 0&&eC.encode(e.reasoningMessageContent,t.uint32(218).fork()).join(),e.reasoningMessageEnd!==void 0&&nC.encode(e.reasoningMessageEnd,t.uint32(226).fork()).join(),e.reasoningMessageChunk!==void 0&&iC.encode(e.reasoningMessageChunk,t.uint32(234).fork()).join(),e.reasoningEnd!==void 0&&oC.encode(e.reasoningEnd,t.uint32(242).fork()).join(),e.reasoningEncryptedValue!==void 0&&cC.encode(e.reasoningEncryptedValue,t.uint32(250).fork()).join(),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=hC();for(;n.pos>>3){case 1:if(e!==10)break;i.textMessageStart=cS.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.textMessageContent=uS.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.textMessageEnd=fS.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.toolCallStart=gS.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.toolCallArgs=vS.decode(n,n.uint32());continue;case 6:if(e!==50)break;i.toolCallEnd=bS.decode(n,n.uint32());continue;case 7:if(e!==58)break;i.stateSnapshot=ES.decode(n,n.uint32());continue;case 8:if(e!==66)break;i.stateDelta=OS.decode(n,n.uint32());continue;case 9:if(e!==74)break;i.messagesSnapshot=AS.decode(n,n.uint32());continue;case 10:if(e!==82)break;i.raw=IS.decode(n,n.uint32());continue;case 11:if(e!==90)break;i.custom=RS.decode(n,n.uint32());continue;case 12:if(e!==98)break;i.runStarted=BS.decode(n,n.uint32());continue;case 13:if(e!==106)break;i.runFinished=HS.decode(n,n.uint32());continue;case 14:if(e!==114)break;i.runError=WS.decode(n,n.uint32());continue;case 15:if(e!==122)break;i.stepStarted=KS.decode(n,n.uint32());continue;case 16:if(e!==130)break;i.stepFinished=JS.decode(n,n.uint32());continue;case 17:if(e!==138)break;i.textMessageChunk=mS.decode(n,n.uint32());continue;case 18:if(e!==146)break;i.toolCallChunk=SS.decode(n,n.uint32());continue;case 19:if(e!==154)break;i.subagentStarted=uC.decode(n,n.uint32());continue;case 20:if(e!==162)break;i.subagentFinished=fC.decode(n,n.uint32());continue;case 21:if(e!==170)break;i.subagentError=mC.decode(n,n.uint32());continue;case 22:if(e!==178)break;i.toolCallResult=wS.decode(n,n.uint32());continue;case 23:if(e!==186)break;i.activitySnapshot=MS.decode(n,n.uint32());continue;case 24:if(e!==194)break;i.activityDelta=PS.decode(n,n.uint32());continue;case 25:if(e!==202)break;i.reasoningStart=XS.decode(n,n.uint32());continue;case 26:if(e!==210)break;i.reasoningMessageStart=QS.decode(n,n.uint32());continue;case 27:if(e!==218)break;i.reasoningMessageContent=eC.decode(n,n.uint32());continue;case 28:if(e!==226)break;i.reasoningMessageEnd=nC.decode(n,n.uint32());continue;case 29:if(e!==234)break;i.reasoningMessageChunk=iC.decode(n,n.uint32());continue;case 30:if(e!==242)break;i.reasoningEnd=oC.decode(n,n.uint32());continue;case 31:if(e!==250)break;i.reasoningEncryptedValue=cC.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return gC.fromPartial(e??{})},fromPartial(e){let t=hC();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?cS.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?uS.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?fS.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?gS.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?vS.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?bS.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?ES.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?OS.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?AS.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?IS.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?RS.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?BS.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?HS.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?WS.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?KS.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?JS.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?mS.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?SS.fromPartial(e.toolCallChunk):void 0,t.subagentStarted=e.subagentStarted!==void 0&&e.subagentStarted!==null?uC.fromPartial(e.subagentStarted):void 0,t.subagentFinished=e.subagentFinished!==void 0&&e.subagentFinished!==null?fC.fromPartial(e.subagentFinished):void 0,t.subagentError=e.subagentError!==void 0&&e.subagentError!==null?mC.fromPartial(e.subagentError):void 0,t.toolCallResult=e.toolCallResult!==void 0&&e.toolCallResult!==null?wS.fromPartial(e.toolCallResult):void 0,t.activitySnapshot=e.activitySnapshot!==void 0&&e.activitySnapshot!==null?MS.fromPartial(e.activitySnapshot):void 0,t.activityDelta=e.activityDelta!==void 0&&e.activityDelta!==null?PS.fromPartial(e.activityDelta):void 0,t.reasoningStart=e.reasoningStart!==void 0&&e.reasoningStart!==null?XS.fromPartial(e.reasoningStart):void 0,t.reasoningMessageStart=e.reasoningMessageStart!==void 0&&e.reasoningMessageStart!==null?QS.fromPartial(e.reasoningMessageStart):void 0,t.reasoningMessageContent=e.reasoningMessageContent!==void 0&&e.reasoningMessageContent!==null?eC.fromPartial(e.reasoningMessageContent):void 0,t.reasoningMessageEnd=e.reasoningMessageEnd!==void 0&&e.reasoningMessageEnd!==null?nC.fromPartial(e.reasoningMessageEnd):void 0,t.reasoningMessageChunk=e.reasoningMessageChunk!==void 0&&e.reasoningMessageChunk!==null?iC.fromPartial(e.reasoningMessageChunk):void 0,t.reasoningEnd=e.reasoningEnd!==void 0&&e.reasoningEnd!==null?oC.fromPartial(e.reasoningEnd):void 0,t.reasoningEncryptedValue=e.reasoningEncryptedValue!==void 0&&e.reasoningEncryptedValue!==null?cC.fromPartial(e.reasoningEncryptedValue):void 0,t}};function _C(){return{provider:void 0,model:void 0,inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0,cacheWriteInputTokens:void 0}}var vC={encode(e,t=new J){return e.provider!==void 0&&t.uint32(10).string(e.provider),e.model!==void 0&&t.uint32(18).string(e.model),e.inputTokens!==void 0&&t.uint32(24).int64(e.inputTokens),e.outputTokens!==void 0&&t.uint32(32).int64(e.outputTokens),e.totalTokens!==void 0&&t.uint32(40).int64(e.totalTokens),e.reasoningTokens!==void 0&&t.uint32(48).int64(e.reasoningTokens),e.cachedInputTokens!==void 0&&t.uint32(56).int64(e.cachedInputTokens),e.cacheWriteInputTokens!==void 0&&t.uint32(64).int64(e.cacheWriteInputTokens),t},decode(e,t){let n=e instanceof Y?e:new Y(e),r=t===void 0?n.len:n.pos+t,i=_C();for(;n.pos>>3){case 1:if(e!==10)break;i.provider=n.string();continue;case 2:if(e!==18)break;i.model=n.string();continue;case 3:if(e!==24)break;i.inputTokens=yC(n.int64());continue;case 4:if(e!==32)break;i.outputTokens=yC(n.int64());continue;case 5:if(e!==40)break;i.totalTokens=yC(n.int64());continue;case 6:if(e!==48)break;i.reasoningTokens=yC(n.int64());continue;case 7:if(e!==56)break;i.cachedInputTokens=yC(n.int64());continue;case 8:if(e!==64)break;i.cacheWriteInputTokens=yC(n.int64());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return vC.fromPartial(e??{})},fromPartial(e){let t=_C();return t.provider=e.provider??void 0,t.model=e.model??void 0,t.inputTokens=e.inputTokens??void 0,t.outputTokens=e.outputTokens??void 0,t.totalTokens=e.totalTokens??void 0,t.reasoningTokens=e.reasoningTokens??void 0,t.cachedInputTokens=e.cachedInputTokens??void 0,t.cacheWriteInputTokens=e.cacheWriteInputTokens??void 0,t}};function yC(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error(`Value is larger than Number.MAX_SAFE_INTEGER`);if(te&&typeof e==`object`?e:void 0,xC=e=>Array.isArray(e)?e:[],SC=()=>typeof process<`u`&&!!{}.SUPPRESS_TRANSFORMATION_WARNINGS,CC=()=>{SC()||console.warn(`[ag-ui][proto] Dropped a content part this build does not know: the protocol has a variant this SDK predates.`)};new Set(Object.values(A));var wC={textMessageStart:`TEXT_MESSAGE_START`,textMessageContent:`TEXT_MESSAGE_CONTENT`,textMessageEnd:`TEXT_MESSAGE_END`,textMessageChunk:`TEXT_MESSAGE_CHUNK`,toolCallStart:`TOOL_CALL_START`,toolCallArgs:`TOOL_CALL_ARGS`,toolCallEnd:`TOOL_CALL_END`,toolCallChunk:`TOOL_CALL_CHUNK`,toolCallResult:`TOOL_CALL_RESULT`,stateSnapshot:`STATE_SNAPSHOT`,stateDelta:`STATE_DELTA`,messagesSnapshot:`MESSAGES_SNAPSHOT`,activitySnapshot:`ACTIVITY_SNAPSHOT`,activityDelta:`ACTIVITY_DELTA`,raw:`RAW`,custom:`CUSTOM`,runStarted:`RUN_STARTED`,runFinished:`RUN_FINISHED`,runError:`RUN_ERROR`,stepStarted:`STEP_STARTED`,stepFinished:`STEP_FINISHED`,reasoningStart:`REASONING_START`,reasoningMessageStart:`REASONING_MESSAGE_START`,reasoningMessageContent:`REASONING_MESSAGE_CONTENT`,reasoningMessageEnd:`REASONING_MESSAGE_END`,reasoningMessageChunk:`REASONING_MESSAGE_CHUNK`,reasoningEnd:`REASONING_END`,reasoningEncryptedValue:`REASONING_ENCRYPTED_VALUE`,subagentStarted:`SUBAGENT_STARTED`,subagentFinished:`SUBAGENT_FINISHED`,subagentError:`SUBAGENT_ERROR`},TC=new Set([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]),EC=e=>{let t=bC(e);if(t){if([t.data,t.url,t.file].filter(Boolean).length>1)throw Error(`Invalid event: source carries more than one arm`);if(t.data){let e=t.data;return{type:`data`,value:e.value,mimeType:e.mimeType}}if(t.url){let e=t.url;return{type:`url`,value:e.value,mimeType:e.mimeType}}if(t.file){let e=t.file;return{type:`file`,value:e.value,provider:e.provider,mimeType:e.mimeType}}}},DC=e=>{let t=bC(e);if(t){if([t.text,t.image,t.audio,t.video,t.document].filter(Boolean).length>1)throw Error(`Invalid event: content part carries more than one arm`);if(t.text){let e=t.text;return{type:`text`,id:e.id,text:e.text,metadata:e.metadata}}if(t.image){let e=t.image;return e.source!==void 0&&EC(e.source)===void 0?void 0:{type:`image`,id:e.id,source:EC(e.source),metadata:e.metadata}}if(t.audio){let e=t.audio;return e.source!==void 0&&EC(e.source)===void 0?void 0:{type:`audio`,id:e.id,source:EC(e.source),metadata:e.metadata}}if(t.video){let e=t.video;return e.source!==void 0&&EC(e.source)===void 0?void 0:{type:`video`,id:e.id,source:EC(e.source),metadata:e.metadata}}if(t.document){let e=t.document;return e.source!==void 0&&EC(e.source)===void 0?void 0:{type:`document`,id:e.id,source:EC(e.source),metadata:e.metadata}}}},OC=new Set([`activity`]),kC=new Set([`user`,`tool`]),AC=new Set([`developer`,`system`,`assistant`,`user`,`tool`,`activity`,`reasoning`]),jC=e=>{let t=bC(e)??{},n={...t},r=typeof t.role==`string`?t.role:``,i=AC.has(r),a=i?kC.has(r):xC(t.contentParts).length>0,o=i?OC.has(r):!a&&t.activityContent!==void 0;if(!i&&(t.content===void 0?0:1)+ +(xC(t.contentParts).length>0)+(t.activityContent===void 0?0:1)>1)throw Error(`Invalid event: message carries more than one content form`);if(i){if(!a&&xC(t.contentParts).length>0)throw Error(`Invalid event: message carries content parts for a role that has none`);if(t.activityContent!==void 0&&!o)throw Error(`Invalid event: message carries activity content for a non-activity role`);if(o&&t.content!==void 0)throw Error(`Invalid event: activity content cannot ride with other content forms`);if(a&&t.content!==void 0&&xC(t.contentParts).length>0)throw Error(`Invalid event: message carries both string content and content parts`)}return a&&t.content===void 0&&(n.content=xC(t.contentParts).map(e=>{let t=DC(e);return t===void 0&&CC(),t}).filter(e=>e!==void 0)),o&&t.activityContent!==void 0&&(n.content=t.activityContent),delete n.activityContent,delete n.contentParts,xC(t.toolCalls).length===0&&delete n.toolCalls,Object.keys(n).forEach(e=>{n[e]===void 0&&delete n[e]}),n},MC=e=>{if(Array.isArray(e)){for(let t of e)MC(t);return}let t=bC(e);if(t)for(let e of Object.keys(t))t[e]===void 0?delete t[e]:MC(t[e])},NC=e=>{let t=bC(e);if(!t)return;let n={};return t.threadId!==void 0&&(n.threadId=t.threadId),t.runId!==void 0&&(n.runId=t.runId),t.protocolVersion!==void 0&&(n.protocolVersion=t.protocolVersion),t.parentRunId!==void 0&&(n.parentRunId=t.parentRunId),t.state!==void 0&&(n.state=t.state),n.messages=xC(t.messages).map(jC).filter(e=>e!==void 0),n.tools=xC(t.tools),n.context=xC(t.context),t.forwardedProps!==void 0&&(n.forwardedProps=t.forwardedProps),n.resume=xC(t.resume),n},PC={TextMessageStartEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},BaseEvent:{singular:new Set([3,4]),descend:{},google:{3:`google.protobuf.Value`,4:`google.protobuf.Struct`}},TextMessageContentEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},TextMessageEndEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ToolCallStartEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ToolCallArgsEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ToolCallEndEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},StateSnapshotEvent:{singular:new Set([1,2]),descend:{1:`BaseEvent`},google:{2:`google.protobuf.Value`}},StateDeltaEvent:{singular:new Set([1]),descend:{1:`BaseEvent`,2:`JsonPatchOperation`}},JsonPatchOperation:{singular:new Set([4]),descend:{},google:{4:`google.protobuf.Value`}},MessagesSnapshotEvent:{singular:new Set([1]),descend:{1:`BaseEvent`,2:`Message`}},Message:{singular:new Set([9,13]),descend:{5:`ToolCall`,8:`InputContent`},google:{9:`google.protobuf.Struct`,13:`google.protobuf.Struct`}},ToolCall:{singular:new Set([3,4]),descend:{},google:{4:`google.protobuf.Struct`}},InputContent:{singular:new Set([1,2,3,4,5]),descend:{1:`TextInputPart`,2:`ImageInputPart`,3:`AudioInputPart`,4:`VideoInputPart`,5:`DocumentInputPart`},arms:new Set([1,2,3,4,5])},TextInputPart:{singular:new Set([3]),descend:{},google:{3:`google.protobuf.Value`}},ImageInputPart:{singular:new Set([1,2]),descend:{1:`InputContentSource`},google:{2:`google.protobuf.Value`}},InputContentSource:{singular:new Set([1,2,3]),descend:{},arms:new Set([1,2,3])},AudioInputPart:{singular:new Set([1,2]),descend:{1:`InputContentSource`},google:{2:`google.protobuf.Value`}},VideoInputPart:{singular:new Set([1,2]),descend:{1:`InputContentSource`},google:{2:`google.protobuf.Value`}},DocumentInputPart:{singular:new Set([1,2]),descend:{1:`InputContentSource`},google:{2:`google.protobuf.Value`}},RawEvent:{singular:new Set([1,2]),descend:{1:`BaseEvent`},google:{2:`google.protobuf.Value`}},CustomEvent:{singular:new Set([1,3]),descend:{1:`BaseEvent`},google:{3:`google.protobuf.Value`}},RunStartedEvent:{singular:new Set([1,5]),descend:{1:`BaseEvent`,5:`RunAgentInput`}},RunAgentInput:{singular:new Set([4,8]),descend:{5:`Message`,6:`Tool`,9:`ResumeEntry`},google:{4:`google.protobuf.Value`,8:`google.protobuf.Value`}},Tool:{singular:new Set([3,4]),descend:{},google:{3:`google.protobuf.Value`,4:`google.protobuf.Struct`}},ResumeEntry:{singular:new Set([3,4]),descend:{},google:{3:`google.protobuf.Value`,4:`google.protobuf.Struct`}},RunFinishedEvent:{singular:new Set([1,4]),descend:{1:`BaseEvent`,6:`Interrupt`},google:{4:`google.protobuf.Value`}},Interrupt:{singular:new Set([5,7]),descend:{},google:{5:`google.protobuf.Value`,7:`google.protobuf.Value`}},RunErrorEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},StepStartedEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},StepFinishedEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},TextMessageChunkEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ToolCallChunkEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},SubagentStartedEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},SubagentFinishedEvent:{singular:new Set([1,3]),descend:{1:`BaseEvent`},google:{3:`google.protobuf.Value`}},SubagentErrorEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ToolCallResultEvent:{singular:new Set([1]),descend:{1:`BaseEvent`,7:`InputContent`}},ActivitySnapshotEvent:{singular:new Set([1,5]),descend:{1:`BaseEvent`},google:{5:`google.protobuf.Struct`}},ActivityDeltaEvent:{singular:new Set([1]),descend:{1:`BaseEvent`,5:`JsonPatchOperation`}},ReasoningStartEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ReasoningMessageStartEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ReasoningMessageContentEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ReasoningMessageEndEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ReasoningMessageChunkEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ReasoningEndEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},ReasoningEncryptedValueEvent:{singular:new Set([1]),descend:{1:`BaseEvent`}},"google.protobuf.Struct":{singular:new Set,descend:{1:`google.protobuf.Struct.FieldsEntry`}},"google.protobuf.Struct.FieldsEntry":{singular:new Set([2]),descend:{2:`google.protobuf.Value`}},"google.protobuf.Value":{singular:new Set([5,6]),descend:{5:`google.protobuf.Struct`,6:`google.protobuf.ListValue`},arms:new Set([1,2,3,4,5,6]),armWireTypes:{1:0,2:1,3:2,4:0,5:2,6:2}},"google.protobuf.ListValue":{singular:new Set,descend:{1:`google.protobuf.Value`}}},FC={1:`TextMessageStartEvent`,2:`TextMessageContentEvent`,3:`TextMessageEndEvent`,4:`ToolCallStartEvent`,5:`ToolCallArgsEvent`,6:`ToolCallEndEvent`,7:`StateSnapshotEvent`,8:`StateDeltaEvent`,9:`MessagesSnapshotEvent`,10:`RawEvent`,11:`CustomEvent`,12:`RunStartedEvent`,13:`RunFinishedEvent`,14:`RunErrorEvent`,15:`StepStartedEvent`,16:`StepFinishedEvent`,17:`TextMessageChunkEvent`,18:`ToolCallChunkEvent`,19:`SubagentStartedEvent`,20:`SubagentFinishedEvent`,21:`SubagentErrorEvent`,22:`ToolCallResultEvent`,23:`ActivitySnapshotEvent`,24:`ActivityDeltaEvent`,25:`ReasoningStartEvent`,26:`ReasoningMessageStartEvent`,27:`ReasoningMessageContentEvent`,28:`ReasoningMessageEndEvent`,29:`ReasoningMessageChunkEvent`,30:`ReasoningEndEvent`,31:`ReasoningEncryptedValueEvent`};function IC(e,t){let n=0,r=0;for(;;){if(t.offset>=e.length)throw Error(`Invalid event`);let i=e[t.offset++];if(r<28?n+=(i&127)*2**r:r===28&&(n+=(i&15)*2**28),r+=7,!(i&128))return n}}function LC(e,t){let n={offset:0},r=0,i=0;for(;n.offsete.length)throw Error(`Invalid event`);if(r===0){if(t.arms?.has(o)){if(i!==0&&i!==o)throw Error(`Invalid event`);i=o}let r=t.descend[o];if(r!==void 0){let t=PC[r];t!==void 0&&LC(e.subarray(n.offset,n.offset+a),t)}}n.offset+=a}else if(s===5)n.offset+=4;else throw Error(`Invalid event`);if(n.offset>e.length)throw Error(`Invalid event`)}if(r!==0)throw Error(`Invalid event`)}function RC(e){let t=new Set,n={offset:0},r=0;for(;n.offset0&&!t.has(a))throw Error(`Invalid event`);t.add(a)}if(o===0)IC(e,n);else if(o===1)n.offset+=8;else if(o===2){let t=IC(e,n);if(n.offset+t>e.length)throw Error(`Invalid event`);if(r===0){let r=FC[a];if(r!==void 0){let i=PC[r];i!==void 0&&LC(e.subarray(n.offset,n.offset+t),i)}}n.offset+=t}else if(o===5)n.offset+=4;else throw Error(`Invalid event`);if(n.offset>e.length)throw Error(`Invalid event`)}if(r!==0)throw Error(`Invalid event`)}function zC(e){if(e.length===1)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}function BC(e,t){let n=new Y(e),r=[],i=new Map,a,o=!1;for(;n.pos1||n!==t){s.push(new J().uint32(e.number*8+2).bytes(n).finish()),o=!0;continue}}s.push(e.raw)}return o?zC(s):e}var VC=class extends Error{constructor(e=`Unknown event type`){super(e),this.name=`AGUIUnknownEventTypeError`}};function HC(e,t,n,r){let i=0,a=0,o=0;for(;;){if(t.offset>=e.length||o>=n)return-1;let s=e[t.offset++];if(o+=1,o===n&&s>r)return-1;if(i+=(s&127)*2**a,a+=7,!(s&128))return i}}var UC=(e,t)=>HC(e,t,5,15),WC=(e,t)=>HC(e,t,10,1);function GC(e){let t={offset:0},n=[];for(;t.offsete.length)return!1;t.offset+=n}else return!1;if(t.offset>e.length)return!1}return n.length===0}function KC(e){let t={offset:0},n=[],r=0;for(;t.offsete.length)return!1;if(s){if(TC.has(a)||!GC(e.subarray(t.offset,t.offset+n)))return!1;r+=1}t.offset+=n}else return!1;if(t.offset>e.length)return!1}return n.length===0&&r>0}function qC(e){RC(e);let t=gC.decode(BC(e,{singular:TC,descend:FC})),n=Object.entries(t).filter(([,e])=>e!==void 0);if(n.length!==1)throw n.length===0&&KC(e)?new VC:Error(`Invalid event`);let r=n[0],i=wC[r[0]];if(i===void 0)throw Error(`Invalid event`);let a=r[1],o=bC(a.baseEvent);if(!o)throw Error(`Invalid event`);let s=aS[o.type];if(s!==i)throw Error(`Invalid event: envelope carries `+i+` but the base event declares `+String(s));if(a.type=i,a.timestamp=o.timestamp,a.rawEvent=o.rawEvent,o.metadata!==void 0&&(a.metadata=o.metadata),delete a.baseEvent,a.type===`MESSAGES_SNAPSHOT`&&Array.isArray(a.messages)&&(a.messages=a.messages.map(jC).filter(e=>e!==void 0)),a.type===`RUN_FINISHED`){let e=a,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,n={};n.pendingToolCallIds=e.pendingToolCallIds,delete e.pendingToolCallIds,n.interrupts=e.interrupts,delete e.interrupts,delete e.outcome,t===void 0&&(xC(n.pendingToolCallIds).length>0&&(e.pendingToolCallIds=n.pendingToolCallIds),xC(n.interrupts).length>0&&(e.interrupts=n.interrupts)),t===`success`&&(e.outcome={type:`success`,...xC(n.pendingToolCallIds).length>0?{pendingToolCallIds:n.pendingToolCallIds}:{},...xC(n.interrupts).length>0?{interrupts:n.interrupts}:{}}),t===`interrupt`&&(e.outcome={type:`interrupt`,interrupts:xC(n.interrupts),...xC(n.pendingToolCallIds).length>0?{pendingToolCallIds:n.pendingToolCallIds}:{}}),t===`cancelled`&&(e.outcome={type:`cancelled`,...xC(n.pendingToolCallIds).length>0?{pendingToolCallIds:n.pendingToolCallIds}:{},...xC(n.interrupts).length>0?{interrupts:n.interrupts}:{}}),t!==void 0&&![`success`,`interrupt`,`cancelled`].includes(t)&&(e.outcome={type:t,...xC(n.pendingToolCallIds).length>0?{pendingToolCallIds:n.pendingToolCallIds}:{},...xC(n.interrupts).length>0?{interrupts:n.interrupts}:{}})}if(a.type===`SUBAGENT_FINISHED`){let e=a,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,n={};n.interruptIds=e.interruptIds,delete e.interruptIds,delete e.outcome,t===void 0&&xC(n.interruptIds).length>0&&(e.interruptIds=n.interruptIds),t===`success`&&(e.outcome={type:`success`,...xC(n.interruptIds).length>0?{interruptIds:n.interruptIds}:{}}),t===`suspended`&&(e.outcome={type:`suspended`,...xC(n.interruptIds).length>0?{interruptIds:n.interruptIds}:{}}),t!==void 0&&![`success`,`suspended`].includes(t)&&(e.outcome={type:t,...xC(n.interruptIds).length>0?{interruptIds:n.interruptIds}:{}})}if(a.type===`STATE_DELTA`&&Array.isArray(a.delta)&&(a.delta=a.delta.map(e=>{let t=bx[e.op];return e.op=typeof t==`string`&&t!==`UNRECOGNIZED`?t.toLowerCase():String(e.op),Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e})),a.type===`ACTIVITY_DELTA`&&Array.isArray(a.patch)&&(a.patch=a.patch.map(e=>{let t=bx[e.op];return e.op=typeof t==`string`&&t!==`UNRECOGNIZED`?t.toLowerCase():String(e.op),Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e})),a.type===`RUN_FINISHED`&&Array.isArray(a.usage)&&a.usage.length===0&&delete a.usage,a.type===`RUN_ERROR`&&Array.isArray(a.usage)&&a.usage.length===0&&delete a.usage,a.type===`TOOL_CALL_RESULT`){let e=a;if(e.content!==void 0&&xC(e.contentParts).length>0)throw Error(`Invalid event: content carries both string content and content parts`);e.content===void 0&&(e.content=xC(e.contentParts).map(e=>{let t=DC(e);return t===void 0&&CC(),t}).filter(e=>e!==void 0)),delete e.contentParts}return a.type===`RUN_STARTED`&&a.input!==void 0&&(a.input=NC(a.input)),MC(a),a}var JC=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,YC=e=>{if(typeof e!=`string`)throw TypeError(`Invalid argument expected string`);let t=e.match(JC);if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},XC=e=>e===`*`||e===`x`||e===`X`,ZC=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},QC=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],$C=(e,t)=>{if(XC(e)||XC(t))return 0;let[n,r]=QC(ZC(e),ZC(t));return n>r?1:n{for(let n=0;n{let n=YC(e),r=YC(t),i=n.pop(),a=r.pop(),o=ew(n,r);return o===0?i&&a?ew(i.split(`.`),a.split(`.`)):i||a?i?-1:1:0:o},nw=e=>typeof e==`string`&&/^[v\d]/.test(e)&&JC.test(e);Object.freeze({status:`aborted`});function Q(e,t,n){function r(n,r){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r);for(let e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var rw=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},iw={};function aw(e){return e&&Object.assign(iw,e),iw}function ow(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function sw(e,t){return typeof t==`bigint`?t.toString():t}function cw(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function lw(e){return e==null}function uw(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function dw(e,t,n){Object.defineProperty(e,t,{get(){{let r=n();return e[t]=r,r}},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function fw(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function pw(e){return JSON.stringify(e)}var mw=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function hw(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var gw=cw(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function _w(e){if(hw(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return hw(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}var vw=new Set([`string`,`number`,`symbol`]);function yw(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function bw(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function xw(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Sw(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function Cw(e,t){let n={},r=e._zod.def;for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&(n[e]=r.shape[e])}return bw(e,{...e._zod.def,shape:n,checks:[]})}function ww(e,t){let n={...e._zod.def.shape},r=e._zod.def;for(let e in t){if(!(e in r.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return bw(e,{...e._zod.def,shape:n,checks:[]})}function Tw(e,t){if(!_w(t))throw Error(`Invalid input to extend: expected a plain object`);return bw(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return fw(this,`shape`,n),n},checks:[]})}function Ew(e,t){return bw(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return fw(this,`shape`,n),n},catchall:t._zod.def.catchall,checks:[]})}function Dw(e,t,n){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return bw(t,{...t._zod.def,shape:i,checks:[]})}function Ow(e,t,n){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return bw(t,{...t._zod.def,shape:i,checks:[]})}function kw(e,t=0){for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function jw(e){return typeof e==`string`?e:e?.message}function Mw(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=jw(e.inst?._zod.def?.error?.(e))??jw(t?.error?.(e))??jw(n.customError?.(e))??jw(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Nw(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Pw(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Fw=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,sw,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Iw=Q(`$ZodError`,Fw),Lw=Q(`$ZodError`,Fw,{Parent:Error});function Rw(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function zw(e,t){let n=t||function(e){return e.message},r={_errors:[]},i=e=>{for(let t of e.issues)if(t.code===`invalid_union`&&t.errors.length)t.errors.map(e=>i({issues:e}));else if(t.code===`invalid_key`)i({issues:t.issues});else if(t.code===`invalid_element`)i({issues:t.issues});else if(t.path.length===0)r._errors.push(n(t));else{let e=r,i=0;for(;i(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new rw;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Mw(e,a,aw())));throw mw(t,i?.callee),t}return o.value},Vw=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Mw(e,a,aw())));throw mw(t,i?.callee),t}return o.value},Hw=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new rw;return a.issues.length?{success:!1,error:new(e??Iw)(a.issues.map(e=>Mw(e,i,aw())))}:{success:!0,data:a.value}},Uw=Hw(Lw),Ww=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Mw(e,i,aw())))}:{success:!0,data:a.value}},Gw=Ww(Lw),Kw=Q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),qw=Q(`$ZodCheckMaxLength`,(e,t)=>{var n;Kw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!lw(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;if(r.length<=t.maximum)return;let i=Nw(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Jw=Q(`$ZodCheckMinLength`,(e,t)=>{var n;Kw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!lw(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Nw(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Yw=Q(`$ZodCheckLengthEquals`,(e,t)=>{var n;Kw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!lw(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Nw(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Xw=Q(`$ZodCheckOverwrite`,(e,t)=>{Kw.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Zw=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` +`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(` +`))}},Qw={major:4,minor:0,patch:0},$w=Q(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Qw;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=kw(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new rw;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=kw(e,t))});else{if(e.issues.length===t)continue;r||=kw(e,t)}}return i?i.then(()=>e):e};e._zod.run=(n,i)=>{let a=e._zod.parse(n,i);if(a instanceof Promise){if(i.async===!1)throw new rw;return a.then(e=>t(e,r,i))}return t(a,r,i)}}e[`~standard`]={validate:t=>{try{let n=Uw(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Gw(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}}),eT=Q(`$ZodUnknown`,(e,t)=>{$w.init(e,t),e._zod.parse=e=>e}),tT=Q(`$ZodNever`,(e,t)=>{$w.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function nT(e,t,n){e.issues.length&&t.issues.push(...Aw(n,e.issues)),t.value[n]=e.value}var rT=Q(`$ZodArray`,(e,t)=>{$w.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;enT(t,n,e))):nT(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function iT(e,t,n){e.issues.length&&t.issues.push(...Aw(n,e.issues)),t.value[n]=e.value}function aT(e,t,n,r){e.issues.length?r[n]===void 0?n in r?t.value[n]=void 0:t.value[n]=e.value:t.issues.push(...Aw(n,e.issues)):e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}var oT=Q(`$ZodObject`,(e,t)=>{$w.init(e,t);let n=cw(()=>{let e=Object.keys(t.shape);for(let n of e)if(!(t.shape[n]instanceof $w))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Sw(t.shape);return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}});dw(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=e=>{let t=new Zw([`shape`,`payload`,`ctx`]),r=n.value,i=e=>{let t=pw(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of r.keys)a[e]=`key_${o++}`;t.write(`const newResult = {}`);for(let e of r.keys)if(r.optionalKeys.has(e)){let n=a[e];t.write(`const ${n} = ${i(e)};`);let r=pw(e);t.write(` + if (${n}.issues.length) { + if (input[${r}] === undefined) { + if (${r} in input) { + newResult[${r}] = undefined; + } + } else { + payload.issues = payload.issues.concat( + ${n}.issues.map((iss) => ({ + ...iss, + path: iss.path ? [${r}, ...iss.path] : [${r}], + })) + ); + } + } else if (${n}.value === undefined) { + if (${r} in input) newResult[${r}] = undefined; + } else { + newResult[${r}] = ${n}.value; + } + `)}else{let n=a[e];t.write(`const ${n} = ${i(e)};`),t.write(` + if (${n}.issues.length) payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${pw(e)}, ...iss.path] : [${pw(e)}] + })));`),t.write(`newResult[${pw(e)}] = ${n}.value`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},i,a=hw,o=!iw.jitless,s=o&&gw.value,c=t.catchall,l;e._zod.parse=(u,d)=>{l??=n.value;let f=u.value;if(!a(f))return u.issues.push({expected:`object`,code:`invalid_type`,input:f,inst:e}),u;let p=[];if(o&&s&&d?.async===!1&&d.jitless!==!0)i||=r(t.shape),u=i(u,d);else{u.value={};let e=l.shape;for(let t of l.keys){let n=e[t],r=n._zod.run({value:f[t],issues:[]},d),i=n._zod.optin===`optional`&&n._zod.optout===`optional`;r instanceof Promise?p.push(r.then(e=>i?aT(e,u,t,f):iT(e,u,t))):i?aT(r,u,t,f):iT(r,u,t)}}if(!c)return p.length?Promise.all(p).then(()=>u):u;let m=[],h=l.keySet,g=c._zod,_=g.def.type;for(let e of Object.keys(f)){if(h.has(e))continue;if(_===`never`){m.push(e);continue}let t=g.run({value:f[e],issues:[]},d);t instanceof Promise?p.push(t.then(t=>iT(t,u,e))):iT(t,u,e)}return m.length&&u.issues.push({code:`unrecognized_keys`,keys:m,input:f,inst:e}),p.length?Promise.all(p).then(()=>u):u}});function sT(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Mw(e,r,aw())))}),t}var cT=Q(`$ZodUnion`,(e,t)=>{$w.init(e,t),dw(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),dw(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),dw(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),dw(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>uw(e.source)).join(`|`)})$`)}}),e._zod.parse=(n,r)=>{let i=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)a.push(t),i=!0;else{if(t.issues.length===0)return t;a.push(t)}}return i?Promise.all(a).then(t=>sT(t,n,e,r)):sT(a,n,e,r)}}),lT=Q(`$ZodIntersection`,(e,t)=>{$w.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>dT(e,t,n)):dT(e,i,a)}});function uT(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(_w(e)&&_w(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=uT(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{$w.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!_w(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[];if(t.keyType._zod.values){let o=t.keyType._zod.values;n.value={};for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...Aw(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...Aw(e,o.issues)),n.value[e]=o.value)}let s;for(let e in i)o.has(e)||(s??=[],s.push(e));s&&s.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:s})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){n.issues.push({origin:`record`,code:`invalid_key`,issues:s.issues.map(e=>Mw(e,r,aw())),input:o,path:[o],inst:e}),n.value[s.value]=s.value;continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Aw(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Aw(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),pT=Q(`$ZodEnum`,(e,t)=>{$w.init(e,t);let n=ow(t.entries);e._zod.values=new Set(n),e._zod.pattern=RegExp(`^(${n.filter(e=>vw.has(typeof e)).map(e=>typeof e==`string`?yw(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,r)=>{let i=t.value;return e._zod.values.has(i)||t.issues.push({code:`invalid_value`,values:n,input:i,inst:e}),t}}),mT=Q(`$ZodLiteral`,(e,t)=>{$w.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?yw(e):e?e.toString():String(e)).join(`|`)})$`),e._zod.parse=(n,r)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:`invalid_value`,values:t.values,input:i,inst:e}),n}}),hT=Q(`$ZodTransform`,(e,t)=>{$w.init(e,t),e._zod.parse=(e,n)=>{let r=t.transform(e.value,e);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then(t=>(e.value=t,e));if(r instanceof Promise)throw new rw;return e.value=r,e}}),gT=Q(`$ZodOptional`,(e,t)=>{$w.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,dw(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),dw(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${uw(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>t.innerType._zod.optin===`optional`?t.innerType._zod.run(e,n):e.value===void 0?e:t.innerType._zod.run(e,n)}),_T=Q(`$ZodNullable`,(e,t)=>{$w.init(e,t),dw(e._zod,`optin`,()=>t.innerType._zod.optin),dw(e._zod,`optout`,()=>t.innerType._zod.optout),dw(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${uw(e.source)}|null)$`):void 0}),dw(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),vT=Q(`$ZodDefault`,(e,t)=>{$w.init(e,t),e._zod.optin=`optional`,dw(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>yT(e,t)):yT(r,t)}});function yT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var bT=Q(`$ZodPrefault`,(e,t)=>{$w.init(e,t),e._zod.optin=`optional`,dw(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),xT=Q(`$ZodNonOptional`,(e,t)=>{$w.init(e,t),dw(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>ST(t,e)):ST(i,e)}});function ST(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var CT=Q(`$ZodCatch`,(e,t)=>{$w.init(e,t),e._zod.optin=`optional`,dw(e._zod,`optout`,()=>t.innerType._zod.optout),dw(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Mw(e,n,aw()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Mw(e,n,aw()))},input:e.value}),e.issues=[]),e)}}),wT=Q(`$ZodPipe`,(e,t)=>{$w.init(e,t),dw(e._zod,`values`,()=>t.in._zod.values),dw(e._zod,`optin`,()=>t.in._zod.optin),dw(e._zod,`optout`,()=>t.out._zod.optout),e._zod.parse=(e,n)=>{let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>TT(e,t,n)):TT(r,t,n)}});function TT(e,t,n){return kw(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}var ET=Q(`$ZodReadonly`,(e,t)=>{$w.init(e,t),dw(e._zod,`propValues`,()=>t.innerType._zod.propValues),dw(e._zod,`values`,()=>t.innerType._zod.values),dw(e._zod,`optin`,()=>t.innerType._zod.optin),dw(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(DT):DT(r)}});function DT(e){return e.value=Object.freeze(e.value),e}var OT=Q(`$ZodLazy`,(e,t)=>{$w.init(e,t),dw(e._zod,`innerType`,()=>t.getter()),dw(e._zod,`pattern`,()=>e._zod.innerType._zod.pattern),dw(e._zod,`propValues`,()=>e._zod.innerType._zod.propValues),dw(e._zod,`optin`,()=>e._zod.innerType._zod.optin),dw(e._zod,`optout`,()=>e._zod.innerType._zod.optout),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),kT=Q(`$ZodCustom`,(e,t)=>{Kw.init(e,t),$w.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>AT(t,n,r,e));AT(i,n,r,e)}});function AT(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Pw(e))}}var jT=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function MT(){return new jT}var NT=MT();function PT(e){return new e({type:`unknown`})}function FT(e,t){return new e({type:`never`,...xw(t)})}function IT(e,t){return new qw({check:`max_length`,...xw(t),maximum:e})}function LT(e,t){return new Jw({check:`min_length`,...xw(t),minimum:e})}function RT(e,t){return new Yw({check:`length_equals`,...xw(t),length:e})}function zT(e){return new Xw({check:`overwrite`,tx:e})}function BT(e,t,n){return new e({type:`array`,element:t,...xw(n)})}function VT(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...xw(n)})}var HT=(e,t)=>{Iw.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>zw(e,t)},flatten:{value:t=>Rw(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return e.issues.length===0}}})};Q(`ZodError`,HT);var UT=Q(`ZodError`,HT,{Parent:Error}),WT=Bw(UT),GT=Vw(UT),KT=Hw(UT),qT=Ww(UT),JT=Q(`ZodType`,(e,t)=>($w.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),e.clone=(t,n)=>bw(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>WT(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>KT(e,t,n),e.parseAsync=async(t,n)=>GT(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>qT(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(jE(t,n)),e.superRefine=t=>e.check(ME(t)),e.overwrite=t=>e.check(zT(t)),e.optional=()=>pE(e),e.nullable=()=>hE(e),e.nullish=()=>pE(hE(e)),e.nonoptional=t=>xE(e,t),e.array=()=>eE(e),e.or=t=>rE([e,t]),e.and=t=>aE(e,t),e.transform=t=>TE(e,dE(t)),e.default=t=>_E(e,t),e.prefault=t=>yE(e,t),e.catch=t=>CE(e,t),e.pipe=t=>TE(e,t),e.readonly=()=>DE(e),e.describe=t=>{let n=e.clone();return NT.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return NT.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return NT.get(e);let n=e.clone();return NT.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),YT=Q(`ZodUnknown`,(e,t)=>{eT.init(e,t),JT.init(e,t)});function XT(){return PT(YT)}var ZT=Q(`ZodNever`,(e,t)=>{tT.init(e,t),JT.init(e,t)});function QT(e){return FT(ZT,e)}var $T=Q(`ZodArray`,(e,t)=>{rT.init(e,t),JT.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(LT(t,n)),e.nonempty=t=>e.check(LT(1,t)),e.max=(t,n)=>e.check(IT(t,n)),e.length=(t,n)=>e.check(RT(t,n)),e.unwrap=()=>e.element});function eE(e,t){return BT($T,e,t)}var tE=Q(`ZodObject`,(e,t)=>{oT.init(e,t),JT.init(e,t),dw(e,`shape`,()=>t.shape),e.keyof=()=>cE(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:XT()}),e.loose=()=>e.clone({...e._zod.def,catchall:XT()}),e.strict=()=>e.clone({...e._zod.def,catchall:QT()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Tw(e,t),e.merge=t=>Ew(e,t),e.pick=t=>Cw(e,t),e.omit=t=>ww(e,t),e.partial=(...t)=>Dw(fE,e,t[0]),e.required=(...t)=>Ow(bE,e,t[0])}),nE=Q(`ZodUnion`,(e,t)=>{cT.init(e,t),JT.init(e,t),e.options=t.options});function rE(e,t){return new nE({type:`union`,options:e,...xw(t)})}var iE=Q(`ZodIntersection`,(e,t)=>{lT.init(e,t),JT.init(e,t)});function aE(e,t){return new iE({type:`intersection`,left:e,right:t})}var oE=Q(`ZodRecord`,(e,t)=>{fT.init(e,t),JT.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),sE=Q(`ZodEnum`,(e,t)=>{pT.init(e,t),JT.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new sE({...t,checks:[],...xw(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new sE({...t,checks:[],...xw(r),entries:i})}});function cE(e,t){return new sE({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...xw(t)})}var lE=Q(`ZodLiteral`,(e,t)=>{mT.init(e,t),JT.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),uE=Q(`ZodTransform`,(e,t)=>{hT.init(e,t),JT.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Pw(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,t.continue??=!0,n.issues.push(Pw(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function dE(e){return new uE({type:`transform`,transform:e})}var fE=Q(`ZodOptional`,(e,t)=>{gT.init(e,t),JT.init(e,t),e.unwrap=()=>e._zod.def.innerType});function pE(e){return new fE({type:`optional`,innerType:e})}var mE=Q(`ZodNullable`,(e,t)=>{_T.init(e,t),JT.init(e,t),e.unwrap=()=>e._zod.def.innerType});function hE(e){return new mE({type:`nullable`,innerType:e})}var gE=Q(`ZodDefault`,(e,t)=>{vT.init(e,t),JT.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _E(e,t){return new gE({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}var vE=Q(`ZodPrefault`,(e,t)=>{bT.init(e,t),JT.init(e,t),e.unwrap=()=>e._zod.def.innerType});function yE(e,t){return new vE({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}var bE=Q(`ZodNonOptional`,(e,t)=>{xT.init(e,t),JT.init(e,t),e.unwrap=()=>e._zod.def.innerType});function xE(e,t){return new bE({type:`nonoptional`,innerType:e,...xw(t)})}var SE=Q(`ZodCatch`,(e,t)=>{CT.init(e,t),JT.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function CE(e,t){return new SE({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var wE=Q(`ZodPipe`,(e,t)=>{wT.init(e,t),JT.init(e,t),e.in=t.in,e.out=t.out});function TE(e,t){return new wE({type:`pipe`,in:e,out:t})}var EE=Q(`ZodReadonly`,(e,t)=>{ET.init(e,t),JT.init(e,t)});function DE(e){return new EE({type:`readonly`,innerType:e})}var OE=Q(`ZodLazy`,(e,t)=>{OT.init(e,t),JT.init(e,t),e.unwrap=()=>e._zod.def.getter()}),kE=Q(`ZodCustom`,(e,t)=>{kT.init(e,t),JT.init(e,t)});function AE(e){let t=new Kw({check:`custom`});return t._zod.check=e,t}function jE(e,t={}){return VT(kE,e,t)}function ME(e){let t=AE(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Pw(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Pw(r))}},e(n.value,n)));return t}var NE=`@ag-ui/client`;function PE(e){if(!e.metadata||!Object.prototype.hasOwnProperty.call(e.metadata,NE))return;let t=e.metadata?.[NE];if(!t||typeof t!=`object`||Array.isArray(t))return[];if(!Object.prototype.hasOwnProperty.call(t,`authoritativeActivityTypes`))return;let n=t.authoritativeActivityTypes;return n===null?null:Array.isArray(n)&&n.every(e=>typeof e==`string`)?n:[]}var $=e=>{if(typeof structuredClone==`function`)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function FE(){return ms()}function IE(e){return e instanceof TypeError&&/read[- ]?only|not extensible|cannot add property|cannot delete property|can't be deleted|unable to delete property|object is frozen|is not writable/i.test(e.message)}function LE(e){if(Object.freeze(e),typeof e==`object`&&e)for(let t of Object.values(e))typeof t==`object`&&t&&!Object.isFrozen(t)&&LE(t);return e}var RE=524288;function zE(e,t,n){let r=0,i=[e,t],a=new WeakSet;for(;i.length>0;){let e=i.pop();if(typeof e==`string`){if(r+=e.length,r>n)return!0}else if(typeof e==`object`&&e){if(a.has(e))continue;if(a.add(e),Array.isArray(e))for(let t=0;tn)return!0;i.push(e[o])}}}}return!1}async function BE(e,t,n,r){let i=typeof process<`u`&&!0,a=i&&!!{}.VITEST_WORKER_ID,o=i&&!!{}.VITEST_WORKER_ID,s=o&&!zE(t,n,RE),c=s?$(t):t,l=s?$(n):n,u=!1,d=!1,f;for(let t of e)try{s&&(LE(c),LE(l));let e=await r(t,c,l);if(e===void 0)continue;let n=!1;if(e.messages!==void 0&&e.messages!==c&&(c=$(e.messages),u=!0,n=!0),e.state!==void 0&&e.state!==l&&(l=$(e.state),d=!0,n=!0),s&&n&&zE(c,l,RE)&&(s=!1),f=e.stopPropagation,f===!0)break}catch(e){if(a&&e instanceof TypeError)throw e;s&&o&&IE(e)?console.error(`AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.`,e):console.error(`Subscriber error:`,e);continue}return{...u?{messages:Object.isFrozen(c)?$(c):c}:{},...d?{state:Object.isFrozen(l)?$(l):l}:{},...f===void 0?{}:{stopPropagation:f}}}function VE(e){if(!e)return{enabled:!1,events:!1,lifecycle:!1,verbose:!1};if(e===!0)return{enabled:!0,events:!0,lifecycle:!0,verbose:!0};let t=e.events??!0,n=e.lifecycle??!0,r=e.verbose??!1;return{enabled:t||n,events:t,lifecycle:n,verbose:r}}function HE(e){if(e instanceof UE)return e;if(e===!0)return new UE(VE(!0))}var UE=class{constructor(e){this.config=e}event(e,t,n,r){this.config.events&&(this.config.verbose?console.debug(`[${e}] ${t}`,typeof n==`string`?n:JSON.stringify(n)):console.debug(`[${e}] ${t}`,r??n))}lifecycle(e,t,n){this.config.lifecycle&&(n?console.debug(`[${e}] ${t}`,n):console.debug(`[${e}] ${t}`))}get eventsEnabled(){return this.config.events}get lifecycleEnabled(){return this.config.lifecycle}get enabled(){return this.config.enabled}};function WE(e){return e.enabled?new UE(e):void 0}function GE(e,t,n){if(t){let r=e.find(e=>e.id===t);if(r?.role===`assistant`)return r;r&&console.warn(`TOOL_CALL_START: parentMessageId '${t}' matches a '${r.role}' message, not assistant — falling back to toolCallId`);let i={id:r?n:t,role:`assistant`,toolCalls:[]};return e.push(i),i}let r={id:n,role:`assistant`,toolCalls:[]};return e.push(r),r}function KE(e,t){return!e||t.metadata===void 0?!1:(e.metadata=bs(e.metadata,$(t.metadata)),!0)}var qE=(e,t,n,r,i)=>{let a=HE(i),o=$(n.messages),s=$(e.state),c={},l=[],u=new Set,d=e=>{let t=e.outcome?.type===`success`?e.outcome.pendingToolCallIds:void 0;return t!==void 0&&t.length>0?[...t]:l.filter(e=>!u.has(e))},f=e=>{e.messages!==void 0&&(o=e.messages,c.messages=e.messages),e.state!==void 0&&(s=e.state,c.state=e.state)},p=()=>{let e=$(c);return c={},e.messages!==void 0||e.state!==void 0?M(e):ol};return t.pipe(Jl(async t=>{let i=await BE(r,o,s,(r,i,a)=>r.onEvent?.({event:t,agent:n,input:e,messages:i,state:a}));if(f(i),i.stopPropagation===!0?a?.event(`APPLY`,`Event dropped:`,t,{type:t.type,reason:`stopPropagation by subscriber`}):a?.event(`APPLY`,`Event applied:`,t,{type:t.type,subscribers:r.length}),i.stopPropagation===!0)return p();switch(t.type){case A.TEXT_MESSAGE_START:{let i=await BE(r,o,s,(r,i,a)=>r.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{messageId:e,role:n=`assistant`,name:r,subagentRunId:i}=t,a=o.find(t=>t.id===e);if(a?.role===`activity`)return console.warn(`TEXT_MESSAGE_START: Message '${e}' is an activity message — message ids must be unique across activity and text messages`),p();let s=a;if(!s){let t={id:e,role:n,content:``,...r!==void 0&&{name:r},...i!=null&&{subagentRunId:i}};o.push(t),s=t}let c=KE(s,t);(!a||c)&&f({messages:o})}return p()}case A.TEXT_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${i}'`),p();if(c.role===`activity`)return console.warn(`TEXT_MESSAGE_CONTENT: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),p();let l=await BE(r,o,s,(r,i,a)=>r.onTextMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,textMessageBuffer:typeof c.content==`string`?c.content:``}));return f(l),l.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,KE(c,t),f({messages:o})),p()}case A.TEXT_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),p();if(a.role===`activity`)return console.warn(`TEXT_MESSAGE_END: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),p();let c=await BE(r,o,s,(r,i,o)=>r.onTextMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,textMessageBuffer:typeof a.content==`string`?a.content:``}));return f(c),c.stopPropagation!==!0&&KE(a,t)&&f({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),p()}case A.TOOL_CALL_START:{let i=await BE(r,o,s,(r,i,a)=>r.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{toolCallId:e,toolCallName:n,parentMessageId:r,subagentRunId:i}=t;l.includes(e)||l.push(e);let a=o.find(t=>t.toolCalls?.some(t=>t.id===e))?.toolCalls?.find(t=>t.id===e);if(a){let r=a.function.name!==n;return r&&(console.warn(`TOOL_CALL_START: tool call '${e}' already exists with name '${a.function.name}' — updating it to '${n}'`),a.function.name=n),(KE(a,t)||r)&&f({messages:o}),p()}let s=new Set(o.map(e=>e.id)),c=GE(o,r,e);!s.has(c.id)&&i!=null&&c.subagentRunId===void 0&&(c.subagentRunId=i),c.toolCalls??=[];let u={id:e,type:`function`,function:{name:n,arguments:``}};c.toolCalls.push(u),KE(u,t),f({messages:o})}return p()}case A.TOOL_CALL_ARGS:{let{toolCallId:i,delta:a}=t,c=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!c)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${i}'`),p();let l=c.toolCalls?.find(e=>e.id===i);if(!l)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),p();let u=await BE(r,o,s,(r,i,a)=>{let o=l.function.arguments,s=l.function.name,c={};try{c=tu(o)}catch{}return r.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallBuffer:o,toolCallName:s,partialToolCallArgs:c})});return f(u),u.stopPropagation!==!0&&(l.function.arguments+=a,KE(l,t),f({messages:o})),p()}case A.TOOL_CALL_END:{let{toolCallId:i}=t,a=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!a)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${i}'`),p();let c=a.toolCalls?.find(e=>e.id===i);if(!c)return console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),p();let l=await BE(r,o,s,(r,i,a)=>{let o=c.function.arguments,s=c.function.name,l={};try{l=JSON.parse(o)}catch{}return r.onToolCallEndEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallName:s,toolCallArgs:l})});return f(l),l.stopPropagation!==!0&&KE(c,t)&&f({messages:o}),await Promise.all(r.map(t=>{t.onNewToolCall?.({toolCall:c,messages:o,state:s,agent:n,input:e})})),p()}case A.TOOL_CALL_RESULT:{let i=await BE(r,o,s,(r,i,a)=>r.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{messageId:i,toolCallId:a,content:c,role:l,subagentRunId:d}=t;u.add(a);let p={id:i,toolCallId:a,role:l||`tool`,content:c,...d!=null&&{subagentRunId:d}};KE(p,t);let m=o.findIndex(e=>e.role===`assistant`&&e.toolCalls?.some(e=>e.id===a));if(m===-1)o.push(p);else{let e=m+1;for(;e{t.onNewMessage?.({message:p,messages:o,state:s,agent:n,input:e})})),f({messages:o})}return p()}case A.STATE_SNAPSHOT:{let i=await BE(r,o,s,(r,i,a)=>r.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{snapshot:e}=t;s=e,f({state:s})}return p()}case A.STATE_DELTA:{let i=await BE(r,o,s,(r,i,a)=>r.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{delta:e}=t;try{s=ic.applyPatch(s,e,!0,!1).newDocument,f({state:s})}catch(t){let n=t instanceof Error?t.message:String(t);console.warn(`Failed to apply state patch:\nCurrent state: ${JSON.stringify(s,null,2)}\nPatch operations: ${JSON.stringify(e,null,2)}\nError: ${n}`)}}return p()}case A.MESSAGES_SNAPSHOT:{let i=await BE(r,o,s,(r,i,a)=>r.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{messages:e}=t,n=e.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}),r=new Map(n.map(e=>[e.id,e])),i=PE(t),a=n.some(e=>e.role===`activity`),s=n.some(e=>e.role===`reasoning`),c=e=>e.role===`activity`&&(i?!i.includes(e.activityType):i!==null&&!a)||e.role===`reasoning`&&!s;o=o.filter(e=>r.has(e.id)||c(e)).map(e=>r.get(e.id)??e);let l=new Set(o.map(e=>e.id));for(let e of n)l.has(e.id)||o.push(e);f({messages:o})}return p()}case A.ACTIVITY_SNAPSHOT:{let i=t,a=o.findIndex(e=>e.id===i.messageId),c=a>=0?o[a]:void 0,l=c?.role===`activity`?c:void 0,u=i.replace??!0,d=await BE(r,o,s,(t,r,a)=>t.onActivitySnapshotEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:l,existingMessage:c}));if(f(d),d.stopPropagation!==!0){let t={id:i.messageId,role:`activity`,activityType:i.activityType,content:$(i.content),...i.subagentRunId!=null&&{subagentRunId:i.subagentRunId}},c,d;a===-1?(o.push(t),c=t,d=t):l?(u&&(o[a]={...l,activityType:i.activityType,content:$(i.content),subagentRunId:i.subagentRunId},i.subagentRunId??delete o[a].subagentRunId),d=o[a]):u&&(o[a]=t,c=t,d=t),KE(d,i),f({messages:o}),c&&await Promise.all(r.map(t=>t.onNewMessage?.({message:c,messages:o,state:s,agent:n,input:e})))}return p()}case A.ACTIVITY_DELTA:{let i=t,a=o.findIndex(e=>e.id===i.messageId);if(a===-1)return p();let c=o[a];if(c.role!==`activity`)return console.warn(`ACTIVITY_DELTA: Message '${i.messageId}' is not an activity message`),p();let l=c,u=await BE(r,o,s,(t,r,a)=>t.onActivityDeltaEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:l}));if(f(u),u.stopPropagation!==!0)try{KE(l,i)&&f({messages:o});let e=$(l.content??{}),t=ic.applyPatch(e,i.patch??[],!0,!1).newDocument;o[a]={...l,content:$(t),activityType:i.activityType},f({messages:o})}catch(e){let t=e instanceof Error?e.message:String(e);console.warn(`Failed to apply activity patch for '${i.messageId}': ${t}`)}return p()}case A.RAW:return f(await BE(r,o,s,(r,i,a)=>r.onRawEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case A.CUSTOM:return f(await BE(r,o,s,(r,i,a)=>r.onCustomEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case A.RUN_STARTED:{let i=await BE(r,o,s,(r,i,a)=>r.onRunStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),l=[],u=new Set,i.stopPropagation!==!0){let e=t;if(e.input?.messages){for(let t of e.input.messages){let e=t;if(t.subagentRunId===null){let n={...t};delete n.subagentRunId,e=n}o.find(t=>t.id===e.id)||o.push(e)}f({messages:o})}}return p()}case A.RUN_FINISHED:{let i=t,a=i.outcome?.type===`interrupt`?{event:i,outcome:`interrupt`,interrupts:i.outcome.interrupts}:i.outcome?.type===`cancelled`?{event:i,outcome:`cancelled`}:{event:i,outcome:`success`,result:i.result,pendingToolCallIds:d(i)},c=await BE(r,o,s,(t,r,i)=>t.onRunFinishedEvent?.({...a,messages:r,state:i,agent:n,input:e}));return f(c),c.stopPropagation!==!0&&(n.pendingInterrupts=a.outcome===`interrupt`?a.interrupts.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}):[]),p()}case A.RUN_ERROR:return f(await BE(r,o,s,(r,i,a)=>r.onRunErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case A.STEP_STARTED:return f(await BE(r,o,s,(r,i,a)=>r.onStepStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case A.STEP_FINISHED:return f(await BE(r,o,s,(r,i,a)=>r.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case A.TEXT_MESSAGE_CHUNK:throw Error(`TEXT_MESSAGE_CHUNK must be transformed before being applied`);case A.TOOL_CALL_CHUNK:throw Error(`TOOL_CALL_CHUNK must be transformed before being applied`);case A.REASONING_START:return f(await BE(r,o,s,(r,i,a)=>r.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case A.REASONING_MESSAGE_START:{let i=await BE(r,o,s,(r,i,a)=>r.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{messageId:e,subagentRunId:n}=t,r=o.find(t=>t.id===e);if(r?.role===`activity`)return console.warn(`REASONING_MESSAGE_START: Message '${e}' is an activity message — message ids must be unique across activity and reasoning messages`),p();let i=r;if(!i){let t={id:e,role:`reasoning`,content:``,...n!=null&&{subagentRunId:n}};o.push(t),i=t}let a=KE(i,t);(!r||a)&&f({messages:o})}return p()}case A.REASONING_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`REASONING_MESSAGE_CONTENT: No message found with ID '${i}'`),p();if(c.role===`activity`)return console.warn(`REASONING_MESSAGE_CONTENT: Message '${i}' is an activity message — message ids must be unique across activity and reasoning messages`),p();let l=await BE(r,o,s,(r,i,a)=>r.onReasoningMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,reasoningMessageBuffer:typeof c.content==`string`?c.content:``}));return f(l),l.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,KE(c,t),f({messages:o})),p()}case A.REASONING_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),p();if(a.role===`activity`)return console.warn(`REASONING_MESSAGE_END: Message '${i}' is an activity message — message ids must be unique across activity and reasoning messages`),p();let c=await BE(r,o,s,(r,i,o)=>r.onReasoningMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,reasoningMessageBuffer:typeof a.content==`string`?a.content:``}));return f(c),c.stopPropagation!==!0&&KE(a,t)&&f({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),p()}case A.REASONING_MESSAGE_CHUNK:throw Error(`REASONING_MESSAGE_CHUNK must be transformed before being applied`);case A.REASONING_END:return f(await BE(r,o,s,(r,i,a)=>r.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case A.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:l}=t,u=await BE(r,o,s,(r,i,a)=>r.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(u),u.stopPropagation!==!0){let e=!1;if(i===`tool-call`){for(let t of o)if(t.role===`assistant`&&t.toolCalls){let n=t.toolCalls.find(e=>e.id===a);if(n){n.encryptedValue=l,e=!0;break}}}else{let t=o.find(e=>e.id===a);t?.role!==`activity`&&t&&(t.encryptedValue=l,e=!0)}e&&(c.messages=o)}return p()}case A.SUBAGENT_STARTED:return f(await BE(r,o,s,(r,i,a)=>r.onSubagentStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case A.SUBAGENT_FINISHED:return f(await BE(r,o,s,(r,i,a)=>r.onSubagentFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case A.SUBAGENT_ERROR:return f(await BE(r,o,s,(r,i,a)=>r.onSubagentErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p()}return t.type,p()}),Wl(),r.length>0?Yl({}):e=>e)},JE=e=>t=>{let n=HE(e),r=new Set,i=new Set,a=new Set,o=new Set,s={message:new Map,toolCall:new Map,activity:new Map,reasoning:new Map},c=!1,l=!1,u=!1,d=new Map,f=e=>{let t=d.get(e);return t||(t=new Map,d.set(e,t)),t},p=()=>{for(let e of d.values())if(e.size>0)return!0;return!1},m=new Map,h=new Set,g=!1,_=()=>{r.clear(),i.clear(),a.clear(),o.clear(),s.message.clear(),s.toolCall.clear(),s.activity.clear(),s.reasoning.clear(),d.clear(),m.clear(),h.clear(),c=!1,l=!1,g=!0},v=(e,t)=>{let n=e??[];if(Array.isArray(n))for(let e of n){if(!e||typeof e.id!=`string`)continue;if(e.subagentRunId===null)return new j(`Cannot send a message (id '${e.id}') with 'subagentRunId: null'. The field is optional — omit it entirely.`);let n=e.role===`reasoning`?s.reasoning:e.role===`activity`?s.activity:s.message;(t||!n.has(e.id))&&n.set(e.id,{subagentRunId:e.subagentRunId});for(let n of e.toolCalls??[])n&&typeof n.id==`string`&&(t||!s.toolCall.has(n.id))&&s.toolCall.set(n.id,{subagentRunId:e.subagentRunId??void 0})}},y=(e,t,n,r,i)=>{if(t!==void 0&&n&&n.subagentRunId!==t)return new j(`Cannot send '${e}': subagentRunId '${t}' does not match the ${r} '${i}' opener's subagent '${n.subagentRunId??`(the parent agent)`}'.`)};return t.pipe(Ul(e=>{let t=e.type;if(n?.event(`VERIFY`,`Event:`,e,{type:e.type}),l&&t!==A.RUN_STARTED)return N(()=>new j(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(c&&t!==A.RUN_ERROR&&t!==A.RUN_STARTED)return N(()=>new j(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(!u){if(u=!0,t!==A.RUN_STARTED&&t!==A.RUN_ERROR)return N(()=>new j(`First event must be 'RUN_STARTED'`))}else if(t===A.RUN_STARTED){if(g&&!c&&!l)return N(()=>new j(`Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run.`));(c||l)&&_()}if(e.subagentRunId===null)return N(()=>new j(`Cannot send '${t}' with 'subagentRunId: null'. The field is optional — omit it entirely.`));if(t===A.SUBAGENT_STARTED||t===A.SUBAGENT_FINISHED||t===A.SUBAGENT_ERROR){let n=t===A.SUBAGENT_STARTED?[`description`,`parentSubagentRunId`,`parentToolCallId`,`parentMessageId`]:t===A.SUBAGENT_FINISHED?[`outcome`]:[`code`];for(let r of n)if(e[r]===null)return N(()=>new j(`Cannot send '${t}' with '${r}: null'. The field is optional — omit it entirely.`));let r=e.outcome;if(r!=null&&r.type!==`success`&&r.type!==`suspended`)return N(()=>new j(`Cannot send '${t}' with outcome type '${String(r.type)}'. The outcome is either { type: "success" } or { type: "suspended" }.`));if(r&&r.interruptIds===null)return N(()=>new j(`Cannot send '${t}' with 'outcome.interruptIds: null'. The field is optional — omit it entirely.`));if(r&&Array.isArray(r.interruptIds)&&r.interruptIds.some(e=>typeof e!=`string`))return N(()=>new j(`Cannot send '${t}' with a non-string entry in 'outcome.interruptIds'. Interrupt ids are strings.`))}if(t===A.RUN_FINISHED){let t=e.outcome;if(t?.type===`interrupt`&&Array.isArray(t.interrupts)){for(let e of t.interrupts)if(e&&e.subagentRunId===null)return N(()=>new j(`Cannot send 'RUN_FINISHED' with an interrupt (id '${e.id}') carrying 'subagentRunId: null'. The field is optional — omit it entirely.`))}}switch(t){case A.TEXT_MESSAGE_START:{let n=e.messageId;if(r.has(n))return N(()=>new j(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${n}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`));let i=s.message.get(n);if(i){let r=y(t,e.subagentRunId,i,`message`,n);if(r)return N(()=>r)}return r.add(n),i||s.message.set(n,{subagentRunId:e.subagentRunId}),M(e)}case A.TEXT_MESSAGE_CONTENT:{let n=e.messageId;if(!r.has(n))return N(()=>new j(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${n}'. Start a text message with 'TEXT_MESSAGE_START' first.`));let i=y(t,e.subagentRunId,s.message.get(n),`message`,n);return i?N(()=>i):M(e)}case A.TEXT_MESSAGE_END:{let n=e.messageId;if(!r.has(n))return N(()=>new j(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${n}'. A 'TEXT_MESSAGE_START' event must be sent first.`));let i=y(t,e.subagentRunId,s.message.get(n),`message`,n);return i?N(()=>i):(r.delete(n),M(e))}case A.TOOL_CALL_START:{let n=e.toolCallId;if(i.has(n))return N(()=>new j(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${n}' is already in progress. Complete it with 'TOOL_CALL_END' first.`));let r=e.parentMessageId,a=e.subagentRunId,o;if(r!==void 0){let e=s.message.get(r);if(e){if(a!==void 0&&a!==e.subagentRunId)return N(()=>new j(`Cannot send 'TOOL_CALL_START': subagentRunId '${a}' does not match its parent message '${r}' owner '${e.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`));o=e}}let c=s.toolCall.get(n);if(c){let e=y(t,a,c,`tool call`,n);if(e)return N(()=>e);if(a===void 0&&o&&o.subagentRunId!==c.subagentRunId)return N(()=>new j(`Cannot send 'TOOL_CALL_START': tool call '${n}' is owned by '${c.subagentRunId??`(the parent agent)`}' but its parent message '${r}' is owned by '${o.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`))}return i.add(n),c||s.toolCall.set(n,a===void 0?o??{subagentRunId:void 0}:{subagentRunId:a}),M(e)}case A.TOOL_CALL_ARGS:{let n=e.toolCallId;if(!i.has(n))return N(()=>new j(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${n}'. Start a tool call with 'TOOL_CALL_START' first.`));let r=y(t,e.subagentRunId,s.toolCall.get(n),`tool call`,n);return r?N(()=>r):M(e)}case A.TOOL_CALL_END:{let n=e.toolCallId;if(!i.has(n))return N(()=>new j(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${n}'. A 'TOOL_CALL_START' event must be sent first.`));let r=y(t,e.subagentRunId,s.toolCall.get(n),`tool call`,n);return r?N(()=>r):(i.delete(n),M(e))}case A.STEP_STARTED:{let t=e.stepName,n=e.subagentRunId;return f(n).has(t)?N(()=>new j(`Step "${t}" is already active for 'STEP_STARTED'${n===void 0?``:` in subagent '${n}'`}`)):(f(n).set(t,!0),M(e))}case A.STEP_FINISHED:{let t=e.stepName,n=e.subagentRunId;if(!f(n).has(t)){let e,r=!1;for(let[i,a]of d)if(i!==n&&a.has(t)){e=i,r=!0;break}return N(r?()=>new j(`Cannot send 'STEP_FINISHED' for step "${t}" attributed to ${n===void 0?`the parent agent`:`subagent '${n}'`}: that step is open under ${e===void 0?`the parent agent`:`subagent '${e}'`}. A step must be finished by whoever started it.`):()=>new j(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}return f(n).delete(t),M(e)}case A.ACTIVITY_SNAPSHOT:{let t=e.messageId;return(!s.activity.has(t)||e.replace!==!1)&&s.activity.set(t,{subagentRunId:e.subagentRunId}),M(e)}case A.TOOL_CALL_RESULT:{let t=e.messageId;return typeof t==`string`&&s.message.set(t,{subagentRunId:e.subagentRunId}),M(e)}case A.REASONING_START:case A.REASONING_MESSAGE_START:{let n=e.messageId,r=t===A.REASONING_START,i=r?a:o;if(i.has(n))return N(()=>new j(r?`Cannot send 'REASONING_START' event: A reasoning span with ID '${n}' is already in progress. Complete it with 'REASONING_END' first.`:`Cannot send 'REASONING_MESSAGE_START' event: A reasoning message with ID '${n}' is already in progress. Complete it with 'REASONING_MESSAGE_END' first.`));let c=s.reasoning.get(n);if(c){let r=y(t,e.subagentRunId,c,`reasoning message`,n);if(r)return N(()=>r)}return i.add(n),c||s.reasoning.set(n,{subagentRunId:e.subagentRunId}),M(e)}case A.REASONING_MESSAGE_CONTENT:case A.REASONING_MESSAGE_END:case A.REASONING_END:{let n=e.messageId,r=t===A.REASONING_END,i=r?a:o;if(!i.has(n))return N(()=>new j(r?`Cannot send 'REASONING_END' event: No active reasoning span found with ID '${n}'. A 'REASONING_START' event must be sent first.`:`Cannot send '${t}' event: No active reasoning message found with ID '${n}'. Start a reasoning message with 'REASONING_MESSAGE_START' first.`));let c=y(t,e.subagentRunId,s.reasoning.get(n),`reasoning message`,n);return c?N(()=>c):((t===A.REASONING_END||t===A.REASONING_MESSAGE_END)&&i.delete(n),M(e))}case A.REASONING_ENCRYPTED_VALUE:{let n=e.entityId,r=e.subtype,i=r===`tool-call`?s.toolCall.get(n):r===`message`?s.message.get(n)??s.reasoning.get(n):s.reasoning.get(n),a=r===`tool-call`?`tool call`:r===`message`?`message`:`reasoning message`,o=y(t,e.subagentRunId,i,a,n);return o?N(()=>o):M(e)}case A.ACTIVITY_DELTA:{let n=e.messageId,r=y(t,e.subagentRunId,s.activity.get(n),`activity`,n);return r?N(()=>r):M(e)}case A.SUBAGENT_STARTED:{if(typeof e.subagentRunId!=`string`)return N(()=>new j(`Cannot send 'SUBAGENT_STARTED' without a 'subagentRunId'.`));if(typeof e.name!=`string`)return N(()=>new j(`Cannot send 'SUBAGENT_STARTED' without a 'name'.`));let t=e.subagentRunId,n=e.parentSubagentRunId;return m.has(t)?N(()=>new j(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' is already active. Finish it with 'SUBAGENT_FINISHED' first.`)):h.has(t)?N(()=>new j(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' has already finished in this run. Subagent IDs are per-invocation and cannot be reused.`)):n!==void 0&&!m.has(n)&&!h.has(n)?N(()=>new j(`Cannot send 'SUBAGENT_STARTED': parentSubagentRunId '${n}' has not been started in this run.`)):(m.set(t,!0),M(e))}case A.SUBAGENT_FINISHED:case A.SUBAGENT_ERROR:{if(typeof e.subagentRunId!=`string`)return N(()=>new j(`Cannot send '${t}' without a 'subagentRunId'.`));if(t===A.SUBAGENT_ERROR&&typeof e.message!=`string`)return N(()=>new j(`Cannot send 'SUBAGENT_ERROR' without a 'message'.`));let n=e.subagentRunId;return m.has(n)?(m.delete(n),h.add(n),M(e)):N(()=>new j(`Cannot send '${t}': no active subagent found with ID '${n}'. A 'SUBAGENT_STARTED' event must be sent first.`))}case A.MESSAGES_SNAPSHOT:{let t=v(e.messages,!0);if(t)return N(()=>t)}return M(e);case A.RUN_STARTED:g=!0;{let t=v((e.input??{}).messages,!1);if(t)return N(()=>t)}return M(e);case A.RUN_FINISHED:if(p()){let e=[];for(let[t,n]of d)for(let r of n.keys())e.push(t===void 0?r:`${r} (subagent '${t}')`);let t=e.join(`, `);return N(()=>new j(`Cannot send 'RUN_FINISHED' while steps are still active: ${t}`))}if(r.size>0){let e=Array.from(r.keys()).join(`, `);return N(()=>new j(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(o.size>0){let e=Array.from(o.keys()).join(`, `);return N(()=>new j(`Cannot send 'RUN_FINISHED' while reasoning messages are still active: ${e}`))}if(a.size>0){let e=Array.from(a.keys()).join(`, `);return N(()=>new j(`Cannot send 'RUN_FINISHED' while reasoning spans are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(`, `);return N(()=>new j(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}if(m.size>0){let e=Array.from(m.keys()).join(`, `);return N(()=>new j(`Cannot send 'RUN_FINISHED' while subagents are still active: ${e}`))}return c=!0,M(e);case A.RUN_ERROR:return l=!0,M(e);case A.CUSTOM:return M(e);default:return M(e)}}))},YE=function(e){return e.HEADERS=`headers`,e.DATA=`data`,e}({}),XE=e=>Gl(()=>Rl(e())).pipe(Zl(e=>{if(!e.ok){let t=e.headers.get(`content-type`)||``;return Rl(e.text()).pipe(Ul(n=>{let r=n;if(t.includes(`application/json`))try{r=JSON.parse(n)}catch{}let i=Error(`HTTP ${e.status}: ${typeof r==`string`?r:JSON.stringify(r)}`);return i.status=e.status,i.payload=r,N(()=>i)}))}let t={type:YE.HEADERS,status:e.status,headers:e.headers},n=e.body?.getReader();return n?new qc(e=>(e.next(t),(async()=>{try{for(;;){let{done:t,value:r}=await n.read();if(t)break;let i={type:YE.DATA,data:r};e.next(i)}e.complete()}catch(t){e.error(t)}})(),()=>{n.cancel().catch(e=>{if(e?.name!==`AbortError`)throw e})})):N(()=>Error(`Failed to getReader() from response`))})),ZE=10485760,QE=(e,t)=>{let n=HE(t),r=new nl,i=new TextDecoder(`utf-8`,{fatal:!1}),a=``;e.subscribe({next:e=>{if(e.type!==YE.HEADERS&&e.type===YE.DATA&&e.data){let t=i.decode(e.data,{stream:!0});a+=t;let n=a.split(/\n\n/);a=n.pop()||``;for(let e of n)o(e);if(a.length>ZE){r.error(Error(`SSE buffer size exceeded maximum limit of ${ZE/1048576} MB`));return}}},error:e=>r.error(e),complete:()=>{a&&(a+=i.decode(),o(a)),r.complete()}});function o(e){let t=e.split(` +`),i=[];for(let e of t)e.startsWith(`data:`)&&i.push(e.slice(5).replace(/^ /,``));if(i.length>0)try{let e=i.join(` +`),t=JSON.parse(e);n?.event(`SSE`,`Event received:`,t,{type:t?.type}),r.next(t)}catch(e){r.error(e)}}return r.asObservable()},$E=10485760,eD=()=>typeof process<`u`&&!!{}.SUPPRESS_TRANSFORMATION_WARNINGS,tD=(e,t)=>{let n=HE(t),r=new nl,i=new Uint8Array,a=!1;e.subscribe({next:e=>{if(e.type!==YE.HEADERS&&e.type===YE.DATA&&e.data){let t=new Uint8Array(i.length+e.data.length);t.set(i,0),t.set(e.data,i.length),i=t,o()}},error:e=>r.error(e),complete:()=>{if(o(),!a){if(i.length>0){r.error(Error(`The binary stream ended mid-frame: ${i.length} trailing bytes could not be read as a complete message.`));return}r.complete()}}});function o(){if(!a)for(;i.length>=4;){let e=4+new DataView(i.buffer,i.byteOffset,4).getUint32(0,!1);if(e>$E){r.error(Error(`Protobuf message size exceeded maximum limit of ${$E/1048576} MB`));return}if(i.length{let n=HE(t),r=new nl,i=new al(1),a=!1,o,s=!1,c=()=>{s=!0,o?.unsubscribe()},l=e=>{c(),r.error(e)},u=()=>{c(),r.complete()};return o=e.subscribe({next:e=>{if(i.next(e),e.type===YE.HEADERS&&!a){a=!0;let t=e.headers.get(`content-type`);n?.lifecycle(`HTTP`,`Stream format detected:`,{contentType:t,parser:t===`application/vnd.ag-ui.event+proto`?`protobuf`:`sse`}),t===`application/vnd.ag-ui.event+proto`?tD(i,n).subscribe({next:e=>r.next(e),error:e=>l(e),complete:()=>u()}):QE(i,n).subscribe({next:e=>{if(typeof e!=`object`||!e||Array.isArray(e)){let t=Error(`Invalid event: the frame is not a JSON object.`);n?.event(`HTTP`,`Event invalid:`,{json:e,error:String(t)}),l(t);return}let t=e;if(typeof t.type!=`string`||t.type.length===0){let t=Error(`Invalid event: the frame carries no event type.`);n?.event(`HTTP`,`Event invalid:`,{json:e,error:String(t)}),l(t);return}n?.event(`HTTP`,`Event received:`,e,{type:t.type}),r.next(e)},error:e=>{if(e?.name===`AbortError`){r.next({type:A.RUN_ERROR,message:e.message||`Request aborted`,code:`abort`,rawEvent:e}),u();return}return l(e)},complete:()=>u()})}else a||l(Error(`No headers event received before data events`))},error:e=>{i.error(e),l(e)},complete:()=>{i.complete()}}),s&&o.unsubscribe(),r.asObservable()},rD={TextMessageStart:`TextMessageStart`,TextMessageContent:`TextMessageContent`,TextMessageEnd:`TextMessageEnd`,ActionExecutionStart:`ActionExecutionStart`,ActionExecutionArgs:`ActionExecutionArgs`,ActionExecutionEnd:`ActionExecutionEnd`,ActionExecutionResult:`ActionExecutionResult`,AgentStateMessage:`AgentStateMessage`,MetaEvent:`MetaEvent`,RunStarted:`RunStarted`,RunFinished:`RunFinished`,RunError:`RunError`,NodeStarted:`NodeStarted`,NodeFinished:`NodeFinished`},iD=e=>{if(typeof e==`string`)return e;if(!Array.isArray(e))return;let t=e.filter(e=>e.type===`text`).map(e=>e.text).filter(e=>e.length>0);if(t.length!==0)return t.join(` +`)};function aD(e,t){return Ss(t)&&oD(`[ag-ui][legacy] The result of tool call '${e}' carries content parts the legacy protocol cannot represent; only its text parts are bridged and the rest is dropped.`),xs(t)}var oD=e=>{typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(e)},sD=(e,t,n)=>r=>{let i={},a=!0,o=!0,s=``,c=null,l=null,u=[],d={},f=!1,p=e=>{typeof e==`object`&&e&&(`messages`in e&&delete e.messages,i=e)};return r.pipe(Ul(r=>{switch(r.type){case A.TEXT_MESSAGE_START:{let e=r;return[{type:rD.TextMessageStart,messageId:e.messageId,role:e.role}]}case A.TEXT_MESSAGE_CONTENT:{let e=r;return[{type:rD.TextMessageContent,messageId:e.messageId,content:e.delta}]}case A.TEXT_MESSAGE_END:{let e=r;return[{type:rD.TextMessageEnd,messageId:e.messageId}]}case A.TOOL_CALL_START:{let e=r;return u.push({id:e.toolCallId,type:`function`,function:{name:e.toolCallName,arguments:``}}),o=!0,d[e.toolCallId]=e.toolCallName,[{type:rD.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}]}case A.TOOL_CALL_ARGS:{let c=r,d=u.find(e=>e.id===c.toolCallId);if(!d)return oD(`[ag-ui][legacy] TOOL_CALL_ARGS: No tool call found with ID '${c.toolCallId}'`),[];d.function.arguments+=c.delta;let f=!1;if(l){let e=l.find(e=>e.tool==d.function.name);if(e)try{let t=JSON.parse(tu(d.function.arguments));e.tool_argument&&e.tool_argument in t?(p({...i,[e.state_key]:t[e.tool_argument]}),f=!0):e.tool_argument||(p({...i,[e.state_key]:t}),f=!0)}catch{}}return[{type:rD.ActionExecutionArgs,actionExecutionId:c.toolCallId,args:c.delta},...f?[{type:rD.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]:[]]}case A.TOOL_CALL_END:{let e=r;return[{type:rD.ActionExecutionEnd,actionExecutionId:e.toolCallId}]}case A.TOOL_CALL_RESULT:{let e=r,t=d[e.toolCallId];return(t===void 0||t===``)&&oD(`[ag-ui][legacy] No usable tool name was seen for tool call '${e.toolCallId}' (${t===void 0?`no TOOL_CALL_START reached this bridge`:`its TOOL_CALL_START carried an empty toolCallName`}), so its result is being bridged with the fabricated action name "unknown". Downstream consumers route on that name.`),[{type:rD.ActionExecutionResult,actionExecutionId:e.toolCallId,result:aD(e.toolCallId,e.content),actionName:t||`unknown`}]}case A.RAW:return f||(f=!0,oD(`[ag-ui][legacy] Dropping RAW events: the legacy runtime protocol has no equivalent, so the provider payloads they carry do not reach the legacy stream. Reported once per stream.`)),[];case A.CUSTOM:{let e=r;switch(e.name){case`Exit`:a=!1;break;case`PredictState`:l=e.value}return[{type:rD.MetaEvent,name:e.name,value:e.value}]}case A.STATE_SNAPSHOT:return p(r.snapshot),[{type:rD.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}];case A.STATE_DELTA:{let c=r,l;try{l=ic.applyPatch(i,c.delta,!0,!1).newDocument}catch(e){let t=e instanceof Error?e.message:String(e);return oD(`[ag-ui][legacy] Failed to apply state patch:\nCurrent state: ${JSON.stringify(i,null,2)}\nPatch operations: ${JSON.stringify(c.delta,null,2)}\nError: ${t}`),[]}return p(l),[{type:rD.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]}case A.MESSAGES_SNAPSHOT:return c=r.messages,[{type:rD.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case A.RUN_STARTED:return[];case A.RUN_FINISHED:{if(c&&(i.messages=c),Object.keys(i).length===0)return[];let r=null;if(c)try{r=cD(c)}catch(e){return[{type:rD.RunError,message:e.message}]}return[{type:rD.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...r?{messages:r}:{}}),active:!1}]}case A.RUN_ERROR:{let e=r;return[{type:rD.RunError,message:e.message,code:e.code}]}case A.STEP_STARTED:return s=r.stepName,u=[],l=null,[{type:rD.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!0}];case A.STEP_FINISHED:return u=[],l=null,[{type:rD.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!1}];default:return[]}}))};function cD(e){let t=[];for(let n of e)if(n.role===`assistant`||n.role===`user`||n.role===`system`){let e=iD(n.content);if(e){let r={id:n.id,role:n.role,content:e};t.push(r)}if(n.role===`assistant`&&n.toolCalls&&n.toolCalls.length>0)for(let e of n.toolCalls){let r;try{r=JSON.parse(e.function.arguments)}catch(t){throw Error(`Failed to parse arguments for tool call '${e.id}' (${e.function.name}): ${t.message}`)}let i={id:e.id,name:e.function.name,arguments:r,parentMessageId:n.id};t.push(i)}}else if(n.role===`tool`){let r=`unknown`;for(let t of e)if(t.role===`assistant`&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===n.toolCallId){r=e.function.name;break}}let i={id:n.id,result:aD(n.toolCallId,n.content),actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}var lD=e=>e.kind===`tool`?e.fields.toolCallId:e.fields.messageId,uD=e=>e===`tool`?`toolCallId`:`messageId`,dD=(e,t,n,r,i)=>{if(r!==void 0&&r!==i)throw Error(`Cannot continue ${e} '${t}': chunk ${n} '${r}' does not match the open stream's ${n} ${i===void 0?`(absent)`:`'${i}'`}.`)},fD=(e,t)=>t.metadata===void 0?e:{...e,metadata:t.metadata},pD=(e,t)=>{let n=fD(e,t);return t.rawEvent===void 0?n:{...n,rawEvent:t.rawEvent}},mD=e=>new Set(Object.keys(e.shape)),hD=mD(jy),gD=mD(Fy),_D=mD(vb),vD=(e,t)=>{let n;for(let r of Object.keys(e))t.has(r)||((n??={})[r]=e[r]);return n},yD=e=>{typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`[ag-ui][transform] ${e} Set SUPPRESS_TRANSFORMATION_WARNINGS=true to silence.`)},bD=(e,t,n,r)=>{if(t===void 0||n||e.length===0)return;let i=e[e.length-1],a=Object.keys(t).filter(e=>Object.prototype.hasOwnProperty.call(i,e));a.length>0&&yD(`A ${r} carried ${a.map(e=>`'${e}'`).join(`, `)}, which the synthesized ${String(i.type)} already describes. The synthesized value is kept and the chunk's is dropped — this stage does not judge a described field, so the producer's value cannot be substituted for its own.`),e[e.length-1]={...t,...i}},xD=e=>t=>{let n=HE(e),r=new Map,i=e=>{let t=r.get(e);if(!t)return[];switch(r.delete(e),t.kind){case`text`:{let e={type:A.TEXT_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!==void 0&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TEXT_MESSAGE_END`,e,{messageId:e.messageId}),[e]}case`tool`:{let e={type:A.TOOL_CALL_END,toolCallId:t.fields.toolCallId,...t.fields.subagentRunId!==void 0&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TOOL_CALL_END`,e,{toolCallId:e.toolCallId}),[e]}case`reasoning`:{let e={type:A.REASONING_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!==void 0&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`REASONING_MESSAGE_END`,e,{messageId:e.messageId}),[e]}}},a=()=>[...r.keys()].flatMap(e=>i(e)),o=(e,t)=>{for(let[n,i]of r)if(i.kind===e&&lD(i)===t)return{owner:n}},s=(e,t,n,i,a)=>{if(t!==void 0){let r=o(e,t);if(r){if(n!==void 0&&n!==r.owner)throw Error(`Cannot continue ${a} '${t}': chunk subagentRunId '${n}' does not match the open stream's subagent '${r.owner??`(the parent agent)`}'.`);return r.owner}return n}if(n!==void 0)return n;if(r.get(void 0)?.kind===e)return;let s=[...r.entries()].filter(([,t])=>t.kind===e);if(s.length===1)return s[0][0];if(s.length>1)throw Error(`Ambiguous ${i}: it carries neither a ${uD(e)} nor a subagentRunId, but ${s.length} lanes have an open ${a}. Attribute the chunk to the subagent it belongs to.`)};return t.pipe(Ul(e=>{switch(e.type){case A.TEXT_MESSAGE_START:case A.TEXT_MESSAGE_CONTENT:case A.TEXT_MESSAGE_END:case A.TOOL_CALL_START:case A.TOOL_CALL_ARGS:case A.TOOL_CALL_END:case A.TOOL_CALL_RESULT:case A.STATE_SNAPSHOT:case A.STATE_DELTA:case A.CUSTOM:case A.STEP_STARTED:case A.STEP_FINISHED:case A.REASONING_START:case A.REASONING_MESSAGE_START:case A.REASONING_MESSAGE_CONTENT:case A.REASONING_MESSAGE_END:case A.REASONING_END:return[...i(e.subagentRunId??void 0),e];case A.RUN_STARTED:case A.RUN_FINISHED:case A.RUN_ERROR:case A.MESSAGES_SNAPSHOT:return[...a(),e];case A.RAW:case A.ACTIVITY_SNAPSHOT:case A.ACTIVITY_DELTA:case A.REASONING_ENCRYPTED_VALUE:case A.SUBAGENT_STARTED:return[e];case A.SUBAGENT_FINISHED:case A.SUBAGENT_ERROR:{let t=e.subagentRunId;return t==null?[e]:[...i(t),e]}case A.TEXT_MESSAGE_CHUNK:{let t=e,a=vD(e,hD),o=s(`text`,t.messageId,t.subagentRunId??void 0,`TEXT_MESSAGE_CHUNK`,`text message`),c=r.get(o),l=[],u=!1,d;if(c?.kind===`text`&&(t.messageId===void 0||t.messageId===c.fields.messageId))dD(`text message`,c.fields.messageId,`role`,t.role,c.fields.role),dD(`text message`,c.fields.messageId,`name`,t.name,c.fields.name),d=c.fields;else{if(l.push(...i(o)),t.messageId===void 0)throw Error(`First TEXT_MESSAGE_CHUNK must have a messageId`);d={messageId:t.messageId,role:t.role===void 0?`assistant`:t.role,name:t.name,subagentRunId:t.subagentRunId},r.set(o,{kind:`text`,fields:d});let e=fD({type:A.TEXT_MESSAGE_START,messageId:t.messageId,role:d.role,...t.name!==void 0&&{name:t.name},...t.subagentRunId!==void 0&&{subagentRunId:t.subagentRunId}},t);l.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0||t.rawEvent!==void 0){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId,r=pD({...a,type:A.TEXT_MESSAGE_CONTENT,messageId:d.messageId,delta:t.delta===void 0?``:t.delta,...e!==void 0&&{subagentRunId:e}},t);l.push(r),u=!0,n?.event(`TRANSFORM`,`TEXT_MESSAGE_CONTENT`,r,{messageId:d.messageId})}if(l.length===0&&(t.metadata!==void 0||t.rawEvent!==void 0||t.subagentRunId===null||a!==void 0)){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId;l.push({...a,type:A.TEXT_MESSAGE_CONTENT,messageId:d.messageId,delta:``,...t.metadata!==void 0&&{metadata:t.metadata},...t.rawEvent!==void 0&&{rawEvent:t.rawEvent},...e!==void 0&&{subagentRunId:e}}),u=!0}return bD(l,a,u,`TEXT_MESSAGE_CHUNK`),l}case A.TOOL_CALL_CHUNK:{let t=e,a=vD(e,gD),o=s(`tool`,t.toolCallId,t.subagentRunId??void 0,`TOOL_CALL_CHUNK`,`tool call`),c=r.get(o),l=[],u=!1,d;if(c?.kind===`tool`&&(t.toolCallId===void 0||t.toolCallId===c.fields.toolCallId))dD(`tool call`,c.fields.toolCallId,`toolCallName`,t.toolCallName,c.fields.toolCallName),dD(`tool call`,c.fields.toolCallId,`parentMessageId`,t.parentMessageId,c.fields.parentMessageId),d=c.fields;else{if(l.push(...i(o)),t.toolCallId===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallId`);if(t.toolCallName===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallName`);d={toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,subagentRunId:t.subagentRunId},r.set(o,{kind:`tool`,fields:d});let e=fD({type:A.TOOL_CALL_START,toolCallId:t.toolCallId,toolCallName:t.toolCallName,...t.parentMessageId!==void 0&&{parentMessageId:t.parentMessageId},...t.subagentRunId!==void 0&&{subagentRunId:t.subagentRunId}},t);l.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_START`,e,{toolCallId:t.toolCallId,toolCallName:t.toolCallName})}if(t.delta!==void 0||t.rawEvent!==void 0){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId,r=pD({...a,type:A.TOOL_CALL_ARGS,toolCallId:d.toolCallId,delta:t.delta===void 0?``:t.delta,...e!==void 0&&{subagentRunId:e}},t);l.push(r),u=!0,n?.event(`TRANSFORM`,`TOOL_CALL_ARGS`,r,{toolCallId:d.toolCallId})}if(l.length===0&&(t.metadata!==void 0||t.rawEvent!==void 0||t.subagentRunId===null||a!==void 0)){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId;l.push({...a,type:A.TOOL_CALL_ARGS,toolCallId:d.toolCallId,delta:``,...t.metadata!==void 0&&{metadata:t.metadata},...t.rawEvent!==void 0&&{rawEvent:t.rawEvent},...e!==void 0&&{subagentRunId:e}}),u=!0}return bD(l,a,u,`TOOL_CALL_CHUNK`),l}case A.REASONING_MESSAGE_CHUNK:{let t=e,a=vD(e,_D),o=s(`reasoning`,t.messageId,t.subagentRunId??void 0,`REASONING_MESSAGE_CHUNK`,`reasoning message`),c=r.get(o),l=[],u=!1,d;if(c?.kind===`reasoning`&&(t.messageId===void 0||t.messageId===c.fields.messageId))d=c.fields;else{if(l.push(...i(o)),t.messageId===void 0)throw Error(`First REASONING_MESSAGE_CHUNK must have a messageId`);d={messageId:t.messageId,subagentRunId:t.subagentRunId},r.set(o,{kind:`reasoning`,fields:d});let e=fD({type:A.REASONING_MESSAGE_START,messageId:t.messageId,role:`reasoning`,...t.subagentRunId!==void 0&&{subagentRunId:t.subagentRunId}},t);l.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0||t.rawEvent!==void 0){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId,r=pD({...a,type:A.REASONING_MESSAGE_CONTENT,messageId:d.messageId,delta:t.delta===void 0?``:t.delta,...e!==void 0&&{subagentRunId:e}},t);l.push(r),u=!0,n?.event(`TRANSFORM`,`REASONING_MESSAGE_CONTENT`,r,{messageId:d.messageId})}if(l.length===0&&(t.metadata!==void 0||t.rawEvent!==void 0||t.subagentRunId===null||a!==void 0)){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId;l.push({...a,type:A.REASONING_MESSAGE_CONTENT,messageId:d.messageId,delta:``,...t.metadata!==void 0&&{metadata:t.metadata},...t.rawEvent!==void 0&&{rawEvent:t.rawEvent},...e!==void 0&&{subagentRunId:e}}),u=!0}return bD(l,a,u,`REASONING_MESSAGE_CHUNK`),l}}return e.type,[e]}),Xl(()=>{a()}))},SD=Symbol(`agui.strip.drop`);function CD(e){let t=e;for(;;){if(t instanceof fE||t instanceof mE||t instanceof gE||t instanceof EE||t instanceof SE){t=t.unwrap();continue}if(t instanceof wE){t=t.def.in;continue}if(t instanceof OE){t=t.def.getter();continue}return t}}function wD(e){let t=e.def;return typeof t?.discriminator==`string`?t.discriminator:void 0}function TD(e){let t=e,n=Array.isArray(t.def?.values)?t.def.values:t.values?Array.from(t.values):void 0;return n&&n.length===1?n[0]:t.value}function ED(e){let t=CD(e);return t instanceof lE?TD(t):void 0}function DD(e,t,n,r){let i=CD(t);if(i instanceof tE){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t=i.shape,a=e,o={},s=i.meta()?.specOpen===!0;for(let e of Object.keys(a)){let i=Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;if(i===void 0){if(s){o[e]=a[e];continue}r.push(`${n}/${e}`);continue}let c=r.length,l=DD(a[e],i,`${n}/${e}`,r);if(l===SD){if(r.length=c,i.safeParse(void 0).success){r.push(`${n}/${e}`);continue}return SD}o[e]=l}return o}if(i instanceof $T){if(!Array.isArray(e))return e;let t=i.element,a=[];return e.forEach((e,i)=>{let o=r.length,s=DD(e,t,`${n}/${i}`,r);if(s===SD){r.length=o,r.push(`${n}/${i}`);return}a.push(s)}),a}if(i instanceof oE){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t=i.def.valueType,a=e,o={};for(let e of Object.keys(a)){let i=r.length,s=DD(a[e],t,`${n}/${e}`,r);if(s===SD){r.length=i,r.push(`${n}/${e}`);continue}o[e]=s}return o}if(i instanceof nE){let t=i.options,a=wD(i);if(a!==void 0){if(typeof e!=`object`||!e||Array.isArray(e))return e;let i=e[a];for(let o of t){let t=CD(o);if(!(t instanceof tE))continue;let s=t.shape;if(ED(s[a])===i)return DD(e,o,n,r)}return SD}let o=t.filter(e=>CD(e)instanceof tE),s=typeof e==`object`&&!!e&&!Array.isArray(e);if(o.length>1&&s)return e;for(let i of t){let t=CD(i);if(t instanceof $T&&Array.isArray(e)||t instanceof tE&&s)return DD(e,i,n,r)}return e}return e}function OD(e,t){let n=[],r=DD(e,t,``,n);if(r===SD)throw Error(`Internal error: the stripper found the whole value unrecognisable, which the schemas are not supposed to allow — schema/stripper mismatch.`);return{value:r,stripped:n}}var kD=new Set(Object.values(A));function AD(e){return kD.has(e.type)}var jD=new Map(wb.options.map(e=>{let t=e.shape;return[String(TD(t.type)),e]})),MD=()=>typeof process<`u`&&!!{}.SUPPRESS_TRANSFORMATION_WARNINGS;function ND(e){MD()||console.warn(`[ag-ui][enforce] ${e}`)}var PD=e=>t=>{let n=HE(e);return t.pipe(Ul(e=>{if(!AD(e))return ND(`Dropping unrecognised event '${String(e.type)}': no middleware translated it and the protocol does not describe it.`),n?.event(`ENFORCE`,`Unrecognised event dropped:`,e,{type:e.type}),ol;let t=jD.get(e.type);if(t===void 0)throw Error(`No validator for recognised event type '${String(e.type)}'`);let{value:r,stripped:i}=OD(e,t);for(let t of i)ND(`Removed unrecognised material at '${t}' on ${String(e.type)}. Nothing handled it; see the repo-root DEPRECATIONS.md if it is a retired shape.`);return M(t.parse(r))}))};function FD(e){let{value:t,stripped:n}=OD(vs(e,`RunAgentInput`),ib);for(let e of n)ND(`Removed unrecognised material at '${e}' from the outgoing input.`);return ib.parse(t)}var ID=class{runNext(e,t){return t.run(e).pipe(xD(!1))}runNextWithState(e,t){let n=$(e.messages||[]),r=$(e.state===void 0?{}:e.state),i=new al;return qE(e,i,t,[]).subscribe({next:e=>{e.messages!==void 0&&(n=e.messages),e.state!==void 0&&(r=e.state)},error:()=>{}}),this.runNext(e,t).pipe(Jl(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:$(n),state:$(r)})))}},LD=class extends ID{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function RD(e){return e.startsWith(`image/`)?`image`:e.startsWith(`audio/`)?`audio`:e.startsWith(`video/`)?`video`:`document`}function zD(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`binary`&&`mimeType`in e&&typeof e.mimeType==`string`}function BD(e){let t=RD(e.mimeType);return e.data?{type:t,source:{type:`data`,value:e.data,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e.url?{type:t,source:{type:`url`,value:e.url,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:((typeof process>`u`||!{}.SUPPRESS_TRANSFORMATION_WARNINGS)&&console.warn(`[ag-ui][compat] A binary content part carries only an id ('${e.id??``}') and cannot be converted to a modern media part; a 1.0 peer will not accept it. Provide data or a url. See the repo-root DEPRECATIONS.md.`),e)}function VD(e,t,n){if(typeof e!=`object`||!e||!(`type`in e)||e.type!==t.type||!(`source`in e))return!1;let r=e.source;return typeof r!=`object`||!r||!(`type`in r)||r.type!==t.source.type||!(`value`in r)||r.value!==t.source.value||!(`mimeType`in r)||r.mimeType!==t.source.mimeType?!1:!n||`metadata`in e&&typeof e.metadata==`object`&&e.metadata!==null&&`filename`in e.metadata&&e.metadata.filename===n}function HD(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.flatMap(e=>{if(zD(e)){let n=BD(e);return n.type!==`binary`&&t.some(t=>VD(t,n,e.filename))?[]:[n]}return[e]});return{...e,content:n}}var UD=`THINKING_START`,WD=`THINKING_END`,GD=`THINKING_TEXT_MESSAGE_START`,KD=`THINKING_TEXT_MESSAGE_CONTENT`,qD=`THINKING_TEXT_MESSAGE_END`;function JD(e,t){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`[ag-ui][compat] Converting deprecated ${e} to ${t}. The old shape leaves the protocol after its shim window — see the repo-root DEPRECATIONS.md. Set SUPPRESS_TRANSFORMATION_WARNINGS=true to silence.`)}function YD(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function XD(e,t,n){if(!YD(e)||e[t]!==null)return e;JD(`${n}.${t}: null`,`an absent field`);let{[t]:r,...i}=e;return i}function ZD(e,t,n){if(!YD(e)||!Array.isArray(e[t]))return e;let r=e[t],i=r.map(n);return i.some((e,t)=>e!==r[t])?{...e,[t]:i}:e}function QD(e){return ZD(e,`content`,e=>{if(!YD(e))return e;switch(e.type){case`image`:case`audio`:case`video`:case`document`:return XD(e,`metadata`,`${e.type} input content`);default:return e}})}function $D(e){let t=XD(e,`forwardedProps`,`RunAgentInput`);return t=ZD(t,`tools`,e=>XD(e,`parameters`,`Tool`)),t=ZD(t,`resume`,e=>XD(e,`payload`,`ResumeEntry`)),ZD(t,`messages`,QD)}var eO=class extends ID{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warn(e,t){JD(e,t)}mintedContinuationId(e,t){if(t!==null)return t;let n=FE();return this.warnAside(`Minting a messageId ('${n}') for ${e}: no THINKING opener preceded it, so there was no id to continue. The id is this client's invention, not the producer's, and verification will reject the translated event for naming something nothing opened.`),n}warnAside(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`[ag-ui][compat] ${e} Set SUPPRESS_TRANSFORMATION_WARNINGS=true to silence.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,e.messages=e.messages.map(HD),t.run(e).pipe(Vl(e=>this.transformEvent(e)))}transformEvent(e){if(e.rawEvent===null){this.warn(`${e.type}.rawEvent: null`,`an absent field`);let{rawEvent:t,...n}=e;e=n}if((e.type===A.RUN_FINISHED||e.type===A.SUBAGENT_FINISHED)&&e.result===null){this.warn(`${e.type}.result: null`,`an absent field`);let{result:t,...n}=e;e=n}switch(e.type){case UD:{this.currentReasoningId=FE();let{title:t,...n}=e;return this.warn(UD,A.REASONING_START),t!==void 0&&this.warnAside(`Dropping ${UD}.title ${JSON.stringify(t)}: ${A.REASONING_START} has no title field, so the span's label cannot be carried and nothing downstream can recover it.`),{...n,type:A.REASONING_START,messageId:this.currentReasoningId}}case GD:return this.currentMessageId=FE(),this.warn(GD,A.REASONING_MESSAGE_START),{...e,type:A.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`reasoning`};case KD:{let{delta:t,...n}=e;return this.warn(KD,A.REASONING_MESSAGE_CONTENT),{...n,type:A.REASONING_MESSAGE_CONTENT,messageId:this.mintedContinuationId(KD,this.currentMessageId),delta:t}}case qD:{let t=this.mintedContinuationId(qD,this.currentMessageId);return this.currentMessageId=null,this.warn(qD,A.REASONING_MESSAGE_END),{...e,type:A.REASONING_MESSAGE_END,messageId:t}}case WD:{let t=this.mintedContinuationId(WD,this.currentReasoningId);return this.currentReasoningId=null,this.warn(WD,A.REASONING_END),{...e,type:A.REASONING_END,messageId:t}}case A.TOOL_CALL_START:case A.TOOL_CALL_CHUNK:{let t=e;if(t.parentMessageId===null){this.warn(`${e.type}.parentMessageId: null`,`an absent field`);let{parentMessageId:n,...r}=t;return r}return e}case A.RUN_FINISHED:{let t=e;if(t.outcome===null){this.warn(`RUN_FINISHED.outcome: null`,`an absent field`);let{outcome:e,...n}=t;return n}return e}case A.MESSAGES_SNAPSHOT:{let t=e;return Array.isArray(t.messages)?{...t,messages:t.messages.map(e=>this.upgradeInboundMessage(e))}:e}case A.RUN_STARTED:{let t=$D(e.input),n=t===e.input?e:{...e,input:t},r=n;return!r.input||!Array.isArray(r.input.messages)?n:{...r,input:{...r.input,messages:r.input.messages.map(e=>this.upgradeInboundMessage(e))}}}default:return e}}upgradeInboundMessage(e){e=QD(e);let t=e.content;return!Array.isArray(t)||!t.some(e=>typeof e==`object`&&!!e&&e.type===`binary`)?e:(this.warn(`binary input content`,`the modern media content parts`),HD(e))}},tO=()=>e=>Gl(()=>{let t=new eO;return e.pipe(Vl(e=>t.transformEvent(e)))});function nO(e,t=new Date){return e.expiresAt!==void 0&&new Date(e.expiresAt)<=t}function rO(){return typeof process<`u`&&!!{}.SUPPRESS_TRANSFORMATION_WARNINGS}function iO(e){rO()||console.warn(`[ag-ui][compat] Flattening message content for a <=0.0.39 peer DROPS non-text parts (${e.join(`, `)}). The peer cannot receive them; upgrade it to keep media content. See the repo-root DEPRECATIONS.md.`)}function aO(e){rO()||console.warn(`[ag-ui][compat] Not flattening message content for a <=0.0.39 peer: ${e} content part(s) claim type "text" but carry a malformed 'text' value. That is a defect in the message, not media the peer cannot represent, and a downgrade must not repair it — the content is passed on unchanged so the outgoing enforcement boundary reports it. See the repo-root DEPRECATIONS.md.`)}function oO(e){let t=e.content;if(Array.isArray(t)){let n=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`text`,r=e=>n(e)&&typeof e.text==`string`,i=t.filter(e=>n(e)&&!r(e));if(i.length>0)return aO(i.length),e;let a=t.filter(e=>!r(e)).map(e=>typeof e==`object`&&e&&`type`in e?String(e.type):typeof e);a.length>0&&iO(a);let o=t.filter(r).map(e=>e.text).join(``);return{...e,content:o}}return typeof t==`string`?e:t===void 0?{...e,content:``}:e}var sO=class extends ID{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(oO)};return this.runNext(i,t)}},cO=`THINKING_START`,lO=`THINKING_END`,uO=`THINKING_TEXT_MESSAGE_START`,dO=`THINKING_TEXT_MESSAGE_CONTENT`,fO=`THINKING_TEXT_MESSAGE_END`,pO=class extends ID{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe(Vl(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case cO:{this.currentReasoningId=FE();let{title:t,...n}=e;return this.warnAboutTransformation(cO,A.REASONING_START),{...n,type:A.REASONING_START,messageId:this.currentReasoningId}}case uO:return this.currentMessageId=FE(),this.warnAboutTransformation(uO,A.REASONING_MESSAGE_START),{...e,type:A.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`reasoning`};case dO:{let{delta:t,...n}=e;return this.warnAboutTransformation(dO,A.REASONING_MESSAGE_CONTENT),{...n,type:A.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??FE(),delta:t}}case fO:{let t=this.currentMessageId??FE();return this.warnAboutTransformation(fO,A.REASONING_MESSAGE_END),{...e,type:A.REASONING_MESSAGE_END,messageId:t}}case lO:{let t=this.currentReasoningId??FE();return this.warnAboutTransformation(lO,A.REASONING_END),{...e,type:A.REASONING_END,messageId:t}}default:return e}}},mO=`SUBAGENT_STARTED`,hO=`SUBAGENT_FINISHED`,gO=`SUBAGENT_ERROR`;function _O(e){if(e&&typeof e==`object`&&`subagentRunId`in e){let{subagentRunId:t,...n}=e;return n}return e}function vO(e){return e.map(e=>_O(e))}var yO=class extends ID{warnDroppedLifecycleEvent(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is dropping ${e} because the target agent predates subagent support. To remove this warning, upgrade your AG-UI integration package. To suppress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){let n={...e,messages:(e.messages??[]).map(e=>_O(e))};return this.runNext(n,t).pipe($l(e=>{let t=e.type;(t===mO||t===hO||t===gO)&&this.warnDroppedLifecycleEvent(t)}),Kl(e=>{let t=e.type;return t!==mO&&t!==hO&&t!==gO}),Vl(e=>{let t=_O(e);if(t.type===A.MESSAGES_SNAPSHOT){let e=t;if(Array.isArray(e.messages))return{...e,messages:vO(e.messages)}}if(t.type===A.RUN_FINISHED){let e=t;if(e.outcome&&Array.isArray(e.outcome.interrupts))return{...e,outcome:{...e.outcome,interrupts:e.outcome.interrupts.map(e=>_O(e))}}}if(t.type===A.RUN_STARTED){let e=t;if(e.input&&Array.isArray(e.input.messages))return{...e,input:{...e.input,messages:vO(e.input.messages)}}}return t}))}},bO=`1.0.1`,xO=!1,SO=new WeakSet,CO=(e,t)=>/^\d+\.\d+$/.test(e)?tw(e,t)>0?`newer`:`not-newer`:`uninterpretable`,wO=e=>{let t=e.protocolVersion;if(t!==void 0&&t!==`1.0`)switch(CO(t,`1.0`)){case`uninterpretable`:console.warn(`[ag-ui] The producer declared protocol version '${t}', which this client cannot interpret.`);return;case`newer`:console.warn(`[ag-ui] The producer speaks protocol ${t}; this client speaks 1.0. Unrecognised material will be stripped with warnings.`);return;case`not-newer`:return}},TO=class e{resolvePeerCeiling(t){if(this.resolvingPeerCeiling)return bO;let n=Object.getOwnPropertyDescriptor(this,`maxVersion`),r=Object.getOwnPropertyDescriptor(this,`maxProtocolVersion`),i=Object.getPrototypeOf(this);for(;i&&i!==e.prototype;)n??=Object.getOwnPropertyDescriptor(i,`maxVersion`),r??=Object.getOwnPropertyDescriptor(i,`maxProtocolVersion`),i=Object.getPrototypeOf(i);if(t===`maxVersion`&&n)return bO;let a=t===`maxProtocolVersion`?n:r;if(!a)return bO;this.resolvingPeerCeiling=!0;try{return a.get?a.get.call(this):a.value}finally{this.resolvingPeerCeiling=!1}}get maxProtocolVersion(){return this.resolvePeerCeiling(`maxProtocolVersion`)}get maxVersion(){return!this.resolvingPeerCeiling&&!xO&&(xO=!0,console.warn(`[ag-ui] AbstractAgent.maxVersion is deprecated — use maxProtocolVersion. Same value; the new name says whose version it is and that it is a ceiling.`)),this.resolvePeerCeiling(`maxVersion`)}get debug(){return this._debug}set debug(e){this._debug=VE(e),this._debugLogger=WE(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){this._debugLogger=typeof e==`boolean`?e?WE(VE(!0)):void 0:e}resolvedCeilingDuringConstruction(){let e=this.maxProtocolVersion;if(typeof e!=`string`||!nw(e))throw new j(`maxProtocolVersion resolved to ${JSON.stringify(e)} during construction, which is not a version this client can compare. A ceiling read from an instance field is not available yet — return a literal from the getter.`);return e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.resolvingPeerCeiling=!1,this.agentId=e,this.description=t??``,this.threadId=n??ms(),this.messages=$(r??[]),this.state=$(i??{}),this._debug=VE(a),this._debugLogger=WE(this._debug);let o=this.resolvedCeilingDuringConstruction();tw(o,`0.0.39`)<=0&&this.middlewares.unshift(new sO),tw(o,`0.0.45`)<=0&&this.middlewares.unshift(new pO),tw(o,`0.0.57`)<=0&&this.middlewares.unshift(new yO)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>typeof e==`function`?new LD(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??ms();let n=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle(`LIFECYCLE`,`Run started:`,{agentId:this.agentId,threadId:this.threadId});let r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunStartedEvent:({event:e})=>wO(e),onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];SO.add(n),await this.onInitialize(n,a),this.activeRunDetach$=new nl;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await Bl(Gc(()=>[...this.middlewares,new eO].reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),PD(this.debugLogger),xD(this.debugLogger),JE(this.debugLogger),e=>e.pipe(Ql(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),ql(e=>(this.debugLogger?.lifecycle(`LIFECYCLE`,`Run errored:`,{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(n,e,a))),Xl(()=>{this.debugLogger?.lifecycle(`LIFECYCLE`,`Run finished:`,{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(M(null)));let s=$(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}connect(e){throw new ys}async connectAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??ms();let n=this.prepareRunAgentInput(e),r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunStartedEvent:({event:e})=>wO(e),onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new nl;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await Bl(Gc(()=>Gl(()=>this.connect(n)),e=>PD(this.debugLogger)(tO()(e)),xD(this.debugLogger),JE(this.debugLogger),e=>e.pipe(Ql(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),ql(e=>(this.isRunning=!1,e instanceof ys?ol:this.onError(n,e,a))),Xl(()=>{this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(M(null)),{defaultValue:void 0});let s=$(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}apply(e,t,n){return qE(e,t,this,n,this.debugLogger)}processApplyEvents(e,t,n){return t.pipe($l(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state!==void 0&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=$(this.messages);for(let e of t)e.subagentRunId===null&&delete e.subagentRunId;let n=t.filter(e=>e.role!==`activity`);return{threadId:this.threadId,runId:e?.runId||ms(),...tw(this.maxProtocolVersion,bO)>=0&&{protocolVersion:`1.0`},tools:$(e?.tools??[]),context:$(e?.context??[]),forwardedProps:$(e?.forwardedProps??{}),state:$(this.state),messages:n,...e?.resume===void 0?{}:{resume:$(e.resume)}}}async onInitialize(e,t){if(SO.has(e)&&this.pendingInterrupts.length>0){let t=new Set((e.resume??[]).map(e=>e.interruptId)),n=this.pendingInterrupts.map(e=>e.id).filter(e=>!t.has(e));if(n.length>0)throw new j(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(`, `)}`);for(let t of this.pendingInterrupts)if(nO(t)&&(e.resume??[]).find(e=>e.interruptId===t.id)?.status!==`cancelled`)throw new j(`Interrupt ${t.id} expired at ${t.expiresAt} and can no longer be answered. Cancel it to continue the thread.`)}let n=await BE(t,this.messages,this.state,(t,n,r)=>t.onRunInitialized?.({messages:n,state:r,agent:this,input:e}));if(n.messages!==void 0||n.state!==void 0){if(n.messages){this.messages=n.messages;for(let e of n.messages)e.subagentRunId===null&&delete e.subagentRunId;e.messages=n.messages.filter(e=>e.role!==`activity`),t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})}n.state!==void 0&&(this.state=n.state,e.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}}onError(e,t,n){return Rl(BE(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe(Vl(r=>{let i=r;if((i.messages!==void 0||i.state!==void 0)&&(i.messages!==void 0&&(this.messages=i.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),i.state!==void 0&&(this.state=i.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),i.stopPropagation!==!0){let e=String(t);if(t.name!==`AbortError`&&t.message!==`Fetch is aborted`&&t.message!==`signal is aborted without reason`&&t.message!==`component unmounted`&&e!==`component unmounted`)throw console.error(`Agent execution failed:`,t),t}return{}}))}async onFinalize(e,t){let n=await BE(t,this.messages,this.state,(t,n,r)=>t.onRunFinalized?.({messages:n,state:r,agent:this,input:e}));(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=$(this.messages),e.state=$(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=$(this.pendingInterrupts),e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if(e.role===`assistant`&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if(t.role===`assistant`&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=$(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=$(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){this.agentId=this.agentId??ms();let t=this.prepareRunAgentInput(e);return[...this.middlewares,new eO].reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(t).pipe(PD(this.debugLogger),xD(this.debugLogger),JE(this.debugLogger),sD(this.threadId,t.runId,this.agentId),e=>e.pipe(Vl(e=>(this.debugLogger?.event(`LEGACY`,`Event:`,e,{type:e.type}),e))))}};function EO(e){if(!Array.isArray(e.messages))return e;let t=!1,n=e.messages.map(e=>{if(e.subagentRunId===null){t=!0;let n={...e};return delete n.subagentRunId,n}return e});return t?{...e,messages:n}:e}var DO=class extends TO{requestInit(e){return{method:`POST`,headers:{...this.headers,"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify(EO(e)),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=$(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return nD(XE(()=>this.fetch(this.url,this.requestInit(FD(e)))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=$(this.headers??{}),e.fetch=this.fetch;let t=new AbortController,n=this.abortController.signal;return n.aborted&&t.abort(n.reason),e.abortController=t,e}},OO=class extends on{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:xn(t,n.data),hasPreviousPage:sn(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},kO=class extends un{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new _n({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=AO(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=AO(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=AO(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=AO(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){vn.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>wn(t,e))}findAll(e={}){return this.getAll().filter(t=>wn(e,t))}notify(e){vn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return vn.batch(()=>Promise.all(e.map(e=>e.continue().catch(Cn))))}};function AO(e){return e.options.scope?.id}var jO=class extends un{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Sn(r,t),a=this.get(i);return a||(a=new mn({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){vn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>T(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>T(e,t)):t}notify(e){vn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){vn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){vn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},MO=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new jO,this.#t=e.mutationCache||new kO,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=hn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=cn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Wt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=ln(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return vn.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;vn.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return vn.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=vn.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Cn).catch(Cn)}invalidateQueries(e,t={}){return vn.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=vn.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Cn)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Cn)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(Wt(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Wt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Cn).catch(Cn)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Cn).catch(Cn)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return cn.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(rn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{nn(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(rn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{nn(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Sn(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Kt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function NO(e,t){return an(e,OO,t)}var PO=new Map([[`bold`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z`}))],[`duotone`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z`,opacity:`0.2`}),E.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`fill`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z`}))],[`light`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z`}))],[`regular`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`thin`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z`}))]]),FO=new Map([[`bold`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),E.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),IO=new Map([[`bold`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),E.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),LO=new Map([[`bold`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),E.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),RO=new Map([[`bold`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M240.49,15.51a12,12,0,0,0-17,0L173.94,65.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L100,83l-3.51-3.52a12,12,0,0,0-17,17L83,100,62.54,120.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l49.57-49.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L156,173l3.51,3.52a12,12,0,0,0,17-17L173,156l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,49.58-49.57A12,12,0,0,0,240.49,15.51Zm-121.95,161a12,12,0,0,1-17,0L79.51,154.43a12,12,0,0,1,0-17L100,117l39,39Zm58-57.95h0L156,139l-39-39,20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17ZM85.27,33.37a12,12,0,0,1,21.46-10.74l8,16A12,12,0,1,1,93.27,49.37Zm-68,57.26a12,12,0,0,1,16.1-5.36l16,8a12,12,0,1,1-10.74,21.46l-16-8A12,12,0,0,1,17.27,90.63Zm221.46,74.74a12,12,0,0,1-16.1,5.36l-16-8a12,12,0,0,1,10.74-21.46l16,8A12,12,0,0,1,238.73,165.37Zm-68,57.26a12,12,0,1,1-21.46,10.74l-8-16a12,12,0,0,1,21.46-10.74Z`}))],[`duotone`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M185,127,127,185a24,24,0,0,1-33.94,0L71,162.91A24,24,0,0,1,71,129L129,71a24,24,0,0,1,33.94,0L185,93.09A24,24,0,0,1,185,127Z`,opacity:`0.2`}),E.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32.06,32.06,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94h0L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22a16,16,0,0,1,0,22.63ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`fill`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM29,103.43l20,8A8,8,0,1,0,55,96.57l-20-8A8,8,0,0,0,29,103.43ZM227,152.57l-20-8A8,8,0,1,0,201,159.43l20,8A8,8,0,0,0,227,152.57ZM159.43,201A8,8,0,0,0,144.57,207l8,20A8,8,0,1,0,167.43,221ZM237.91,18.52a8,8,0,0,0-11.5-.18L174,70.75l-5.38-5.38a32,32,0,0,0-45.28,0L106.14,82.54a4,4,0,0,0,0,5.66l61.7,61.66a4,4,0,0,0,5.66,0l16.74-16.74a32.76,32.76,0,0,0,9.81-22.52,31.82,31.82,0,0,0-9.37-23.17l-5.38-5.37,52.2-52.17A8.22,8.22,0,0,0,237.91,18.52ZM85.64,90.34a8,8,0,0,0-11.49.18,8.22,8.22,0,0,0,.41,11.37L80.67,108,65.34,123.31A31.82,31.82,0,0,0,56,146.47,32.75,32.75,0,0,0,65.77,169l5,4.94L18.49,226.13a8.21,8.21,0,0,0-.61,11.1,8,8,0,0,0,11.72.43L82,185.25l5.37,5.38a32.1,32.1,0,0,0,45.29,0L148,175.31l6.34,6.35a8,8,0,0,0,11.32-11.32Z`}))],[`light`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M236.24,19.76a6,6,0,0,0-8.48,0L173.94,73.57l-6.79-6.78a30,30,0,0,0-42.42,0L100,91.51l-7.76-7.75a6,6,0,0,0-8.48,8.48L91.51,100,66.79,124.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l53.82-53.81,6.79,6.78a30,30,0,0,0,42.42,0L156,164.49l7.76,7.75a6,6,0,0,0,8.48-8.48L164.49,156l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,53.81-53.82A6,6,0,0,0,236.24,19.76Zm-113.45,161a18,18,0,0,1-25.46,0L75.27,158.67a18,18,0,0,1,0-25.46L100,108.49,147.51,156Zm57.94-57.94L156,147.51,108.49,100l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46ZM90.43,34.23a6,6,0,0,1,11.14-4.46l8,20a6,6,0,1,1-11.14,4.46Zm-64,59.54a6,6,0,0,1,7.8-3.34l20,8a6,6,0,1,1-4.46,11.14l-20-8A6,6,0,0,1,26.43,93.77Zm203.14,68.46a6,6,0,0,1-7.8,3.34l-20-8a6,6,0,0,1,4.46-11.14l20,8A6,6,0,0,1,229.57,162.23Zm-64,59.54a6,6,0,1,1-11.14,4.46l-8-20a6,6,0,0,1,11.14-4.46Z`}))],[`regular`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32,32,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,179.31,121.37ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`thin`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z`}))]]),zO=new Map([[`bold`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z`}))],[`duotone`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),E.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`fill`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`light`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z`}))],[`regular`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`thin`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z`}))]]),BO=new Map([[`bold`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),E.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,E.createElement(E.Fragment,null,E.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),VO=E.forwardRef((e,t)=>E.createElement(b,{ref:t,...e,weights:PO}));VO.displayName=`BookOpenIcon`;var HO=VO,UO=E.forwardRef((e,t)=>E.createElement(b,{ref:t,...e,weights:FO}));UO.displayName=`MagnifyingGlassIcon`;var WO=UO,GO=E.forwardRef((e,t)=>E.createElement(b,{ref:t,...e,weights:IO}));GO.displayName=`MoonIcon`;var KO=GO,qO=E.forwardRef((e,t)=>E.createElement(b,{ref:t,...e,weights:LO}));qO.displayName=`PencilSimpleIcon`;var JO=qO,YO=E.forwardRef((e,t)=>E.createElement(b,{ref:t,...e,weights:RO}));YO.displayName=`PlugsConnectedIcon`;var XO=YO,ZO=E.forwardRef((e,t)=>E.createElement(b,{ref:t,...e,weights:zO}));ZO.displayName=`SignOutIcon`;var QO=ZO,$O=E.forwardRef((e,t)=>E.createElement(b,{ref:t,...e,weights:BO}));$O.displayName=`SunIcon`;var ek=$O,tk={home:`https://fanout.run/start/what-fanout-is`,ingest:`https://fanout.run/start/send-telemetry`};async function nk(e,t){let n=new URLSearchParams({limit:`30`});e&&n.set(`q`,e),t&&n.set(`cursor`,t);let r=await w(`/api/agent/threads?${n}`);if(!r.ok)throw Error(`Unable to load chats (${r.status})`);return r.json()}function rk({agentAvailable:e,activeThreadID:t,activeDashboardID:n,autoFocusSearch:r=!1,onNewChat:i,onSelectThread:a,onDeletedThread:o,onSelectDashboard:s,onCreateDashboard:c,onInvestigateService:l,ref:u}){let d=$t(),[f,p]=(0,E.useState)(``),[m]=Fa(f.trim(),250),[h,g]=(0,E.useState)(null),[_,y]=(0,E.useState)(null),[b,ee]=(0,E.useState)(``),[x,C]=(0,E.useState)(``),[ne,ie]=(0,E.useState)(!1),ae=(0,E.useRef)(null);(0,E.useImperativeHandle)(u,()=>({focusSearch:()=>ae.current?.focus()}),[]),(0,E.useEffect)(()=>{r&&requestAnimationFrame(()=>ae.current?.focus())},[r]);let se=NO({queryKey:[...yn,m],queryFn:({pageParam:e})=>nk(m,e),initialPageParam:``,getNextPageParam:e=>e.nextCursor||void 0,enabled:e}),ce=dn({queryKey:bn,queryFn:()=>gn(`/api/dashboards`),refetchInterval:3e4,staleTime:vt}),le=(0,E.useMemo)(()=>se.data?.pages.flatMap(e=>e.threads)??[],[se.data]),de=(0,E.useMemo)(()=>lk(le),[le]),fe=dt(`overview`,rt({window:`1h`,namespace:``}),!!m&&!!l),pe=(0,E.useMemo)(()=>{if(!m)return[];let e=m.toLowerCase();return(fe.data?.data.services??[]).map(e=>e.service).filter(t=>t.toLowerCase().includes(e)).slice(0,6)},[fe.data,m]),me=(0,E.useMemo)(()=>{let e=ce.data?.dashboards??[],t=m.toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)):e},[ce.data,m]);function ge(e){C(``),ee(e.title),g(e)}async function _e(){if(h&&b.trim()){ie(!0),C(``);try{let e=await w(`/api/agent/threads/${encodeURIComponent(h.threadId)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:b.trim()})});if(!e.ok)throw Error(`Unable to rename chat (${e.status})`);await d.invalidateQueries({queryKey:yn}),g(null)}catch(e){C(e instanceof Error?e.message:`Unable to rename this chat.`)}finally{ie(!1)}}}async function ye(){if(_){ie(!0),C(``);try{let e=await w(`/api/agent/threads/${encodeURIComponent(_.threadId)}`,{method:`DELETE`});if(!e.ok)throw Error(`Unable to delete chat (${e.status})`);let t=_.threadId;y(null),await d.invalidateQueries({queryKey:yn}),o(t)}catch(e){C(e instanceof Error?e.message:`Unable to delete this chat.`)}finally{ie(!1)}}}return(0,D.jsxs)(he,{gap:`sm`,h:`100%`,component:`nav`,"aria-label":`Navigation`,children:[e&&(0,D.jsx)(ve,{leftSection:(0,D.jsx)(Ye,{size:16,weight:`bold`}),onClick:i,children:`New chat`}),(0,D.jsx)(Rt,{type:`auto`,offsetScrollbars:!0,flex:1,mx:-4,px:4,children:(0,D.jsxs)(he,{gap:`lg`,pb:`sm`,children:[e&&(0,D.jsxs)(he,{gap:4,children:[(0,D.jsx)(ik,{children:`Chats`}),se.isLoading&&(0,D.jsx)(ue,{py:`md`,children:(0,D.jsx)(v,{size:`xs`})}),se.isError&&(0,D.jsx)(re,{color:`bad`,radius:`md`,p:`xs`,children:`Chats could not be loaded.`}),!se.isLoading&&!se.isError&&le.length===0&&(0,D.jsx)(S,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:m?`No matching chats`:`No chats yet`}),de.map(e=>(0,D.jsxs)(he,{gap:2,children:[de.length>1&&(0,D.jsx)(S,{c:`dimmed`,size:`xs`,px:`sm`,pt:4,children:e.label}),e.threads.map(e=>(0,D.jsx)(ak,{thread:e,active:e.threadId===t,onSelect:()=>a(e.threadId),onRename:()=>ge(e),onDelete:()=>{C(``),y(e)}},e.threadId))]},e.label)),se.hasNextPage&&(0,D.jsx)(ve,{variant:`subtle`,color:`gray`,size:`compact-sm`,loading:se.isFetchingNextPage,onClick:()=>void se.fetchNextPage(),children:`See all`})]}),pe.length>0&&l&&(0,D.jsxs)(he,{gap:4,children:[(0,D.jsx)(ik,{children:`Services`}),pe.map(e=>(0,D.jsx)(te,{className:`rail-row`,p:`sm`,onClick:()=>l(e),children:(0,D.jsx)(S,{size:`sm`,fw:500,truncate:!0,children:e})},e))]}),(0,D.jsxs)(he,{gap:4,children:[(0,D.jsx)(ik,{children:`Dashboards`}),ce.isLoading&&(0,D.jsx)(ue,{py:`md`,children:(0,D.jsx)(v,{size:`xs`})}),ce.isError&&(0,D.jsx)(re,{color:`bad`,radius:`md`,p:`xs`,children:`Dashboards could not be loaded.`}),!ce.isLoading&&!ce.isError&&m&&me.length===0&&(0,D.jsx)(S,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:`No matching dashboards`}),me.map(e=>{let t=e.id===n;return(0,D.jsx)(te,{className:`rail-row`,"data-active":t||void 0,"aria-current":t?`page`:void 0,p:`sm`,onClick:()=>s(e.id),children:(0,D.jsxs)(oe,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,D.jsx)(S,{size:`sm`,fw:t?600:500,truncate:!0,children:e.name}),e.is_default&&(0,D.jsx)(Xe,{size:`xs`,variant:`light`,color:`gray`,children:`Default`})]})},e.id)}),e&&(0,D.jsx)(ve,{variant:`subtle`,color:`gray`,size:`compact-sm`,justify:`flex-start`,leftSection:(0,D.jsx)(Nt,{size:14,weight:`fill`}),onClick:c,children:`Create with AI`})]})]})}),(0,D.jsx)(ke,{ref:ae,value:f,onChange:e=>p(e.currentTarget.value),leftSection:(0,D.jsx)(WO,{size:15}),rightSection:(0,D.jsx)(ss,{size:`xs`,children:`⌘K`}),rightSectionWidth:44,placeholder:`Search`,"aria-label":`Search chats, dashboards and services`,size:`sm`}),(0,D.jsx)(pn,{opened:h!==null,onClose:()=>!ne&&g(null),title:`Rename chat`,centered:!0,children:(0,D.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),_e()},children:(0,D.jsxs)(he,{children:[(0,D.jsx)(ke,{label:`Name`,value:b,onChange:e=>ee(e.currentTarget.value),maxLength:120,autoFocus:!0}),x&&(0,D.jsx)(re,{color:`bad`,children:x}),(0,D.jsxs)(oe,{justify:`flex-end`,children:[(0,D.jsx)(ve,{variant:`default`,onClick:()=>g(null),disabled:ne,children:`Cancel`}),(0,D.jsx)(ve,{type:`submit`,loading:ne,disabled:!b.trim(),children:`Save`})]})]})})}),(0,D.jsx)(pn,{opened:_!==null,onClose:()=>!ne&&y(null),title:`Delete chat?`,centered:!0,children:(0,D.jsxs)(he,{children:[(0,D.jsxs)(S,{size:`sm`,children:[`This permanently removes `,(0,D.jsx)(S,{span:!0,fw:650,children:_?.title}),` and its saved messages.`]}),x&&(0,D.jsx)(re,{color:`bad`,children:x}),(0,D.jsxs)(oe,{justify:`flex-end`,children:[(0,D.jsx)(ve,{variant:`default`,onClick:()=>y(null),disabled:ne,children:`Cancel`}),(0,D.jsx)(ve,{color:`bad`,loading:ne,onClick:()=>void ye(),children:`Delete`})]})]})})]})}function ik({children:e}){return(0,D.jsx)(S,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,px:`sm`,children:e})}function ak({thread:e,active:t,onSelect:n,onRename:r,onDelete:i}){return(0,D.jsx)(xe,{"data-active":t||void 0,className:`rail-row`,children:(0,D.jsxs)(oe,{gap:2,wrap:`nowrap`,children:[(0,D.jsx)(te,{onClick:n,"aria-current":t?`page`:void 0,p:`sm`,flex:1,style:{minWidth:0},children:(0,D.jsxs)(he,{gap:0,children:[(0,D.jsx)(S,{size:`sm`,fw:t?600:500,truncate:!0,children:e.title}),(0,D.jsx)(S,{c:`dimmed`,size:`xs`,children:uk(e.updatedAt)})]})}),(0,D.jsxs)(Mt,{position:`bottom-end`,withinPortal:!0,children:[(0,D.jsx)(Mt.Target,{children:(0,D.jsx)(kn,{className:`rail-row-actions`,variant:`subtle`,color:`gray`,size:`sm`,mr:4,"aria-label":`Actions for ${e.title}`,children:(0,D.jsx)(Ie,{size:18,weight:`bold`})})}),(0,D.jsxs)(Mt.Dropdown,{children:[(0,D.jsx)(Mt.Item,{leftSection:(0,D.jsx)(JO,{size:15}),onClick:r,children:`Rename`}),(0,D.jsx)(Mt.Item,{color:`bad`,leftSection:(0,D.jsx)(ot,{size:15}),onClick:i,children:`Delete`})]})]})]})})}function ok(e){return e.includes(`T`)?new Date(e):new Date(`${e.replace(` `,`T`)}Z`)}function sk(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}var ck=[`Today`,`Yesterday`,`Previous 7 days`,`Older`];function lk(e){let t=sk(new Date),n=new Map;for(let r of e){let e=Math.floor((t-sk(ok(r.updatedAt)))/864e5),i=e<=0?`Today`:e===1?`Yesterday`:e<=7?`Previous 7 days`:`Older`,a=n.get(i)??[];a.push(r),n.set(i,a)}return ck.filter(e=>n.has(e)).map(e=>({label:e,threads:n.get(e)}))}function uk(e){let t=ok(e),n=sk(new Date);return Math.floor((n-sk(t))/864e5)<=1?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(t):new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}).format(t)}function dk({children:e}){let{agentAvailable:t,threadID:n,threadMissing:r,newThread:i,selectThread:a,openChat:o}=Dn(),s=Me(),c=Pa({select:e=>e.location.pathname}),{dashboardId:l}=Ue({strict:!1}),u=c===`/chat`||c.startsWith(`/chat/`),[d,f]=Ia(!1),[p,m]=(0,E.useState)(!1),[h,g]=(0,E.useState)(``),_=(0,E.useRef)(null),v=me(`(max-width: 62em)`),y=(0,E.useRef)(v);y.current=v,(0,E.useEffect)(()=>{f.close()},[c]),(0,E.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),y.current?(m(!0),f.open()):_.current?.focusSearch())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let b={agentAvailable:t,activeThreadID:u&&!r&&c!==`/chat`?n:void 0,activeDashboardID:l,onNewChat:i,onSelectThread:a,onDeletedThread:e=>{e===n&&i()},onSelectDashboard:e=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e}}),onCreateDashboard:()=>o(Tn),onInvestigateService:e=>o(`Investigate the ${e} service. Explain its errors and latency.`)};return(0,D.jsxs)(To,{header:{height:52},navbar:{width:256,breakpoint:`md`,collapsed:{mobile:!0}},padding:0,children:[(0,D.jsx)(To.Header,{children:(0,D.jsxs)(oe,{h:`100%`,px:{base:`sm`,sm:`md`},justify:`space-between`,wrap:`nowrap`,children:[(0,D.jsxs)(oe,{gap:`sm`,wrap:`nowrap`,children:[(0,D.jsx)(zo,{hiddenFrom:`md`,opened:d,onClick:()=>{m(!1),f.toggle()},size:`sm`,"aria-label":d?`Close navigation`:`Open navigation`}),(0,D.jsx)(_e,{size:`small`})]}),(0,D.jsxs)(oe,{gap:`xs`,wrap:`nowrap`,children:[(0,D.jsx)(zt,{label:`Documentation`,children:(0,D.jsx)(kn,{component:`a`,href:tk.home,target:`_blank`,rel:`noopener noreferrer`,variant:`subtle`,color:`gray`,"aria-label":`Documentation`,children:(0,D.jsx)(HO,{size:17,weight:`bold`})})}),(0,D.jsx)(fk,{}),(0,D.jsx)(pk,{onError:g})]})]})}),(0,D.jsx)(To.Navbar,{p:`sm`,children:(0,D.jsx)(rk,{ref:_,...b})}),(0,D.jsx)(is,{opened:d,onClose:f.close,hiddenFrom:`md`,size:288,padding:`sm`,title:(0,D.jsx)(_e,{size:`small`}),overlayProps:{backgroundOpacity:.24,blur:1},children:(0,D.jsx)(rk,{...b,autoFocusSearch:d&&p})}),(0,D.jsxs)(To.Main,{children:[h&&(0,D.jsx)(re,{color:`bad`,m:`md`,withCloseButton:!0,onClose:()=>g(``),children:h}),e]})]})}function fk(){let{setColorScheme:e}=Vt(),t=Ht(`light`,{getInitialValueInEffect:!0}),n=t===`dark`?`light`:`dark`,[r,i]=(0,E.useState)(!1);return(0,D.jsx)(zt,{label:`Switch to ${n} theme`,opened:r,children:(0,D.jsx)(kn,{variant:`subtle`,color:`gray`,"aria-label":`Switch to ${n} theme`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),onClick:()=>{i(!1),e(n)},children:t===`dark`?(0,D.jsx)(ek,{size:17,weight:`bold`}):(0,D.jsx)(KO,{size:17,weight:`bold`})})})}function pk({onError:e}){let t=Me(),n=Ae(),r=(n.name.trim()||n.email.trim()||`?`).charAt(0).toUpperCase();return(0,D.jsxs)(Mt,{position:`bottom-end`,withinPortal:!0,shadow:`md`,children:[(0,D.jsx)(Mt.Target,{children:(0,D.jsx)(kn,{variant:`subtle`,color:`gray`,size:`lg`,radius:`xl`,"aria-label":`Account menu`,children:(0,D.jsx)(Io,{size:26,radius:`xl`,color:`brand`,children:r})})}),(0,D.jsxs)(Mt.Dropdown,{children:[(0,D.jsx)(Mt.Label,{children:n.email||`Signed in`}),(0,D.jsx)(Mt.Item,{leftSection:(0,D.jsx)(XO,{size:15}),onClick:()=>void t({to:`/settings`}),children:`Connect telemetry`}),(0,D.jsx)(Mt.Divider,{}),(0,D.jsx)(Mt.Item,{leftSection:(0,D.jsx)(QO,{size:15}),onClick:()=>void Ce().catch(t=>e(t instanceof Error?t.message:`Sign-out failed — your session is still active.`)),children:`Sign out`})]})]})}function mk(){let{agent_available:e}=Oe(),t=Me(),n=$t(),{threadId:r}=Ue({strict:!1}),[i,a]=(0,E.useState)(Pt),o=(0,E.useRef)(new Set),s=r??i,[c,l]=(0,E.useState)([]),[u,d]=(0,E.useState)({}),[f,p]=(0,E.useState)(``),[m,h]=(0,E.useState)(!1),[g,_]=(0,E.useState)(!1),[v,y]=(0,E.useState)(``),[b,ee]=(0,E.useState)(``),[te,x]=(0,E.useState)(``),[S,C]=(0,E.useState)(0),ne=(0,E.useRef)(``),re=(0,E.useRef)(null),ie=(0,E.useRef)(0),ae=(0,E.useMemo)(()=>new DO({url:`/api/agent/runs`,threadId:s,fetch:(e,t)=>w(e,t)}),[s]),oe=!e||f===s;function se(){ie.current=0,y(``)}(0,E.useEffect)(()=>{let t=!0;if(l([]),d({}),p(``),h(!1),_(!1),se(),x(``),!e){p(s);return}!r||o.current.has(s)?(ae.setMessages([]),p(s)):w(`/api/agent/threads/${encodeURIComponent(s)}`).then(async e=>{if(e.status===404)return null;if(!e.ok)throw Error(`Unable to load thread (${e.status})`);return e.json()}).then(e=>{if(t){if(e===null){h(!0),p(s);return}ae.setMessages(e.messages??[]),l([...e.messages??[]]),p(s)}}).catch(()=>{t&&(ne.current=``,x(`This chat could not be restored. Start a new chat or try again.`))});let i=ae.subscribe({onEvent:({messages:e})=>l([...e]),onRunInitialized:()=>{_(!0),x(``)},onToolCallStartEvent:({event:e})=>{ie.current+=1,y(On(e.toolCallName))},onToolCallEndEvent:()=>{ie.current=Math.max(0,ie.current-1),ie.current===0&&y(``)},onRunFinalized:({messages:e})=>{let t=[...e];l(t),d(e=>{let n={...e};for(let e of t)e.role===`assistant`&&!n[e.id]&&(n[e.id]=Date.now());return n}),_(!1),se(),o.current.delete(s),n.invalidateQueries({queryKey:yn})},onRunFailed:e=>{console.error(`Agent run failed`,e),x(`Fanout could not complete this analysis.`),_(!1),se(),o.current.delete(s),n.invalidateQueries({queryKey:yn})}});return()=>{t=!1,i.unsubscribe(),ae.abortRun()}},[ae,e,n,S,s]),(0,E.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.target,i=n?.matches(`input, textarea, [contenteditable='true']`);e.key===`/`&&!i&&(e.preventDefault(),r?requestAnimationFrame(()=>re.current?.focus()):t({to:`/chat`}).then(()=>requestAnimationFrame(()=>re.current?.focus()))),e.key===`Escape`&&n===re.current&&(ee(``),re.current?.blur())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,r]);async function ce(){_(!0),x(``);try{await ae.runAgent()}catch(e){console.error(`Agent run failed`,e),x(`Fanout could not complete this analysis.`),_(!1),se(),o.current.delete(s)}}async function le(n){let i=n.trim();if(!e||!i||g||!oe||m)return;r||(o.current.add(s),t({to:`/chat/$threadId`,params:{threadId:s},replace:!0}));let a={id:Pt(),role:`user`,content:i};ae.addMessage(a),l([...ae.messages]),d(e=>({...e,[a.id]:Date.now()})),ee(``),await ce()}(0,E.useEffect)(()=>{let e=ne.current;oe&&r&&e&&(ne.current=``,le(e))},[oe,r,s]);function ue(e){e.preventDefault(),le(b)}function de(){ae.abortRun(),_(!1),se(),o.current.delete(s)}function fe(){!g&&ae.messages.some(e=>e.role===`user`)&&ce()}function pe(n){if(!e)return;let r=Pt();o.current.add(r),ne.current=n??``,t({to:`/chat/$threadId`,params:{threadId:r}})}function me(){ae.abortRun(),ne.current=``,a(Pt()),t({to:`/chat`})}function he(e){t({to:`/chat/$threadId`,params:{threadId:e}})}function ge(){C(e=>e+1)}return(0,D.jsx)(En.Provider,{value:{agentAvailable:e,threadID:s,threadMissing:m,messages:c,messageTimes:u,ready:oe,running:g,activity:v,input:b,setInput:ee,error:te,inputRef:re,send:le,submit:ue,stop:de,retry:fe,reloadThread:ge,openChat:pe,newThread:me,selectThread:he},children:(0,D.jsx)(dk,{children:(0,D.jsx)(wa,{})})})}function hk(){let e=(0,E.useMemo)(()=>new MO,[]);return(0,D.jsx)(Gt,{client:e,children:(0,D.jsx)(je,{children:(0,D.jsx)(mk,{})})})}var gk=Be({component:hk,notFoundComponent:()=>(0,D.jsx)(Ee,{to:`/`,replace:!0})}),_k=Le(`/`)({component:Ke(()=>An(()=>import(`./routes-Cjen0w58.js`),__vite__mapDeps([0,1,2])),`component`)}),vk=Le(`/settings`)({component:Ke(()=>An(()=>import(`./settings-Bzn5FZaN.js`),__vite__mapDeps([3,1,2,4,5,6])),`component`)}),yk=Le(`/chat/`)({component:Ke(()=>An(()=>import(`./chat.index-CDrUSu7Q.js`),__vite__mapDeps([7,8,1,4,9,10])),`component`)}),bk=Le(`/chat/$threadId`)({component:Ke(()=>An(()=>import(`./chat._threadId-CDrUSu7Q.js`),__vite__mapDeps([11,8,1,4,9,10])),`component`)}),xk=Le(`/dashboards/`)({component:Ke(()=>An(()=>import(`./dashboards.index-CsydfhAv.js`),__vite__mapDeps([12,1,2,13,14,4,15,5,9,10,6])),`component`),validateSearch:ct}),Sk=Le(`/dashboards/$dashboardId`)({component:Ke(()=>An(()=>import(`./dashboards._dashboardId-DTHMtzKv.js`),__vite__mapDeps([16,1,2,13,14,4,15,5,9,10,6])),`component`),validateSearch:ct}),Ck=_k.update({id:`/`,path:`/`,getParentRoute:()=>gk}),wk=vk.update({id:`/settings`,path:`/settings`,getParentRoute:()=>gk}),Tk=yk.update({id:`/chat/`,path:`/chat/`,getParentRoute:()=>gk}),Ek=bk.update({id:`/chat/$threadId`,path:`/chat/$threadId`,getParentRoute:()=>gk}),Dk=xk.update({id:`/dashboards/`,path:`/dashboards/`,getParentRoute:()=>gk}),Ok={IndexRoute:Ck,SettingsRoute:wk,ChatThreadIdRoute:Ek,DashboardsDashboardIdRoute:Sk.update({id:`/dashboards/$dashboardId`,path:`/dashboards/$dashboardId`,getParentRoute:()=>gk}),ChatIndexRoute:Tk,DashboardsIndexRoute:Dk},kk=Aa({routeTree:gk._addFileChildren(Ok)._addFileTypes(),defaultPreload:`intent`,scrollRestoration:!0}),Ak={brand:wt,ok:Et,warn:At,bad:yt,info:xt},jk={light:7,dark:5};function Mk(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function Nk(e){let t=Mk(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Pk(e){return Object.fromEntries(Object.entries(Ak).map(([t,n])=>[`--fanout-color-${t}-contrast`,Nk(n[jk[e]])]))}function Fk(e){return t=>{let n=t.color??Rk.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(Ak,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var Ik=.25,Lk={xs:9,sm:10,md:11,lg:13,xl:16},Rk={primaryColor:`brand`,primaryShade:jk,autoContrast:!0,luminanceThreshold:Ik,colors:{dark:Ot,brand:wt,ok:Et,warn:At,bad:yt,info:xt},defaultRadius:`md`,fontFamily:it.body,fontFamilyMonospace:it.display,headings:{fontFamily:it.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:Vk(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:Vk(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:Bk(t.size)})}}},zk=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":ft.light.muted,...Pk(`light`)},dark:Pk(`dark`)});function Bk(e){let t=Lk[e??`md`];return t===void 0||t>=gt.micro?{}:{"--badge-fz":`${gt.micro/16}rem`}}function Vk(e,t){return!e||e===Rk.primaryColor?{[t]:`var(--fanout-color-${Rk.primaryColor}-contrast)`}:{}}var Hk=Fk(m),Uk=eo({...Rk,variantColorResolver:Hk});(0,hs.createRoot)(document.getElementById(`root`)).render((0,D.jsx)(E.StrictMode,{children:(0,D.jsx)($a,{theme:Uk,defaultColorScheme:`auto`,cssVariablesResolver:zk,children:(0,D.jsx)(Na,{router:kk})})}));export{j_ as A,Ty as C,Pv as D,Hv as E,Th as M,wh as N,cv as O,L as P,ty as S,B as T,G as _,$_ as a,Tv as b,jv as c,Rv as d,H as f,by as g,Kv as h,ev as i,kh as j,L_ as k,kv as l,iv as m,xk as n,wv as o,Wv as p,tk as r,Xv as s,Sk as t,U as u,W as v,Jv as w,Bv as x,Iv as y}; \ No newline at end of file diff --git a/internal/ui/dist/assets/mcp-app-frame-CNfakaT6.js b/internal/ui/dist/assets/mcp-app-frame-CNfakaT6.js new file mode 100644 index 00000000..f83f113a --- /dev/null +++ b/internal/ui/dist/assets/mcp-app-frame-CNfakaT6.js @@ -0,0 +1,58 @@ +import{_ as e,d as t,f as n,gt as r,l as i,mt as a,x as o,yt as s}from"./brand-CnsMBQCm.js";import{i as c}from"./auth-DmDDao4N.js";import{t as l}from"./use-computed-color-scheme-B3cychmA.js";import{A as u,C as d,D as f,E as p,M as m,N as h,O as g,P as _,S as v,T as y,_ as b,a as x,b as S,c as ee,d as C,f as w,g as te,h as ne,i as re,j as ie,k as T,l as E,m as ae,o as oe,p as se,s as D,u as ce,v as O,w as k,x as A,y as le}from"./index-e7JI4Tgx.js";var j={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},ue;ue||={};function de(e){return h(x,e)}function fe(e){return m(re,e)}function pe(e){return ie(oe,e)}var me=Object.create,M=Object.defineProperty,he=Object.getOwnPropertyDescriptor,ge=Object.getOwnPropertyNames,N=Object.getPrototypeOf,_e=Object.prototype.hasOwnProperty,ve=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ye=(e,t)=>{let n={};for(var r in e)M(n,r,{get:e[r],enumerable:!0});return t&&M(n,Symbol.toStringTag,{value:`Module`}),n},P=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ge(t),a=0,o=i.length,s;at[e]).bind(null,s),enumerable:!(r=he(t,s))||r.enumerable});return e},be=(e,t,n)=>(n=e==null?{}:me(N(e)),P(t||!e||!e.__esModule?M(n,`default`,{value:e,enumerable:!0}):n,e)),F=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),xe=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),Se=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),Ce=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function we(e){return typeof e==`string`&&xe.has(e.replace(/#$/,``))}function Te(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(F.has(n))return`2020-12`;if(xe.has(n))return`2019-09`;if(Se.has(n)||Ce.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var Ee=`2025-11-25`,De=[Ee,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Oe=`io.modelcontextprotocol/related-task`,ke=`io.modelcontextprotocol/protocolVersion`,Ae=`io.modelcontextprotocol/clientInfo`,je=`io.modelcontextprotocol/serverInfo`,Me=`io.modelcontextprotocol/clientCapabilities`,Ne=`io.modelcontextprotocol/subscriptionId`,Pe=`io.modelcontextprotocol/logLevel`,Fe=te(()=>p([y(),S(),w(),ee(),k(y(),Fe),C(Fe)])),I=k(y(),Fe),Ie=C(Fe),Le=p([y(),S().int()]),Re=y(),ze=A({ttl:S().optional()}),Be=A({taskId:y()}),Ve=O({progressToken:Le.optional(),[Oe]:Be.optional()}),L=A({_meta:Ve.optional()}),He=L.extend({task:ze.optional()}),R=A({method:y(),params:L.loose().optional()}),z=A({_meta:Ve.optional()}),B=A({method:y(),params:z.loose().optional()}),Ue=O({get[je](){return tt.optional().catch(void 0)}}),V=O({_meta:Ue.optional()}),H=p([y(),S().int()]),We=A({jsonrpc:b(`2.0`),id:H,...R.shape}).strict(),Ge=A({jsonrpc:b(`2.0`),...B.shape}).strict(),Ke=A({jsonrpc:b(`2.0`),id:H,result:V}).strict(),qe=A({jsonrpc:b(`2.0`),id:H.optional(),error:A({code:S().int(),message:y(),data:f().optional()})}).strict(),Je=p([We,Ge,Ke,qe]),Ye=p([Ke,qe]),Xe=V.strict(),Ze=z.extend({requestId:H.optional(),reason:y().optional()}),Qe=B.extend({method:b(`notifications/cancelled`),params:Ze}),$e=A({src:y(),mimeType:y().optional(),sizes:C(y()).optional(),theme:D([`light`,`dark`]).optional()}),et=A({icons:C($e).optional()}),U=A({name:y(),title:y().optional()}),tt=U.extend({...U.shape,...et.shape,version:y(),websiteUrl:y().optional(),description:y().optional()}),nt=ne(A({applyDefaults:w().optional()}),I),rt=d(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ne(A({form:nt.optional(),url:I.optional()}),I.optional())),it=O({list:I.optional(),cancel:I.optional(),requests:O({sampling:O({createMessage:I.optional()}).optional(),elicitation:O({create:I.optional()}).optional()}).optional()}),at=O({list:I.optional(),cancel:I.optional(),requests:O({tools:O({call:I.optional()}).optional()}).optional()}),ot=A({experimental:k(y(),I).optional(),sampling:A({context:I.optional(),tools:I.optional()}).optional(),elicitation:rt.optional(),roots:A({listChanged:w().optional()}).optional(),tasks:it.optional(),extensions:k(y(),I).optional()}),W=L.extend({protocolVersion:y(),capabilities:ot,clientInfo:tt}),st=R.extend({method:b(`initialize`),params:W}),ct=A({experimental:k(y(),I).optional(),logging:I.optional(),completions:I.optional(),prompts:A({listChanged:w().optional()}).optional(),resources:A({subscribe:w().optional(),listChanged:w().optional()}).optional(),tools:A({listChanged:w().optional()}).optional(),tasks:at.optional(),extensions:k(y(),I).optional()}),lt=V.extend({protocolVersion:y(),capabilities:ct,serverInfo:tt,instructions:y().optional()}),ut=B.extend({method:b(`notifications/initialized`),params:z.optional()}),dt=R.extend({method:b(`server/discover`),params:L.optional()}),ft=V.extend({supportedVersions:C(y()),capabilities:ct,instructions:y().optional()}),pt=R.extend({method:b(`ping`),params:L.optional()}),mt=A({progress:S(),total:v(S()),message:v(y())}),ht=A({...z.shape,...mt.shape,progressToken:Le}),gt=B.extend({method:b(`notifications/progress`),params:ht}),_t=L.extend({cursor:Re.optional()}),vt=R.extend({params:_t.optional()}),yt=V.extend({nextCursor:Re.optional()}),bt=A({uri:y(),mimeType:v(y()),_meta:k(y(),f()).optional()}),xt=bt.extend({text:y()}),St=y().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Ct=bt.extend({blob:St}),wt=D([`user`,`assistant`]),Tt=A({audience:C(wt).optional(),priority:S().min(0).max(1).optional(),lastModified:de({offset:!0}).optional()}),Et=A({...U.shape,...et.shape,uri:y(),description:v(y()),mimeType:v(y()),size:v(S()),annotations:Tt.optional(),_meta:v(O({}))}),Dt=A({...U.shape,...et.shape,uriTemplate:y(),description:v(y()),mimeType:v(y()),annotations:Tt.optional(),_meta:v(O({}))}),Ot=vt.extend({method:b(`resources/list`)}),kt=yt.extend({resources:C(Et)}),At=vt.extend({method:b(`resources/templates/list`)}),jt=yt.extend({resourceTemplates:C(Dt)}),Mt=L.extend({uri:y()}),Nt=Mt,Pt=R.extend({method:b(`resources/read`),params:Nt}),Ft=V.extend({contents:C(p([xt,Ct]))}),G=B.extend({method:b(`notifications/resources/list_changed`),params:z.optional()}),K=Mt,It=R.extend({method:b(`resources/subscribe`),params:K}),Lt=Mt,Rt=R.extend({method:b(`resources/unsubscribe`),params:Lt}),zt=A({toolsListChanged:w().optional(),promptsListChanged:w().optional(),resourcesListChanged:w().optional(),resourceSubscriptions:C(y()).optional()}),Bt=L.extend({notifications:zt}),Vt=R.extend({method:b(`subscriptions/listen`),params:Bt}),Ht=z.extend({notifications:zt}),Ut=B.extend({method:b(`notifications/subscriptions/acknowledged`),params:Ht}),Wt=Ue.extend({[Ne]:H}),Gt=V.extend({_meta:Wt}),Kt=z.extend({uri:y()}),qt=B.extend({method:b(`notifications/resources/updated`),params:Kt}),Jt=A({name:y(),description:v(y()),required:v(w())}),Yt=A({...U.shape,...et.shape,description:v(y()),arguments:v(C(Jt)),_meta:v(O({}))}),Xt=vt.extend({method:b(`prompts/list`)}),Zt=yt.extend({prompts:C(Yt)}),Qt=L.extend({name:y(),arguments:k(y(),y()).optional()}),$t=R.extend({method:b(`prompts/get`),params:Qt}),q=A({type:b(`text`),text:y(),annotations:Tt.optional(),_meta:k(y(),f()).optional()}),en=A({type:b(`image`),data:St,mimeType:y(),annotations:Tt.optional(),_meta:k(y(),f()).optional()}),tn=A({type:b(`audio`),data:St,mimeType:y(),annotations:Tt.optional(),_meta:k(y(),f()).optional()}),nn=A({type:b(`tool_use`),name:y(),id:y(),input:k(y(),f()),_meta:k(y(),f()).optional()}),rn=A({type:b(`resource`),resource:p([xt,Ct]),annotations:Tt.optional(),_meta:k(y(),f()).optional()}),an=Et.extend({type:b(`resource_link`)}),on=p([q,en,tn,an,rn]),sn=A({role:wt,content:on}),cn=V.extend({description:y().optional(),messages:C(sn)}),ln=B.extend({method:b(`notifications/prompts/list_changed`),params:z.optional()}),un=A({title:y().optional(),readOnlyHint:w().optional(),destructiveHint:w().optional(),idempotentHint:w().optional(),openWorldHint:w().optional()}),dn=A({taskSupport:D([`required`,`optional`,`forbidden`]).optional()}),fn=A({...U.shape,...et.shape,description:y().optional(),inputSchema:A({type:b(`object`),properties:k(y(),Fe).optional(),required:C(y()).optional()}).catchall(f()),outputSchema:O({$schema:y().optional()}).optional(),annotations:un.optional(),execution:dn.optional(),_meta:k(y(),f()).optional()}),pn=vt.extend({method:b(`tools/list`)}),mn=yt.extend({tools:C(fn)}),hn=V.extend({content:C(on).default([]),structuredContent:f().optional(),isError:w().optional()}),gn=hn.or(V.extend({toolResult:f()})),_n=He.extend({name:y(),arguments:k(y(),f()).optional()}),vn=R.extend({method:b(`tools/call`),params:_n}),yn=B.extend({method:b(`notifications/tools/list_changed`),params:z.optional()}),bn=A({autoRefresh:w().default(!0),debounceMs:S().int().nonnegative().default(300)}),xn=D([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Sn=L.extend({level:xn}),Cn=R.extend({method:b(`logging/setLevel`),params:Sn}),wn=z.extend({level:xn,logger:y().optional(),data:f()}),Tn=B.extend({method:b(`notifications/message`),params:wn}),En=A({name:y().optional()}),Dn=A({hints:C(En).optional(),costPriority:S().min(0).max(1).optional(),speedPriority:S().min(0).max(1).optional(),intelligencePriority:S().min(0).max(1).optional()}),On=A({mode:D([`auto`,`required`,`none`]).optional()}),kn=A({type:b(`tool_result`),toolUseId:y().describe(`The unique identifier for the corresponding tool call.`),content:C(on),structuredContent:f().optional(),isError:w().optional(),_meta:k(y(),f()).optional()}),An=se(`type`,[q,en,tn]),jn=se(`type`,[q,en,tn,nn,kn]),Mn=A({role:wt,content:p([jn,C(jn)]),_meta:k(y(),f()).optional()}),Nn=He.extend({messages:C(Mn),modelPreferences:Dn.optional(),systemPrompt:y().optional(),includeContext:D([`none`,`thisServer`,`allServers`]).optional(),temperature:S().optional(),maxTokens:S().int(),stopSequences:C(y()).optional(),metadata:I.optional(),tools:C(fn).optional(),toolChoice:On.optional()}),Pn=R.extend({method:b(`sampling/createMessage`),params:Nn}),Fn=V.extend({model:y(),stopReason:v(D([`endTurn`,`stopSequence`,`maxTokens`]).or(y())),role:wt,content:An}),In=V.extend({model:y(),stopReason:v(D([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(y())),role:wt,content:p([jn,C(jn)])}),Ln=A({type:b(`boolean`),title:y().optional(),description:y().optional(),default:w().optional()}),Rn=A({type:b(`string`),title:y().optional(),description:y().optional(),minLength:S().optional(),maxLength:S().optional(),format:D([`email`,`uri`,`date`,`date-time`]).optional(),default:y().optional()}),zn=A({type:D([`number`,`integer`]),title:y().optional(),description:y().optional(),minimum:S().optional(),maximum:S().optional(),default:S().optional()}),Bn=A({type:b(`string`),title:y().optional(),description:y().optional(),enum:C(y()),default:y().optional()}),Vn=A({type:b(`string`),title:y().optional(),description:y().optional(),oneOf:C(A({const:y(),title:y()})),default:y().optional()}),Hn=A({type:b(`string`),title:y().optional(),description:y().optional(),enum:C(y()),enumNames:C(y()).optional(),default:y().optional()}),Un=p([Bn,Vn]),Wn=A({type:b(`array`),title:y().optional(),description:y().optional(),minItems:S().optional(),maxItems:S().optional(),items:A({type:b(`string`),enum:C(y())}),default:C(y()).optional()}),Gn=A({type:b(`array`),title:y().optional(),description:y().optional(),minItems:S().optional(),maxItems:S().optional(),items:A({anyOf:C(A({const:y(),title:y()}))}),default:C(y()).optional()}),Kn=p([Wn,Gn]),qn=p([Hn,Un,Kn]),Jn=p([qn,Ln,Rn,zn]),Yn=He.extend({mode:b(`form`).optional(),message:y(),requestedSchema:A({type:b(`object`),properties:k(y(),Jn),required:C(y()).optional()}).catchall(f())}),Xn=He.extend({mode:b(`url`),message:y(),elicitationId:y(),url:y().url()}),Zn=p([Yn,Xn]),Qn=R.extend({method:b(`elicitation/create`),params:Zn}),$n=z.extend({elicitationId:y()}),er=B.extend({method:b(`notifications/elicitation/complete`),params:$n}),tr=V.extend({action:D([`accept`,`decline`,`cancel`]),content:d(e=>e===null?void 0:e,k(y(),p([y(),S(),w(),C(y())])).optional())}),nr=A({type:b(`ref/resource`),uri:y()}),rr=A({type:b(`ref/prompt`),name:y()}),ir=L.extend({ref:p([rr,nr]),argument:A({name:y(),value:y()}),context:A({arguments:k(y(),y()).optional()}).optional()}),ar=R.extend({method:b(`completion/complete`),params:ir}),or=V.extend({completion:O({values:C(y()).max(100),total:v(S().int()),hasMore:v(w())})}),sr=A({uri:y().startsWith(`file://`),name:y().optional(),_meta:k(y(),f()).optional()}),cr=R.extend({method:b(`roots/list`),params:L.optional()}),lr=V.extend({roots:C(sr)}),ur=B.extend({method:b(`notifications/roots/list_changed`),params:z.optional()}),dr=O({ttl:S().optional(),pollInterval:S().optional()}),fr=D([`working`,`input_required`,`completed`,`failed`,`cancelled`]),pr=A({taskId:y(),status:fr,ttl:p([S(),ee()]),createdAt:y(),lastUpdatedAt:y(),pollInterval:v(S()),statusMessage:v(y())}),mr=V.extend({task:pr}),hr=z.merge(pr),gr=B.extend({method:b(`notifications/tasks/status`),params:hr}),_r=R.extend({method:b(`tasks/get`),params:L.extend({taskId:y()})}),vr=V.merge(pr),yr=R.extend({method:b(`tasks/result`),params:L.extend({taskId:y()})}),br=V.loose(),xr=vt.extend({method:b(`tasks/list`)}),Sr=yt.extend({tasks:C(pr)}),Cr=R.extend({method:b(`tasks/cancel`),params:L.extend({taskId:y()})}),wr=V.merge(pr),Tr=p([pt,st,dt,ar,Cn,$t,Xt,Ot,At,Pt,It,Rt,Vt,vn,pn]),Er=p([Qe,gt,ut,ur]),Dr=p([Xe,Fn,In,tr,lr]),Or=p([pt,Pn,Qn,cr]),kr=p([Qe,gt,Tn,qt,G,yn,ln,Ut,er]),Ar=p([Xe,lt,ft,or,cn,Zt,kt,jt,Ft,hn,mn,Gt]),J=g().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:j.custom,message:`URL must be parseable`,fatal:!0}),_}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),jr=O({resource:y().url(),authorization_servers:C(J).optional(),jwks_uri:y().url().optional(),scopes_supported:C(y()).optional(),bearer_methods_supported:C(y()).optional(),resource_signing_alg_values_supported:C(y()).optional(),resource_name:y().optional(),resource_documentation:y().optional(),resource_policy_uri:y().url().optional(),resource_tos_uri:y().url().optional(),tls_client_certificate_bound_access_tokens:w().optional(),authorization_details_types_supported:C(y()).optional(),dpop_signing_alg_values_supported:C(y()).optional(),dpop_bound_access_tokens_required:w().optional()}),Mr=O({issuer:y(),authorization_endpoint:J,token_endpoint:J,registration_endpoint:J.optional(),scopes_supported:C(y()).optional(),response_types_supported:C(y()),response_modes_supported:C(y()).optional(),grant_types_supported:C(y()).optional(),token_endpoint_auth_methods_supported:C(y()).optional(),token_endpoint_auth_signing_alg_values_supported:C(y()).optional(),service_documentation:J.optional(),revocation_endpoint:J.optional(),revocation_endpoint_auth_methods_supported:C(y()).optional(),revocation_endpoint_auth_signing_alg_values_supported:C(y()).optional(),introspection_endpoint:y().optional(),introspection_endpoint_auth_methods_supported:C(y()).optional(),introspection_endpoint_auth_signing_alg_values_supported:C(y()).optional(),code_challenge_methods_supported:C(y()).optional(),client_id_metadata_document_supported:w().optional(),authorization_response_iss_parameter_supported:w().optional().catch(void 0),dpop_signing_alg_values_supported:C(y()).optional()}),Nr=O({issuer:y(),authorization_endpoint:J,token_endpoint:J,userinfo_endpoint:J.optional(),jwks_uri:J,registration_endpoint:J.optional(),scopes_supported:C(y()).optional(),response_types_supported:C(y()),response_modes_supported:C(y()).optional(),grant_types_supported:C(y()).optional(),acr_values_supported:C(y()).optional(),subject_types_supported:C(y()),id_token_signing_alg_values_supported:C(y()),id_token_encryption_alg_values_supported:C(y()).optional(),id_token_encryption_enc_values_supported:C(y()).optional(),userinfo_signing_alg_values_supported:C(y()).optional(),userinfo_encryption_alg_values_supported:C(y()).optional(),userinfo_encryption_enc_values_supported:C(y()).optional(),request_object_signing_alg_values_supported:C(y()).optional(),request_object_encryption_alg_values_supported:C(y()).optional(),request_object_encryption_enc_values_supported:C(y()).optional(),token_endpoint_auth_methods_supported:C(y()).optional(),token_endpoint_auth_signing_alg_values_supported:C(y()).optional(),display_values_supported:C(y()).optional(),claim_types_supported:C(y()).optional(),claims_supported:C(y()).optional(),service_documentation:y().optional(),claims_locales_supported:C(y()).optional(),ui_locales_supported:C(y()).optional(),claims_parameter_supported:w().optional(),request_parameter_supported:w().optional(),request_uri_parameter_supported:w().optional(),require_request_uri_registration:w().optional(),op_policy_uri:J.optional(),op_tos_uri:J.optional(),client_id_metadata_document_supported:w().optional(),authorization_response_iss_parameter_supported:w().optional().catch(void 0)}),Pr=A({...Nr.shape,...Mr.pick({code_challenge_methods_supported:!0}).shape}),Fr=A({access_token:y(),id_token:y().optional(),token_type:y(),expires_in:pe().optional(),scope:y().optional(),refresh_token:y().optional(),issuer:y().optional().catch(void 0)}).strip(),Ir=A({issued_token_type:b(`urn:ietf:params:oauth:token-type:id-jag`),access_token:y(),token_type:y().optional(),expires_in:S().optional(),scope:y().optional()}).strip(),Lr=A({error:y(),error_description:y().optional(),error_uri:y().optional()}),Rr=J.optional().or(b(``).transform(()=>void 0)),zr=A({redirect_uris:C(J),token_endpoint_auth_method:y().optional(),grant_types:C(y()).optional(),response_types:C(y()).optional(),application_type:y().optional(),client_name:y().optional(),client_uri:J.optional(),logo_uri:Rr,scope:y().optional(),contacts:C(y()).optional(),tos_uri:Rr,policy_uri:y().optional(),jwks_uri:J.optional(),jwks:ce().optional(),software_id:y().optional(),software_version:y().optional(),software_statement:y().optional()}).strip(),Br=A({client_id:y(),client_secret:y().optional(),client_id_issued_at:S().optional(),client_secret_expires_at:S().optional(),issuer:y().optional().catch(void 0)}).strip(),Vr=zr.merge(Br),Hr=A({error:y(),error_description:y().optional()}).strip(),Ur=A({token:y(),token_type_hint:y().optional()}).strip(),Wr=Symbol.for(`mcp.sdk.errorBrands`);function Gr(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,Wr,{value:n,enumerable:!1,configurable:!0})}function Kr(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Wr)){let n=t[Wr];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var qr=function(e){return e.InvalidRequest=`invalid_request`,e.InvalidClient=`invalid_client`,e.InvalidGrant=`invalid_grant`,e.UnauthorizedClient=`unauthorized_client`,e.UnsupportedGrantType=`unsupported_grant_type`,e.InvalidScope=`invalid_scope`,e.AccessDenied=`access_denied`,e.ServerError=`server_error`,e.TemporarilyUnavailable=`temporarily_unavailable`,e.UnsupportedResponseType=`unsupported_response_type`,e.UnsupportedTokenType=`unsupported_token_type`,e.InvalidToken=`invalid_token`,e.MethodNotAllowed=`method_not_allowed`,e.TooManyRequests=`too_many_requests`,e.InvalidClientMetadata=`invalid_client_metadata`,e.InvalidRedirectUri=`invalid_redirect_uri`,e.InsufficientScope=`insufficient_scope`,e.InvalidTarget=`invalid_target`,e.InvalidDpopProof=`invalid_dpop_proof`,e.UseDpopNonce=`use_dpop_nonce`,e}({}),Jr=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return Kr(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Kr(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,Gr(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},Y=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),X=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return Kr(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Kr(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,Gr(this,new.target)}},Yr=class extends X{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}};function Xr(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function Zr(e){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t={...e};return delete t.issuer,t}function Qr({requestedResource:e,configuredResource:t}){let n=typeof e==`string`?new URL(e):new URL(e.href),r=typeof t==`string`?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length=$r}function ni(e){return e.filter(e=>!ti(e))}function ri(e){return e.filter(e=>ti(e))}function ii(e){let t=e.structuredContent;return t===void 0||typeof t==`object`&&t&&!Array.isArray(t)||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var ai=[`task`,`inputRequests`,`requestState`];function oi(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||ai.some(t=>t in e)?e:{...e,content:[]}}function si(){let e=te(()=>p([y(),S(),w(),ee(),k(y(),e),C(e)])),t=k(y(),e),n=p([y(),S().int()]),r=y(),i=A({ttl:S().optional()}),a=A({taskId:y()}),o=O({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=A({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=A({method:y(),params:s.loose().optional()}),u=A({_meta:o.optional()}),m=A({method:y(),params:u.loose().optional()}),h=O({_meta:o.optional()}),g=p([y(),S().int()]),_=h.strict(),x=u.extend({requestId:g.optional(),reason:y().optional()}),re=m.extend({method:b(`notifications/cancelled`),params:x}),ie=A({src:y(),mimeType:y().optional(),sizes:C(y()).optional(),theme:D([`light`,`dark`]).optional()}),T=A({icons:C(ie).optional()}),E=A({name:y(),title:y().optional()}),ae=E.extend({...E.shape,...T.shape,version:y(),websiteUrl:y().optional(),description:y().optional()}),oe=ne(A({applyDefaults:w().optional()}),t),ce=d(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ne(A({form:oe.optional(),url:t.optional()}),t.optional())),le=O({list:t.optional(),cancel:t.optional(),requests:O({sampling:O({createMessage:t.optional()}).optional(),elicitation:O({create:t.optional()}).optional()}).optional()}),j=O({list:t.optional(),cancel:t.optional(),requests:O({tools:O({call:t.optional()}).optional()}).optional()}),ue=A({experimental:k(y(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:ce.optional(),roots:A({listChanged:w().optional()}).optional(),tasks:le.optional(),extensions:k(y(),t).optional()}),fe=s.extend({protocolVersion:y(),capabilities:ue,clientInfo:ae}),pe=l.extend({method:b(`initialize`),params:fe}),me=A({experimental:k(y(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:w().optional()}).optional(),resources:A({subscribe:w().optional(),listChanged:w().optional()}).optional(),tools:A({listChanged:w().optional()}).optional(),tasks:j.optional(),extensions:k(y(),t).optional()}),M=h.extend({protocolVersion:y(),capabilities:me,serverInfo:ae,instructions:y().optional()}),he=m.extend({method:b(`notifications/initialized`),params:u.optional()}),ge=l.extend({method:b(`ping`),params:s.optional()}),N=A({progress:S(),total:v(S()),message:v(y())}),_e=A({...u.shape,...N.shape,progressToken:n}),ve=m.extend({method:b(`notifications/progress`),params:_e}),ye=s.extend({cursor:r.optional()}),P=l.extend({params:ye.optional()}),be=h.extend({nextCursor:r.optional()}),F=A({uri:y(),mimeType:v(y()),_meta:k(y(),f()).optional()}),xe=F.extend({text:y()}),Se=y().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Ce=F.extend({blob:Se}),we=D([`user`,`assistant`]),Te=A({audience:C(we).optional(),priority:S().min(0).max(1).optional(),lastModified:de({offset:!0}).optional()}),Ee=A({...E.shape,...T.shape,uri:y(),description:v(y()),mimeType:v(y()),size:v(S()),annotations:Te.optional(),_meta:v(O({}))}),De=A({...E.shape,...T.shape,uriTemplate:y(),description:v(y()),mimeType:v(y()),annotations:Te.optional(),_meta:v(O({}))}),Oe=P.extend({method:b(`resources/list`)}),ke=be.extend({resources:C(Ee)}),Ae=P.extend({method:b(`resources/templates/list`)}),je=be.extend({resourceTemplates:C(De)}),Me=s.extend({uri:y()}),Ne=Me,Pe=l.extend({method:b(`resources/read`),params:Ne}),Fe=h.extend({contents:C(p([xe,Ce]))}),I=m.extend({method:b(`notifications/resources/list_changed`),params:u.optional()}),Ie=Me,Le=l.extend({method:b(`resources/subscribe`),params:Ie}),Re=Me,ze=l.extend({method:b(`resources/unsubscribe`),params:Re}),Be=u.extend({uri:y()}),Ve=m.extend({method:b(`notifications/resources/updated`),params:Be}),L=A({name:y(),description:v(y()),required:v(w())}),He=A({...E.shape,...T.shape,description:v(y()),arguments:v(C(L)),_meta:v(O({}))}),R=P.extend({method:b(`prompts/list`)}),z=be.extend({prompts:C(He)}),B=s.extend({name:y(),arguments:k(y(),y()).optional()}),Ue=l.extend({method:b(`prompts/get`),params:B}),V=A({type:b(`text`),text:y(),annotations:Te.optional(),_meta:k(y(),f()).optional()}),H=A({type:b(`image`),data:Se,mimeType:y(),annotations:Te.optional(),_meta:k(y(),f()).optional()}),We=A({type:b(`audio`),data:Se,mimeType:y(),annotations:Te.optional(),_meta:k(y(),f()).optional()}),Ge=A({type:b(`tool_use`),name:y(),id:y(),input:k(y(),f()),_meta:k(y(),f()).optional()}),Ke=A({type:b(`resource`),resource:p([xe,Ce]),annotations:Te.optional(),_meta:k(y(),f()).optional()}),qe=Ee.extend({type:b(`resource_link`)}),Je=p([V,H,We,qe,Ke]),Ye=A({role:we,content:Je}),Xe=h.extend({description:y().optional(),messages:C(Ye)}),Ze=m.extend({method:b(`notifications/prompts/list_changed`),params:u.optional()}),Qe=A({title:y().optional(),readOnlyHint:w().optional(),destructiveHint:w().optional(),idempotentHint:w().optional(),openWorldHint:w().optional()}),$e=A({taskSupport:D([`required`,`optional`,`forbidden`]).optional()}),et=A({...E.shape,...T.shape,description:y().optional(),inputSchema:A({type:b(`object`),properties:k(y(),e).optional(),required:C(y()).optional()}).catchall(f()),outputSchema:A({type:b(`object`),properties:k(y(),e).optional(),required:C(y()).optional()}).catchall(f()).optional(),annotations:Qe.optional(),execution:$e.optional(),_meta:k(y(),f()).optional()}),U=P.extend({method:b(`tools/list`)}),tt=be.extend({tools:C(et)}),nt=h.extend({content:C(Je),structuredContent:k(y(),f()).optional(),isError:w().optional()}),rt=c.extend({name:y(),arguments:k(y(),f()).optional()}),it=l.extend({method:b(`tools/call`),params:rt}),at=m.extend({method:b(`notifications/tools/list_changed`),params:u.optional()}),ot=D([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),W=s.extend({level:ot}),st=l.extend({method:b(`logging/setLevel`),params:W}),ct=u.extend({level:ot,logger:y().optional(),data:f()}),lt=m.extend({method:b(`notifications/message`),params:ct}),ut=A({name:y().optional()}),dt=A({hints:C(ut).optional(),costPriority:S().min(0).max(1).optional(),speedPriority:S().min(0).max(1).optional(),intelligencePriority:S().min(0).max(1).optional()}),ft=A({mode:D([`auto`,`required`,`none`]).optional()}),pt=A({type:b(`tool_result`),toolUseId:y().describe(`The unique identifier for the corresponding tool call.`),content:C(Je),structuredContent:A({}).loose().optional(),isError:w().optional(),_meta:k(y(),f()).optional()}),mt=se(`type`,[V,H,We]),ht=se(`type`,[V,H,We,Ge,pt]),gt=A({role:we,content:p([ht,C(ht)]),_meta:k(y(),f()).optional()}),_t=c.extend({messages:C(gt),modelPreferences:dt.optional(),systemPrompt:y().optional(),includeContext:D([`none`,`thisServer`,`allServers`]).optional(),temperature:S().optional(),maxTokens:S().int(),stopSequences:C(y()).optional(),metadata:t.optional(),tools:C(et).optional(),toolChoice:ft.optional()}),vt=l.extend({method:b(`sampling/createMessage`),params:_t}),yt=h.extend({model:y(),stopReason:v(D([`endTurn`,`stopSequence`,`maxTokens`]).or(y())),role:we,content:mt}),bt=h.extend({model:y(),stopReason:v(D([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(y())),role:we,content:p([ht,C(ht)])}),xt=A({type:b(`boolean`),title:y().optional(),description:y().optional(),default:w().optional()}),St=A({type:b(`string`),title:y().optional(),description:y().optional(),minLength:S().optional(),maxLength:S().optional(),format:D([`email`,`uri`,`date`,`date-time`]).optional(),default:y().optional()}),Ct=A({type:D([`number`,`integer`]),title:y().optional(),description:y().optional(),minimum:S().optional(),maximum:S().optional(),default:S().optional()}),wt=A({type:b(`string`),title:y().optional(),description:y().optional(),enum:C(y()),default:y().optional()}),Tt=A({type:b(`string`),title:y().optional(),description:y().optional(),oneOf:C(A({const:y(),title:y()})),default:y().optional()}),Et=A({type:b(`string`),title:y().optional(),description:y().optional(),enum:C(y()),enumNames:C(y()).optional(),default:y().optional()}),Dt=p([wt,Tt]),Ot=A({type:b(`array`),title:y().optional(),description:y().optional(),minItems:S().optional(),maxItems:S().optional(),items:A({type:b(`string`),enum:C(y())}),default:C(y()).optional()}),kt=A({type:b(`array`),title:y().optional(),description:y().optional(),minItems:S().optional(),maxItems:S().optional(),items:A({anyOf:C(A({const:y(),title:y()}))}),default:C(y()).optional()}),At=p([Ot,kt]),jt=p([Et,Dt,At]),Mt=p([jt,xt,St,Ct]),Nt=c.extend({mode:b(`form`).optional(),message:y(),requestedSchema:A({type:b(`object`),properties:k(y(),Mt),required:C(y()).optional()}).catchall(f())}),Pt=c.extend({mode:b(`url`),message:y(),elicitationId:y(),url:y().url()}),Ft=p([Nt,Pt]),G=l.extend({method:b(`elicitation/create`),params:Ft}),K=u.extend({elicitationId:y()}),It=m.extend({method:b(`notifications/elicitation/complete`),params:K}),Lt=h.extend({action:D([`accept`,`decline`,`cancel`]),content:d(e=>e===null?void 0:e,k(y(),p([y(),S(),w(),C(y())])).optional())}),Rt=A({type:b(`ref/resource`),uri:y()}),zt=A({type:b(`ref/prompt`),name:y()}),Bt=s.extend({ref:p([zt,Rt]),argument:A({name:y(),value:y()}),context:A({arguments:k(y(),y()).optional()}).optional()}),Vt=l.extend({method:b(`completion/complete`),params:Bt}),Ht=h.extend({completion:O({values:C(y()).max(100),total:v(S().int()),hasMore:v(w())})}),Ut=A({uri:y().startsWith(`file://`),name:y().optional(),_meta:k(y(),f()).optional()}),Wt=l.extend({method:b(`roots/list`),params:s.optional()}),Gt=h.extend({roots:C(Ut)}),Kt=m.extend({method:b(`notifications/roots/list_changed`),params:u.optional()}),qt=O({ttl:S().optional(),pollInterval:S().optional()}),Jt=D([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Yt=A({taskId:y(),status:Jt,ttl:p([S(),ee()]),createdAt:y(),lastUpdatedAt:y(),pollInterval:v(S()),statusMessage:v(y())}),Xt=h.extend({task:Yt}),Zt=u.merge(Yt),Qt=m.extend({method:b(`notifications/tasks/status`),params:Zt}),$t=l.extend({method:b(`tasks/get`),params:s.extend({taskId:y()})}),q=h.merge(Yt),en=l.extend({method:b(`tasks/result`),params:s.extend({taskId:y()})}),tn=h.loose(),nn=P.extend({method:b(`tasks/list`)}),rn=be.extend({tasks:C(Yt)}),an=l.extend({method:b(`tasks/cancel`),params:s.extend({taskId:y()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:m,ResultSchema:h,RequestIdSchema:g,EmptyResultSchema:_,CancelledNotificationParamsSchema:x,CancelledNotificationSchema:re,IconSchema:ie,IconsSchema:T,BaseMetadataSchema:E,ImplementationSchema:ae,ClientTasksCapabilitySchema:le,ServerTasksCapabilitySchema:j,ClientCapabilitiesSchema:ue,InitializeRequestParamsSchema:fe,InitializeRequestSchema:pe,ServerCapabilitiesSchema:me,InitializeResultSchema:M,InitializedNotificationSchema:he,PingRequestSchema:ge,ProgressSchema:N,ProgressNotificationParamsSchema:_e,ProgressNotificationSchema:ve,PaginatedRequestParamsSchema:ye,PaginatedRequestSchema:P,PaginatedResultSchema:be,ResourceContentsSchema:F,TextResourceContentsSchema:xe,BlobResourceContentsSchema:Ce,RoleSchema:we,AnnotationsSchema:Te,ResourceSchema:Ee,ResourceTemplateSchema:De,ListResourcesRequestSchema:Oe,ListResourcesResultSchema:ke,ListResourceTemplatesRequestSchema:Ae,ListResourceTemplatesResultSchema:je,ResourceRequestParamsSchema:Me,ReadResourceRequestParamsSchema:Ne,ReadResourceRequestSchema:Pe,ReadResourceResultSchema:Fe,ResourceListChangedNotificationSchema:I,SubscribeRequestParamsSchema:Ie,SubscribeRequestSchema:Le,UnsubscribeRequestParamsSchema:Re,UnsubscribeRequestSchema:ze,ResourceUpdatedNotificationParamsSchema:Be,ResourceUpdatedNotificationSchema:Ve,PromptArgumentSchema:L,PromptSchema:He,ListPromptsRequestSchema:R,ListPromptsResultSchema:z,GetPromptRequestParamsSchema:B,GetPromptRequestSchema:Ue,TextContentSchema:V,ImageContentSchema:H,AudioContentSchema:We,ToolUseContentSchema:Ge,EmbeddedResourceSchema:Ke,ResourceLinkSchema:qe,ContentBlockSchema:Je,PromptMessageSchema:Ye,GetPromptResultSchema:Xe,PromptListChangedNotificationSchema:Ze,ToolAnnotationsSchema:Qe,ToolExecutionSchema:$e,ToolSchema:et,ListToolsRequestSchema:U,ListToolsResultSchema:tt,CallToolResultSchema:nt,CallToolRequestParamsSchema:rt,CallToolRequestSchema:it,ToolListChangedNotificationSchema:at,LoggingLevelSchema:ot,SetLevelRequestParamsSchema:W,SetLevelRequestSchema:st,LoggingMessageNotificationParamsSchema:ct,LoggingMessageNotificationSchema:lt,ModelHintSchema:ut,ModelPreferencesSchema:dt,ToolChoiceSchema:ft,ToolResultContentSchema:pt,SamplingContentSchema:mt,SamplingMessageContentBlockSchema:ht,SamplingMessageSchema:gt,CreateMessageRequestParamsSchema:_t,CreateMessageRequestSchema:vt,CreateMessageResultSchema:yt,CreateMessageResultWithToolsSchema:bt,BooleanSchemaSchema:xt,StringSchemaSchema:St,NumberSchemaSchema:Ct,UntitledSingleSelectEnumSchemaSchema:wt,TitledSingleSelectEnumSchemaSchema:Tt,LegacyTitledEnumSchemaSchema:Et,SingleSelectEnumSchemaSchema:Dt,UntitledMultiSelectEnumSchemaSchema:Ot,TitledMultiSelectEnumSchemaSchema:kt,MultiSelectEnumSchemaSchema:At,EnumSchemaSchema:jt,PrimitiveSchemaDefinitionSchema:Mt,ElicitRequestFormParamsSchema:Nt,ElicitRequestURLParamsSchema:Pt,ElicitRequestParamsSchema:Ft,ElicitRequestSchema:G,ElicitationCompleteNotificationParamsSchema:K,ElicitationCompleteNotificationSchema:It,ElicitResultSchema:Lt,ResourceTemplateReferenceSchema:Rt,PromptReferenceSchema:zt,CompleteRequestParamsSchema:Bt,CompleteRequestSchema:Vt,CompleteResultSchema:Ht,RootSchema:Ut,ListRootsRequestSchema:Wt,ListRootsResultSchema:Gt,RootsListChangedNotificationSchema:Kt,TaskCreationParamsSchema:qt,TaskStatusSchema:Jt,TaskSchema:Yt,CreateTaskResultSchema:Xt,TaskStatusNotificationParamsSchema:Zt,TaskStatusNotificationSchema:Qt,GetTaskRequestSchema:$t,GetTaskResultSchema:q,GetTaskPayloadRequestSchema:en,GetTaskPayloadResultSchema:tn,ListTasksRequestSchema:nn,ListTasksResultSchema:rn,CancelTaskRequestSchema:an,CancelTaskResultSchema:h.merge(Yt),ClientRequestSchema:p([ge,pe,Vt,st,Ue,R,Oe,Ae,Pe,Le,ze,it,U,$t,en,nn,an]),ClientNotificationSchema:p([re,ve,he,Kt,Qt]),ClientResultSchema:p([_,yt,bt,Lt,Gt,q,rn,Xt]),ServerRequestSchema:p([ge,vt,G,Wt,$t,en,nn,an]),ServerNotificationSchema:p([re,ve,lt,Ve,I,at,Ze,Qt,It]),ServerResultSchema:p([_,M,Ht,Xe,z,ke,je,Fe,nt,tt,q,rn,Xt]),CallToolResultWireSchema:f().superRefine((e,t)=>{if(typeof e==`object`&&e&&!Array.isArray(e)&&e.content===void 0){for(let n of ai)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(oi).pipe(nt)}}var ci;function li(){return ci??=si()}function ui(e){return e.type!==`object`}var di=new Set([`const`,`enum`,`default`,`examples`]),fi=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function pi(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function mi(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(pi(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=we(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&pi(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:i[o]=di.has(o)?s:fi.has(o)?r(s,!0):r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var hi={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},gi={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},_i={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},vi;function yi(){if(vi)return vi;let e=li();return vi={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},vi}function bi(e){return Object.prototype.hasOwnProperty.call(hi,e)}function xi(e){return Object.prototype.hasOwnProperty.call(gi,e)}function Si(e){return Object.prototype.hasOwnProperty.call(_i,e)}function Ci(e){return Si(e)?yi().resultSchemas[e]:void 0}function wi(e){return bi(e)?yi().requestSchemas[e]:void 0}function Ti(e){return xi(e)?yi().notificationSchemas[e]:void 0}Object.keys(hi),Object.keys(gi);function Ei(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Di(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Oi={ok:!1,reason:`not-in-era`};function ki(e){return Ei(e)&&Ei(e.outputSchema)&&ui(e.outputSchema)}function Ai(e){return e}var ji={era:`2025-11-25`,hasRequestMethod:bi,hasNotificationMethod:xi,validateRequest:(e,t)=>Di(wi(e),t),validateResult:(e,t)=>Di(Ci(e),t),validateNotification:(e,t)=>Di(Ti(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Oi,validateInputResponse:()=>Oi,samplingResultVariant:((e,t)=>{let n=li();return Di(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=ii(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&ui(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Ei(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Ai(e)}}return{kind:`complete`,result:Ai(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>ki(e))?t:{...t,tools:n.map(e=>ki(e)?{...e,outputSchema:mi(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Mi(){let e=te(()=>p([y(),S(),w(),ee(),k(y(),e),C(e)])),t=k(y(),e),n=p([y(),S().int()]),r=y(),i=p([y(),S().int()]),a=D([`user`,`assistant`]),o=D([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=y().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=A({ttl:S().optional()}),l=A({taskId:y()}),u=O({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),m=A({_meta:u.optional()}),h=m.extend({task:c.optional()}),g=A({_meta:u.optional()}),_=A({method:y(),params:g.loose().optional()}),x=A({src:y(),mimeType:y().optional(),sizes:C(y()).optional(),theme:D([`light`,`dark`]).optional()}),re=A({icons:C(x).optional()}),ie=A({name:y(),title:y().optional()}),T=ie.extend({...ie.shape,...re.shape,version:y(),websiteUrl:y().optional(),description:y().optional()}),E=ne(A({applyDefaults:w().optional()}),t),ae=d(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ne(A({form:E.optional(),url:t.optional()}),t.optional())),oe=O({list:t.optional(),cancel:t.optional(),requests:O({sampling:O({createMessage:t.optional()}).optional(),elicitation:O({create:t.optional()}).optional()}).optional()}),se=O({list:t.optional(),cancel:t.optional(),requests:O({tools:O({call:t.optional()}).optional()}).optional()}),ce=A({experimental:k(y(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:ae.optional(),roots:A({listChanged:w().optional()}).optional(),tasks:oe.optional(),extensions:k(y(),t).optional()}),le=A({experimental:k(y(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:w().optional()}).optional(),resources:A({subscribe:w().optional(),listChanged:w().optional()}).optional(),tools:A({listChanged:w().optional()}).optional(),tasks:se.optional(),extensions:k(y(),t).optional()}),j=A({progress:S(),total:v(S()),message:v(y())}),ue=A({...g.shape,...j.shape,progressToken:n}),fe=_.extend({method:b(`notifications/progress`),params:ue}),pe=g.extend({level:o,logger:y().optional(),data:f()}),me=_.extend({method:b(`notifications/message`),params:pe}),M=A({uri:y(),mimeType:v(y()),_meta:k(y(),f()).optional()}),he=M.extend({text:y()}),ge=M.extend({blob:s}),N=A({audience:C(a).optional(),priority:S().min(0).max(1).optional(),lastModified:de({offset:!0}).optional()}),_e=A({...ie.shape,...re.shape,uri:y(),description:v(y()),mimeType:v(y()),size:v(S()),annotations:N.optional(),_meta:v(O({}))}),ve=A({...ie.shape,...re.shape,uriTemplate:y(),description:v(y()),mimeType:v(y()),annotations:N.optional(),_meta:v(O({}))}),ye=_.extend({method:b(`notifications/resources/list_changed`),params:g.optional()}),P=g.extend({uri:y()}),be=_.extend({method:b(`notifications/resources/updated`),params:P}),F=A({name:y(),description:v(y()),required:v(w())}),xe=A({...ie.shape,...re.shape,description:v(y()),arguments:v(C(F)),_meta:v(O({}))}),Se=_.extend({method:b(`notifications/prompts/list_changed`),params:g.optional()}),Ce=A({type:b(`text`),text:y(),annotations:N.optional(),_meta:k(y(),f()).optional()}),we=A({type:b(`image`),data:s,mimeType:y(),annotations:N.optional(),_meta:k(y(),f()).optional()}),Te=A({type:b(`audio`),data:s,mimeType:y(),annotations:N.optional(),_meta:k(y(),f()).optional()}),Ee=A({type:b(`tool_use`),name:y(),id:y(),input:k(y(),f()),_meta:k(y(),f()).optional()}),De=A({type:b(`resource`),resource:p([he,ge]),annotations:N.optional(),_meta:k(y(),f()).optional()}),Oe=_e.extend({type:b(`resource_link`)}),Ne=p([Ce,we,Te,Oe,De]),Fe=A({role:a,content:Ne}),I=A({title:y().optional(),readOnlyHint:w().optional(),destructiveHint:w().optional(),idempotentHint:w().optional(),openWorldHint:w().optional()}),Ie=_.extend({method:b(`notifications/tools/list_changed`),params:g.optional()}),Le=A({name:y().optional()}),Re=A({hints:C(Le).optional(),costPriority:S().min(0).max(1).optional(),speedPriority:S().min(0).max(1).optional(),intelligencePriority:S().min(0).max(1).optional()}),ze=A({mode:D([`auto`,`required`,`none`]).optional()}),Be=A({type:b(`boolean`),title:y().optional(),description:y().optional(),default:w().optional()}),Ve=A({type:b(`string`),title:y().optional(),description:y().optional(),minLength:S().optional(),maxLength:S().optional(),format:D([`email`,`uri`,`date`,`date-time`]).optional(),default:y().optional()}),L=A({type:D([`number`,`integer`]),title:y().optional(),description:y().optional(),minimum:S().optional(),maximum:S().optional(),default:S().optional()}),He=A({type:b(`string`),title:y().optional(),description:y().optional(),enum:C(y()),default:y().optional()}),R=A({type:b(`string`),title:y().optional(),description:y().optional(),oneOf:C(A({const:y(),title:y()})),default:y().optional()}),z=A({type:b(`string`),title:y().optional(),description:y().optional(),enum:C(y()),enumNames:C(y()).optional(),default:y().optional()}),B=p([He,R]),Ue=A({type:b(`array`),title:y().optional(),description:y().optional(),minItems:S().optional(),maxItems:S().optional(),items:A({type:b(`string`),enum:C(y())}),default:C(y()).optional()}),V=A({type:b(`array`),title:y().optional(),description:y().optional(),minItems:S().optional(),maxItems:S().optional(),items:A({anyOf:C(A({const:y(),title:y()}))}),default:C(y()).optional()}),H=p([Ue,V]),We=p([z,B,H]),Ge=p([We,Be,Ve,L]),Ke=h.extend({mode:b(`form`).optional(),message:y(),requestedSchema:A({type:b(`object`),properties:k(y(),Ge),required:C(y()).optional()}).catchall(f())}),qe=A({type:b(`ref/resource`),uri:y()}),Je=A({type:b(`ref/prompt`),name:y()}),Ye=A({uri:y().startsWith(`file://`),name:y().optional(),_meta:k(y(),f()).optional()}),Xe=ce.shape,Ze=A({experimental:Xe.experimental,sampling:Xe.sampling,elicitation:Xe.elicitation,roots:Xe.roots,extensions:Xe.extensions}),Qe=le.shape,$e=A({experimental:Qe.experimental,logging:Qe.logging,completions:Qe.completions,prompts:Qe.prompts,resources:Qe.resources,tools:Qe.tools,extensions:Qe.extensions}),et=O({progressToken:n.optional(),[ke]:y(),[Ae]:T.optional(),[Me]:Ze,[Pe]:o.optional()}),U=A({...ie.shape,...re.shape,description:y().optional(),inputSchema:O({$schema:y().optional(),type:b(`object`)}),outputSchema:O({$schema:y().optional()}).optional(),annotations:I.optional(),_meta:k(y(),f()).optional()}),tt=A({type:b(`tool_result`),toolUseId:y(),content:C(Ne),structuredContent:f().optional(),isError:w().optional(),_meta:k(y(),f()).optional()}),nt=p([Ce,we,Te,Ee,tt]),rt=A({role:a,content:p([nt,C(nt)]),_meta:k(y(),f()).optional()}),it=y(),at=O({[je]:T.optional().catch(void 0)}),ot=at.optional();function W(e){return O({_meta:ot,resultType:it.default(`complete`),...e})}let st=W({}),ct=W({nextCursor:r.optional()}),lt=W({content:C(Ne),structuredContent:f().optional(),isError:w().optional()}),ut=W({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`]),tools:C(U),nextCursor:r.optional()}),dt=W({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`]),prompts:C(xe),nextCursor:r.optional()}),ft=W({description:y().optional(),messages:C(Fe)}),pt=W({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`]),resources:C(_e),nextCursor:r.optional()}),mt=W({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`]),resourceTemplates:C(ve),nextCursor:r.optional()}),ht=W({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`]),contents:C(p([he,ge]))}),gt=W({completion:A({values:C(y()).max(100),total:S().int().optional(),hasMore:w().optional()}).loose()}),_t=W({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`])}),vt=W({ttlMs:S().int().min(0).catch(0),cacheScope:D([`public`,`private`]).catch(`private`),supportedVersions:C(y()),capabilities:$e,instructions:y().optional()}),yt=A({messages:C(rt),modelPreferences:Re.optional(),systemPrompt:y().optional(),includeContext:D([`none`,`thisServer`,`allServers`]).optional(),temperature:S().optional(),maxTokens:S().int(),stopSequences:C(y()).optional(),metadata:t.optional(),tools:C(U).optional(),toolChoice:ze.optional()}),bt=A({method:b(`sampling/createMessage`),params:yt}),xt=A({method:b(`roots/list`),params:A({_meta:k(y(),f()).optional()}).optional()}),St=A({...rt.shape,model:y(),stopReason:y().optional()}),Ct=A({roots:C(Ye)}),wt=A({action:D([`accept`,`decline`,`cancel`]),content:k(y(),p([y(),S(),w(),C(y())])).optional()}),Tt=A({mode:b(`url`),message:y(),url:y().url()}),Et=p([Ke,Tt]),Dt=A({method:b(`elicitation/create`),params:Et}),Ot=p([bt,xt,Dt]),kt=p([St,Ct,wt]),At=k(y(),Ot),jt=k(y(),kt),Mt=W({inputRequests:At.optional(),requestState:y().optional()}),Nt={inputResponses:jt.optional(),requestState:y().optional()},Pt=A({_meta:et,...Nt}),Ft=O({progressToken:n.optional()});function G(e,t){return A({method:b(e),params:A({_meta:et,...t})})}function K(e,t){return A({method:b(e),params:A({_meta:Ft.optional(),...t}).optional()})}let It={name:y(),arguments:k(y(),f()).optional(),...Nt},Lt={cursor:r.optional()},Rt=G(`tools/call`,It),zt=G(`tools/list`,Lt),Bt=G(`prompts/list`,Lt),Vt=G(`prompts/get`,{name:y(),arguments:k(y(),y()).optional(),...Nt}),Ht=G(`resources/list`,Lt),Ut=G(`resources/templates/list`,Lt),Wt=G(`resources/read`,{uri:y(),...Nt}),Gt={ref:p([Je,qe]),argument:A({name:y(),value:y()}),context:A({arguments:k(y(),y()).optional()}).optional()},Kt=G(`completion/complete`,Gt),qt=G(`server/discover`,{}),Jt=A({toolsListChanged:w().optional(),promptsListChanged:w().optional(),resourcesListChanged:w().optional(),resourceSubscriptions:C(y()).optional()}),Yt={notifications:Jt},Xt=G(`subscriptions/listen`,Yt),Zt=at.extend({"io.modelcontextprotocol/subscriptionId":i}),Qt=O({_meta:Zt,resultType:it.default(`complete`)}),$t={"tools/call":K(`tools/call`,It),"tools/list":K(`tools/list`,Lt),"prompts/get":K(`prompts/get`,{name:y(),arguments:k(y(),y()).optional()}),"prompts/list":K(`prompts/list`,Lt),"resources/list":K(`resources/list`,Lt),"resources/templates/list":K(`resources/templates/list`,Lt),"resources/read":K(`resources/read`,{uri:y()}),"completion/complete":K(`completion/complete`,Gt),"server/discover":K(`server/discover`,{}),"subscriptions/listen":K(`subscriptions/listen`,Yt)};function q(e){return O({_meta:ot,...e})}let en={"tools/call":q({content:C(Ne),structuredContent:f().optional(),isError:w().optional()}),"tools/list":q({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`]),tools:C(U),nextCursor:r.optional()}),"prompts/get":q({description:y().optional(),messages:C(Fe)}),"prompts/list":q({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`]),prompts:C(xe),nextCursor:r.optional()}),"resources/list":q({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`]),resources:C(_e),nextCursor:r.optional()}),"resources/templates/list":q({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`]),resourceTemplates:C(ve),nextCursor:r.optional()}),"resources/read":q({ttlMs:S().int().min(0),cacheScope:D([`public`,`private`]),contents:C(p([he,ge]))}),"completion/complete":q({completion:A({values:C(y()).max(100),total:S().int().optional(),hasMore:w().optional()}).loose()}),"server/discover":q({ttlMs:S().int().min(0).catch(0),cacheScope:D([`public`,`private`]).catch(`private`),supportedVersions:C(y()),capabilities:$e,instructions:y().optional()}),"subscriptions/listen":q({})},tn=O({"io.modelcontextprotocol/subscriptionId":i.optional()}),nn=A({method:b(`notifications/subscriptions/acknowledged`),params:A({_meta:tn.optional(),notifications:Jt})}),rn=A({_meta:tn.optional(),requestId:i,reason:y().optional()}),an=A({method:b(`notifications/cancelled`),params:rn}),on={"notifications/cancelled":an,"notifications/progress":fe,"notifications/message":me,"notifications/resources/updated":be,"notifications/resources/list_changed":ye,"notifications/tools/list_changed":Ie,"notifications/prompts/list_changed":Se,"notifications/subscriptions/acknowledged":nn},sn=e=>A({jsonrpc:b(`2.0`),id:p([y(),S().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:m,TaskAugmentedRequestParamsSchema:h,NotificationsParamsSchema:g,NotificationSchema:_,IconSchema:x,IconsSchema:re,BaseMetadataSchema:ie,ImplementationSchema:T,ClientTasksCapabilitySchema:oe,ServerTasksCapabilitySchema:se,ClientCapabilitiesSchema:ce,ServerCapabilitiesSchema:le,ProgressSchema:j,ProgressNotificationParamsSchema:ue,ProgressNotificationSchema:fe,LoggingMessageNotificationParamsSchema:pe,LoggingMessageNotificationSchema:me,ResourceContentsSchema:M,TextResourceContentsSchema:he,BlobResourceContentsSchema:ge,AnnotationsSchema:N,ResourceSchema:_e,ResourceTemplateSchema:ve,ResourceListChangedNotificationSchema:ye,ResourceUpdatedNotificationParamsSchema:P,ResourceUpdatedNotificationSchema:be,PromptArgumentSchema:F,PromptSchema:xe,PromptListChangedNotificationSchema:Se,TextContentSchema:Ce,ImageContentSchema:we,AudioContentSchema:Te,ToolUseContentSchema:Ee,EmbeddedResourceSchema:De,ResourceLinkSchema:Oe,ContentBlockSchema:Ne,PromptMessageSchema:Fe,ToolAnnotationsSchema:I,ToolListChangedNotificationSchema:Ie,ModelHintSchema:Le,ModelPreferencesSchema:Re,ToolChoiceSchema:ze,BooleanSchemaSchema:Be,StringSchemaSchema:Ve,NumberSchemaSchema:L,UntitledSingleSelectEnumSchemaSchema:He,TitledSingleSelectEnumSchemaSchema:R,LegacyTitledEnumSchemaSchema:z,SingleSelectEnumSchemaSchema:B,UntitledMultiSelectEnumSchemaSchema:Ue,TitledMultiSelectEnumSchemaSchema:V,MultiSelectEnumSchemaSchema:H,EnumSchemaSchema:We,PrimitiveSchemaDefinitionSchema:Ge,ElicitRequestFormParamsSchema:Ke,ResourceTemplateReferenceSchema:qe,PromptReferenceSchema:Je,RootSchema:Ye,ClientCapabilities2026Schema:Ze,ServerCapabilities2026Schema:$e,RequestMetaEnvelopeSchema:et,ToolSchema:U,ToolResultContentSchema:tt,SamplingMessageContentBlockSchema:nt,SamplingMessageSchema:rt,ResultTypeSchema:it,ResultMetaSchema:at,ResultSchema:st,PaginatedResultSchema:ct,CallToolResultSchema:lt,ListToolsResultSchema:ut,ListPromptsResultSchema:dt,GetPromptResultSchema:ft,ListResourcesResultSchema:pt,ListResourceTemplatesResultSchema:mt,ReadResourceResultSchema:ht,CompleteResultSchema:gt,CacheableResultSchema:_t,DiscoverResultSchema:vt,CreateMessageRequestParamsSchema:yt,CreateMessageRequestSchema:bt,ListRootsRequestSchema:xt,CreateMessageResultSchema:St,ListRootsResultSchema:Ct,ElicitResultSchema:wt,ElicitRequestURLParamsSchema:Tt,ElicitRequestParamsSchema:Et,ElicitRequestSchema:Dt,InputRequestSchema:Ot,InputResponseSchema:kt,InputRequestsSchema:At,InputResponsesSchema:jt,InputRequiredResultSchema:Mt,InputResponseRequestParamsSchema:Pt,CallToolRequestSchema:Rt,ListToolsRequestSchema:zt,ListPromptsRequestSchema:Bt,GetPromptRequestSchema:Vt,ListResourcesRequestSchema:Ht,ListResourceTemplatesRequestSchema:Ut,ReadResourceRequestSchema:Wt,CompleteRequestSchema:Kt,DiscoverRequestSchema:qt,SubscriptionFilterSchema:Jt,SubscriptionsListenRequestSchema:Xt,SubscriptionsListenResultMetaSchema:Zt,SubscriptionsListenResultSchema:Qt,dispatchRequestSchemas:$t,dispatchResultSchemas:en,NotificationMetaSchema:tn,SubscriptionsAcknowledgedNotificationSchema:nn,CancelledNotificationParamsSchema:rn,CancelledNotificationSchema:an,notificationSchemas2026:on,JSONRPCResultResponseSchema:sn(st),CallToolResultResponseSchema:sn(p([lt,Mt])),ListToolsResultResponseSchema:sn(ut),ListPromptsResultResponseSchema:sn(dt),GetPromptResultResponseSchema:sn(p([ft,Mt])),ListResourcesResultResponseSchema:sn(pt),ListResourceTemplatesResultResponseSchema:sn(mt),ReadResourceResultResponseSchema:sn(p([ht,Mt])),CompleteResultResponseSchema:sn(gt),DiscoverResultResponseSchema:sn(vt)}}var Ni;function Pi(){return Ni??=Mi()}var Fi=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Ii(e){return Fi.includes(e)}var Li=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Ri(e){return e[Li]}function zi(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Bi(e){return e===`public`||e===`private`}var Z=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),Q=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return Kr(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Kr(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,Gr(this,new.target)}static fromError(t,n,r){if(t===Z.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Hi(e.elicitations,n)}if(t===Z.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Ui({supported:e.supported,requested:e.requested},n)}if(t===Z.InvalidParams||t===Z.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===Z.ResourceNotFound||Object.keys(e).length===1))return new Vi(e.uri,n)}if(t===Z.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Wi({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Vi=class extends Q{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(Z.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Hi=class extends Q{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Z.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Ui=class extends Q{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(Z.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Wi=class extends Q{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(Z.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Gi=0,Ki=`private`,qi=[`tools/call`,`prompts/get`,`resources/read`];function Ji(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||qi.includes(e))return t;throw new Q(Z.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function Yi(e,t){let n=Ri(t);if(t.resultType!==`complete`||!Ii(e))return n===void 0?t:ea(t);let r=t,i=zi(r.ttlMs)?r.ttlMs:Qi(n),a=Bi(r.cacheScope)?r.cacheScope:$i(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Li],o}function Xi(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Zi(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[je]:t}}:!Xi(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[je]:t}}}function Qi(e){return e!==void 0&&zi(e.ttlMs)?e.ttlMs:Gi}function $i(e){return e!==void 0&&Bi(e.cacheScope)?e.cacheScope:Ki}function ea(e){let t={...e};return delete t[Li],t}var ta=[`elicitation/create`,`sampling/createMessage`,`roots/list`],na;function ra(){if(na)return na;let e=Pi();return na={request:{"elicitation/create":A({method:b(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":A({method:b(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":A({method:b(`roots/list`),params:O({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},na}function ia(e){return ta.includes(e)}function aa(e){return ia(e)?ra().request[e]:void 0}function oa(e){return ia(e)?ra().response[e]:void 0}var sa={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},ca={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function la(e){return Object.prototype.hasOwnProperty.call(sa,e)}function ua(e){return Object.prototype.hasOwnProperty.call(ca,e)}function da(e){return Object.prototype.hasOwnProperty.call(sa,e)}function fa(e){return la(e)?Pi().dispatchRequestSchemas[e]:void 0}function pa(e){return da(e)?Pi().dispatchResultSchemas[e]:void 0}function ma(e){return ua(e)?Pi().notificationSchemas2026[e]:void 0}Object.keys(sa),Object.keys(ca);function ha(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ga(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var _a={ok:!1,reason:`not-in-era`},va=[ke,Me];function ya(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>ha(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!ha(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(ha(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var ba={era:`2026-07-28`,hasRequestMethod:la,hasNotificationMethod:ua,hasInputRequestMethod:e=>aa(e)!==void 0,validateRequest:(e,t)=>ga(fa(e),t),validateResult:(e,t)=>ga(pa(e),t),validateNotification:(e,t)=>ga(ma(e),t),validateInputRequest:(e,t)=>ga(aa(e),t),validateInputResponse:(e,t)=>ga(oa(e),t),samplingResultVariant:()=>_a,outboundEnvelope(e){return{[ke]:e.protocolVersion,[Ae]:e.clientInfo,[Me]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of va)n in e||t.push({key:n,problem:`missing`});let n=Pi().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>ii(e),inputRequestSchema:aa,decodeResult(e,t){if(!ha(t))return{kind:`invalid`,error:new X(Y.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new X(Y.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new X(Y.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=ha(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:Pi().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new X(Y.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new X(Y.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=Sa(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new X(Y.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return Zi(Yi(e,Ji(e,ya(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=Pi().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},xa;function Sa(){if(xa)return xa;let e=Pi();return xa={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},xa}var Ca=`2026-07-28`;function wa(e){return e!==void 0&&ti(e)?ba:ji}function Ta(e){return e.revision===void 0?e.era===`modern`?ba.era:ji.era:wa(e.revision).era}function Ea(e){return Oa.some(t=>t.hasRequestMethod(e))}function Da(e){return Oa.some(t=>t.hasNotificationMethod(e))}var Oa=[ji,ba],ka=ye({AnnotationsSchema:()=>Tt,AudioContentSchema:()=>tn,BaseMetadataSchema:()=>U,BaseRequestParamsSchema:()=>L,BlobResourceContentsSchema:()=>Ct,BooleanSchemaSchema:()=>Ln,CallToolRequestParamsSchema:()=>_n,CallToolRequestSchema:()=>vn,CallToolResultSchema:()=>hn,CancelTaskRequestSchema:()=>Cr,CancelTaskResultSchema:()=>wr,CancelledNotificationParamsSchema:()=>Ze,CancelledNotificationSchema:()=>Qe,ClientCapabilitiesSchema:()=>ot,ClientNotificationSchema:()=>Er,ClientRequestSchema:()=>Tr,ClientResultSchema:()=>Dr,ClientTasksCapabilitySchema:()=>it,CompatibilityCallToolResultSchema:()=>gn,CompleteRequestParamsSchema:()=>ir,CompleteRequestSchema:()=>ar,CompleteResultSchema:()=>or,ContentBlockSchema:()=>on,CreateMessageRequestParamsSchema:()=>Nn,CreateMessageRequestSchema:()=>Pn,CreateMessageResultSchema:()=>Fn,CreateMessageResultWithToolsSchema:()=>In,CreateTaskResultSchema:()=>mr,CursorSchema:()=>Re,DiscoverRequestSchema:()=>dt,DiscoverResultSchema:()=>ft,ElicitRequestFormParamsSchema:()=>Yn,ElicitRequestParamsSchema:()=>Zn,ElicitRequestSchema:()=>Qn,ElicitRequestURLParamsSchema:()=>Xn,ElicitResultSchema:()=>tr,ElicitationCompleteNotificationParamsSchema:()=>$n,ElicitationCompleteNotificationSchema:()=>er,EmbeddedResourceSchema:()=>rn,EmptyResultSchema:()=>Xe,EnumSchemaSchema:()=>qn,GetPromptRequestParamsSchema:()=>Qt,GetPromptRequestSchema:()=>$t,GetPromptResultSchema:()=>cn,GetTaskPayloadRequestSchema:()=>yr,GetTaskPayloadResultSchema:()=>br,GetTaskRequestSchema:()=>_r,GetTaskResultSchema:()=>vr,IconSchema:()=>$e,IconsSchema:()=>et,ImageContentSchema:()=>en,ImplementationSchema:()=>tt,InitializeRequestParamsSchema:()=>W,InitializeRequestSchema:()=>st,InitializeResultSchema:()=>lt,InitializedNotificationSchema:()=>ut,JSONArraySchema:()=>Ie,JSONObjectSchema:()=>I,JSONRPCErrorResponseSchema:()=>qe,JSONRPCMessageSchema:()=>Je,JSONRPCNotificationSchema:()=>Ge,JSONRPCRequestSchema:()=>We,JSONRPCResponseSchema:()=>Ye,JSONRPCResultResponseSchema:()=>Ke,JSONValueSchema:()=>Fe,LegacyTitledEnumSchemaSchema:()=>Hn,ListChangedOptionsBaseSchema:()=>bn,ListPromptsRequestSchema:()=>Xt,ListPromptsResultSchema:()=>Zt,ListResourceTemplatesRequestSchema:()=>At,ListResourceTemplatesResultSchema:()=>jt,ListResourcesRequestSchema:()=>Ot,ListResourcesResultSchema:()=>kt,ListRootsRequestSchema:()=>cr,ListRootsResultSchema:()=>lr,ListTasksRequestSchema:()=>xr,ListTasksResultSchema:()=>Sr,ListToolsRequestSchema:()=>pn,ListToolsResultSchema:()=>mn,LoggingLevelSchema:()=>xn,LoggingMessageNotificationParamsSchema:()=>wn,LoggingMessageNotificationSchema:()=>Tn,ModelHintSchema:()=>En,ModelPreferencesSchema:()=>Dn,MultiSelectEnumSchemaSchema:()=>Kn,NotificationSchema:()=>B,NotificationsParamsSchema:()=>z,NumberSchemaSchema:()=>zn,PaginatedRequestParamsSchema:()=>_t,PaginatedRequestSchema:()=>vt,PaginatedResultSchema:()=>yt,PingRequestSchema:()=>pt,PrimitiveSchemaDefinitionSchema:()=>Jn,ProgressNotificationParamsSchema:()=>ht,ProgressNotificationSchema:()=>gt,ProgressSchema:()=>mt,ProgressTokenSchema:()=>Le,PromptArgumentSchema:()=>Jt,PromptListChangedNotificationSchema:()=>ln,PromptMessageSchema:()=>sn,PromptReferenceSchema:()=>rr,PromptSchema:()=>Yt,ReadResourceRequestParamsSchema:()=>Nt,ReadResourceRequestSchema:()=>Pt,ReadResourceResultSchema:()=>Ft,RelatedTaskMetadataSchema:()=>Be,RequestIdSchema:()=>H,RequestMetaSchema:()=>Ve,RequestSchema:()=>R,ResourceContentsSchema:()=>bt,ResourceLinkSchema:()=>an,ResourceListChangedNotificationSchema:()=>G,ResourceRequestParamsSchema:()=>Mt,ResourceSchema:()=>Et,ResourceTemplateReferenceSchema:()=>nr,ResourceTemplateSchema:()=>Dt,ResourceUpdatedNotificationParamsSchema:()=>Kt,ResourceUpdatedNotificationSchema:()=>qt,ResultMetaObjectSchema:()=>Ue,ResultSchema:()=>V,RoleSchema:()=>wt,RootSchema:()=>sr,RootsListChangedNotificationSchema:()=>ur,SamplingContentSchema:()=>An,SamplingMessageContentBlockSchema:()=>jn,SamplingMessageSchema:()=>Mn,ServerCapabilitiesSchema:()=>ct,ServerNotificationSchema:()=>kr,ServerRequestSchema:()=>Or,ServerResultSchema:()=>Ar,ServerTasksCapabilitySchema:()=>at,SetLevelRequestParamsSchema:()=>Sn,SetLevelRequestSchema:()=>Cn,SingleSelectEnumSchemaSchema:()=>Un,StringSchemaSchema:()=>Rn,SubscribeRequestParamsSchema:()=>K,SubscribeRequestSchema:()=>It,SubscriptionFilterSchema:()=>zt,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Ht,SubscriptionsAcknowledgedNotificationSchema:()=>Ut,SubscriptionsListenRequestParamsSchema:()=>Bt,SubscriptionsListenRequestSchema:()=>Vt,SubscriptionsListenResultMetaSchema:()=>Wt,SubscriptionsListenResultSchema:()=>Gt,TaskAugmentedRequestParamsSchema:()=>He,TaskCreationParamsSchema:()=>dr,TaskMetadataSchema:()=>ze,TaskSchema:()=>pr,TaskStatusNotificationParamsSchema:()=>hr,TaskStatusNotificationSchema:()=>gr,TaskStatusSchema:()=>fr,TextContentSchema:()=>q,TextResourceContentsSchema:()=>xt,TitledMultiSelectEnumSchemaSchema:()=>Gn,TitledSingleSelectEnumSchemaSchema:()=>Vn,ToolAnnotationsSchema:()=>un,ToolChoiceSchema:()=>On,ToolExecutionSchema:()=>dn,ToolListChangedNotificationSchema:()=>yn,ToolResultContentSchema:()=>kn,ToolSchema:()=>fn,ToolUseContentSchema:()=>nn,UnsubscribeRequestParamsSchema:()=>Lt,UnsubscribeRequestSchema:()=>Rt,UntitledMultiSelectEnumSchemaSchema:()=>Wn,UntitledSingleSelectEnumSchemaSchema:()=>Bn}),Aa=e=>We.safeParse(e).success,ja=e=>Ge.safeParse(e).success,Ma=e=>Ke.safeParse(e).success,Na=e=>qe.safeParse(e).success,Pa=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Fa=e=>st.safeParse(e).success,Ia=e=>ut.safeParse(e).success,La=`Mcp-Param-`,Ra=`x-mcp-header`,za=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Ba=new Set([`string`,`integer`,`boolean`,`number`]);function Va(e){let t=[],n=new Map,r=(e,i,a)=>{if(typeof e!=`object`||!e)return;let o=e;if(Ra in o){if(!a||i.length===0)return`${Wa(i)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=o[Ra];if(typeof e!=`string`||e.length===0)return`${Wa(i)}: x-mcp-header MUST be a non-empty string`;if(!za.test(e))return`${Wa(i)}: x-mcp-header '${e}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let r=typeof o.type==`string`?o.type:void 0;if(r===void 0||!Ba.has(r))return`${Wa(i)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${r??``}`;let s=e.toLowerCase(),c=n.get(s);if(c!==void 0)return`x-mcp-header '${e}' is not case-insensitively unique (also declared as '${c}')`;n.set(s,e),t.push({path:i,headerName:e,type:r})}let s=o.properties;if(typeof s==`object`&&s)for(let[e,t]of Object.entries(s)){let n=r(t,[...i,e],a);if(n!==void 0)return n}for(let e of Ha){let t=o[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Ua.has(e)?Object.values(t):[t];for(let t of n){let n=r(t,[...i,`<${e}>`],!1);if(n!==void 0)return n}}},i=r(e,[],!0);return i===void 0?{valid:!0,declarations:t}:{valid:!1,reason:i}}var Ha=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Ua=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Wa(e){return e.length===0?``:e.join(`.`)}var Ga=`=?base64?`,Ka=`?=`;function qa(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function Ja(e){if(e.length===0||e.startsWith(Ga)&&e.endsWith(Ka)||e!==e.trim())return!0;for(let t=0;t=32&&n<=126))return!0}return!1}function Ya(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function Xa(e){return Ja(e)?`${Ga}${Ya(e)}${Ka}`:e}function Za(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function Qa(e,t){let n={};for(let r of e){let e=Za(t,r.path);if(e==null)continue;let i=qa(e);i!==void 0&&(n[`${La}${r.headerName}`]=Xa(i))}return n}Z.InvalidRequest,Z.UnsupportedProtocolVersion,Z.InvalidParams,Z.MethodNotFound,Z.InvalidParams,Z.MissingRequiredClientCapability,Z.ParseError,Z.InvalidRequest,Z.MethodNotFound,Z.UnsupportedProtocolVersion,Z.MissingRequiredClientCapability;var $a={"tools/call":`name`,"prompts/get":`name`,"resources/read":`uri`,"tasks/get":`taskId`,"tasks/update":`taskId`,"tasks/cancel":`taskId`};function eo(e,t){let n=Object.hasOwn($a,e)?$a[e]:void 0;if(n===void 0)return;let r=to(t)?t[n]:void 0;return{field:n,value:typeof r==`string`?r:void 0}}function to(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function no(e,t){return T(e,t)}function ro(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function io(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var ao=!1,oo=`draft-2020-12`;function so(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:oo});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);ao||(ao=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=u(e,{target:oo,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&co(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function co(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||co(e)))}return!1}function lo(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function uo(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>lo(e)).join(`, `)}:{success:!0,data:n.value}}function fo(e){let t=u(e,{target:oo,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var po=/\\\.\\d\{(\d+)\}/;function mo(e){let t=po.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>de({local:e,offset:t,precision:n}))))}function ho(e,t){let n;switch(e){case`email`:n=[ae()];break;case`uri`:n=[g()];break;case`date`:n=[fe()];break;case`date-time`:n=mo(t)}return new Set(n.map(e=>fo(e)).filter(e=>e!==void 0))}function go(e,t,n){return n!==`zod`||ho(e,t).has(t)}function _o(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function vo(e){try{return so(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new Q(Z.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var yo=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function bo(e){return yo.has(e)||e.startsWith(`x-`)}var xo=new Set([`$schema`,...Object.keys(Yn.shape.requestedSchema.shape)]),So={string:ro([Rn,Bn,Vn,Hn]),number:ro([zn]),integer:ro([zn]),boolean:ro([Ln]),array:ro([Wn,Gn])},Co=new Set(Rn.shape.format.unwrap().options);function wo(e,t,n,r){if(!_o(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(So,e.type)?So[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||bo(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?Co.has(e.format)?(typeof s!=`string`||!go(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function To(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&_o(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,wo(n,`properties.${e}`,t,r)])):xo.has(i)?n[i]=a:bo(i)||r.push(i);if(r.length>0)throw new Q(Z.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function Eo(e,t){if(!_o(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!no(Jn,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Do(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Do(e,t[r],`${n}[${r}]`)):!_o(e)||!_o(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Do(r,t[e],i):bo(e)?[]:[i]})}function Oo(e){if(!io(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=To(vo(e.requestedSchema),t),r=no(Yn.shape.requestedSchema,n);if(!r.success)throw new Q(Z.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${Eo(n,r.error.message)}`);let i=Do(n,r.data);if(i.length>0)throw new Q(Z.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new Q(Z.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function ko(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(ko,{elicit(e){try{return{method:`elicitation/create`,params:Oo(e)}}catch(e){throw e instanceof Q?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Ao=!0,jo=10,Mo=250;function No(e){return{autoFulfill:e?.autoFulfill??Ao,maxRounds:e?.maxRounds??jo}}function Po(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function Fo(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function Io(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof X?t.reason:new X(Y.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof X?t.reason:new X(Y.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function Lo(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function Ro(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new X(Y.InputRequiredRoundsExceeded,Fo(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by '${n}' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=Lo(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await Io(Mo,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new X(Y.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(Po(r,u,c.requestState),d);if(Pa(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var zo=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),Bo={IdJagTokenExchangeResponseSchema:Ir,OAuthClientInformationFullSchema:Vr,OAuthClientInformationSchema:Br,OAuthClientMetadataSchema:zr,OAuthClientRegistrationErrorSchema:Hr,OAuthErrorResponseSchema:Lr,OAuthMetadataSchema:Mr,OAuthProtectedResourceMetadataSchema:jr,OAuthTokenRevocationRequestSchema:Ur,OAuthTokensSchema:Fr,OpenIdProviderDiscoveryMetadataSchema:Pr,OpenIdProviderMetadataSchema:Nr},Vo={},Ho={};function Uo(e,t){let n=e.slice(0,-6);Vo[n]=t,Ho[n]=e=>t.safeParse(e).success}for(let e of zo)Uo(e,ka[e]);for(let[e,t]of Object.entries(Bo))Uo(e,t);Object.freeze(Vo);var Wo=Object.freeze(Ho);function Go(e){switch(e){case`initialize`:case`notifications/initialized`:return wa(void 0);case`server/discover`:return wa(Ca);default:return}}var Ko=[ke,Ae,Me,Pe],qo=[`inputResponses`,`requestState`];function Jo(e,t){let n=e.params;if(!$o(n))return{message:e,lifted:{}};let r=n._meta,i=$o(r)?Ko.filter(e=>e in r):[],a=t===`request`?qo.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&$o(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function Yo(e,t){let n=e.validateResult(t,void 0);if(n.ok||n.reason!==`not-in-era`)return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function Xo(e){return()=>e}var Zo=Xo(void 0),Qo=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??De,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new X(Y.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new X(Y.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Ma(e)||Na(e)?this._onresponse(e):Aa(e)?this._onrequest(e,t):ja(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new X(Y.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Jo(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=Ta(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(Da(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;(i!==void 0||a!==void 0)&&Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=Jo(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=Ta(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(Z.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Ea(n.method)&&!i.hasRequestMethod(n.method)){o(Z.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(Z.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(Z.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:ns(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?Zo:Xo(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),io(t))return u(e,t,n);let i=Yo(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(Z.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:Z.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Ma(e)?n(e):n(Q.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),io(t))return this._requestWithSchemaViaCodec(r,e,t,n);let i=Yo(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return wa(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Go(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Ea(t)&&!e.hasRequestMethod(t))throw new X(Y.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof X?e:new X(Y.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof X?e:new X(Y.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(cs(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;uo(n,o).then(e=>{e.success?d(e.data):f(new X(Y.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let b=r?.timeout??6e4;this._setupTimeout(h,b,r?.maxTotalTimeout,()=>y(new X(Y.RequestTimeout,`Request timed out`,{timeout:b})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new X(Y.NotConnected,`Not connected`);if(Da(t.method)&&!e.hasNotificationMethod(t.method))throw new X(Y.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Ea(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new Q(Z.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await uo(t.params,{...r.params});if(!a.success)throw new Q(Z.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Da(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new Q(Z.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await uo(t.params,{...r.params});if(!i.success)throw new Q(Z.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function $o(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function es(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=$o(a)&&$o(i)?{...a,...i}:i}return n}function ts(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ns(e){let t={},n=[];if(!ts(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!ts(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function rs(e){throw new X(Y.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function is(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:Xo(void 0),signal:r,send:(()=>rs(`send`)),notify:()=>rs(`notify`)}}}async function as(e,t,n,r,i){if(!ts(r)||typeof r.method!=`string`)throw new X(Y.InvalidResult,`Invalid input request '${n}': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new X(Y.InvalidResult,`Invalid input request '${n}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new X(Y.CapabilityNotSupported,`Cannot fulfil input request '${n}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=ts(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(is(n,a,s,i,e.sessionId)))}function os(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function ss(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>as(e,i,t,n,r),retry:(e,t)=>r.retry(e,os(o,t))};return Ro({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function cs(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}var ls=be(ve((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),1);function us(e){if(e)try{return ls.parse(e).type}catch{let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return t===``||e.slice(t.length).includes(`,`)?void 0:t}}function ds(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function fs(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...ds(t.headers),...ds(r.headers)}:t.headers}):e}function ps(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r1?t[a.href]=e:(a.hash=``,r===``?n=a:bs(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(vs[i])continue;let a=`${r}/${ms(i)}`,o=e[i];if(Array.isArray(o)){if(gs[i]){let e=o.length;for(let r=0;r%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Ds=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,Os=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,ks=/^(?:\/(?:[^~/]|~0|~1)*)*$/,As=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,js=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Ms=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},Ns=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Ps=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,Fs=e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function Is(e){return e.test.bind(e)}var Ls={date:zs,time:Bs.bind(void 0,!1),"date-time":Hs,duration:Fs,uri:Gs,"uri-reference":Is(Ts),"uri-template":Is(Es),url:Is(Ds),email:Ms,hostname:Is(ws),ipv4:Is(Ns),ipv6:Is(Ps),regex:qs,uuid:Is(Os),"json-pointer":Is(ks),"json-pointer-uri-fragment":Is(As),"relative-json-pointer":Is(js)};function Rs(e){return e%4==0&&(e%100!=0||e%400==0)}function zs(e){let t=e.match(xs);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&Rs(n)?29:Ss[r])}function Bs(e,t){let n=t.match(Cs);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var Vs=/t|\s/i;function Hs(e){let t=e.split(Vs);return t.length==2&&zs(t[0])&&Bs(!0,t[1])}var Us=/\/|:/,Ws=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Gs(e){return Us.test(e)&&Ws.test(e)}var Ks=/[^\\]\\Z/;function qs(e){if(Ks.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function Js(e){let t=0,n=e.length,r=0,i;for(;r=55296&&i<=56319&&rps(e,t))||F.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||F.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;$(e,v,n,r,i,a,o,t).valid&&F.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let xe=[];if(y!==void 0){let t=`${s}/anyOf`,l=F.length,u=!1;for(let s=0;s{let u=Object.create(c),d=$(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return F.push(...d.errors),d.valid&&xe.push(u),d.valid}).length;u===1?F.length=l:F.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...xe),S!==void 0){let t=`${s}/if`;if($(e,S,n,r,i,a,o,t,c).valid){if(ee!==void 0){let l=$(e,ee,n,r,i,a,o,`${s}/then`,c);l.valid||F.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(C!==void 0){let l=$(e,C,n,r,i,a,o,`${s}/else`,c);l.valid||F.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||F.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(T!==void 0&&t.lengthE&&F.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${E} properties.`}),ae!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${ms(s)}`,c=$(s,ae,n,r,i,a,e,t);c.valid||F.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(oe!==void 0){let t=`${s}/dependantRequired`;for(let n in oe)if(n in e){let r=oe[n];for(let i of r)i in e||F.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(se!==void 0)for(let t in se){let l=`${s}/dependentSchemas`;if(t in e){let s=$(e,se[t],n,r,i,a,o,`${l}/${ms(t)}`,c);s.valid||F.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(D!==void 0){let t=`${s}/dependencies`;for(let s in D)if(s in e){let c=D[s];if(Array.isArray(c))for(let n of c)n in e||F.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=$(e,c,n,r,i,a,o,`${t}/${ms(s)}`);l.valid||F.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(te!==void 0){let t=`${s}/properties`;for(let s in te){if(!(s in e))continue;let d=`${o}/${ms(s)}`,f=$(e[s],te[s],n,r,i,a,d,`${t}/${ms(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,F.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&ne!==void 0){let t=`${s}/patternProperties`;for(let s in ne){let d=new RegExp(s,`u`),f=ne[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${ms(p)}`,h=$(e[p],f,n,r,i,a,m,`${t}/${ms(s)}`);h.valid?c[p]=l[p]=!0:(u=i,F.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&re!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${ms(s)}`,f=$(e[s],re,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,F.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&ie!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${ms(s)}`,u=$(e[s],ie,n,r,i,a,l,t);u.valid?c[s]=!0:F.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){fe!==void 0&&e.length>fe&&F.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${fe}).`}),de!==void 0&&e.length=(j||0)&&(F.length=u),j===void 0&&ue===void 0&&d===0?F.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):j!==void 0&&due&&F.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${ue} items matching schema. ${d} items were found.`})}}if(!u&&A!==void 0){let u=`${s}/unevaluatedItems`;for(;l=M||e>M)&&F.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${ge?`or equal to `:``} ${M}.`})):(me!==void 0&&eM&&F.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${M}.`}),he!==void 0&&e<=he&&F.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${he}.`}),ge!==void 0&&e>=ge&&F.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${ge}.`})),N!==void 0){let t=e%N;Math.abs(0-t)>=1.1920929e-7&&Math.abs(N-t)>=1.1920929e-7&&F.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${N}.`})}}else if(u===`string`){let t=_e===void 0&&ve===void 0?0:Js(e);_e!==void 0&&t<_e&&F.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${_e}).`}),ve!==void 0&&t>ve&&F.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${ve}).`}),ye!==void 0&&!new RegExp(ye,`u`).test(e)&&F.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),w!==void 0&&Ls[w]&&!Ls[w](e)&&F.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${w}".`})}return{valid:F.length===0,errors:F}}var Ys=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=bs(e)}validate(e){return $(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),bs(e,this.lookup)}},Xs=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=Te(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new Ys(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}},Zs=globalThis.crypto;async function Qs(e){return(await Zs).getRandomValues(new Uint8Array(e))}async function $s(e){let t=``;for(;t.length128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await ec(e);return{code_verifier:t,code_challenge:await tc(t)}}var rc=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},ic=10,ac=13,oc=32;function sc(e){}function cc(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:t=sc,onError:n=sc,onRetry:r=sc,onComment:i,maxBufferSize:a}=e,o=[],s=0,c=!0,l,u=``,d=0,f,p=!1;function m(e){if(p)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(c&&(c=!1,e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),o.length===0){let t=g(e);t!==``&&(o.push(t),s=t.length),h();return}if(e.indexOf(` +`)===-1&&e.indexOf(`\r`)===-1){o.push(e),s+=e.length,h();return}o.push(e);let t=o.join(``);o.length=0,s=0;let n=g(t);n!==``&&(o.push(n),s=n.length),h()}function h(){a!==void 0&&(s+u.length<=a||(p=!0,o.length=0,s=0,l=void 0,u=``,d=0,f=void 0,n(new rc(`Buffered data exceeded max buffer size of ${a} characters`,{type:`max-buffer-size-exceeded`}))))}function g(e){let n=0;if(e.indexOf(`\r`)===-1){let r=e.indexOf(` +`,n);for(;r!==-1;){if(n===r){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0,n=r+1,r=e.indexOf(` +`,n);continue}let i=e.charCodeAt(n);if(lc(e,n,i)){let i=e.charCodeAt(n+5)===oc?n+6:n+5,a=e.slice(i,r);if(d===0&&e.charCodeAt(r+1)===ic){t({id:l,event:f,data:a}),l=void 0,u=``,f=void 0,n=r+2,r=e.indexOf(` +`,n);continue}u=d===0?a:`${u} +${a}`,d++}else uc(e,n,i)?f=e.slice(e.charCodeAt(n+6)===oc?n+7:n+6,r)||void 0:_(e,n,r);n=r+1,r=e.indexOf(` +`,n)}return e.slice(n)}for(;n20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}))}}function y(){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0}function b(e={}){if(e.consume&&o.length>0){let e=o.join(``);_(e,0,e.length)}c=!0,l=void 0,u=``,d=0,f=void 0,o.length=0,s=0,p=!1}return{feed:m,reset:b}}function lc(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function uc(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}var dc=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n,maxBufferSize:r}={}){let i;super({start(a){i=cc({onEvent:e=>{a.enqueue(e)},onError(t){typeof e==`function`&&e(t),(e===`terminate`||t.type===`max-buffer-size-exceeded`)&&a.error(t)},onRetry:t,onComment:n,maxBufferSize:r})},transform(e){i.feed(e)}})}},fc=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return Kr(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Kr(this,e)}constructor(e){super(e),this.name=new.target.name,Gr(this,new.target)}},pc=class extends fc{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 §3.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}},mc=class extends fc{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},hc=class extends fc{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},gc=class extends fc{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},_c=class extends fc{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};function vc(e,t,n){if(e)return typeof e.issuer==`string`?yc(e.issuer,t)?e:void 0:(n?.canPersistStamp!==!1&&console.warn(`[mcp-sdk] SEP-2352: stored OAuth credential has no 'issuer' stamp (pre-upgrade storage or provider not round-tripping the value). SEP-2352 isolation is inactive for this read; ensure your provider round-trips the issuer field.`),e.issuer===void 0?e:{...e,issuer:void 0})}function yc(e,t){return e===t||e.endsWith(`/`)&&e.slice(0,-1)===t||t.endsWith(`/`)&&t.slice(0,-1)===e}function bc(e){if(e==null)return!1;let t=e;return typeof t.tokens==`function`&&typeof t.clientInformation==`function`}async function xc(e,t,n){let{resourceMetadataUrl:r,scope:i}=Yc(t.response);if(await Uc(e,{serverUrl:t.serverUrl,resourceMetadataUrl:r,scope:i,fetchFn:t.fetchFn,...n})!==`AUTHORIZED`)throw new Cc}function Sc(e,t){return{token:async()=>(await e.tokens())?.access_token,onUnauthorized:async n=>xc(e,n,t)}}var Cc=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return Kr(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Kr(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,Gr(this,new.target)}};function wc(e){return e?.authorization_response_iss_parameter_supported===!0}function Tc({iss:e,expectedIssuer:t,issParameterSupported:n}){if(t!==void 0){if(e===void 0){if(n)throw new pc(`authorization_response`,t,void 0);return}if(e!==t)throw new pc(`authorization_response`,t,e)}}function Ec(...e){let t=new Set;for(let n of e)if(n)for(let e of n.split(/\s+/))e&&t.add(e);return t.size>0?[...t].join(` `):void 0}function Dc(e,t){if(!e)return!1;let n=new Set((t??``).split(/\s+/).filter(Boolean));for(let t of e.split(/\s+/))if(t&&!n.has(t))return!0;return!1}async function Oc(e,t,n,r,i){if(typeof e==`string`)return{authorizationCode:e,iss:t};let a=e.get(`iss`)??void 0,o=e.get(`code`);if(o)return{authorizationCode:o,iss:a};let s=(await n.discoveryState?.())?.authorizationServerMetadata;if(!s)try{s=(await al(r,i)).authorizationServerMetadata}catch{s=void 0}if(!s)throw new Cc(`Authorization callback failed and the issuer could not be verified`);Tc({iss:a,expectedIssuer:s.issuer,issParameterSupported:wc(s)});let c=e.get(`error`);throw c?new Jr(c,e.get(`error_description`)??c,e.get(`error_uri`)??void 0):new Cc("Authorization callback contained neither `code` nor `error`")}function kc(e){return[`client_secret_basic`,`client_secret_post`,`none`].includes(e)}var Ac=`code`,jc=`S256`;function Mc(e,t){let n=e.client_secret!==void 0;return`token_endpoint_auth_method`in e&&e.token_endpoint_auth_method&&kc(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?`client_secret_basic`:`none`:n&&t.includes(`client_secret_basic`)?`client_secret_basic`:n&&t.includes(`client_secret_post`)?`client_secret_post`:t.includes(`none`)?`none`:n?`client_secret_post`:`none`}function Nc(e,t,n,r){let{client_id:i,client_secret:a}=t;switch(e){case`client_secret_basic`:Pc(i,a,n);return;case`client_secret_post`:Fc(i,a,r);return;case`none`:Ic(i,r);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function Pc(e,t,n){if(!t)throw Error(`client_secret_basic authentication requires a client_secret`);let r=btoa(`${e}:${t}`);n.set(`Authorization`,`Basic ${r}`)}function Fc(e,t,n){n.set(`client_id`,e),t&&n.set(`client_secret`,t)}function Ic(e,t){t.set(`client_id`,e)}function Lc(e){return e===`localhost`||e.endsWith(`.localhost`)||e===`127.0.0.1`||e===`[::1]`||e===`::1`}function Rc(e){let t=new URL(String(e));if(t.protocol!==`https:`&&!Lc(t.hostname))throw new hc(t.href);return t}function zc(e){for(let t of e??[]){let e;try{e=new URL(t)}catch{continue}if(e.protocol!==`http:`&&e.protocol!==`https:`||Lc(e.hostname))return`native`}return`web`}function Bc(e){let t=e.clientMetadata;return{...t,grant_types:t.grant_types??(e.redirectUrl===void 0?void 0:[`authorization_code`,`refresh_token`]),application_type:t.application_type??zc(t.redirect_uris)}}async function Vc(e){let t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{let e=Lr.parse(JSON.parse(n));return Jr.fromResponse(e)}catch(e){let r=`${t?`HTTP ${t}: `:``}Invalid OAuth error response: ${e}. Raw body: ${n}`;return new Jr(qr.ServerError,r)}}function Hc(e,t,n){let r=e.invalidateCredentials===void 0?`retrying authorization without discarding the stored ${n} (provider implements no invalidateCredentials())`:`invalidating the stored ${n} and retrying authorization`;console.warn(`[mcp-sdk] OAuth ${JSON.stringify(t.code)} — ${r}. Cause: ${JSON.stringify(t.message)}`)}async function Uc(e,t){try{return await Gc(e,t)}catch(n){if(n instanceof Jr){if(n.code===qr.InvalidClient||n.code===qr.UnauthorizedClient)return Hc(e,n,`client credentials and tokens`),await e.invalidateCredentials?.(`client`),await e.invalidateCredentials?.(`tokens`),await Gc(e,t);if(n.code===qr.InvalidGrant||n.code===qr.InvalidDpopProof)return Hc(e,n,`tokens`),await e.invalidateCredentials?.(`tokens`),await Gc(e,t)}throw n}}function Wc(e){let{requestedScope:t,resourceMetadata:n,authServerMetadata:r,clientMetadata:i}=e,a=t||n?.scopes_supported?.join(` `)||i.scope;return a&&r?.scopes_supported?.includes(`offline_access`)&&!a.split(` `).includes(`offline_access`)&&i.grant_types?.includes(`refresh_token`)&&(a=`${a} offline_access`),a}async function Gc(e,{serverUrl:t,authorizationCode:n,iss:r,scope:i,resourceMetadataUrl:a,fetchFn:o,skipIssuerMetadataValidation:s,forceReauthorization:c}){let l=Bc(e),u=await e.discoveryState?.(),d,f,p,m,h=a;if(!h&&u?.resourceMetadataUrl&&(h=new URL(u.resourceMetadataUrl)),u?.authorizationServerUrl){if(f=u.authorizationServerUrl,d=u.resourceMetadata,p=u.authorizationServerMetadata??await il(f,{fetchFn:o,skipIssuerValidation:s}),!d)try{d=await Zc(t,{resourceMetadataUrl:h},o)}catch(e){if(e instanceof TypeError)throw e}(p!==u.authorizationServerMetadata||d!==u.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(f),resourceMetadataUrl:h?.toString(),resourceMetadata:d,authorizationServerMetadata:p})}else{let e=await al(t,{resourceMetadataUrl:h,fetchFn:o,skipIssuerMetadataValidation:s});f=e.authorizationServerUrl,p=e.authorizationServerMetadata,d=e.resourceMetadata,m={authorizationServerUrl:String(f),resourceMetadataUrl:h?.toString(),resourceMetadata:d,authorizationServerMetadata:p}}let g=p?.issuer??String(f),_={issuer:g};if(await e.saveAuthorizationServerUrl?.(g),n!==void 0){let t=u?.authorizationServerMetadata?.issuer??u?.authorizationServerUrl;if(t===void 0){if(e.saveDiscoveryState!==void 0)throw new gc(`discoveryState was not available on the callback leg; ensure your provider persists discoveryState alongside codeVerifier`,g);console.warn(`[mcp-sdk] OAuthClientProvider does not implement saveDiscoveryState()/discoveryState(); the SEP-2352 callback-leg authorization-server binding cannot be checked. Implement discoveryState (persist alongside codeVerifier) — see docs/migration/upgrade-to-v2.md §SEP-2352.`)}else if(!yc(t,g))throw new gc(t,g)}m&&await e.saveDiscoveryState?.(m);let v=await qc(t,e,d),y=v&&d&&!e.validateResourceURL?d.resource:v;y&&await e.saveResourceUrl?.(ol(y));let b=Wc({requestedScope:i,resourceMetadata:d,authServerMetadata:p,clientMetadata:e.clientMetadata}),x=await Promise.resolve(e.clientInformation(_)),S=vc(x,g,{canPersistStamp:e.saveClientInformation!==void 0});if(S===void 0&&x?.issuer&&e.saveClientInformation===void 0)throw new gc(x.issuer,g);if(S&&S.issuer===void 0&&(S={...S,issuer:g},await e.saveClientInformation?.(S,_)),!S){if(n!==void 0)throw Error(`Existing OAuth client information is required when exchanging an authorization code`);let t=p?.client_id_metadata_document_supported===!0,r=e.clientMetadataUrl;if(r&&!Kc(r))throw new Jr(qr.InvalidClientMetadata,`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${r}`);if(t&&r)S={client_id:r,issuer:g},await e.saveClientInformation?.(S,_);else{if(!e.saveClientInformation)throw Error(`OAuth client information must be saveable for dynamic registration`);S={...await fl(f,{metadata:p,clientMetadata:l,scope:b,fetchFn:o}),issuer:g},await e.saveClientInformation(S,_)}}let ee=!e.redirectUrl;if(n!==void 0||ee){n!==void 0&&Tc({iss:r,expectedIssuer:p?.issuer,issParameterSupported:wc(p)});let t=await dl(e,f,{metadata:p,resource:y,authorizationCode:n,iss:r,scope:b,fetchFn:o});return await e.saveTokens({...t,issuer:g},_),`AUTHORIZED`}let C=vc(await e.tokens(_),g);if(C&&C.issuer===void 0&&(C={...C,issuer:g},await e.saveTokens(C,_)),C?.refresh_token&&!c){let t;try{t=await ul(f,{metadata:p,clientInformation:S,refreshToken:C.refresh_token,resource:y,addClientAuthentication:e.addClientAuthentication,dpop:await e.dpop?.(),fetchFn:o})}catch(e){if(e instanceof hc)throw e;if(!(e instanceof Jr)||e.code===qr.ServerError)console.warn(`[mcp-sdk] Could not refresh OAuth tokens; falling back to a new authorization request. Cause: ${JSON.stringify(e instanceof Error?e.message:String(e))}`);else throw e}if(t)return await e.saveTokens({...t,issuer:g},_),`AUTHORIZED`}let w=e.state?await e.state():void 0,{authorizationUrl:te,codeVerifier:ne}=await sl(f,{metadata:p,clientInformation:S,state:w,redirectUrl:e.redirectUrl,scope:b,resource:y});return await e.saveCodeVerifier(ne),await e.redirectToAuthorization(te),`REDIRECT`}function Kc(e){if(!e)return!1;try{let t=new URL(e);return t.protocol===`https:`&&t.pathname!==`/`}catch{return!1}}async function qc(e,t,n){let r=Xr(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Qr({requestedResource:r,configuredResource:n.resource}))throw Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}var Jc=new Set([`bearer`,`dpop`]);function Yc(e){let t=e.headers.get(`WWW-Authenticate`);if(!t)return{};let[n,r]=t.split(` `);if(!n||!Jc.has(n.toLowerCase())||!r)return{};let i=Xc(e,`resource_metadata`)||void 0,a;if(i)try{a=new URL(i)}catch{}let o=Xc(e,`scope`)||void 0,s=Xc(e,`error`)||void 0,c=Xc(e,`error_description`)||void 0;return{resourceMetadataUrl:a,scope:o,error:s,errorDescription:c}}function Xc(e,t){let n=e.headers.get(`WWW-Authenticate`);if(!n)return null;let r=new RegExp(String.raw`${t}=(?:"([^"]+)"|([^\s,]+))`),i=n.match(r);if(i){let e=i[1]||i[2];if(e)return e}return null}async function Zc(e,t,n=fetch){let r=await nl(e,`oauth-protected-resource`,n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.text?.().catch(()=>{}),Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`);if(!r.ok)throw await r.text?.().catch(()=>{}),Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return jr.parse(await r.json())}async function Qc(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(!(r instanceof TypeError))throw r;if(t)try{return await n(e,{})}catch(e){if(!(e instanceof TypeError))throw e;return}return}}function $c(e,t=``,n={}){return t.endsWith(`/`)&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function el(e,t,n=fetch){return await Qc(e,{"MCP-Protocol-Version":t},n)}function tl(e,t){return e?t===`/`?!1:e.status>=400&&e.status<500||e.status===502:!0}async function nl(e,t,n,r){let i=new URL(e),a=r?.protocolVersion??`2025-11-25`,o;if(r?.metadataUrl)o=new URL(r.metadataUrl);else{let e=$c(t,i.pathname);o=new URL(e,r?.metadataServerUrl??i),o.search=i.search}let s=await el(o,a,n);return!r?.metadataUrl&&tl(s,i.pathname)&&(s=await el(new URL(`/.well-known/${t}`,i),a,n)),s}function rl(e){let t=typeof e==`string`?new URL(e):e,n=t.pathname!==`/`,r=[];if(!n)return r.push({url:new URL(`/.well-known/oauth-authorization-server`,t.origin),type:`oauth`},{url:new URL(`/.well-known/openid-configuration`,t.origin),type:`oidc`}),r;let i=t.pathname;return i.endsWith(`/`)&&(i=i.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,t.origin),type:`oauth`},{url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:`oidc`},{url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:`oidc`}),r}async function il(e,{fetchFn:t=fetch,protocolVersion:n=Ee,skipIssuerValidation:r=!1}={}){let i={"MCP-Protocol-Version":n,Accept:`application/json`},a=rl(e);for(let{url:n,type:o}of a){let a=await Qc(n,i,t);if(!a)continue;if(!a.ok){if(await a.text?.().catch(()=>{}),a.status>=400&&a.status<500||a.status===502)continue;throw Error(`HTTP ${a.status} trying to load ${o===`oauth`?`OAuth`:`OpenID provider`} metadata from ${n}`)}let s=o===`oauth`?Mr.parse(await a.json()):Pr.parse(await a.json());if(!r){let t=typeof e==`string`?e:e.href;if(!(s.issuer===t||t.endsWith(`/`)&&s.issuer===t.slice(0,-1)))throw new pc(`metadata`,t,s.issuer)}return s}}async function al(e,t){let n,r;try{n=await Zc(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch(e){if(e instanceof TypeError)throw e}r||=String(new URL(`/`,e));let i=await il(r,{fetchFn:t?.fetchFn,skipIssuerValidation:t?.skipIssuerMetadataValidation});return{authorizationServerUrl:r,authorizationServerMetadata:i,resourceMetadata:n}}function ol(e){return typeof e==`string`?e:e.href}async function sl(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:i,state:a,resource:o}){let s;if(t){if(s=new URL(t.authorization_endpoint),!t.response_types_supported.includes(Ac))throw Error(`Incompatible auth server: does not support response type ${Ac}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(jc))throw Error(`Incompatible auth server: does not support code challenge method ${jc}`)}else s=new URL(`/authorize`,e);let c=await nc(),l=c.code_verifier,u=c.code_challenge;return s.searchParams.set(`response_type`,Ac),s.searchParams.set(`client_id`,n.client_id),s.searchParams.set(`code_challenge`,u),s.searchParams.set(`code_challenge_method`,jc),s.searchParams.set(`redirect_uri`,String(r)),a&&s.searchParams.set(`state`,a),i&&s.searchParams.set(`scope`,i),i?.split(` `).includes(`offline_access`)&&s.searchParams.append(`prompt`,`consent`),o&&s.searchParams.set(`resource`,ol(o)),{authorizationUrl:s,codeVerifier:l}}function cl(e,t,n){return new URLSearchParams({grant_type:`authorization_code`,code:e,code_verifier:t,redirect_uri:String(n)})}async function ll(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:a,dpop:o,fetchFn:s}){let c=Rc(t?.token_endpoint??new URL(`/token`,e)),l=new Headers({"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`});a&&n.set(`resource`,ol(a)),!i&&r&&Nc(Mc(r,t?.token_endpoint_auth_methods_supported??[]),r,l,n);let u=async()=>{let e=new Headers(l);return i&&await i(e,n,c,t),o&&e.set(`DPoP`,await o.buildProof({htm:`POST`,htu:c})),(s??fetch)(c,{method:`POST`,headers:e,body:n})},d=await u();if(o&&d.status===400&&(await d.clone().json().catch(()=>{}))?.error===qr.UseDpopNonce&&(o.observeNonce(d,c),d=await u()),o?.observeNonce(d,c),!d.ok)throw await Vc(d);let f=await d.json();try{return Fr.parse(Zr(f))}catch(e){throw typeof f==`object`&&f&&`error`in f?await Vc(JSON.stringify(f)):e}}async function ul(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:a,dpop:o,fetchFn:s}){return{refresh_token:r,...await ll(e,{metadata:t,tokenRequestParams:new URLSearchParams({grant_type:`refresh_token`,refresh_token:r}),clientInformation:n,addClientAuthentication:a,resource:i,dpop:o,fetchFn:s})}}async function dl(e,t,{metadata:n,resource:r,authorizationCode:i,iss:a,scope:o,fetchFn:s}={}){i!==void 0&&Tc({iss:a,expectedIssuer:n?.issuer,issParameterSupported:wc(n)});let c=n?.issuer??String(t),l=async()=>{let t=await e.clientInformation({issuer:c}),n=vc(t,c,{canPersistStamp:!1});if(t&&n===void 0)throw new gc(String(t.issuer),c);return n},u=await l(),d=o??e.clientMetadata.scope,f;if(e.prepareTokenRequest&&(f=await e.prepareTokenRequest(d)),!f){if(!i)throw Error(`Either provider.prepareTokenRequest() or authorizationCode is required`);if(!e.redirectUrl)throw Error(`redirectUrl is required for authorization_code flow`);f=cl(i,await e.codeVerifier(),e.redirectUrl)}return u??=await l(),ll(t,{metadata:n,tokenRequestParams:f,clientInformation:u,addClientAuthentication:e.addClientAuthentication,resource:r,dpop:await e.dpop?.(),fetchFn:s})}async function fl(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:i}){let a;if(t){if(!t.registration_endpoint)throw Error(`Incompatible auth server: does not support dynamic client registration`);a=new URL(t.registration_endpoint)}else a=new URL(`/register`,e);let o={...n,...r===void 0?{}:{scope:r}},s=await(i??fetch)(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(o)});if(!s.ok)throw new mc({status:s.status,body:await s.text(),submittedMetadata:o});return Vr.parse(Zr(await s.json()))}var pl=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),ml=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(hl(e))}set(e,t){let n=hl(e),r=pl.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!pl.has(e.slice(0,e.indexOf(`\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(hl(e))&&!pl.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\0`,n=pl.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function hl(e){return`${e.method}\0${JSON.stringify([e.partition??``,e.params??``])}`}function gl(e,t){return t===void 0?e:`${e}\0${t}`}var _l=864e5,vl=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=gl(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=gl(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(gl(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:yl(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(n?.expiresAt!==void 0&&n.expiresAt>this.now())try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function yl(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var bl=Symbol.for(`mcp.authSeamEscape`);function xl(e){if(typeof e==`object`&&e||typeof e==`function`)try{Object.defineProperty(e,bl,{value:!0,configurable:!0})}catch{}return e}function Sl(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[bl]===!0}var Cl=-32022,wl=new Set([-32001,-32020,-32021]);function Tl(e,t){switch(e.kind){case`result`:return El(e.result,t);case`rpc-error`:return Dl(e,t);case`http-error`:return Ol(e,t);case`network-error`:return kl(e.error,t);case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:kl(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new X(Y.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function El(e,t){let n=wa(Ca).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new Ui({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function Dl(e,t){let{code:n,message:r,data:i}=e;if(n===Cl){let e=Ml(i);if(e===void 0)return{kind:`legacy`};let n=new Ui({supported:e,requested:Nl(i)??t.requestedVersion},r),a=ri(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return wl.has(n),{kind:`legacy`}}function Ol(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new Yr(t?Y.ClientHttpForbidden:Y.ClientHttpAuthentication,`Version negotiation failed: ${t?`the server denied access (HTTP 403)`:`the server requires authorization (HTTP 401)`}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:`error`,error:new Yr(Y.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=Pl(e.body);return n===void 0?{kind:`legacy`}:Dl(n,t)}function kl(e,t){return t.environment===`browser`&&Al(e)?{kind:`legacy`}:{kind:`error`,error:new X(Y.EraNegotiationFailed,`Version negotiation probe failed: ${jl(e)}`,{cause:e},{cause:e})}}function Al(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function jl(e){return e instanceof Error?e.message:String(e)}function Ml(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(Array.isArray(t)&&t.length!==0&&t.every(e=>typeof e==`string`))return t}function Nl(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function Pl(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var Fl=`legacy`;function Il(e,t){let n=e?.mode??Fl;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!ti(n.pin))throw TypeError(`versionNegotiation: { pin: '${n.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?ri(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...ei],fallbackAvailable:!t||ni(t).length>0,probe:r}}function Ll(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function Rl(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var zl=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(Ma(e)||Na(e))&&e.id===t.id){n._pending=void 0,Ma(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,Bl.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},Bl=new WeakMap;function Vl(e){let t=Bl.get(e);Bl.delete(e),t?.()}function Hl(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:wa(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function Ul(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(Sl(t)||t instanceof Cc||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof Yr){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0,statusText:t.data.statusText}}return{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function Wl(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await zl.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>Hl(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=Ul(r,n),d=Tl(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new X(Y.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new X(Y.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new X(Y.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function Gl(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function Kl(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(ql())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=Wl(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await Jl(a),t.close=o}if(s)throw ql();return u}function ql(){return new X(Y.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function Jl(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function Yl(e){let t=e._meta?.[je];return Wo.Implementation(t)?t:void 0}function Xl(e,t){if(e&&typeof t==`object`&&t){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&Xl(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&Xl(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&Xl(n,t)}}function Zl(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}function Ql(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&ft.safeParse(e.discover).success))return e;throw new X(Y.EraNegotiationFailed,`connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }`)}var $l={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},eu=64,tu=class extends Qo{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new X(Y.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Xs,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=No(t?.inputRequired),this._cache=new vl(t?.responseCacheStore??new ml,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??eu,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&ti(this._negotiatedProtocolVersion)&&Aa(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?ss({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new X(Y.UnsupportedResultType,`Unsupported result type 'input_required' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=es(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=wa(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new Q(i.reason===`not-in-era`?Z.InternalError:Z.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=Zl(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new Q(Z.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new Q(Z.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new Q(l.reason===`not-in-era`?Z.InternalError:Z.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{Xl(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=wa(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new Q(i.reason===`not-in-era`?Z.InternalError:Z.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new Q(c.reason===`not-in-era`?Z.InternalError:Z.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new X(Y.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,Ql(t.prior),t);let n=Il(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=ni(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new X(Y.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server's protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=Rl(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:Ll(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?Gl(e):void 0;r=o===void 0?await Wl(t,{...a,transport:e,transportKind:i}):await Kl(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),Vl(e),t}if(Vl(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=Yl(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&ri(i).length>0?ri(i):ei).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new X(Y.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=Yl(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return ti(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new X(Y.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new X(Y.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw new X(Y.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new X(Y.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new X(Y.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new X(Y.CapabilityNotSupported,`Server does not support completions (required for ${e})`)}}assertNotificationCapability(e){if(e===`notifications/roots/list_changed`&&!this._capabilities.roots?.listChanged)throw new X(Y.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new X(Y.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new X(Y.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new X(Y.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`)}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},ft,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,e=>e.prompts):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,e=>e.resources):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,e=>e.resourceTemplates):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this.request({method:e,...t&&{params:{...t}}},n),c=s.nextCursor,l=s,u=1;for(;c!==void 0;){if(this._listMaxPages!==0&&u>=this._listMaxPages)throw new X(Y.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let i=await this.request({method:e,params:{...t,cursor:c}},n);if(i.nextCursor===c&&JSON.stringify(r(i))===JSON.stringify(r(l)))break;r(s).push(...r(i)),l=i,c=i.nextCursor,u++}return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),_l),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof X?e:new X(Y.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:Va(n.inputSchema)}async readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return n;let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return i}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new X(Y.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!ti(n))throw new X(Y.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof X?e:new X(Y.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new X(Y.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new X(Y.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let _={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},v=e=>{p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(_,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})}).catch(v)}catch(e){v(e)}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn($l,e.method)?$l[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[Ne],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){Na(e)?n.settle({cause:`remote`,error:Q.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new X(Y.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new X(Y.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&Ll()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=Qa(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new Q(Z.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof Q&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new Q(Z.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new Q(Z.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){throw e instanceof Q?e:new Q(Z.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||Rl(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=Va(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool '${e.name}' from tools/list: invalid x-mcp-header declaration — ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=no(bn,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}};function nu(e){return/(?:^|,)\s*dpop(?:\s|$|,)/i.test(e)}function ru(e){if(e.status!==401)return!1;let t=e.headers.get(`www-authenticate`)??``;return nu(t)&&/use_dpop_nonce/i.test(t)}var iu=(e,t)=>n=>{let r=typeof e==`function`?e:()=>e;return async(e,i)=>{let a=(i?.method??`GET`).toUpperCase(),o=new URL(e.toString()),s=await r();if(!s)return n(e,i);let c=async()=>{let r=await t();if(!r)return n(e,i);let c=new Headers(i?.headers),l=await s.buildProof({htm:a,htu:o,accessToken:r});return c.set(`Authorization`,`DPoP ${r}`),c.set(`DPoP`,l),n(e,{...i,headers:c})},l=await c();return ru(l)&&l.headers.has(`dpop-nonce`)&&(s.observeNonce(l,o),await l.text?.().catch(()=>{}),l=await c()),s.observeNonce(l,o),l}},au=e=>iu(async()=>{try{return await e.dpop?.()}catch(e){throw xl(e)}},async()=>{let t;try{t=await e.tokens()}catch(e){throw xl(e)}return t?.token_type?.toLowerCase()===`dpop`?t.access_token:void 0});(class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return Kr(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Kr(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,Gr(this,new.target)}});var ou=1,su={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},cu=new Set([`authorization`,`dpop`,`content-type`,`mcp-protocol-version`,`mcp-method`,`mcp-name`,`mcp-session-id`]);function lu(e,t){if(typeof AbortSignal.any==`function`)return AbortSignal.any([e,t]);let n=new AbortController;if(e.aborted)return n.abort(e.reason),n.signal;if(t.aborted)return n.abort(t.reason),n.signal;let r=()=>{e.removeEventListener(`abort`,i),t.removeEventListener(`abort`,a)};function i(){r(),n.abort(e.reason)}function a(){r(),n.abort(t.reason)}return e.addEventListener(`abort`,i,{once:!0}),t.addEventListener(`abort`,a,{once:!0}),n.signal}var uu=class{_abortController;_url;_resourceMetadataUrl;_scope;_requestInit;_authProvider;_oauthProvider;_skipIssuerMetadataValidation;_fetch;_fetchWithInit;_sessionId;_reconnectionOptions;_protocolVersion;_onInsufficientScope;_maxStepUpRetries;_serverRetryMs;_reconnectionScheduler;_cancelReconnection;onclose;onerror;onmessage;hasPerRequestStream=!0;constructor(e,t){this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._skipIssuerMetadataValidation=t?.skipIssuerMetadataValidation,this._fetch=t?.fetch,bc(t?.authProvider)?(this._oauthProvider=t.authProvider,this._authProvider=Sc(t.authProvider,{skipIssuerMetadataValidation:t.skipIssuerMetadataValidation}),t.authProvider.dpop&&(this._fetch=au(t.authProvider)(t.fetch??fetch))):this._authProvider=t?.authProvider,this._fetchWithInit=fs(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._protocolVersion=t?.protocolVersion,this._reconnectionOptions=t?.reconnectionOptions??su,this._reconnectionScheduler=t?.reconnectionScheduler,this._onInsufficientScope=t?.onInsufficientScope??`reauthorize`,this._maxStepUpRetries=Math.max(0,t?.maxStepUpRetries??ou)}async _stepUpAuthorize(e,t){try{return await this._stepUpAuthorizeInner(e,t)}catch(e){throw xl(e)}}async _stepUpAuthorizeInner(e,t){if(this._onInsufficientScope===`throw`||!this._oauthProvider)throw new _c({requiredScope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,errorDescription:e.errorDescription});if(t>=this._maxStepUpRetries)throw new Yr(Y.ClientHttpForbidden,`Server returned 403 insufficient_scope after step-up re-authorization (retry limit ${this._maxStepUpRetries} reached)`,{status:403,statusText:e.statusText??`Forbidden`,text:e.text});e.resourceMetadataUrl&&(this._resourceMetadataUrl=e.resourceMetadataUrl);let n=await this._oauthProvider.tokens(),r=Ec(this._scope,n?.scope,e.scope);this._scope=r;let i=Dc(r,n?.scope);return Uc(this._oauthProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:r,forceReauthorization:i,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})}async _commonHeaders(){let e=new Headers(this._requestInit?.headers||void 0),t;try{t=await this._authProvider?.token()}catch(e){throw xl(e)}return t&&e.set(`Authorization`,`Bearer ${t}`),this._sessionId&&e.set(`mcp-session-id`,this._sessionId),this._protocolVersion&&e.set(`mcp-protocol-version`,this._protocolVersion),e}_applyBodyDerivedHeaders(e,t){if(Array.isArray(t)||!Aa(t))return;let n=t.params?._meta?.[ke];if(typeof n!=`string`)return;e.set(`mcp-protocol-version`,n),e.set(`mcp-method`,t.method);let r=eo(t.method,t.params);r?.value!==void 0&&e.set(`mcp-name`,Xa(r.value))}_isModernEnvelopedRequest(e){if(Array.isArray(e)||!Aa(e))return!1;let t=e.params?._meta?.[ke];return typeof t==`string`&&ti(t)}async _startOrAuthSse(e,t=!1,n=0){let{resumptionToken:r,requestSignal:i}=e,a=()=>this._abortController?.signal.aborted===!0||i?.aborted===!0;try{let a=await this._commonHeaders(),o=[...a.get(`accept`)?.split(`,`).map(e=>e.trim().toLowerCase())??[],`text/event-stream`];a.set(`accept`,[...new Set(o)].join(`, `)),r&&a.set(`last-event-id`,r);let s=this._abortController?.signal,c=i!==void 0&&s!==void 0?lu(s,i):i??s,l=await(this._fetch??fetch)(this._url,{...this._requestInit,method:`GET`,headers:a,signal:c});if(!l.ok){if(l.status===401&&this._authProvider){if(l.headers.has(`www-authenticate`)){let{resourceMetadataUrl:e,scope:t}=Yc(l);this._resourceMetadataUrl=e,this._scope=Ec(this._scope,t)}if(this._authProvider.onUnauthorized&&!t){try{await this._authProvider.onUnauthorized({response:l,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(e){throw xl(e)}return await l.text?.().catch(()=>{}),this._startOrAuthSse(e,!0,n)}throw await l.text?.().catch(()=>{}),xl(t?new Yr(Y.ClientHttpAuthentication,`Server returned 401 after re-authentication`,{status:401,statusText:l.statusText}):new Cc)}if(l.status===403){let{resourceMetadataUrl:r,scope:i,error:a,errorDescription:o}=Yc(l);if(a===`insufficient_scope`){let a=await l.text?.().catch(()=>null);if(await this._stepUpAuthorize({scope:i,resourceMetadataUrl:r,errorDescription:o,statusText:l.statusText,text:a},n)!==`AUTHORIZED`)throw xl(new Cc);return this._startOrAuthSse(e,t,n+1)}}if(await l.text?.().catch(()=>{}),l.status===405){e.onRequestStreamEnd?.();return}throw new Yr(Y.ClientHttpFailedToOpenStream,`Failed to open SSE stream: ${l.statusText}`,{status:l.status,statusText:l.statusText})}this._handleSseStream(l.body,e,!0)}catch(e){throw a()||this.onerror?.(e),e}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let t=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*n**+e,r)}_scheduleReconnection(e,t=0){let n=this._reconnectionOptions.maxRetries;if(t>=n){this.onerror?.(Error(`Maximum reconnection attempts (${n}) exceeded.`)),e.onRequestStreamEnd?.();return}let r=this._getNextReconnectionDelay(t),i=()=>{this._cancelReconnection=void 0,!(this._abortController?.signal.aborted||e.requestSignal?.aborted)&&this._startOrAuthSse(e).catch(n=>{if(!(this._abortController?.signal.aborted||e.requestSignal?.aborted)){this.onerror?.(Error(`Failed to reconnect SSE stream: ${n instanceof Error?n.message:String(n)}`));try{this._scheduleReconnection(e,t+1)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}})};if(this._reconnectionScheduler){let e=this._reconnectionScheduler(i,r,t);this._cancelReconnection=typeof e==`function`?e:void 0}else{let e=setTimeout(i,r);this._cancelReconnection=()=>clearTimeout(e)}}_handleSseStream(e,t,n){if(!e){t.onRequestStreamEnd?.();return}let{onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o}=t,s=()=>this._abortController?.signal.aborted===!0||a?.aborted===!0,c,l=!1,u=!1;(async()=>{try{let t=e.pipeThrough(new TextDecoderStream).pipeThrough(new dc({onRetry:e=>{this._serverRetryMs=e}})).getReader();for(;;){let{value:e,done:n}=await t.read();if(n)break;if(e.id&&(c=e.id,l=!0,r?.(e.id)),e.data&&(!e.event||e.event===`message`))try{let t=Je.parse(JSON.parse(e.data));(Ma(t)||Na(t))&&(u=!0,i!==void 0&&(t.id=i)),this.onmessage?.(t)}catch(e){this.onerror?.(e)}}(n||l)&&!u&&this._abortController&&!s()?this._scheduleReconnection({resumptionToken:c,onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o},0):s()||o?.()}catch(e){if(s())return;if(this.onerror?.(Error(`SSE stream disconnected: ${e}`)),(n||l)&&!u&&this._abortController&&!s())try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o},0)}catch(e){this.onerror?.(Error(`Failed to reconnect: ${e instanceof Error?e.message:String(e)}`)),o?.()}else o?.()}})()}async start(){if(this._abortController)throw Error(`StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.`);this._abortController=new AbortController}async finishAuth(e,t){if(!this._oauthProvider)throw new Cc(`finishAuth requires an OAuthClientProvider`);let{authorizationCode:n,iss:r}=await Oc(e,t,this._oauthProvider,this._url,{fetchFn:this._fetchWithInit,resourceMetadataUrl:this._resourceMetadataUrl});if(await Uc(this._oauthProvider,{serverUrl:this._url,authorizationCode:n,iss:r,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})!==`AUTHORIZED`)throw new Cc(`Failed to authorize`)}async close(){try{this._cancelReconnection?.()}finally{this._cancelReconnection=void 0,this._abortController?.abort(),this.onclose?.()}}async send(e,t){return this._send(e,t,!1)}async _send(e,t,n,r=0){try{let{resumptionToken:i,onresumptiontoken:a}=t||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:Aa(e)?e.id:void 0,requestSignal:t?.requestSignal}).catch(e=>this.onerror?.(e));return}let o=await this._commonHeaders();this._applyBodyDerivedHeaders(o,e);let s=Array.isArray(e)?e.some(e=>Fa(e)):Fa(e);if(s&&o.delete(`mcp-session-id`),t?.headers!==void 0)for(let[e,n]of Object.entries(t.headers))cu.has(e.toLowerCase())||o.set(e,n);o.set(`content-type`,`application/json`);let c=[...o.get(`accept`)?.split(`,`).map(e=>e.trim().toLowerCase())??[],`application/json`,`text/event-stream`];o.set(`accept`,[...new Set(c)].join(`, `));let l=this._abortController?.signal,u=t?.requestSignal!==void 0&&l!==void 0?lu(l,t.requestSignal):t?.requestSignal??l,d={...this._requestInit,method:`POST`,headers:o,body:JSON.stringify(e),signal:u},f=await(this._fetch??fetch)(this._url,d);if(s&&f.ok&&(this._sessionId=f.headers.get(`mcp-session-id`)||void 0),!f.ok){if(f.status===401&&this._authProvider){if(f.headers.has(`www-authenticate`)){let{resourceMetadataUrl:e,scope:t}=Yc(f);this._resourceMetadataUrl=e,this._scope=Ec(this._scope,t)}if(this._authProvider.onUnauthorized&&!n){try{await this._authProvider.onUnauthorized({response:f,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(e){throw xl(e)}return await f.text?.().catch(()=>{}),this._send(e,t,!0,r)}throw await f.text?.().catch(()=>{}),xl(n?new Yr(Y.ClientHttpAuthentication,`Server returned 401 after re-authentication`,{status:401,statusText:f.statusText}):new Cc)}let i=await f.text?.().catch(()=>null);if(f.status===403){let{resourceMetadataUrl:a,scope:o,error:s,errorDescription:c}=Yc(f);if(s===`insufficient_scope`){if(await this._stepUpAuthorize({scope:o,resourceMetadataUrl:a,errorDescription:c,statusText:f.statusText,text:i},r)!==`AUTHORIZED`)throw xl(new Cc);return this._send(e,t,n,r+1)}}if(f.status===400&&typeof i==`string`&&this._isModernEnvelopedRequest(e))try{let t=Je.parse(JSON.parse(i)),n=(Array.isArray(e)?e:[e]).filter(e=>Aa(e));if(Na(t)&&n.some(e=>e.id===t.id)){this.onmessage?.(t);return}}catch{}throw new Yr(Y.ClientHttpNotImplemented,`Error POSTing to endpoint: ${i}`,{status:f.status,statusText:f.statusText,text:i})}if(f.status===202){await f.text?.().catch(()=>{}),Ia(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(e=>this.onerror?.(e));return}let p=(Array.isArray(e)?e:[e]).some(e=>`method`in e&&`id`in e&&e.id!==void 0),m=f.headers.get(`content-type`),h=us(m);if(p){if(h===`text/event-stream`)this._handleSseStream(f.body,{onresumptiontoken:a,requestSignal:t?.requestSignal,onRequestStreamEnd:t?.onRequestStreamEnd},!1);else if(h===`application/json`){let e=await f.json(),t=Array.isArray(e)?e.map(e=>Je.parse(e)):[Je.parse(e)];for(let e of t)this.onmessage?.(e)}else throw await f.text?.().catch(()=>{}),new X(Y.ClientHttpUnexpectedContent,`Unexpected content type: ${m}`,{contentType:m})}else await f.text?.().catch(()=>{})}catch(e){throw t?.requestSignal?.aborted!==!0&&this.onerror?.(e),e}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{let e=await this._commonHeaders(),t={...this._requestInit,method:`DELETE`,headers:e,signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._url,t);if(await n.text?.().catch(()=>{}),!n.ok&&n.status!==405)throw new Yr(Y.ClientHttpFailedToTerminateSession,`Failed to terminate session: ${n.statusText}`,{status:n.status,statusText:n.statusText});this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}},du=class{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(n){n.onHandler?.(t);for(let e of[...n.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},fu=class{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},pu=new Set;function mu(e,t){let[n,r]=t,i=n?.shape;if(typeof i?.method?.value!=`string`)return;let a=i.method.value,o=e===`request`?`setRequestHandler`:`setNotificationHandler`;pu.has(o)||(pu.add(o),console.warn(`[ext-apps] ${o}(Schema, handler) is deprecated; use ${o}("${a}", { params: Schema.shape.params }, handler).`));let s=r;return[a,{params:i.params},e===`request`?(e,t)=>s({method:a,params:e},hu(t)):e=>s({method:a,params:e})]}function hu(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var gu=`2026-01-26`,_u=p([b(`light`),b(`dark`)]).describe(`Color theme preference for the host environment.`),vu=p([b(`inline`),b(`fullscreen`),b(`pip`)]).describe(`Display mode for UI presentation.`),yu=p([b(`--color-background-primary`),b(`--color-background-secondary`),b(`--color-background-tertiary`),b(`--color-background-inverse`),b(`--color-background-ghost`),b(`--color-background-info`),b(`--color-background-danger`),b(`--color-background-success`),b(`--color-background-warning`),b(`--color-background-disabled`),b(`--color-text-primary`),b(`--color-text-secondary`),b(`--color-text-tertiary`),b(`--color-text-inverse`),b(`--color-text-ghost`),b(`--color-text-info`),b(`--color-text-danger`),b(`--color-text-success`),b(`--color-text-warning`),b(`--color-text-disabled`),b(`--color-border-primary`),b(`--color-border-secondary`),b(`--color-border-tertiary`),b(`--color-border-inverse`),b(`--color-border-ghost`),b(`--color-border-info`),b(`--color-border-danger`),b(`--color-border-success`),b(`--color-border-warning`),b(`--color-border-disabled`),b(`--color-ring-primary`),b(`--color-ring-secondary`),b(`--color-ring-inverse`),b(`--color-ring-info`),b(`--color-ring-danger`),b(`--color-ring-success`),b(`--color-ring-warning`),b(`--font-sans`),b(`--font-mono`),b(`--font-weight-normal`),b(`--font-weight-medium`),b(`--font-weight-semibold`),b(`--font-weight-bold`),b(`--font-text-xs-size`),b(`--font-text-sm-size`),b(`--font-text-md-size`),b(`--font-text-lg-size`),b(`--font-heading-xs-size`),b(`--font-heading-sm-size`),b(`--font-heading-md-size`),b(`--font-heading-lg-size`),b(`--font-heading-xl-size`),b(`--font-heading-2xl-size`),b(`--font-heading-3xl-size`),b(`--font-text-xs-line-height`),b(`--font-text-sm-line-height`),b(`--font-text-md-line-height`),b(`--font-text-lg-line-height`),b(`--font-heading-xs-line-height`),b(`--font-heading-sm-line-height`),b(`--font-heading-md-line-height`),b(`--font-heading-lg-line-height`),b(`--font-heading-xl-line-height`),b(`--font-heading-2xl-line-height`),b(`--font-heading-3xl-line-height`),b(`--border-radius-xs`),b(`--border-radius-sm`),b(`--border-radius-md`),b(`--border-radius-lg`),b(`--border-radius-xl`),b(`--border-radius-full`),b(`--border-width-regular`),b(`--shadow-hairline`),b(`--shadow-sm`),b(`--shadow-md`),b(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`),bu=k(yu.describe(`Style variables for theming MCP apps. + +Individual style keys are optional - hosts may provide any subset of these values. +Values are strings containing CSS values (colors, sizes, font stacks, etc.). + +Note: This type uses \`Record\` rather than \`Partial>\` +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),p([y(),E()]).describe(`Style variables for theming MCP apps. + +Individual style keys are optional - hosts may provide any subset of these values. +Values are strings containing CSS values (colors, sizes, font stacks, etc.). + +Note: This type uses \`Record\` rather than \`Partial>\` +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps. + +Individual style keys are optional - hosts may provide any subset of these values. +Values are strings containing CSS values (colors, sizes, font stacks, etc.). + +Note: This type uses \`Record\` rather than \`Partial>\` +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),xu=A({method:b(`ui/open-link`),params:A({url:y().describe(`URL to open in the host's browser`)})}),Su=A({isError:w().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),Cu=A({isError:w().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),wu=A({isError:w().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough(),Tu=A({method:b(`ui/notifications/sandbox-proxy-ready`),params:A({})}),Eu=A({connectDomains:C(y()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). + +- Maps to CSP \`connect-src\` directive +- Empty or omitted → no network connections (secure default)`),resourceDomains:C(y()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:C(y()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:C(y()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),Du=A({camera:A({}).optional().describe(`Request camera access. + +Maps to Permission Policy \`camera\` feature.`),microphone:A({}).optional().describe(`Request microphone access. + +Maps to Permission Policy \`microphone\` feature.`),geolocation:A({}).optional().describe(`Request geolocation access. + +Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:A({}).optional().describe(`Request clipboard write access. + +Maps to Permission Policy \`clipboard-write\` feature.`)}),Ou=A({method:b(`ui/notifications/size-changed`),params:A({width:S().optional().describe(`New width in pixels.`),height:S().optional().describe(`New height in pixels.`)})});A({method:b(`ui/notifications/tool-input`),params:A({arguments:k(y(),f().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),A({method:b(`ui/notifications/tool-input-partial`),params:A({arguments:k(y(),f().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),A({method:b(`ui/notifications/tool-cancelled`),params:A({reason:y().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})});var ku=A({fonts:y().optional()}),Au=A({variables:bu.optional().describe(`CSS variables for theming the app.`),css:ku.optional().describe(`CSS blocks that apps can inject.`)});A({method:b(`ui/resource-teardown`),params:A({})});var ju=k(y(),f()),Mu=A({text:A({}).optional().describe(`Host supports text content blocks.`),image:A({}).optional().describe(`Host supports image content blocks.`),audio:A({}).optional().describe(`Host supports audio content blocks.`),resource:A({}).optional().describe(`Host supports resource content blocks.`),resourceLink:A({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:A({}).optional().describe(`Host supports structured content.`)}),Nu=A({method:b(`ui/notifications/request-teardown`),params:A({}).optional()}),Pu=A({experimental:k(y(),k(y(),ce()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:A({}).optional().describe(`Host supports opening external URLs.`),downloadFile:A({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:A({listChanged:w().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:A({listChanged:w().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:A({}).optional().describe(`Host accepts log messages.`),sandbox:A({permissions:Du.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:Eu.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Mu.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Mu.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:A({tools:A({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Fu=A({experimental:k(y(),k(y(),ce()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:A({listChanged:w().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:C(vu).optional().describe(`Display modes the app supports.`)}),Iu=A({method:b(`ui/notifications/initialized`),params:A({}).optional()});A({csp:Eu.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:Du.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:y().optional().describe(`Dedicated origin for view sandbox. + +Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists. + +**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include: +- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`) +- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`) + +If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:w().optional().describe(`Visual boundary preference - true if view prefers a visible border. + +Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary. + +- \`true\`: request visible border + background +- \`false\`: request no visible border + background +- omitted: host decides border`)});var Lu=A({method:b(`ui/request-display-mode`),params:A({mode:vu.describe(`The display mode being requested.`)})}),Ru=A({mode:vu.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),zu=p([b(`model`),b(`app`)]).describe(`Tool visibility scope - who can access the tool.`);A({resourceUri:y().optional(),visibility:C(zu).optional().describe(`Who can access this tool. Default: ["model", "app"] +- "model": Tool visible to and callable by the agent +- "app": Tool callable by the app from this server only`),csp:le().optional(),permissions:le().optional()}),A({mimeTypes:C(y()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var Bu=A({method:b(`ui/download-file`),params:A({contents:C(p([rn,an])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Vu=A({method:b(`ui/message`),params:A({role:b(`user`).describe(`Message role, currently only "user" is supported.`),content:C(on).describe(`Message content blocks (text, image, etc.).`)})});A({method:b(`ui/notifications/sandbox-resource-ready`),params:A({html:y().describe(`HTML content to load into the inner iframe.`),sandbox:y().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:Eu.optional().describe(`CSP configuration from resource metadata.`),permissions:Du.optional().describe(`Sandbox permissions from resource metadata.`)})}),A({method:b(`ui/notifications/tool-result`),params:hn.describe(`Standard MCP tool execution result.`)});var Hu=A({toolInfo:A({id:H.optional().describe(`JSON-RPC id of the tools/call request.`),tool:fn.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:_u.optional().describe(`Current color theme preference.`),styles:Au.optional().describe(`Style configuration for theming the app.`),displayMode:vu.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:C(vu).optional().describe(`Display modes the host supports.`),containerDimensions:p([A({height:S().describe(`Fixed container height in pixels.`)}),A({maxHeight:p([S(),E()]).optional().describe(`Maximum container height in pixels.`)})]).and(p([A({width:S().describe(`Fixed container width in pixels.`)}),A({maxWidth:p([S(),E()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other +container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:y().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:y().optional().describe(`User's timezone in IANA format.`),userAgent:y().optional().describe(`Host application identifier.`),platform:p([b(`web`),b(`desktop`),b(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:A({touch:w().optional().describe(`Whether the device supports touch input.`),hover:w().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:A({top:S().describe(`Top safe area inset in pixels.`),right:S().describe(`Right safe area inset in pixels.`),bottom:S().describe(`Bottom safe area inset in pixels.`),left:S().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough();A({method:b(`ui/notifications/host-context-changed`),params:Hu.describe(`Partial context update containing only changed fields.`)});var Uu=A({method:b(`ui/update-model-context`),params:A({content:C(on).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:k(y(),f().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Wu=A({method:b(`ui/initialize`),params:A({appInfo:tt.describe(`App identification (name and version).`),appCapabilities:Fu.describe(`Features and capabilities this app provides.`),protocolVersion:y().describe(`Protocol version this app supports.`)})}),Gu=A({protocolVersion:y().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:tt.describe(`Host application identification and version.`),hostCapabilities:Pu.describe(`Features and capabilities provided by the host.`),hostContext:Hu.describe(`Rich context about the host environment.`)}).passthrough(),Ku=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=Je.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},qu=[gu],Ju=class extends Qo{_client;_hostInfo;_hostCapabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_registeredEvents=new Set;_events=new du;_methods=new fu;setRequestHandler=(...e)=>{let[t,...n]=mu(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=mu(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_wrapHandler(e,t){let n=super._wrapHandler(e,t);return e===`ui/initialize`||e===`ping`?n:async(t,r)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${e}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),n(t,r))}eventSchemas={sizechange:Ou,sandboxready:Tu,initialized:Iu,requestteardown:Nu,loggingmessage:Tn};setEventHandler(e,t){this._ensureEventSlot(e),this._events.setHandler(e,t)}getEventHandler(e){return this._events.getHandler(e)}addEventListener(e,t){this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);let n=t=>{e===`initialized`&&(this._initializedReceived=!0),this._events.dispatch(e,t)};e===`loggingmessage`?this.setNotificationHandler(`notifications/message`,e=>{n(e.params)}):this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},e=>n(e)),this._registeredEvents.add(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t,n,r){super(r),this._client=e,this._hostInfo=t,this._hostCapabilities=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),this._ensureEventSlot(`initialized`),this._hostContext=r?.hostContext||{},this.replaceRequestHandler(`ui/initialize`,{params:Wu.shape.params,result:Gu},e=>this._onAppsInitialize(e)),this.replaceRequestHandler(`ping`,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(`ui/request-display-mode`,{params:Lu.shape.params,result:Ru},()=>({mode:this._hostContext.displayMode??`inline`}))}buildContext(e){return e}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler(`sizechange`)}set onsizechange(e){this.setEventHandler(`sizechange`,e)}get onsandboxready(){return this.getEventHandler(`sandboxready`)}set onsandboxready(e){this.setEventHandler(`sandboxready`,e)}get oninitialized(){return this.getEventHandler(`initialized`)}set oninitialized(e){this.setEventHandler(`initialized`,e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced(`onmessage`,this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(`ui/message`,{params:Vu.shape.params,result:wu},async(e,t)=>{if(!this._onmessage)throw Error(`No onmessage handler set`);return this._onmessage(e,t)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced(`onopenlink`,this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(`ui/open-link`,{params:xu.shape.params,result:Su},async(e,t)=>{if(!this._onopenlink)throw Error(`No onopenlink handler set`);return this._onopenlink(e,t)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced(`ondownloadfile`,this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(`ui/download-file`,{params:Bu.shape.params,result:Cu},async(e,t)=>{if(!this._ondownloadfile)throw Error(`No ondownloadfile handler set`);return this._ondownloadfile(e,t)})}get onrequestteardown(){return this.getEventHandler(`requestteardown`)}set onrequestteardown(e){this.setEventHandler(`requestteardown`,e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced(`onrequestdisplaymode`,this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(`ui/request-display-mode`,{params:Lu.shape.params,result:Ru},async(e,t)=>{if(!this._onrequestdisplaymode)throw Error(`No onrequestdisplaymode handler set`);return this._onrequestdisplaymode(e,t)})}get onloggingmessage(){return this.getEventHandler(`loggingmessage`)}set onloggingmessage(e){this.setEventHandler(`loggingmessage`,e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced(`onupdatemodelcontext`,this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(`ui/update-model-context`,{params:Uu.shape.params,result:Xe},async(e,t)=>{if(!this._onupdatemodelcontext)throw Error(`No onupdatemodelcontext handler set`);return this._onupdatemodelcontext(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_oncreatesamplingmessage;get oncreatesamplingmessage(){return this._oncreatesamplingmessage}set oncreatesamplingmessage(e){this.warnIfRequestHandlerReplaced(`oncreatesamplingmessage`,this._oncreatesamplingmessage,e),this._oncreatesamplingmessage=e,this.replaceRequestHandler(`sampling/createMessage`,async(e,t)=>{if(!this._oncreatesamplingmessage)throw Error(`No oncreatesamplingmessage handler set`);return this._oncreatesamplingmessage(e.params,t)})}sendToolListChanged(e={}){return this.notification({method:`notifications/tools/list_changed`,params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced(`onlistresources`,this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(`resources/list`,async(e,t)=>{if(!this._onlistresources)throw Error(`No onlistresources handler set`);return this._onlistresources(e.params,t)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced(`onlistresourcetemplates`,this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(`resources/templates/list`,async(e,t)=>{if(!this._onlistresourcetemplates)throw Error(`No onlistresourcetemplates handler set`);return this._onlistresourcetemplates(e.params,t)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced(`onreadresource`,this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(`resources/read`,async(e,t)=>{if(!this._onreadresource)throw Error(`No onreadresource handler set`);return this._onreadresource(e.params,t)})}sendResourceListChanged(e={}){return this.notification({method:`notifications/resources/list_changed`,params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced(`onlistprompts`,this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(`prompts/list`,async(e,t)=>{if(!this._onlistprompts)throw Error(`No onlistprompts handler set`);return this._onlistprompts(e.params,t)})}sendPromptListChanged(e={}){return this.notification({method:`notifications/prompts/list_changed`,params:e})}getCapabilities(){return this._hostCapabilities}async _onAppsInitialize(e){let t=e.protocolVersion;return this._appInfo!==void 0&&console.warn(`[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.`),this._appCapabilities=e.appCapabilities,this._appInfo=e.appInfo,{protocolVersion:qu.includes(t)?t:gu,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},n=!1;for(let r of Object.keys(e)){let i=this._hostContext[r],a=e[r];Yu(i,a)||(t[r]=a,n=!0)}n&&(this._hostContext=e,this.sendHostContextChange(t))}sendHostContextChange(e){return this.notification({method:`ui/notifications/host-context-changed`,params:e})}sendToolInput(e){return this.notification({method:`ui/notifications/tool-input`,params:e})}sendToolInputPartial(e){return this.notification({method:`ui/notifications/tool-input-partial`,params:e})}sendToolResult(e){return this.notification({method:`ui/notifications/tool-result`,params:e})}sendToolCancelled(e){return this.notification({method:`ui/notifications/tool-cancelled`,params:e})}sendSandboxResourceReady(e){return this.notification({method:`ui/notifications/sandbox-resource-ready`,params:e})}teardownResource(e,t){return this.request({method:`ui/resource-teardown`,params:e},ju,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},t)}listTools(e,t){return this.request({method:`tools/list`,params:e},t)}async connect(e){if(this.transport)throw Error(`AppBridge is already connected. Call close() before connecting again.`);if(this._initializedReceived=!1,this._client){let e=this._client.getServerCapabilities();if(!e)throw Error(`Client server capabilities not available`);e.tools&&(this.oncalltool=async(e,t)=>this._client.request({method:`tools/call`,params:e},{signal:t.mcpReq.signal}),e.tools.listChanged&&this._client.setNotificationHandler(`notifications/tools/list_changed`,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},{signal:t.mcpReq.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},{signal:t.mcpReq.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},{signal:t.mcpReq.signal}),e.resources.listChanged&&this._client.setNotificationHandler(`notifications/resources/list_changed`,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},{signal:t.mcpReq.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(`notifications/prompts/list_changed`,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function Yu(e,t){return JSON.stringify(e)===JSON.stringify(t)}var Xu=s(r(),1),Zu=a(),Qu=`text/html;profile=mcp-app`,$u=`io.modelcontextprotocol/ui`,ed=3,td=5,nd=2e3,rd=class extends Error{},id=null,ad=null;async function od(){let e=new uu(new URL(`/api/mcp`,location.origin),{fetch:(e,t)=>c(e,t)}),t=new tu({name:`fanout-browser`,version:`0.2.0`},{capabilities:{extensions:{[$u]:{mimeTypes:[Qu]}}}});try{await t.connect(e);let n={client:t,references:0,closed:!1,closeListeners:new Set};return t.onclose=()=>cd(n,!1),t.onerror=()=>cd(n,!0),n}catch(t){throw await e.close().catch(()=>void 0),t}}async function sd(){for(let e=0;e{ad===e&&!t.closed&&(id=t)}).catch(()=>{ad===e&&(ad=null)})}let e=ad;if(!e)continue;let t=await e;if(t.closed){ad===e&&(ad=null);continue}return t.closeTimer&&=(clearTimeout(t.closeTimer),void 0),t.references+=1,t}throw Error(`MCP connection closed during setup`)}function cd(e,t){if(!e.closed){e.closed=!0,e.closeTimer&&clearTimeout(e.closeTimer),e.closeTimer=void 0,id===e&&(id=null),ad=null;for(let t of[...e.closeListeners])t();t&&e.client.close().catch(()=>void 0)}}function ld(e){e.references=Math.max(0,e.references-1),!(e.closed||e.references||e.closeTimer)&&(e.closeTimer=setTimeout(()=>{e.closeTimer=void 0,!(e.references||id!==e)&&(e.closed=!0,id=null,ad=null,e.client.close().catch(()=>void 0))},0))}function ud(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function dd(e,t){if(!Array.isArray(e))return[];let n=new Set(t);return e.filter(e=>{if(typeof e!=`string`||/[\s;'\"]/.test(e))return!1;let t=e.match(/^([a-z]+):\/\/([^/]+)$/i);return!!(t&&n.has(t[1].toLowerCase()))})}function fd(e){let t=ud(ud(ud(e)?.ui)?.csp),n=dd(t?.connectDomains,[`http`,`https`,`ws`,`wss`]),r=dd(t?.resourceDomains,[`http`,`https`]),i=dd(t?.frameDomains,[`http`,`https`]),a=dd(t?.baseUriDomains,[`http`,`https`]),o=r.length?` ${r.join(` `)}`:``,s=[`default-src 'none'`,`script-src 'self' 'unsafe-inline'${o}`,`style-src 'self' 'unsafe-inline'${o}`,`img-src 'self' data:${o}`,`media-src 'self' data:${o}`,`font-src 'self' data:${o}`,`connect-src ${n.length?n.join(` `):`'none'`}`];return i.length&&s.push(`frame-src ${i.join(` `)}`),a.length&&s.push(`base-uri ${a.join(` `)}`),`${s.join(`; `)};`}function pd(e,t){let n=``;return/]*)?>/i.test(e)?e.replace(/]*)?>/i,e=>`${e}${n}`):/]*)?>/i.test(e)?e.replace(/]*)?>/i,e=>`${e}${n}`):`${n}${e}`}function md(e){return e.filter(e=>e.type===`text`).map(e=>String(e.text??``)).join(` +`)}function hd({content:r,onMessage:a}){let s=(0,Xu.useRef)(null),c=(0,Xu.useRef)(null),u=(0,Xu.useRef)(null),d=(0,Xu.useRef)(null),[f,p]=(0,Xu.useState)(``),[m,h]=(0,Xu.useState)(240),[g,_]=(0,Xu.useState)(``),[v,y]=(0,Xu.useState)(0),b=(0,Xu.useRef)(0),x=l(`light`),S=(0,Xu.useRef)(x);S.current=x,(0,Xu.useEffect)(()=>{d.current?.setHostContext({theme:x,displayMode:`inline`})},[x]),(0,Xu.useEffect)(()=>{b.current=0},[r.resourceUri]),(0,Xu.useEffect)(()=>{let e=!1,t;p(``),_(``);let n=()=>{let e=b.current+1;if(e>td)return;b.current=e;let n=e===1?0:Math.min(750*2**(e-2),6e3);n===0?y(e=>e+1):t=setTimeout(()=>y(e=>e+1),n)},i=()=>n();async function a(){try{let t=await sd();if(e){ld(t);return}u.current=t,t.closeListeners.add(i),c.current=t.client;let n=(await t.client.readResource({uri:r.resourceUri})).contents[0];if(!n||!(`text`in n)||!n.text)throw new rd(`MCP App resource has no HTML content`);if(n.uri!==r.resourceUri)throw new rd(`MCP App resource URI does not match the requested URI`);if(n.mimeType!==Qu)throw new rd(`MCP App resource has an unsupported MIME type`);e||(b.current=0,p(pd(n.text,n._meta)))}catch(t){console.error(`MCP app resource load failed`,t),e||(_(`This view could not be loaded. Please try again.`),b.current>0&&!(t instanceof rd)&&n())}}return a(),()=>{e=!0,t&&clearTimeout(t);let n=d.current?.teardownResource({}).catch(()=>void 0)??Promise.resolve(),r=u.current;r&&(r.closeListeners.delete(i),n.finally(()=>ld(r))),d.current=null,c.current=null,u.current=null}},[r.resourceUri,v]);async function ee(){let e=s.current,t=c.current;if(e?.contentWindow&&f&&t&&!d.current)try{let n=new Ju(null,{name:`Fanout`,version:`0.2.0`},{openLinks:{},serverTools:{},logging:{}},{hostContext:{theme:S.current,displayMode:`inline`}});n.oncalltool=(e,n)=>t.callTool(e,{signal:n.mcpReq.signal}),d.current=n,n.onsizechange=({height:e})=>{e&&h(Math.min(nd,Math.max(240,Math.ceil(e)+32)))},n.onmessage=async({content:e})=>{let t=md(e);return t?(await a(t),{}):{isError:!0}},n.oninitialized=async()=>{await n.sendToolInput({arguments:r.toolInput??{}}),await n.sendToolResult({content:[{type:`text`,text:JSON.stringify(r.toolResult??{})}],structuredContent:r.toolResult,isError:r.isError})},await n.connect(new Ku(e.contentWindow,e.contentWindow))}catch(e){console.error(`MCP app bridge connect failed`,e),_(`This view could not be loaded. Please try again.`)}}return g?(0,Zu.jsx)(n,{color:`bad`,m:`md`,children:g}):f?(0,Zu.jsx)(o,{component:`iframe`,ref:s,title:`Fanout analysis view`,sandbox:`allow-scripts`,scrolling:`auto`,srcDoc:f,w:`100%`,bd:0,bg:`var(--mantine-color-body)`,style:{display:`block`,height:m,transition:`height 200ms ease`},onLoad:()=>void ee()}):(0,Zu.jsxs)(i,{mih:180,p:`xl`,children:[(0,Zu.jsx)(e,{size:`sm`}),(0,Zu.jsx)(t,{c:`dimmed`,size:`sm`,ml:`sm`,children:`Preparing view…`})]})}export{hd as default,fd as mcpAppCSP}; \ No newline at end of file diff --git a/internal/ui/dist/assets/mcp-app-frame-DuNwMm4-.js b/internal/ui/dist/assets/mcp-app-frame-DuNwMm4-.js deleted file mode 100644 index 1c7bc704..00000000 --- a/internal/ui/dist/assets/mcp-app-frame-DuNwMm4-.js +++ /dev/null @@ -1,113 +0,0 @@ -import{St as e,_ as t,_t as n,bt as r,d as i,f as a,gt as o,l as s,mt as c,vt as l,x as u,xt as d,yt as f}from"./brand-MzZ03bSa.js";import{i as p}from"./auth-Co_9Gxq0.js";import{t as m}from"./use-computed-color-scheme-6JIsge00.js";function h(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function g(e,t=`|`){return e.map(e=>se(e)).join(t)}function _(e,t){return typeof t==`bigint`?t.toString():t}function v(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function y(e){return e==null}function b(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function x(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r){};function w(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var re=v(()=>{if(Ke.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function T(e){if(w(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return w(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ie(e){return T(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ae=new Set([`string`,`number`,`symbol`]);function oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function E(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function D(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function se(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ce(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var le={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return E(e,C(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&S(e,r,n.shape[r])}return S(this,`shape`,e),e},checks:[]}))}function de(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return E(e,C(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return S(this,`shape`,r),r},checks:[]}))}function fe(e,t){if(!T(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return E(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return S(this,`shape`,n),n}}))}function pe(e,t){if(!T(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return E(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return S(this,`shape`,n),n}}))}function me(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return E(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return S(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function he(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return E(t,C(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return S(this,`shape`,i),i},checks:[]}))}function ge(e,t,n){return E(t,C(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return S(this,`shape`,i),i}}))}function _e(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function be(e){return typeof e==`string`?e:e?.message}function xe(e,t,n){var r;for(let i=t;ie;return t[Le]=!0,t}var ze,Be=Object.freeze({status:`aborted`}),Ve={value:void 0,enumerable:!1},He=`captureStackTrace`in Error?Error:null;function Ue(e){let t=He;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return He=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function k(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Ve.value=new a(r);try{Object.defineProperty(n,"_zod",Ve)}finally{Ve.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Oe(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Ue(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var We=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ge=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(ze=globalThis).__zod_globalConfig??(ze.__zod_globalConfig={});var Ke=globalThis.__zod_globalConfig;function qe(e){return e&&Object.assign(Ke,e),Ke}function Je(){let e=this._zod;return e.message??=JSON.stringify(e.def,_,2),e.message}function Ye(e){this._zod.message=e}var Xe={get:Je,set:Ye,enumerable:!0,configurable:!0},Ze={value:void 0,enumerable:!1},Qe={value:void 0,enumerable:!1},$e=new WeakSet([Object.prototype,Error.prototype]),et=(e,t)=>{e.name=`$ZodError`,Ze.value=e._zod,Object.defineProperty(e,"_zod",Ze),Qe.value=t,Object.defineProperty(e,"issues",Qe),Ze.value=void 0,Qe.value=void 0,Object.defineProperty(e,"message",Xe);let n=Object.getPrototypeOf(e);$e.has(n)||($e.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},tt=k(`$ZodError`,et),nt=k(`$ZodError`,et,void 0,{Parent:Error});function rt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function it(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?rt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function at(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new We;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Se(e,o,qe())));throw ne(n,a?.callee??t),n}return s.value};return t},ct=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Se(e,o,qe())));throw ne(n,a?.callee??t),n}return s.value};return t},lt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new We;return a.issues.length?{success:!1,error:new(e??tt)(a.issues.map(e=>Se(e,i,qe())))}:{success:!0,data:a.value}},ut=lt(nt),dt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Se(e,i,qe())))}:{success:!0,data:a.value}},ft=dt(nt),pt=e=>{let t=st(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,ot(n,a))};return n},mt=e=>{let t=st(e),n=(e,r,i,a)=>t(e,r,i,ot(n,a));return n},ht=e=>{let t=ct(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,ot(n,a))};return n},gt=e=>{let t=ct(e),n=async(e,r,i,a)=>await t(e,r,i,ot(n,a));return n},_t=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return lt(e)(t,n,i)},vt=e=>(t,n,r)=>lt(e)(t,n,r),yt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return dt(e)(t,n,i)},bt=e=>async(t,n,r)=>dt(e)(t,n,r),xt=/^[cC][0-9a-z]{6,}$/,St=/^[0-9a-z]+$/,Ct=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,wt=/^[0-9a-vA-V]{20}$/,Tt=/^[A-Za-z0-9]{27}$/,Et=/^[a-zA-Z0-9_-]{21}$/;function Dt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Ot=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,At=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,jt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Mt=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Nt(){return new RegExp(Mt,`u`)}var Pt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ft=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,It=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Lt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Rt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,zt=/^[A-Za-z0-9_-]*$/,Bt=/^https?$/,Vt=/^\+[1-9]\d{6,14}$/,Ht=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Ut(e){return RegExp(`^${e}$`)}var Wt=Ut(Ht);function Gt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Kt(e){return RegExp(`^${Gt(e)}$`)}function qt(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Gt({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Gt({precision:e.precision})}`:n;return RegExp(`^${Ht}T(?:${r})$`)}var Jt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Yt=/^-?\d+$/,Xt=/^-?\d+(?:\.\d+)?$/,Zt=/^(?:true|false)$/i,Qt=/^null$/i,$t=/^undefined$/i,en=/^[^A-Z]*$/,tn=/^[^a-z]*$/,nn=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),rn=e=>{let t=e.value;return!y(t)&&t.length!==void 0},an={number:`number`,bigint:`bigint`,object:`date`},on=k(`$ZodCheckLessThan`,(e,t)=>{nn.init(e,t);let n=an[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{nn.init(e,t);let n=an[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:an[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cn=k(`$ZodCheckMultipleOf`,(e,t)=>{nn.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):x(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ln=k(`$ZodCheckNumberFormat`,(e,t)=>{nn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=le[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Yt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),un=k(`$ZodCheckMaxLength`,(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=rn),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?we(r):i)<=t.maximum)return;let a=Te(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dn=k(`$ZodCheckMinLength`,(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=rn),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=Te(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fn=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=rn),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?we(r):i;if(a===t.length)return;let o=Te(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),pn=k(`$ZodCheckStringFormat`,(e,t)=>{var n,r;nn.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),mn=k(`$ZodCheckRegex`,(e,t)=>{pn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),hn=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=en,pn.init(e,t)}),gn=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=tn,pn.init(e,t)}),_n=k(`$ZodCheckIncludes`,(e,t)=>{nn.init(e,t);let n=oe(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),vn=k(`$ZodCheckStartsWith`,(e,t)=>{nn.init(e,t);let n=RegExp(`^${oe(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),yn=k(`$ZodCheckEndsWith`,(e,t)=>{nn.init(e,t);let n=RegExp(`.*${oe(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),bn=k(`$ZodCheckOverwrite`,(e,t)=>{nn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),xn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` -`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` -`)}\n};`)(...Object.values(this.closed))}},Sn={major:4,minor:5,patch:4},A=k(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Sn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=_e(t),a;for(let o of n){if(o._zod.def.when){if(ve(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new We;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(xe(t.issues,n,e),i||=_e(t,n))});else{if(t.issues.length===n)continue;xe(t.issues,n,e),i||=_e(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(_e(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new We;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new We;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ae(this,`~standard`,wn(this))},set"~standard"(e){ke(this,`~standard`,e)}}),Cn=e=>e.success?{value:e.data}:{issues:e.error?.issues};function wn(e){return{validate:t=>{try{return Cn(ut(e,t))}catch{return ft(e,t).then(Cn)}},vendor:`zod`,version:1}}var Tn=k(`$ZodString`,(e,t)=>{A.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Jt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),j=k(`$ZodStringFormat`,(e,t)=>{pn.init(e,t),Tn.init(e,t)}),En=k(`$ZodGUID`,(e,t)=>{t.pattern??=kt,j.init(e,t)}),Dn=k(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=At(e)}else t.pattern??=At();j.init(e,t)}),On=k(`$ZodEmail`,(e,t)=>{t.pattern??=jt,j.init(e,t)});function kn(e,t){if(!t.normalize&&t.protocol?.source===Bt.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}var An=/[\t\n\r]/g;function jn(e){return e.replace(An,``)}function Mn(e,t){return t.lastIndex=0,t.test(e.hostname)}function Nn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Pn=k(`$ZodURL`,(e,t)=>{j.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=kn(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Mn(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Nn(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:jn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Fn=k(`$ZodEmoji`,(e,t)=>{t.pattern??=Nt(),j.init(e,t)}),In=k(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Et:Dt(t.length),j.init(e,t)}),Ln=k(`$ZodCUID`,(e,t)=>{t.pattern??=xt,j.init(e,t)}),Rn=k(`$ZodCUID2`,(e,t)=>{t.pattern??=St,j.init(e,t)}),zn=k(`$ZodULID`,(e,t)=>{t.pattern??=Ct,j.init(e,t)}),Bn=k(`$ZodXID`,(e,t)=>{t.pattern??=wt,j.init(e,t)}),Vn=k(`$ZodKSUID`,(e,t)=>{t.pattern??=Tt,j.init(e,t)}),Hn=k(`$ZodISODateTime`,(e,t)=>{t.pattern??=qt(t),j.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),Un=k(`$ZodISODate`,(e,t)=>{t.pattern??=Wt,j.init(e,t)}),Wn=k(`$ZodISOTime`,(e,t)=>{t.pattern??=Kt(t),j.init(e,t)}),Gn=k(`$ZodISODuration`,(e,t)=>{t.pattern??=Ot,j.init(e,t)}),Kn=k(`$ZodIPv4`,(e,t)=>{t.pattern??=Pt,j.init(e,t),e._zod.bag.format=`ipv4`}),qn=/^[0-9a-fA-F:.]+$/;function Jn(e){if(!qn.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}var Yn=k(`$ZodIPv6`,(e,t)=>{t.pattern??=Ft,j.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Jn(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Xn=k(`$ZodCIDRv4`,(e,t)=>{t.pattern??=It,j.init(e,t)});function Zn(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Jn(n)}var Qn=k(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Lt,j.init(e,t),e._zod.check=n=>{Zn(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function $n(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var er=k(`$ZodBase64`,(e,t)=>{t.pattern??=Rt,j.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{$n(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function tr(e){if(!zt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return $n(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var nr=k(`$ZodBase64URL`,(e,t)=>{t.pattern??=zt,j.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{tr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),rr=k(`$ZodE164`,(e,t)=>{t.pattern??=Vt,j.init(e,t)});function ir(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ar=k(`$ZodJWT`,(e,t)=>{j.init(e,t),e._zod.check=n=>{ir(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),or=k(`$ZodNumber`,(e,t)=>{A.init(e,t),e._zod.pattern=e._zod.bag.pattern??Xt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),sr=k(`$ZodNumberFormat`,(e,t)=>{ln.init(e,t),or.init(e,t)}),cr=k(`$ZodBoolean`,(e,t)=>{A.init(e,t),e._zod.pattern=Zt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),lr=k(`$ZodUndefined`,(e,t)=>{A.init(e,t),e._zod.pattern=$t,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),ur=k(`$ZodNull`,(e,t)=>{A.init(e,t),e._zod.pattern=Qt,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),dr=k(`$ZodAny`,(e,t)=>{A.init(e,t),e._zod.parse=e=>e}),fr=k(`$ZodUnknown`,(e,t)=>{A.init(e,t),e._zod.parse=e=>e}),pr=k(`$ZodNever`,(e,t)=>{A.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function mr(e,t,n){e.issues.length&&t.issues.push(...ye(n,e.issues)),t.value[n]=e.value}var hr=k(`$ZodArray`,(e,t)=>{A.init(e,t);let n=Ke.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;emr(t,r,e))):mr(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}});function gr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...ye(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}var _r=[];function vr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:_r,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ce(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function yr(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>gr(e,n,i,t,u,d))):gr(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var br=new WeakMap,xr=k(`$ZodObject`,(e,t)=>{if(A.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;br.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),br.set(t,n),n}})}let n=v(()=>vr(t));O(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||S(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=w,i=t.catchall,a,o=Ke.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>gr(n,t,e,c,r,i))):gr(a,t,e,c,r,i)}return i?yr(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),Sr=k(`$ZodObjectJIT`,(e,t)=>{xr.init(e,t);let n=e._zod.parse,r=v(()=>vr(t)),i=Ke.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new xn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` - for (let i = 0; i < ${e}.issues.length; i++) { - const iss = ${e}.issues[i]; - iss.path = iss.path ? [${t}, ...iss.path] : [${t}]; - payload.issues.push(iss); - }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:ee(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(` - const ${n}_present = ${i}; - if (!${n}.issues.length || ${n}_present) { - if (${n}.issues.length) {${c(n,r)} - } - - if (${e}) { - newResult[${r}] = ${n}.value; - } - } - - `)}else f?o.write(` - if (${n}.issues.length) {${c(n,r)} - } - - if (${n}.value === undefined) { - if (${i}) { - newResult[${r}] = undefined; - } - } else { - newResult[${r}] = ${n}.value; - } - - `):o.write(` - const ${n}_present = ${i}; - if (${n}.issues.length) {${c(n,r)} - } - if (!${n}_present && !${n}.issues.length) { - payload.issues.push({ - code: "invalid_type", - expected: "nonoptional", - input: undefined, - path: [${r}] - }); - } - - if (${n}_present) { - newResult[${r}] = ${n}.value; - } - - `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=w,c=!Ke.jitless,l=c&&re.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?yr([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Cr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!_e(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Se(e,r,qe())))}),t)}var wr=k(`$ZodUnion`,(e,t)=>{A.init(e,t),O(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),O(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),O(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),O(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>b(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Cr(t,r,e,i)):Cr(o,r,e,i)}}),Tr=k(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,wr.init(e,t);let n=e._zod.parse;O(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||S(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=br.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=v(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!w(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Er=k(`$ZodIntersection`,(e,t)=>{A.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Or(e,t,n)):Or(e,i,a)}});function Dr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(T(e)&&T(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Dr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Dr(t.value,n.value);if(!c.valid){if(_e(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var kr=k(`$ZodRecord`,(e,t)=>{A.init(e,t);let n=Ke.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!T(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Se(e,i,qe())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...ye(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...ye(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Xt.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Se(e,i,qe())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...ye(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...ye(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Ar=k(`$ZodEnum`,(e,t)=>{A.init(e,t);let n=h(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>ae.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>oe(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),jr=k(`$ZodLiteral`,(e,t)=>{A.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?oe(e):e?oe(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Mr=k(`$ZodTransform`,(e,t)=>{A.init(e,t),e._zod.optin=`optional`,Ke.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ge(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new We;return n.value=i,n}});function Nr(e,t){return e.value=t.issues.length?void 0:t.value,e}var Pr=k(`$ZodOptional`,(e,t)=>{A.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${b(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Nr(e,t)):Nr(e,r)}return t.innerType._zod.run(e,n)}}),Fr=k(`$ZodExactOptional`,(e,t)=>{Pr.init(e,t),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ir=k(`$ZodNullable`,(e,t)=>{A.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${b(t.source)}|null)$`):void 0}),O(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Lr=k(`$ZodDefault`,(e,t)=>{A.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Rr(e,t)):Rr(r,t)}});function Rr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var zr=k(`$ZodPrefault`,(e,t)=>{A.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Br=k(`$ZodNonOptional`,(e,t)=>{A.init(e,t),O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Vr(t,e)):Vr(i,e)}});function Vr(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Hr(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Se(e,r,qe()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ur=k(`$ZodCatch`,(e,t)=>{A.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Hr(e,r,t,n)):Hr(e,r,t,n)}}),Wr=k(`$ZodPipe`,(e,t)=>{A.init(e,t),O(e,`values`,e=>e.def.in._zod.values),O(e,`optin`,e=>e.def.in._zod.optin),O(e,`optout`,e=>e.def.out._zod.optout),O(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Gr(e,t.in,n)):Gr(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Gr(e,t.out,n)):Gr(r,t.out,n)}});function Gr(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Kr=k(`$ZodPreprocess`,(e,t)=>{Wr.init(e,t)}),qr=k(`$ZodReadonly`,(e,t)=>{A.init(e,t),O(e,`propValues`,e=>e.def.innerType._zod.propValues),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`optin`,e=>e.def.innerType?._zod?.optin),O(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Jr):Jr(r)}});function Jr(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Yr=k(`$ZodCustom`,(e,t)=>{nn.init(e,t),A.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Xr(t,n,r,e));Xr(i,n,r,e)}});function Xr(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(De(e))}}var Zr=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Qr=`~memo`,$r=[];function ei(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var ti=new WeakMap;function ni(e,t){let n=ti.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&ni(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),ti.set(e,r),r}function ri(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}var ii,ai=[],oi={alloc(e,t,n){let r=ii;if(!r)return n;ii=void 0;let i={value:n,issues:null};return r.set(t.value,i),ai.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&ci(n,e.value))throw new Zr;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=ni(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[Qr];l||(l={buckets:new Map,backEdges:void 0},s[Qr]=l);let u;r===s?u=i:(u=ri(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...ei(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;ii=u;let f=ai.length,p=t(o,s);ii=void 0;let m=ai.length>f?ai.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?ei(e.issues):$r),e)):(m&&(m.issues=p.issues.length?ei(p.issues):$r),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}};function si(){return oi}function ci(e,t){let n=e[Qr]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var li=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Ee(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${se(e.values[0])}`:`Invalid option: expected one of ${g(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${g(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function ui(){return{localeError:li()}}var di,fi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function pi(){return new fi}(di=globalThis).__zod_globalRegistry??(di.__zod_globalRegistry=pi());var mi=globalThis.__zod_globalRegistry;function hi(e,t){return new e({type:`string`,...D(t)})}function gi(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...D(t)})}function _i(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...D(t)})}function vi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...D(t)})}function yi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...D(t)})}function bi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...D(t)})}function xi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...D(t)})}function Si(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...D(t)})}function Ci(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...D(t)})}function wi(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...D(t)})}function Ti(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...D(t)})}function Ei(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...D(t)})}function Di(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...D(t)})}function Oi(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...D(t)})}function ki(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...D(t)})}function Ai(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...D(t)})}function ji(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...D(t)})}function Mi(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...D(t)})}function Ni(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...D(t)})}function Pi(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...D(t)})}function Fi(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...D(t)})}function Ii(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...D(t)})}function Li(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...D(t)})}function Ri(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...D(t)})}function zi(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...D(t)})}function Bi(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...D(t)})}function Vi(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...D(t)})}function Hi(e,t){return new e({type:`number`,checks:[],...D(t)})}function Ui(e,t){return new e({type:`number`,coerce:!0,checks:[],...D(t)})}function Wi(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...D(t)})}function Gi(e,t){return new e({type:`boolean`,...D(t)})}function Ki(e,t){return new e({type:`undefined`,...D(t)})}function qi(e,t){return new e({type:`null`,...D(t)})}function Ji(e){return new e({type:`any`})}function Yi(e){return new e({type:`unknown`})}function Xi(e,t){return new e({type:`never`,...D(t)})}function Zi(e,t){return new on({check:`less_than`,...D(t),value:e,inclusive:!1})}function Qi(e,t){return new on({check:`less_than`,...D(t),value:e,inclusive:!0})}function $i(e,t){return new sn({check:`greater_than`,...D(t),value:e,inclusive:!1})}function ea(e,t){return new sn({check:`greater_than`,...D(t),value:e,inclusive:!0})}function ta(e,t){return new cn({check:`multiple_of`,...D(t),value:e})}function na(e,t){return new un({check:`max_length`,...D(t),maximum:e})}function ra(e,t){return new dn({check:`min_length`,...D(t),minimum:e})}function ia(e,t){return new fn({check:`length_equals`,...D(t),length:e})}function aa(e,t){return new mn({check:`string_format`,format:`regex`,...D(t),pattern:e})}function oa(e){return new hn({check:`string_format`,format:`lowercase`,...D(e)})}function sa(e){return new gn({check:`string_format`,format:`uppercase`,...D(e)})}function ca(e,t){return new _n({check:`string_format`,format:`includes`,...D(t),includes:e})}function la(e,t){return new vn({check:`string_format`,format:`starts_with`,...D(t),prefix:e})}function ua(e,t){return new yn({check:`string_format`,format:`ends_with`,...D(t),suffix:e})}function da(e){return new bn({check:`overwrite`,tx:e})}function fa(e){return da(t=>t.normalize(e))}function pa(){return da(e=>e.trim())}function ma(){return da(e=>e.toLowerCase())}function ha(){return da(e=>e.toUpperCase())}function ga(){return da(e=>te(e))}function _a(e,t,n){return new e({type:`array`,element:t,...D(n)})}function va(e,t,n){let r=D(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function ya(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...D(n)})}function ba(e,t){let n=xa(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(De(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(De(r))}},e(t.value,t)),t);return n}function xa(e,t){let n=new nn({check:`custom`,...D(t)});return n._zod.check=e,n}function Sa(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&S(e,t,n[t]);return e}function Ca(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??mi,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function wa(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function M(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,M(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Sa(o.schema,c),t.io===`input`&&Pa(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Ta(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Ea(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Ta(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Ta(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ - -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Da(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Da(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Oa=new Set([`type`,`properties`,`required`,`additionalProperties`]),ka=[`oneOf`,`anyOf`];function Aa(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function ja(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Oa.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Aa(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}S(n,r,e.length===1?e[0]:ja(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Aa(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Ma(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Oa)if(t in e)return;let n=t.filter(e=>ka.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=ja(t);else{let e=n[0],i=ka.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>ja([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Sa(e,r))}function Na(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Sa(i,s),Sa(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Da(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Ma(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Sa(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,S(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Ia(t,`input`,e.processors),output:Ia(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Pa(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Pa(r.element,n);if(r.type===`set`)return Pa(r.valueType,n);if(r.type===`lazy`)return Pa(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return Pa(r.innerType,n);if(r.type===`intersection`)return Pa(r.left,n)||Pa(r.right,n);if(r.type===`record`||r.type===`map`)return Pa(r.keyType,n)||Pa(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Pa(r.in,n)||Pa(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Pa(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Pa(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Pa(e,n))return!0;return!!(r.rest&&Pa(r.rest,n))}return!1}var Fa=(e,t={})=>n=>{let r=Ca({...n,processors:t});return M(e,r),Ea(r,e),Na(r,e)},Ia=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Ca({...i??{},target:a,io:t,processors:n});return M(e,o),Ea(o,e),Na(o,e)},La={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Ra=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=La[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},za=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):wa(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},Ba=(e,t,n,r)=>{n.type=`boolean`},Va=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ha=(e,t,n,r)=>{wa(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Ua=(e,t,n,r)=>{n.not={}},Wa=(e,t,n,r)=>{let i=e._zod.def,a=h(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ga=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(wa(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(wa(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Ka=(e,t,n,r)=>{wa(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},qa=(e,t,n,r)=>{wa(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Ja=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=M(a.element,t,{...r,path:[...r.path,`items`]})};function Ya(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Ya(t.out):t.type===`catch`?Ya(t.innerType):e._zod.optin}var Xa=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&wa(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)S(i.properties,e,M(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?Ya(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=M(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Za=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>M(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Qa=(e,t,n,r)=>{let i=e._zod.def,a=M(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=M(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function $a(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=$a(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>$a(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Xt:Yt).source),p):p}var eo=new WeakMap;function to(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of eo.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=$a(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var no=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=M(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)S(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=M(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=eo.get(t);n||(n=[],eo.set(t,n),t.deferred.push(()=>to(t))),n.push(e)}i.additionalProperties=M(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Ya(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},ro=(e,t,n,r)=>{let i=e._zod.def,a=M(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},io=(e,t,n,r)=>{let i=e._zod.def;M(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ao=Symbol();function oo(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(wa(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),ao):JSON.parse(o)}var so=(e,t,n,r)=>{let i=e._zod.def;M(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=oo(i.defaultValue,e,t,n,r);o!==ao&&(n.default=o)},co=(e,t,n,r)=>{let i=e._zod.def;M(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=oo(i.defaultValue,e,t,n,r);o!==ao&&(n._prefault=o)},lo=(e,t,n,r)=>{let i=e._zod.def;M(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{wa(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},uo=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;M(o,t,r);let s=t.seen.get(e);s.ref=o},fo=(e,t,n,r)=>{let i=e._zod.def;M(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},po=(e,t,n,r)=>{let i=e._zod.def;M(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},mo=new WeakSet([Object.prototype,Error.prototype]);function ho(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var go=k(`ZodError`,(e,t)=>{tt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);mo.has(n)||(mo.add(n),ho(n,`format`,e=>t=>at(e,t)),ho(n,`flatten`,e=>t=>it(e,t)),ho(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,_,2)}),ho(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,_,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),_o=st(go),vo=ct(go),yo=lt(go),bo=dt(go),xo=pt(go),So=mt(go),Co=ht(go),wo=gt(go),To=_t(go),Eo=vt(go),Do=yt(go),Oo=bt(go);function ko(){Ke.localeError||qe(ui())}function Ao(){Ke.memoizer||qe({memoizer:si()})}var N=k(`ZodType`,(e,t)=>(ko(),A.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(C(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return E(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Ys(e,t))},superRefine(e,t){return this.check(Xs(e,t))},overwrite(e){return this.check(da(e))},optional(){return G(this)},exactOptional(){return js(this)},nullable(){return Ns(this)},nullish(){return G(Ns(this))},nonoptional(e){return zs(this,e)},array(){return z(this)},or(e){return H([this,e])},and(e){return Ss(this,e)},transform(e){return Us(this,Os(e))},default(e){return Fs(this,e)},prefault(e){return Ls(this,e)},catch(e){return Vs(this,e)},pipe(e){return Us(this,e)},readonly(){return Ks(this)},describe(e){let t=this.clone();return mi.add(t,{description:e}),t},meta(...e){if(e.length===0)return mi.get(this);let t=this.clone();return mi.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ae(this,`~standard`,{...wn(this),jsonSchema:{input:Ia(this,`input`),output:Ia(this,`output`)}})},set"~standard"(e){ke(this,`~standard`,e)},parse:function e(t,n){return _o(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await vo(this,t,n,{callee:e})},safeParse(e,t){return yo(this,e,t)},async safeParseAsync(e,t){return bo(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){ke(this,`spa`,e)},encode:function e(t,n){return xo(this,t,n,{callee:e})},decode:function e(t,n){return So(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Co(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await wo(this,t,n,{callee:e})},safeEncode(e,t){return To(this,e,t)},safeDecode(e,t){return Eo(this,e,t)},async safeEncodeAsync(e,t){return Do(this,e,t)},async safeDecodeAsync(e,t){return Oo(this,e,t)},toJSONSchema(e){return Fa(this,{})(e)},get description(){return mi.get(this)?.description},get _def(){return this._zod.def}}),jo=k(`_ZodString`,(e,t)=>{Tn.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ra(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(aa(...e))},includes(...e){return this.check(ca(...e))},startsWith(...e){return this.check(la(...e))},endsWith(...e){return this.check(ua(...e))},min(...e){return this.check(ra(...e))},max(...e){return this.check(na(...e))},length(...e){return this.check(ia(...e))},nonempty(...e){return this.check(ra(1,...e))},lowercase(e){return this.check(oa(e))},uppercase(e){return this.check(sa(e))},trim(){return this.check(pa())},normalize(...e){return this.check(fa(...e))},toLowerCase(){return this.check(ma())},toUpperCase(){return this.check(ha())},slugify(){return this.check(ga())}}),Mo=k(`ZodString`,(e,t)=>{Tn.init(e,t),jo.init(e,t)},{email(e){return this.check(gi(Lo,e))},url(e){return this.check(Si(Bo,e))},jwt(e){return this.check(Li(ns,e))},emoji(e){return this.check(Ci(Ho,e))},guid(e){return this.check(_i(Ro,e))},uuid(e){return this.check(vi(zo,e))},uuidv4(e){return this.check(yi(zo,e))},uuidv6(e){return this.check(bi(zo,e))},uuidv7(e){return this.check(xi(zo,e))},nanoid(e){return this.check(wi(Uo,e))},cuid(e){return this.check(Ti(Wo,e))},cuid2(e){return this.check(Ei(Go,e))},ulid(e){return this.check(Di(Ko,e))},base64(e){return this.check(Pi($o,e))},base64url(e){return this.check(Fi(es,e))},xid(e){return this.check(Oi(qo,e))},ksuid(e){return this.check(ki(Jo,e))},ipv4(e){return this.check(Ai(Yo,e))},ipv6(e){return this.check(ji(Xo,e))},cidrv4(e){return this.check(Mi(Zo,e))},cidrv6(e){return this.check(Ni(Qo,e))},e164(e){return this.check(Ii(ts,e))},datetime(e){return this.check(Ri(No,e))},date(e){return this.check(zi(Po,e))},time(e){return this.check(Bi(Fo,e))},duration(e){return this.check(Vi(Io,e))}});function P(e){return hi(Mo,e)}var F=k(`ZodStringFormat`,(e,t)=>{j.init(e,t),jo.init(e,t)}),No=k(`ZodISODateTime`,(e,t)=>{Hn.init(e,t),F.init(e,t)}),Po=k(`ZodISODate`,(e,t)=>{Un.init(e,t),F.init(e,t)}),Fo=k(`ZodISOTime`,(e,t)=>{Wn.init(e,t),F.init(e,t)}),Io=k(`ZodISODuration`,(e,t)=>{Gn.init(e,t),F.init(e,t)}),Lo=k(`ZodEmail`,(e,t)=>{On.init(e,t),F.init(e,t)}),Ro=k(`ZodGUID`,(e,t)=>{En.init(e,t),F.init(e,t)}),zo=k(`ZodUUID`,(e,t)=>{Dn.init(e,t),F.init(e,t)}),Bo=k(`ZodURL`,(e,t)=>{Pn.init(e,t),F.init(e,t)});function Vo(e){return Si(Bo,e)}var Ho=k(`ZodEmoji`,(e,t)=>{Fn.init(e,t),F.init(e,t)}),Uo=k(`ZodNanoID`,(e,t)=>{In.init(e,t),F.init(e,t)}),Wo=k(`ZodCUID`,(e,t)=>{Ln.init(e,t),F.init(e,t)}),Go=k(`ZodCUID2`,(e,t)=>{Rn.init(e,t),F.init(e,t)}),Ko=k(`ZodULID`,(e,t)=>{zn.init(e,t),F.init(e,t)}),qo=k(`ZodXID`,(e,t)=>{Bn.init(e,t),F.init(e,t)}),Jo=k(`ZodKSUID`,(e,t)=>{Vn.init(e,t),F.init(e,t)}),Yo=k(`ZodIPv4`,(e,t)=>{Kn.init(e,t),F.init(e,t)}),Xo=k(`ZodIPv6`,(e,t)=>{Yn.init(e,t),F.init(e,t)}),Zo=k(`ZodCIDRv4`,(e,t)=>{Xn.init(e,t),F.init(e,t)}),Qo=k(`ZodCIDRv6`,(e,t)=>{Qn.init(e,t),F.init(e,t)}),$o=k(`ZodBase64`,(e,t)=>{er.init(e,t),F.init(e,t)}),es=k(`ZodBase64URL`,(e,t)=>{nr.init(e,t),F.init(e,t)}),ts=k(`ZodE164`,(e,t)=>{rr.init(e,t),F.init(e,t)}),ns=k(`ZodJWT`,(e,t)=>{ar.init(e,t),F.init(e,t)}),rs=k(`ZodNumber`,(e,t)=>{or.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>za(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check($i(e,t))},gte(e,t){return this.check(ea(e,t))},min(e,t){return this.check(ea(e,t))},lt(e,t){return this.check(Zi(e,t))},lte(e,t){return this.check(Qi(e,t))},max(e,t){return this.check(Qi(e,t))},int(e){return this.check(as(e))},safe(e){return this.check(as(e))},positive(e){return this.check($i(0,e))},nonnegative(e){return this.check(ea(0,e))},negative(e){return this.check(Zi(0,e))},nonpositive(e){return this.check(Qi(0,e))},multipleOf(e,t){return this.check(ta(e,t))},step(e,t){return this.check(ta(e,t))},finite(){return this}});function I(e){return Hi(rs,e)}var is=k(`ZodNumberFormat`,(e,t)=>{sr.init(e,t),rs.init(e,t)});function as(e){return Wi(is,e)}var os=k(`ZodBoolean`,(e,t)=>{cr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ba(e,t,n,r)});function L(e){return Gi(os,e)}var ss=k(`ZodUndefined`,(e,t)=>{lr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ha(e,t,n,r)});function cs(e){return Ki(ss,e)}var ls=k(`ZodNull`,(e,t)=>{ur.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Va(e,t,n,r)});function us(e){return qi(ls,e)}var ds=k(`ZodAny`,(e,t)=>{dr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function fs(){return Ji(ds)}var ps=k(`ZodUnknown`,(e,t)=>{fr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function R(){return Yi(ps)}var ms=k(`ZodNever`,(e,t)=>{pr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ua(e,t,n,r)});function hs(e){return Xi(ms,e)}var gs=k(`ZodArray`,(e,t)=>{Ao(),hr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ja(e,t,n,r),e.element=t.element},{min(e,t){return this.check(ra(e,t))},nonempty(e){return this.check(ra(1,e))},max(e,t){return this.check(na(e,t))},length(e,t){return this.check(ia(e,t))},unwrap(){return this.element}});function z(e,t){return _a(gs,e,t)}var _s=k(`ZodObject`,(e,t)=>{Ao(),Sr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xa(e,t,n,r),Ie(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Ts(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:R()})},loose(){return this.clone({...this._zod.def,catchall:R()})},strict(){return this.clone({...this._zod.def,catchall:hs()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return fe(this,e)},safeExtend(e){return pe(this,e)},merge(e){return me(this,e)},pick(e){return ue(this,e)},omit(e){return de(this,e)},partial(...e){return he(ks,this,e[0])},exactPartial(...e){return he(As,this,e[0],`exactPartial`)},required(...e){return ge(Rs,this,e[0])}});function B(e,t){return new _s({type:`object`,shape:e??{},...D(t)})}function V(e,t){return new _s({type:`object`,shape:e,catchall:R(),...D(t)})}var vs=k(`ZodUnion`,(e,t)=>{wr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Za(e,t,n,r),e.options=t.options});function H(e,t){return new vs({type:`union`,options:e,...D(t)})}var ys=k(`ZodDiscriminatedUnion`,(e,t)=>{vs.init(e,t),Tr.init(e,t)});function bs(e,t,n){return new ys({type:`union`,options:t,discriminator:e,...D(n)})}var xs=k(`ZodIntersection`,(e,t)=>{Er.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qa(e,t,n,r)});function Ss(e,t){return new xs({type:`intersection`,left:e,right:t})}var Cs=k(`ZodRecord`,(e,t)=>{Ao(),kr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>no(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function U(e,t,n){return!t||!t._zod?new Cs({type:`record`,keyType:P(),valueType:e,...D(t)}):new Cs({type:`record`,keyType:e,valueType:t,...D(n)})}var ws=k(`ZodEnum`,(e,t)=>{Ar.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wa(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new ws({...t,checks:[],...D(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new ws({...t,checks:[],...D(r),entries:i})}});function Ts(e,t){return new ws({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...D(t)})}var Es=k(`ZodLiteral`,(e,t)=>{jr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ga(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function W(e,t){return new Es({type:`literal`,values:Array.isArray(e)?e:[e],...D(t)})}var Ds=k(`ZodTransform`,(e,t)=>{Ao(),Mr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qa(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ge(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(De(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(De(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Os(e){return new Ds({type:`transform`,transform:e})}var ks=k(`ZodOptional`,(e,t)=>{Pr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>po(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function G(e){return new ks({type:`optional`,innerType:e})}var As=k(`ZodExactOptional`,(e,t)=>{Fr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>po(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function js(e){return new As({type:`optional`,innerType:e})}var Ms=k(`ZodNullable`,(e,t)=>{Ir.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ro(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ns(e){return new Ms({type:`nullable`,innerType:e})}var Ps=k(`ZodDefault`,(e,t)=>{Lr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>so(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Fs(e,t){return new Ps({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ie(t)}})}var Is=k(`ZodPrefault`,(e,t)=>{zr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>co(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ls(e,t){return new Is({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ie(t)}})}var Rs=k(`ZodNonOptional`,(e,t)=>{Br.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>io(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function zs(e,t){return new Rs({type:`nonoptional`,innerType:e,...D(t)})}var Bs=k(`ZodCatch`,(e,t)=>{Ur.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Vs(e,t){return new Bs({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Re(t)})}var Hs=k(`ZodPipe`,(e,t)=>{Wr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uo(e,t,n,r),e.in=t.in,e.out=t.out});function Us(e,t){return new Hs({type:`pipe`,in:e,out:t})}var Ws=k(`ZodPreprocess`,(e,t)=>{Hs.init(e,t),Kr.init(e,t)}),Gs=k(`ZodReadonly`,(e,t)=>{qr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fo(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ks(e){return new Gs({type:`readonly`,innerType:e})}var qs=k(`ZodCustom`,(e,t)=>{Yr.init(e,t),N.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ka(e,t,n,r)});function Js(e,t){return va(qs,e??(()=>!0),t)}function Ys(e,t={}){return ya(qs,e,t)}function Xs(e,t){return ba(e,t)}function Zs(e,t){return new Ws({type:`pipe`,in:Os(e),out:t})}var Qs={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},$s;$s||={};function ec(e){return Ri(No,e)}function tc(e){return Ui(rs,e)}var nc=`2025-11-25`,rc=[nc,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],ic=`io.modelcontextprotocol/related-task`,K=Js(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),ac=H([P(),I().int()]),oc=P();V({ttl:I().optional(),pollInterval:I().optional()});var sc=B({ttl:I().optional()}),cc=B({taskId:P()}),lc=V({progressToken:ac.optional(),[ic]:cc.optional()}),uc=B({_meta:lc.optional()}),dc=uc.extend({task:sc.optional()}),fc=e=>dc.safeParse(e).success,q=B({method:P(),params:uc.loose().optional()}),pc=B({_meta:lc.optional()}),mc=B({method:P(),params:pc.loose().optional()}),J=V({_meta:lc.optional()}),hc=H([P(),I().int()]),gc=B({jsonrpc:W(`2.0`),id:hc,...q.shape}).strict(),_c=e=>gc.safeParse(e).success,vc=B({jsonrpc:W(`2.0`),...mc.shape}).strict(),yc=e=>vc.safeParse(e).success,bc=B({jsonrpc:W(`2.0`),id:hc,result:J}).strict(),xc=e=>bc.safeParse(e).success,Y;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Y||={});var Sc=B({jsonrpc:W(`2.0`),id:hc.optional(),error:B({code:I().int(),message:P(),data:R().optional()})}).strict(),Cc=e=>Sc.safeParse(e).success,wc=H([gc,vc,bc,Sc]);H([bc,Sc]);var Tc=J.strict(),Ec=pc.extend({requestId:hc.optional(),reason:P().optional()}),Dc=mc.extend({method:W(`notifications/cancelled`),params:Ec}),Oc=B({icons:z(B({src:P(),mimeType:P().optional(),sizes:z(P()).optional(),theme:Ts([`light`,`dark`]).optional()})).optional()}),kc=B({name:P(),title:P().optional()}),Ac=kc.extend({...kc.shape,...Oc.shape,version:P(),websiteUrl:P().optional(),description:P().optional()}),jc=Zs(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ss(B({form:Ss(B({applyDefaults:L().optional()}),U(P(),R())).optional(),url:K.optional()}),U(P(),R()).optional())),Mc=V({list:K.optional(),cancel:K.optional(),requests:V({sampling:V({createMessage:K.optional()}).optional(),elicitation:V({create:K.optional()}).optional()}).optional()}),Nc=V({list:K.optional(),cancel:K.optional(),requests:V({tools:V({call:K.optional()}).optional()}).optional()}),Pc=B({experimental:U(P(),K).optional(),sampling:B({context:K.optional(),tools:K.optional()}).optional(),elicitation:jc.optional(),roots:B({listChanged:L().optional()}).optional(),tasks:Mc.optional(),extensions:U(P(),K).optional()}),Fc=uc.extend({protocolVersion:P(),capabilities:Pc,clientInfo:Ac}),Ic=q.extend({method:W(`initialize`),params:Fc}),Lc=B({experimental:U(P(),K).optional(),logging:K.optional(),completions:K.optional(),prompts:B({listChanged:L().optional()}).optional(),resources:B({subscribe:L().optional(),listChanged:L().optional()}).optional(),tools:B({listChanged:L().optional()}).optional(),tasks:Nc.optional(),extensions:U(P(),K).optional()}),Rc=J.extend({protocolVersion:P(),capabilities:Lc,serverInfo:Ac,instructions:P().optional()}),zc=mc.extend({method:W(`notifications/initialized`),params:pc.optional()}),Bc=e=>zc.safeParse(e).success,Vc=q.extend({method:W(`ping`),params:uc.optional()}),Hc=B({progress:I(),total:G(I()),message:G(P())}),Uc=B({...pc.shape,...Hc.shape,progressToken:ac}),Wc=mc.extend({method:W(`notifications/progress`),params:Uc}),Gc=uc.extend({cursor:oc.optional()}),Kc=q.extend({params:Gc.optional()}),qc=J.extend({nextCursor:oc.optional()}),Jc=Ts([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Yc=B({taskId:P(),status:Jc,ttl:H([I(),us()]),createdAt:P(),lastUpdatedAt:P(),pollInterval:G(I()),statusMessage:G(P())}),Xc=J.extend({task:Yc}),Zc=pc.merge(Yc),Qc=mc.extend({method:W(`notifications/tasks/status`),params:Zc}),$c=q.extend({method:W(`tasks/get`),params:uc.extend({taskId:P()})}),el=J.merge(Yc),tl=q.extend({method:W(`tasks/result`),params:uc.extend({taskId:P()})});J.loose();var nl=Kc.extend({method:W(`tasks/list`)}),rl=qc.extend({tasks:z(Yc)}),il=q.extend({method:W(`tasks/cancel`),params:uc.extend({taskId:P()})}),al=J.merge(Yc),ol=B({uri:P(),mimeType:G(P()),_meta:U(P(),R()).optional()}),sl=ol.extend({text:P()}),cl=P().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ll=ol.extend({blob:cl}),ul=Ts([`user`,`assistant`]),dl=B({audience:z(ul).optional(),priority:I().min(0).max(1).optional(),lastModified:ec({offset:!0}).optional()}),fl=B({...kc.shape,...Oc.shape,uri:P(),description:G(P()),mimeType:G(P()),size:G(I()),annotations:dl.optional(),_meta:G(V({}))}),pl=B({...kc.shape,...Oc.shape,uriTemplate:P(),description:G(P()),mimeType:G(P()),annotations:dl.optional(),_meta:G(V({}))}),ml=Kc.extend({method:W(`resources/list`)}),hl=qc.extend({resources:z(fl)}),gl=Kc.extend({method:W(`resources/templates/list`)}),_l=qc.extend({resourceTemplates:z(pl)}),vl=uc.extend({uri:P()}),yl=vl,bl=q.extend({method:W(`resources/read`),params:yl}),xl=J.extend({contents:z(H([sl,ll]))}),Sl=mc.extend({method:W(`notifications/resources/list_changed`),params:pc.optional()}),Cl=vl,wl=q.extend({method:W(`resources/subscribe`),params:Cl}),Tl=vl,El=q.extend({method:W(`resources/unsubscribe`),params:Tl}),Dl=pc.extend({uri:P()}),Ol=mc.extend({method:W(`notifications/resources/updated`),params:Dl}),kl=B({name:P(),description:G(P()),required:G(L())}),Al=B({...kc.shape,...Oc.shape,description:G(P()),arguments:G(z(kl)),_meta:G(V({}))}),jl=Kc.extend({method:W(`prompts/list`)}),Ml=qc.extend({prompts:z(Al)}),Nl=uc.extend({name:P(),arguments:U(P(),P()).optional()}),Pl=q.extend({method:W(`prompts/get`),params:Nl}),Fl=B({type:W(`text`),text:P(),annotations:dl.optional(),_meta:U(P(),R()).optional()}),Il=B({type:W(`image`),data:cl,mimeType:P(),annotations:dl.optional(),_meta:U(P(),R()).optional()}),Ll=B({type:W(`audio`),data:cl,mimeType:P(),annotations:dl.optional(),_meta:U(P(),R()).optional()}),Rl=B({type:W(`tool_use`),name:P(),id:P(),input:U(P(),R()),_meta:U(P(),R()).optional()}),zl=B({type:W(`resource`),resource:H([sl,ll]),annotations:dl.optional(),_meta:U(P(),R()).optional()}),Bl=fl.extend({type:W(`resource_link`)}),Vl=H([Fl,Il,Ll,Bl,zl]),Hl=B({role:ul,content:Vl}),Ul=J.extend({description:P().optional(),messages:z(Hl)}),Wl=mc.extend({method:W(`notifications/prompts/list_changed`),params:pc.optional()}),Gl=B({title:P().optional(),readOnlyHint:L().optional(),destructiveHint:L().optional(),idempotentHint:L().optional(),openWorldHint:L().optional()}),Kl=B({taskSupport:Ts([`required`,`optional`,`forbidden`]).optional()}),ql=B({...kc.shape,...Oc.shape,description:P().optional(),inputSchema:B({type:W(`object`),properties:U(P(),K).optional(),required:z(P()).optional()}).catchall(R()),outputSchema:B({type:W(`object`),properties:U(P(),K).optional(),required:z(P()).optional()}).catchall(R()).optional(),annotations:Gl.optional(),execution:Kl.optional(),_meta:U(P(),R()).optional()}),Jl=Kc.extend({method:W(`tools/list`)}),Yl=qc.extend({tools:z(ql)}),Xl=J.extend({content:z(Vl).default([]),structuredContent:U(P(),R()).optional(),isError:L().optional()});Xl.or(J.extend({toolResult:R()}));var Zl=dc.extend({name:P(),arguments:U(P(),R()).optional()}),Ql=q.extend({method:W(`tools/call`),params:Zl}),$l=mc.extend({method:W(`notifications/tools/list_changed`),params:pc.optional()}),eu=B({autoRefresh:L().default(!0),debounceMs:I().int().nonnegative().default(300)}),tu=Ts([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),nu=uc.extend({level:tu}),ru=q.extend({method:W(`logging/setLevel`),params:nu}),iu=pc.extend({level:tu,logger:P().optional(),data:R()}),au=mc.extend({method:W(`notifications/message`),params:iu}),ou=B({hints:z(B({name:P().optional()})).optional(),costPriority:I().min(0).max(1).optional(),speedPriority:I().min(0).max(1).optional(),intelligencePriority:I().min(0).max(1).optional()}),su=B({mode:Ts([`auto`,`required`,`none`]).optional()}),cu=B({type:W(`tool_result`),toolUseId:P().describe(`The unique identifier for the corresponding tool call.`),content:z(Vl).default([]),structuredContent:B({}).loose().optional(),isError:L().optional(),_meta:U(P(),R()).optional()}),lu=bs(`type`,[Fl,Il,Ll]),uu=bs(`type`,[Fl,Il,Ll,Rl,cu]),du=B({role:ul,content:H([uu,z(uu)]),_meta:U(P(),R()).optional()}),fu=dc.extend({messages:z(du),modelPreferences:ou.optional(),systemPrompt:P().optional(),includeContext:Ts([`none`,`thisServer`,`allServers`]).optional(),temperature:I().optional(),maxTokens:I().int(),stopSequences:z(P()).optional(),metadata:K.optional(),tools:z(ql).optional(),toolChoice:su.optional()}),pu=q.extend({method:W(`sampling/createMessage`),params:fu}),mu=J.extend({model:P(),stopReason:G(Ts([`endTurn`,`stopSequence`,`maxTokens`]).or(P())),role:ul,content:lu}),hu=J.extend({model:P(),stopReason:G(Ts([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(P())),role:ul,content:H([uu,z(uu)])}),gu=B({type:W(`boolean`),title:P().optional(),description:P().optional(),default:L().optional()}),_u=B({type:W(`string`),title:P().optional(),description:P().optional(),minLength:I().optional(),maxLength:I().optional(),format:Ts([`email`,`uri`,`date`,`date-time`]).optional(),default:P().optional()}),vu=B({type:Ts([`number`,`integer`]),title:P().optional(),description:P().optional(),minimum:I().optional(),maximum:I().optional(),default:I().optional()}),yu=B({type:W(`string`),title:P().optional(),description:P().optional(),enum:z(P()),default:P().optional()}),bu=B({type:W(`string`),title:P().optional(),description:P().optional(),oneOf:z(B({const:P(),title:P()})),default:P().optional()}),xu=H([H([B({type:W(`string`),title:P().optional(),description:P().optional(),enum:z(P()),enumNames:z(P()).optional(),default:P().optional()}),H([yu,bu]),H([B({type:W(`array`),title:P().optional(),description:P().optional(),minItems:I().optional(),maxItems:I().optional(),items:B({type:W(`string`),enum:z(P())}),default:z(P()).optional()}),B({type:W(`array`),title:P().optional(),description:P().optional(),minItems:I().optional(),maxItems:I().optional(),items:B({anyOf:z(B({const:P(),title:P()}))}),default:z(P()).optional()})])]),gu,_u,vu]),Su=H([dc.extend({mode:W(`form`).optional(),message:P(),requestedSchema:B({type:W(`object`),properties:U(P(),xu),required:z(P()).optional()})}),dc.extend({mode:W(`url`),message:P(),elicitationId:P(),url:P().url()})]),Cu=q.extend({method:W(`elicitation/create`),params:Su}),wu=pc.extend({elicitationId:P()}),Tu=mc.extend({method:W(`notifications/elicitation/complete`),params:wu}),Eu=J.extend({action:Ts([`accept`,`decline`,`cancel`]),content:Zs(e=>e===null?void 0:e,U(P(),H([P(),I(),L(),z(P())])).optional())}),Du=B({type:W(`ref/resource`),uri:P()}),Ou=B({type:W(`ref/prompt`),name:P()}),ku=uc.extend({ref:H([Ou,Du]),argument:B({name:P(),value:P()}),context:B({arguments:U(P(),P()).optional()}).optional()}),Au=q.extend({method:W(`completion/complete`),params:ku}),ju=J.extend({completion:V({values:z(P()).max(100),total:G(I().int()),hasMore:G(L())})}),Mu=B({uri:P().startsWith(`file://`),name:P().optional(),_meta:U(P(),R()).optional()}),Nu=q.extend({method:W(`roots/list`),params:uc.optional()}),Pu=J.extend({roots:z(Mu)}),Fu=mc.extend({method:W(`notifications/roots/list_changed`),params:pc.optional()});H([Vc,Ic,Au,ru,Pl,jl,ml,gl,bl,wl,El,Ql,Jl,$c,tl,nl,il]),H([Dc,Wc,zc,Fu,Qc]),H([Tc,mu,hu,Eu,Pu,el,rl,Xc]),H([Vc,pu,Cu,Nu,$c,tl,nl,il]),H([Dc,Wc,au,Ol,Sl,$l,Wl,Qc,Tu]),H([Tc,Rc,ju,Ul,Ml,hl,_l,xl,Xl,Yl,el,rl,Xc]);var X=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Y.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Iu(e.elicitations,n)}return new e(t,n,r)}},Iu=class extends X{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Y.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function Lu(e){return!!e._zod}function Ru(e,t){return Lu(e)?ut(e,t):e.safeParse(t)}function zu(e){if(!e)return;let t;if(t=Lu(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function Bu(e){if(Lu(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}function Vu(e){return e===`completed`||e===`failed`||e===`cancelled`}function Hu(e){let t=zu(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=Bu(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function Uu(e,t){let n=Ru(e,t);if(!n.success)throw n.error;return n.data}var Wu=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Dc,e=>{this._oncancel(e)}),this.setNotificationHandler(Wc,e=>{this._onprogress(e)}),this.setRequestHandler(Vc,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler($c,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new X(Y.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(tl,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new X(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new X(Y.InvalidParams,`Task not found: ${r}`);if(!Vu(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(Vu(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[ic]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(nl,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new X(Y.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(il,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new X(Y.InvalidParams,`Task not found: ${e.params.taskId}`);if(Vu(n.status))throw new X(Y.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new X(Y.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof X?e:new X(Y.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),X.fromError(Y.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),xc(e)||Cc(e)?this._onresponse(e):_c(e)?this._onrequest(e,t):yc(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=X.fromError(Y.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[ic]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Y.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=fc(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new X(Y.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Y.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),xc(e)?n(e):n(new X(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(xc(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),xc(e)?r(e):r(X.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof X?e:new X(Y.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Xc,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new X(Y.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},Vu(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new X(Y.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new X(Y.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof X?e:new X(Y.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[ic]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof X?e:new X(Y.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=Ru(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(X.fromError(Y.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},el,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},rl,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},al,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[ic]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[ic]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[ic]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=Hu(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=Uu(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=Hu(e);this._notificationHandlers.set(n,n=>{let r=Uu(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&_c(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new X(Y.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new X(Y.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new X(Y.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new X(Y.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Qc.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),Vu(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new X(Y.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(Vu(a.status))throw new X(Y.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Qc.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),Vu(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function Gu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ku(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=Gu(a)&&Gu(i)?{...a,...i}:i}return n}(e=>typeof r<`u`?r:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof r<`u`?r:e)[t]}):e)(function(e){if(typeof r<`u`)return r.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var qu=class extends Wu{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},Ju=`2026-01-26`,Yu=H([W(`light`),W(`dark`)]).describe(`Color theme preference for the host environment.`),Xu=H([W(`inline`),W(`fullscreen`),W(`pip`)]).describe(`Display mode for UI presentation.`),Zu=U(H([W(`--color-background-primary`),W(`--color-background-secondary`),W(`--color-background-tertiary`),W(`--color-background-inverse`),W(`--color-background-ghost`),W(`--color-background-info`),W(`--color-background-danger`),W(`--color-background-success`),W(`--color-background-warning`),W(`--color-background-disabled`),W(`--color-text-primary`),W(`--color-text-secondary`),W(`--color-text-tertiary`),W(`--color-text-inverse`),W(`--color-text-ghost`),W(`--color-text-info`),W(`--color-text-danger`),W(`--color-text-success`),W(`--color-text-warning`),W(`--color-text-disabled`),W(`--color-border-primary`),W(`--color-border-secondary`),W(`--color-border-tertiary`),W(`--color-border-inverse`),W(`--color-border-ghost`),W(`--color-border-info`),W(`--color-border-danger`),W(`--color-border-success`),W(`--color-border-warning`),W(`--color-border-disabled`),W(`--color-ring-primary`),W(`--color-ring-secondary`),W(`--color-ring-inverse`),W(`--color-ring-info`),W(`--color-ring-danger`),W(`--color-ring-success`),W(`--color-ring-warning`),W(`--font-sans`),W(`--font-mono`),W(`--font-weight-normal`),W(`--font-weight-medium`),W(`--font-weight-semibold`),W(`--font-weight-bold`),W(`--font-text-xs-size`),W(`--font-text-sm-size`),W(`--font-text-md-size`),W(`--font-text-lg-size`),W(`--font-heading-xs-size`),W(`--font-heading-sm-size`),W(`--font-heading-md-size`),W(`--font-heading-lg-size`),W(`--font-heading-xl-size`),W(`--font-heading-2xl-size`),W(`--font-heading-3xl-size`),W(`--font-text-xs-line-height`),W(`--font-text-sm-line-height`),W(`--font-text-md-line-height`),W(`--font-text-lg-line-height`),W(`--font-heading-xs-line-height`),W(`--font-heading-sm-line-height`),W(`--font-heading-md-line-height`),W(`--font-heading-lg-line-height`),W(`--font-heading-xl-line-height`),W(`--font-heading-2xl-line-height`),W(`--font-heading-3xl-line-height`),W(`--border-radius-xs`),W(`--border-radius-sm`),W(`--border-radius-md`),W(`--border-radius-lg`),W(`--border-radius-xl`),W(`--border-radius-full`),W(`--border-width-regular`),W(`--shadow-hairline`),W(`--shadow-sm`),W(`--shadow-md`),W(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. - -Individual style keys are optional - hosts may provide any subset of these values. -Values are strings containing CSS values (colors, sizes, font stacks, etc.). - -Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),H([P(),cs()]).describe(`Style variables for theming MCP apps. - -Individual style keys are optional - hosts may provide any subset of these values. -Values are strings containing CSS values (colors, sizes, font stacks, etc.). - -Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps. - -Individual style keys are optional - hosts may provide any subset of these values. -Values are strings containing CSS values (colors, sizes, font stacks, etc.). - -Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Qu=B({method:W(`ui/open-link`),params:B({url:P().describe(`URL to open in the host's browser`)})});B({isError:L().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),B({isError:L().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),B({isError:L().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();var $u=B({method:W(`ui/notifications/sandbox-proxy-ready`),params:B({})}),ed=B({connectDomains:z(P()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). - -- Maps to CSP \`connect-src\` directive -- Empty or omitted → no network connections (secure default)`),resourceDomains:z(P()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:z(P()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:z(P()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),td=B({camera:B({}).optional().describe(`Request camera access. - -Maps to Permission Policy \`camera\` feature.`),microphone:B({}).optional().describe(`Request microphone access. - -Maps to Permission Policy \`microphone\` feature.`),geolocation:B({}).optional().describe(`Request geolocation access. - -Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:B({}).optional().describe(`Request clipboard write access. - -Maps to Permission Policy \`clipboard-write\` feature.`)}),nd=B({method:W(`ui/notifications/size-changed`),params:B({width:I().optional().describe(`New width in pixels.`),height:I().optional().describe(`New height in pixels.`)})});B({method:W(`ui/notifications/tool-input`),params:B({arguments:U(P(),R().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),B({method:W(`ui/notifications/tool-input-partial`),params:B({arguments:U(P(),R().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),B({method:W(`ui/notifications/tool-cancelled`),params:B({reason:P().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})});var rd=B({fonts:P().optional()}),id=B({variables:Zu.optional().describe(`CSS variables for theming the app.`),css:rd.optional().describe(`CSS blocks that apps can inject.`)});B({method:W(`ui/resource-teardown`),params:B({})});var ad=U(P(),R()),od=B({text:B({}).optional().describe(`Host supports text content blocks.`),image:B({}).optional().describe(`Host supports image content blocks.`),audio:B({}).optional().describe(`Host supports audio content blocks.`),resource:B({}).optional().describe(`Host supports resource content blocks.`),resourceLink:B({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:B({}).optional().describe(`Host supports structured content.`)}),sd=B({method:W(`ui/notifications/request-teardown`),params:B({}).optional()}),cd=B({experimental:U(P(),U(P(),fs()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:B({}).optional().describe(`Host supports opening external URLs.`),downloadFile:B({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:B({listChanged:L().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:B({listChanged:L().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:B({}).optional().describe(`Host accepts log messages.`),sandbox:B({permissions:td.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:ed.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:od.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:od.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:B({tools:B({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),ld=B({experimental:U(P(),U(P(),fs()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:B({listChanged:L().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:z(Xu).optional().describe(`Display modes the app supports.`)}),ud=B({method:W(`ui/notifications/initialized`),params:B({}).optional()});B({csp:ed.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:td.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:P().optional().describe(`Dedicated origin for view sandbox. - -Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists. - -**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include: -- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`) -- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`) - -If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:L().optional().describe(`Visual boundary preference - true if view prefers a visible border. - -Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary. - -- \`true\`: request visible border + background -- \`false\`: request no visible border + background -- omitted: host decides border`)});var dd=B({method:W(`ui/request-display-mode`),params:B({mode:Xu.describe(`The display mode being requested.`)})});B({mode:Xu.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var fd=H([W(`model`),W(`app`)]).describe(`Tool visibility scope - who can access the tool.`);B({resourceUri:P().optional(),visibility:z(fd).optional().describe(`Who can access this tool. Default: ["model", "app"] -- "model": Tool visible to and callable by the agent -- "app": Tool callable by the app from this server only`),csp:hs().optional(),permissions:hs().optional()}),B({mimeTypes:z(P()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var pd=B({method:W(`ui/download-file`),params:B({contents:z(H([zl,Bl])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),md=B({method:W(`ui/message`),params:B({role:W(`user`).describe(`Message role, currently only "user" is supported.`),content:z(Vl).describe(`Message content blocks (text, image, etc.).`)})});B({method:W(`ui/notifications/sandbox-resource-ready`),params:B({html:P().describe(`HTML content to load into the inner iframe.`),sandbox:P().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:ed.optional().describe(`CSP configuration from resource metadata.`),permissions:td.optional().describe(`Sandbox permissions from resource metadata.`)})}),B({method:W(`ui/notifications/tool-result`),params:Xl.describe(`Standard MCP tool execution result.`)});var hd=B({toolInfo:B({id:hc.optional().describe(`JSON-RPC id of the tools/call request.`),tool:ql.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Yu.optional().describe(`Current color theme preference.`),styles:id.optional().describe(`Style configuration for theming the app.`),displayMode:Xu.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:z(Xu).optional().describe(`Display modes the host supports.`),containerDimensions:H([B({height:I().describe(`Fixed container height in pixels.`)}),B({maxHeight:H([I(),cs()]).optional().describe(`Maximum container height in pixels.`)})]).and(H([B({width:I().describe(`Fixed container width in pixels.`)}),B({maxWidth:H([I(),cs()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other -container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:P().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:P().optional().describe(`User's timezone in IANA format.`),userAgent:P().optional().describe(`Host application identifier.`),platform:H([W(`web`),W(`desktop`),W(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:B({touch:L().optional().describe(`Whether the device supports touch input.`),hover:L().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:B({top:I().describe(`Top safe area inset in pixels.`),right:I().describe(`Right safe area inset in pixels.`),bottom:I().describe(`Bottom safe area inset in pixels.`),left:I().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough();B({method:W(`ui/notifications/host-context-changed`),params:hd.describe(`Partial context update containing only changed fields.`)});var gd=B({method:W(`ui/update-model-context`),params:B({content:z(Vl).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:U(P(),R().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),_d=B({method:W(`ui/initialize`),params:B({appInfo:Ac.describe(`App identification (name and version).`),appCapabilities:ld.describe(`Features and capabilities this app provides.`),protocolVersion:P().describe(`Protocol version this app supports.`)})});B({protocolVersion:P().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:Ac.describe(`Host application identification and version.`),hostCapabilities:cd.describe(`Features and capabilities provided by the host.`),hostContext:hd.describe(`Rich context about the host environment.`)}).passthrough();var vd=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=wc.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},yd=[Ju],bd=class extends qu{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,t)=>{this._baseReplaceRequestHandler(e,(e,n)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${e.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),t(e,n)))};eventSchemas={sizechange:nd,sandboxready:$u,initialized:ud,requestteardown:sd,loggingmessage:au};constructor(e,t,n,r){super(r),this._client=e,this._hostInfo=t,this._capabilities=n,this.addEventListener(`initialized`,()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(_d,e=>this._oninitialize(e)),this.setRequestHandler(Vc,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(dd,e=>({mode:this._hostContext.displayMode??`inline`}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler(`sizechange`)}set onsizechange(e){this.setEventHandler(`sizechange`,e)}get onsandboxready(){return this.getEventHandler(`sandboxready`)}set onsandboxready(e){this.setEventHandler(`sandboxready`,e)}get oninitialized(){return this.getEventHandler(`initialized`)}set oninitialized(e){this.setEventHandler(`initialized`,e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced(`onmessage`,this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(md,async(e,t)=>{if(!this._onmessage)throw Error(`No onmessage handler set`);return this._onmessage(e.params,t)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced(`onopenlink`,this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(Qu,async(e,t)=>{if(!this._onopenlink)throw Error(`No onopenlink handler set`);return this._onopenlink(e.params,t)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced(`ondownloadfile`,this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(pd,async(e,t)=>{if(!this._ondownloadfile)throw Error(`No ondownloadfile handler set`);return this._ondownloadfile(e.params,t)})}get onrequestteardown(){return this.getEventHandler(`requestteardown`)}set onrequestteardown(e){this.setEventHandler(`requestteardown`,e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced(`onrequestdisplaymode`,this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(dd,async(e,t)=>{if(!this._onrequestdisplaymode)throw Error(`No onrequestdisplaymode handler set`);return this._onrequestdisplaymode(e.params,t)})}get onloggingmessage(){return this.getEventHandler(`loggingmessage`)}set onloggingmessage(e){this.setEventHandler(`loggingmessage`,e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced(`onupdatemodelcontext`,this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(gd,async(e,t)=>{if(!this._onupdatemodelcontext)throw Error(`No onupdatemodelcontext handler set`);return this._onupdatemodelcontext(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Ql,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(pu,async(t,n)=>e(t.params,n))}sendToolListChanged(e={}){return this.notification({method:`notifications/tools/list_changed`,params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced(`onlistresources`,this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(ml,async(e,t)=>{if(!this._onlistresources)throw Error(`No onlistresources handler set`);return this._onlistresources(e.params,t)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced(`onlistresourcetemplates`,this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(gl,async(e,t)=>{if(!this._onlistresourcetemplates)throw Error(`No onlistresourcetemplates handler set`);return this._onlistresourcetemplates(e.params,t)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced(`onreadresource`,this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(bl,async(e,t)=>{if(!this._onreadresource)throw Error(`No onreadresource handler set`);return this._onreadresource(e.params,t)})}sendResourceListChanged(e={}){return this.notification({method:`notifications/resources/list_changed`,params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced(`onlistprompts`,this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(jl,async(e,t)=>{if(!this._onlistprompts)throw Error(`No onlistprompts handler set`);return this._onlistprompts(e.params,t)})}sendPromptListChanged(e={}){return this.notification({method:`notifications/prompts/list_changed`,params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}getCapabilities(){return this._capabilities}async _oninitialize(e){let t=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn(`[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.`),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:yd.includes(t)?t:Ju,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},n=!1;for(let r of Object.keys(e)){let i=this._hostContext[r],a=e[r];xd(i,a)||(t[r]=a,n=!0)}n&&(this._hostContext=e,this.sendHostContextChange(t))}sendHostContextChange(e){return this.notification({method:`ui/notifications/host-context-changed`,params:e})}sendToolInput(e){return this.notification({method:`ui/notifications/tool-input`,params:e})}sendToolInputPartial(e){return this.notification({method:`ui/notifications/tool-input-partial`,params:e})}sendToolResult(e){return this.notification({method:`ui/notifications/tool-result`,params:e})}sendToolCancelled(e){return this.notification({method:`ui/notifications/tool-cancelled`,params:e})}sendSandboxResourceReady(e){return this.notification({method:`ui/notifications/sandbox-resource-ready`,params:e})}teardownResource(e,t){return this.request({method:`ui/resource-teardown`,params:e},ad,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},Xl,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},Yl,t)}async connect(e){if(this.transport)throw Error(`AppBridge is already connected. Call close() before connecting again.`);if(this._initializedReceived=!1,this._client){let e=this._client.getServerCapabilities();if(!e)throw Error(`Client server capabilities not available`);e.tools&&(this.oncalltool=async(e,t)=>this._client.request({method:`tools/call`,params:e},Xl,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler($l,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},hl,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},_l,{signal:t.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},xl,{signal:t.signal}),e.resources.listChanged&&this._client.setNotificationHandler(Sl,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},Ml,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(Wl,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function xd(e,t){return JSON.stringify(e)===JSON.stringify(t)}var Sd=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Sd(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),Z=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=Sd(),n=Cd(),r=Sd();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=Cd();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=T(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=T(this.rhs,e,n),this}get names(){return re(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=T(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(ie(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>w(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(ae(t),n instanceof e?[n]:n.nodes);if(t!==!1&&this.nodes.length)return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=T(this.condition,e,t),this}get names(){let e=super.names;return re(e,this.condition),this.else&&w(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=T(this.iteration,e,t),this}get names(){return w(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return re(re(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=T(this.iterable,e,t),this}get names(){return w(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var ee=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&w(e,this.catch.names),this.finally&&w(e,this.finally.names),e}},te=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};te.kind=`catch`;var ne=class extends m{render(e){return`finally`+super.render(e)}};ne.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?` -`:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new ee;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new te(e),t(e)}return n&&(this._currNode=r.finally=new ne,this.code(n)),this._endBlockNode(te,ne)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-->0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function w(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function re(e,n){return n instanceof t._CodeOrName?w(e,n.names):e}function T(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function ie(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function ae(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${le(e)}`}e.not=ae;var oe=ce(e.operators.AND);function E(...e){return e.reduce(oe)}e.and=E;var D=ce(e.operators.OR);function se(...e){return e.reduce(D)}e.or=se;function ce(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${le(n)} ${e} ${le(r)}`}function le(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),Q=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=Z(),n=Sd();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0||(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0||{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0||(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0||Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),wd=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),Td=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=Z(),n=Q(),r=wd();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),Ed=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=Td(),n=Z(),r=wd(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),Dd=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Od=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),kd=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=Dd(),n=Od(),r=Td(),i=Z(),a=Q(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null - || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null - || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number" - || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),Ad=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=Z(),n=Q();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),jd=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=Z(),n=Q(),r=wd(),i=Q();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),Md=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=Z(),n=wd(),r=jd(),i=Td();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),Nd=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=Z(),n=Q();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),Pd=n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Fd=n(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=Q(),n=Pd(),r=Fd(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),Ld=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=Ed(),n=kd(),r=Od(),i=kd(),a=Ad(),o=Md(),s=Nd(),c=Z(),l=wd(),u=Id(),d=Q(),f=Td();function p(e){if(S(e)&&(ee(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&ie(e),w(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),te(e),ae(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(ee(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&ie(e),re(e),T(e);let a=r.const(`_errs`,l.default.errors);te(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function ee(e){(0,d.checkUnknownRules)(e),ne(e)}function te(e,t){if(e.opts.jtd)return E(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);E(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function ne(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function w(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function re(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function T(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function ie({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function ae(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&oe(e),t.return((0,c._)`${l.default.errors} === 0`))}function oe({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function E(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>ge(e,`$ref`,h.all.$ref.definition));return}p.jtd||se(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),D(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):D(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function D(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&ge(e,n.keyword,n.definition,t.type)})}function se(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(ce(e,t),e.opts.allowUnionTypes||le(e,t),ue(e,e.dataTypes))}function ce(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{fe(e.dataTypes,t)||me(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),pe(e,t)}}function le(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&me(e,`use allowUnionTypes to allow union type keyword`)}function ue(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>de(t,e))&&me(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function de(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function fe(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function pe(e,t){let n=[];for(let r of e.dataTypes)fe(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function me(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var he=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,ye(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=he;function ge(e,t,n,r){let i=new he(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var _e=/^\/(?:[^~]|~0|~1)*$/,ve=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ye(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!_e.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=ve.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=ye})),Rd=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),zd=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Id();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),Bd=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=Z(),n=Rd(),r=wd(),i=Id(),a=Q(),o=Ld(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),Vd=f({$id:()=>Hd,additionalProperties:()=>!1,default:()=>qd,description:()=>Ud,properties:()=>Kd,required:()=>Gd,type:()=>Wd}),Hd,Ud,Wd,Gd,Kd,qd,Jd=l((()=>{Hd=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,Ud=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,Wd=`object`,Gd=[`$data`],Kd={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},qd={$id:Hd,description:Ud,type:Wd,required:Gd,properties:Kd,additionalProperties:!1}})),Yd=n(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^\d*$/u),a=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),c=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),l=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),u=Array(256);{let e=`0123456789ABCDEF`;for(let t=0;t<256;t++)u[t]=`%`+e[t>>4]+e[t&15]}function d(e){return e<2048?u[192|e>>6]+u[128|e&63]:e<65536?u[224|e>>12]+u[128|e>>6&63]+u[128|e&63]:u[240|e>>18]+u[128|e>>12&63]+u[128|e>>6&63]+u[128|e&63]}function f(e){let t=``,n=0,r=0;for(r=0;r=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var p=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),m=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),h=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),g=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function _(e){if(e.length===0)return!1;for(let t=0;tn&&(n=i,t=r)):(r=-1,i=0);if(n<2)return e.join(`:`);let a=e.slice(0,t).join(`:`),o=e.slice(t+n).join(`:`);return a+`::`+o}function y(e){let t=e.indexOf(`::`);if(t!==-1&&e.indexOf(`::`,t+1)!==-1)return;let n=t===-1?e.split(`:`):e.slice(0,t).split(`:`),i=t===-1?[]:e.slice(t+2).split(`:`);t!==-1&&(n.length===1&&n[0]===``&&(n.length=0),i.length===1&&i[0]===``&&(i.length=0));let a=n.concat(i),o=0;for(let e=0;e=8)return;let s=a.slice(0,n.length);for(let e=o;e<8;e++)s.push(`0`);for(let e=n.length;eC[e])}function w(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r57343)t+=d(i);else if(i<=56319&&n+1=56320&&r<=57343?(t+=d(65536+(i-55296<<10)+(r-56320)),n++):t+=d(65533)}else t+=d(65533)}}return t}function T(e,t=!1){let n=``,r=t&&e[0]!==`/`;for(let t=0;t57343)n+=d(r);else if(r<=56319&&t+1=56320&&i<=57343?(n+=d(65536+(r-55296<<10)+(i-56320)),t++):n+=d(65533)}else n+=d(65533)}}return n}function ie(e,t){let n=``;for(let r=0;r57343)n+=d(t);else if(t<=56319&&r+1=56320&&i<=57343?(n+=d(65536+(t-55296<<10)+(i-56320)),r++):n+=d(65533)}else n+=d(65533)}}return n}function ae(e){return ie(e,l)}function oe(e){return ie(e,c)}function E(e){return ie(e,c)}function D(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function se(e){let t=``;for(let n=0;n57343)t+=d(i);else if(i<=56319&&n+1=56320&&r<=57343?(t+=d(65536+(i-55296<<10)+(r-56320)),n++):t+=d(65533)}else t+=d(65533)}}return t}function ce(e){let t=``;for(let n=0;n{var{isUUID:n}=Yd(),r=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf(`?`),n=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=n&&n!==`/`?n:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n&&n[0]===e.path){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),Zd=n(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,serializePathEncoding:s,normalizeQueryFragmentEncoding:c,encodeQuery:l,encodeFragment:u,reescapeHostDelimiters:d,isIPv4:f,nonSimpleDomain:p}=Yd(),{SCHEMES:m,getSchemeHandler:h}=Xd(),g=/^[A-Za-z][A-Za-z0-9+.-]*$/u,_=`URI scheme is malformed.`;function v(e){let t=unescape(String(e));if(!g.test(t))throw TypeError(_);return t}function y(e,t){return typeof e==`string`?e=D(e,t):typeof e==`object`&&(e=E(C(e,t),t)),e}function b(e,t,r){let i=r?Object.assign({scheme:`null`},r):{scheme:`null`},{parsed:a,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:c,malformedHost:l,malformedScheme:u}=oe(e,i),{parsed:d,malformedAuthorityOrPort:p,malformedPercentEncoding:m,malformedSchemeSpecific:g,malformedHost:_,malformedScheme:v}=oe(t,i);if(o||p||s||m||c||g||l||_||u||v)throw Error(a.error||d.error||`URI is malformed.`);let y=x(a,d,i,!0),b=h(r&&r.scheme||y.scheme),S=y.host,ee=S!==void 0&&S!==``&&(f(S)||n(S).isIPV6);ae(y,r||{},b,ee);let te=S&&S.indexOf(`%`)!==-1&&!/\P{ASCII}/u.test(S);if(y.error&&!te)throw Error(y.error);return i.skipEscape=!0,C(y,i)}function x(e,t,n,i){let a={};return i||(e=E(C(e,n),n),t=E(C(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):(a.path=(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?`/`+t.path:e.path?e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,a.query=t.query===void 0?e.query:t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function S(e,t,n){let r=ce(e,n),i=ce(t,n);return r!==void 0&&i!==void 0&&r===i}function C(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[];n.scheme&&=v(n.scheme);let d=h(o.scheme||n.scheme);d&&d.serialize&&d.serialize(n,o);let f=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,p=!o.skipEscape&&n.scheme===void 0&&!f;n.path!==void 0&&(n.path=o.skipEscape?a(n.path):s(n.path,p)),o.reference!==`suffix`&&n.scheme&&(n.scheme=v(n.scheme),c.push(n.scheme,`:`));let m=i(n);if(m!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(m),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!d||!d.absolutePath)&&(e=r(e)),p&&(e=s(e,!0)),m===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,l(n.query)),n.fragment!==void 0&&c.push(`#`,u(n.fragment)),c.join(``)}var ee=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,te=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,ne=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function w(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function re(e){if(e===void 0)return!1;let t=e.indexOf(`%`);for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf(`%`,t+3)}return!1}function T(e){return e[0]===`[`&&e[e.length-1]===`]`}function ie(e){let t=e[4];return re(e[3])||t!==void 0&&!T(t)&&re(t)||re(e[6])||re(e[7])||re(e[8])}function ae(e,t,n,r){if(!t.unicodeSupport&&(!n||!n.unicodeSupport)&&e.host&&!T(e.host)&&(t.domainHost||n&&n.domainHost)&&r===!1&&p(e.host))try{e.host=new URL(`http://`+e.host).hostname}catch(t){return e.error=e.error||`Host's domain name can not be converted to ASCII: `+t,!0}return!1}function oe(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},s=!1,l=!1,u=!1,p=!1,v=!1,y=!1,b=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let x=e.match(te);x!==null&&x[1].indexOf(`\\`)!==-1&&(i.error=`URI authority must not contain a literal backslash.`,s=!0);let S=e.match(ne);if(S!==null){let e=S[1],t=e.replace(/[\t\n\r]/g,``);t.length>=2&&(t.slice(0,2)===`//`?e.length!==t.length&&(i.error=i.error||`URI authority introducer must not contain whitespace.`,s=!0):(i.error=i.error||`URI authority must not contain a literal backslash.`,s=!0))}let C=e.match(ee);if(C){if(i.scheme=C[1],i.userinfo=C[3],i.host=C[4],i.port=parseInt(C[5],10),i.path=C[6]||``,i.query=C[7],i.fragment=C[8],i.scheme!==void 0){let e=unescape(i.scheme);g.test(e)?i.scheme=e.toLowerCase():(i.error=i.error||_,y=!0)}l=ie(C),l&&(i.error=i.error||`URI contains malformed percent-encoding.`),isNaN(i.port)&&(i.port=C[5]);let t=w(i,C);if(t!==void 0&&(i.error=i.error||t,s=!0),i.host){if(f(i.host)===!1){let e=T(i.host),t=i.host.indexOf(`[`)!==-1||i.host.indexOf(`]`)!==-1,r=n(i.host);b=r.isIPV6||r.isIPVFuture===!0,v=t&&(!e||r.error===!0),i.host=b?r.host:r.host.toLowerCase(),v&&(i.error=i.error||`URI host is malformed.`,s=!0)}else b=!0}i.reference=i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?`same-document`:i.scheme===void 0?`relative`:i.fragment===void 0?`absolute`:`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let x=h(r.scheme||i.scheme);if(v||(p=ae(i,r,x,b)),e.indexOf(`%`)!==-1&&i.host!==void 0&&!v){let e=b?i.host:a(i.host,!0);b||(e=a(e.toLowerCase())),i.host=d(e,b)}(!x||x&&!x.skipNormalize)&&(i.path&&=o(i.path),i.query&&=c(i.query),i.fragment&&=c(i.fragment)),x&&x.parse&&(x.parse(i,r),x===m.urn&&i.nid===void 0&&(u=!0))}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:s,malformedPercentEncoding:l,malformedSchemeSpecific:u,malformedHost:p,malformedScheme:y}}function E(e,t){return oe(e,t).parsed}function D(e,t){return se(e,t).normalized}function se(e,t){let{parsed:n,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}=oe(e,t);return{normalized:r||i||a||o||s?e:C(n,t),malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}}function ce(e,t){if(typeof e!=`string`&&typeof e!=`object`)return;let n;try{n=typeof e==`string`?e:C(e,t)}catch{return}let{normalized:r,malformedAuthorityOrPort:i,malformedPercentEncoding:a,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:c}=se(n,t);return i||a||o||s||c?void 0:r}var le={SCHEMES:m,normalize:y,resolve:b,resolveComponent:x,equal:S,serialize:C,parse:E};t.exports=le,t.exports.default=le,t.exports.fastUri=le})),Qd=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Zd();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),$d=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Ld();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Z();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=Rd(),i=zd(),a=Dd(),o=Bd(),s=Z(),c=Id(),l=kd(),u=Q(),f=(Jd(),d(Vd).default),p=Qd(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=T(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=w.call(this),e.formats&&te.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&ne.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),ee.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(ae.call(this,n,t),!t)return(0,u.eachItem)(n,e=>oe.call(this,e)),this;D.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>oe.call(this,e,r):e=>r.type.forEach(t=>oe.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=ce(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function ee(){let e=this.opts.schemas;if(e){if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}}function te(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function ne(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function w(){let e={...this.opts};for(let t of h)delete e[t];return e}var re={log(){},warn(){},error(){}};function T(e){if(e===!1)return re;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var ie=/^[a-z_$][a-z0-9_$:-]*$/i;function ae(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!ie.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function oe(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?E.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function E(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function D(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=ce(t)),e.validateSchema=this.compile(t,!0))}var se={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function ce(e){return{anyOf:[e,se]}}})),ef=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),tf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=zd(),n=jd(),r=Z(),i=wd(),a=Bd(),o=Q(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0){if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}}if(l.items!==!0){if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}}e.callRef=l,e.default=s})),nf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ef(),n=tf();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),rf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),af=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),of=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r=55296&&i<=56319&&r{Object.defineProperty(e,"__esModule",{value:!0});var t=Z(),n=Q(),r=of();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),cf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=jd(),n=Q(),r=Z();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),lf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),uf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=jd(),n=Z(),r=Q();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),df=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),ff=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Pd();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),pf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=kd(),n=Z(),r=Q(),i=ff();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),mf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z(),n=Q(),r=ff();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),hf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z(),n=Q(),r=ff();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),gf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=rf(),n=af(),r=sf(),i=cf(),a=lf(),o=uf(),s=df(),c=pf(),l=mf(),u=hf();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),_f=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=Z(),n=Q(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),vf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=Z(),n=Q(),r=jd(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),yf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=vf();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),bf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z(),n=Q(),r=jd(),i=_f();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),xf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z(),n=Q();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),Sf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=Z(),n=Q(),r=jd();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e}, - missingProperty: ${i}, - depsCount: ${n}, - deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),Cf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z(),n=Q();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),wf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=jd(),n=Z(),r=wd(),i=Q();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),Tf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ld(),n=jd(),r=Q(),i=wf();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),Ef=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=jd(),n=Z(),r=Q(),i=Q();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),Df=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Q();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),Of=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:jd().validateUnion,error:{message:`must match a schema in anyOf`}}})),kf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z(),n=Q();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Af=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Q();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),jf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z(),n=Q(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),Mf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Q();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),Nf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=_f(),n=yf(),r=vf(),i=bf(),a=xf(),o=Sf(),s=Cf(),c=wf(),l=Tf(),u=Ef(),d=Df(),f=Of(),p=kf(),m=Af(),h=jf(),g=Mf();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),Pf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),Ff=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[Pf().default]})),If=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Lf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=nf(),n=gf(),r=Nf(),i=Ff(),a=If();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Rf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),zf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Z(),n=Rf(),r=Bd(),i=zd(),a=Q();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;eHf,$schema:()=>Vf,default:()=>qf,definitions:()=>Wf,properties:()=>Kf,title:()=>Uf,type:()=>Gf}),Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf=l((()=>{Vf=`http://json-schema.org/draft-07/schema#`,Hf=`http://json-schema.org/draft-07/schema#`,Uf=`Core schema meta-schema`,Wf={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},Gf=[`object`,`boolean`],Kf={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},qf={$schema:Vf,$id:Hf,title:Uf,definitions:Wf,type:Gf,properties:Kf,default:!0}})),Yf=n(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=$d(),r=Lf(),i=zf(),a=(Jf(),d(Bf).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=Ld();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=Z();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=Rd();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=zd();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),Xf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c(!0),l),"date-time":t(f(!0),p),"iso-time":t(c(),u),"iso-date-time":t(f(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:ne,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:y,int32:{type:`number`,validate:S},int64:{type:`number`,validate:C},float:{type:`number`,validate:ee},double:{type:`number`,validate:ee},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e23||u>59||e&&!o)return!1;if(r<=23&&i<=59&&a<60)return!0;let d=i-u*c,f=r-l*c-+(d<0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function l(e,t){if(!(e&&t))return;let n=new Date(`2020-01-01T`+e).valueOf(),r=new Date(`2020-01-01T`+t).valueOf();if(n&&r)return n-r}function u(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3],t=r[1]+r[2]+r[3],e>t?1:e=b}function C(e){return Number.isInteger(e)}function ee(){return!0}var te=/[^\\]\\Z/;function ne(e){if(te.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),Zf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;var t=Yf(),n=Z(),r=n.operators,i={formatMaximum:{okStr:`<=`,ok:r.LTE,fail:r.GT},formatMinimum:{okStr:`>=`,ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:`<`,ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:`>`,ok:r.GT,fail:r.LTE}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,n.str)`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,n._)`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,(0,n._)`${t}[${d.schemaCode}]`);e.fail$data((0,n.or)((0,n._)`typeof ${i} != "object"`,(0,n._)`${i} instanceof RegExp`,(0,n._)`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?(0,n._)`${l.code.formats}${(0,n.getProperty)(t)}`:void 0});e.fail$data(m(a))}function m(e){return(0,n._)`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),Qf=n(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=Xf(),r=Zf(),i=Z(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&(0,r.default)(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=(0,i._)`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})),$f=e(Yf(),1),ep=e(Qf(),1);function tp(){let e=new $f.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,ep.default)(e),e}var np=class{constructor(e){this._ajv=e??tp()}getValidator(e){let t=`$id`in e&&typeof e.$id==`string`?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return e=>t(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}},rp=class{constructor(e){this._client=e}async*callToolStream(e,t=Xl,n){let r=this._client,i={...n,task:n?.task??(r.isToolTask(e.name)?{}:void 0)},a=r.requestStream({method:`tools/call`,params:e},t,i),o=r.getToolOutputValidator(e.name);for await(let t of a){if(t.type===`result`&&o){let n=t.result;if(!n.structuredContent&&!n.isError){yield{type:`error`,error:new X(Y.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(n.structuredContent)try{let e=o(n.structuredContent);if(!e.valid){yield{type:`error`,error:new X(Y.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)};return}}catch(e){if(e instanceof X){yield{type:`error`,error:e};return}yield{type:`error`,error:new X(Y.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)};return}}yield t}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,n){return this._client.getTaskResult({taskId:e},t,n)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,n){return this._client.requestStream(e,t,n)}};function ip(e,t,n){if(!e)throw Error(`${n} does not support task creation (required for ${t})`);if(t===`tools/call`&&!e.tools?.call)throw Error(`${n} does not support task creation for tools/call (required for ${t})`)}function ap(e,t,n){if(!e)throw Error(`${n} does not support task creation (required for ${t})`);switch(t){case`sampling/createMessage`:if(!e.sampling?.createMessage)throw Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case`elicitation/create`:if(!e.elicitation?.create)throw Error(`${n} does not support task creation for elicitation/create (required for ${t})`)}}function op(e,t){if(e&&typeof t==`object`&&t){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&op(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&op(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&op(n,t)}}function sp(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}var cp=class extends Wu{constructor(e,t){super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new np,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,$l,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,Wl,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,Sl,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||={tasks:new rp(this)},this._experimental}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=Ku(this._capabilities,e)}setRequestHandler(e,t){let n=zu(e)?.method;if(!n)throw Error(`Schema is missing a method literal`);let r=Bu(n);if(typeof r!=`string`)throw Error(`Schema method literal must be a string`);let i=r;return i===`elicitation/create`?super.setRequestHandler(e,async(e,n)=>{let r=Ru(Cu,e);if(!r.success){let e=r.error instanceof Error?r.error.message:String(r.error);throw new X(Y.InvalidParams,`Invalid elicitation request: ${e}`)}let{params:i}=r.data;i.mode=i.mode??`form`;let{supportsFormMode:a,supportsUrlMode:o}=sp(this._capabilities.elicitation);if(i.mode===`form`&&!a)throw new X(Y.InvalidParams,`Client does not support form-mode elicitation requests`);if(i.mode===`url`&&!o)throw new X(Y.InvalidParams,`Client does not support URL-mode elicitation requests`);let s=await Promise.resolve(t(e,n));if(i.task){let e=Ru(Xc,s);if(!e.success){let t=e.error instanceof Error?e.error.message:String(e.error);throw new X(Y.InvalidParams,`Invalid task creation result: ${t}`)}return e.data}let c=Ru(Eu,s);if(!c.success){let e=c.error instanceof Error?c.error.message:String(c.error);throw new X(Y.InvalidParams,`Invalid elicitation result: ${e}`)}let l=c.data,u=i.mode===`form`?i.requestedSchema:void 0;if(i.mode===`form`&&l.action===`accept`&&l.content&&u&&this._capabilities.elicitation?.form?.applyDefaults)try{op(u,l.content)}catch{}return l}):i===`sampling/createMessage`?super.setRequestHandler(e,async(e,n)=>{let r=Ru(pu,e);if(!r.success){let e=r.error instanceof Error?r.error.message:String(r.error);throw new X(Y.InvalidParams,`Invalid sampling request: ${e}`)}let{params:i}=r.data,a=await Promise.resolve(t(e,n));if(i.task){let e=Ru(Xc,a);if(!e.success){let t=e.error instanceof Error?e.error.message:String(e.error);throw new X(Y.InvalidParams,`Invalid task creation result: ${t}`)}return e.data}let o=Ru(i.tools||i.toolChoice?hu:mu,a);if(!o.success){let e=o.error instanceof Error?o.error.message:String(o.error);throw new X(Y.InvalidParams,`Invalid sampling result: ${e}`)}return o.data}):super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId===void 0)try{let n=await this.request({method:`initialize`,params:{protocolVersion:nc,capabilities:this._capabilities,clientInfo:this._clientInfo}},Rc,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);if(!rc.includes(n.protocolVersion))throw Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:`notifications/initialized`}),this._pendingListChangedConfig&&=(this._setupListChangedHandlers(this._pendingListChangedConfig),void 0)}catch(e){throw this.close(),e}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw Error(`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw Error(`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw Error(`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw Error(`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw Error(`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw Error(`Server does not support completions (required for ${e})`)}}assertNotificationCapability(e){if(e===`notifications/roots/list_changed`&&!this._capabilities.roots?.listChanged)throw Error(`Client does not support roots list changed notifications (required for ${e})`)}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw Error(`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw Error(`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw Error(`Client does not support roots capability (required for ${e})`);break;case`tasks/get`:case`tasks/list`:case`tasks/result`:case`tasks/cancel`:if(!this._capabilities.tasks)throw Error(`Client does not support tasks capability (required for ${e})`)}}assertTaskCapability(e){ip(this._serverCapabilities?.tasks?.requests,e,`Server`)}assertTaskHandlerCapability(e){this._capabilities&&ap(this._capabilities.tasks?.requests,e,`Client`)}async ping(e){return this.request({method:`ping`},Tc,e)}async complete(e,t){return this.request({method:`completion/complete`,params:e},ju,t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},Tc,t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},Ul,t)}async listPrompts(e,t){return this.request({method:`prompts/list`,params:e},Ml,t)}async listResources(e,t){return this.request({method:`resources/list`,params:e},hl,t)}async listResourceTemplates(e,t){return this.request({method:`resources/templates/list`,params:e},_l,t)}async readResource(e,t){return this.request({method:`resources/read`,params:e},xl,t)}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},Tc,t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},Tc,t)}async callTool(e,t=Xl,n){if(this.isToolTaskRequired(e.name))throw new X(Y.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let r=await this.request({method:`tools/call`,params:e},t,n),i=this.getToolOutputValidator(e.name);if(i){if(!r.structuredContent&&!r.isError)throw new X(Y.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(r.structuredContent)try{let e=i(r.structuredContent);if(!e.valid)throw new X(Y.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){throw e instanceof X?e:new X(Y.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return r}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let t of e){if(t.outputSchema){let e=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,e)}let e=t.execution?.taskSupport;(e===`required`||e===`optional`)&&this._cachedKnownTaskTools.add(t.name),e===`required`&&this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){let n=await this.request({method:`tools/list`,params:e},Yl,t);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(e,t,n,r){let i=eu.safeParse(n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw Error(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{let e=await r();s(null,e)}catch(e){let t=e instanceof Error?e:Error(String(e));s(t,null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}},lp=e(n((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),1);function up(e){if(e)try{return lp.parse(e).type}catch{let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return t===``||e.slice(t.length).includes(`,`)?void 0:t}}function dp(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function fp(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...dp(t.headers),...dp(r.headers)}:t.headers}):e}var pp=globalThis.crypto;async function mp(e){return(await pp).getRandomValues(new Uint8Array(e))}async function hp(e){let t=``;for(;t.length128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await gp(e);return{code_verifier:t,code_challenge:await _p(t)}}var yp=Vo().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Qs.custom,message:`URL must be parseable`,fatal:!0}),Be}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),bp=V({resource:P().url(),authorization_servers:z(yp).optional(),jwks_uri:P().url().optional(),scopes_supported:z(P()).optional(),bearer_methods_supported:z(P()).optional(),resource_signing_alg_values_supported:z(P()).optional(),resource_name:P().optional(),resource_documentation:P().optional(),resource_policy_uri:P().url().optional(),resource_tos_uri:P().url().optional(),tls_client_certificate_bound_access_tokens:L().optional(),authorization_details_types_supported:z(P()).optional(),dpop_signing_alg_values_supported:z(P()).optional(),dpop_bound_access_tokens_required:L().optional()}),xp=V({issuer:P(),authorization_endpoint:yp,token_endpoint:yp,registration_endpoint:yp.optional(),scopes_supported:z(P()).optional(),response_types_supported:z(P()),response_modes_supported:z(P()).optional(),grant_types_supported:z(P()).optional(),token_endpoint_auth_methods_supported:z(P()).optional(),token_endpoint_auth_signing_alg_values_supported:z(P()).optional(),service_documentation:yp.optional(),revocation_endpoint:yp.optional(),revocation_endpoint_auth_methods_supported:z(P()).optional(),revocation_endpoint_auth_signing_alg_values_supported:z(P()).optional(),introspection_endpoint:P().optional(),introspection_endpoint_auth_methods_supported:z(P()).optional(),introspection_endpoint_auth_signing_alg_values_supported:z(P()).optional(),code_challenge_methods_supported:z(P()).optional(),client_id_metadata_document_supported:L().optional()}),Sp=B({...V({issuer:P(),authorization_endpoint:yp,token_endpoint:yp,userinfo_endpoint:yp.optional(),jwks_uri:yp,registration_endpoint:yp.optional(),scopes_supported:z(P()).optional(),response_types_supported:z(P()),response_modes_supported:z(P()).optional(),grant_types_supported:z(P()).optional(),acr_values_supported:z(P()).optional(),subject_types_supported:z(P()),id_token_signing_alg_values_supported:z(P()),id_token_encryption_alg_values_supported:z(P()).optional(),id_token_encryption_enc_values_supported:z(P()).optional(),userinfo_signing_alg_values_supported:z(P()).optional(),userinfo_encryption_alg_values_supported:z(P()).optional(),userinfo_encryption_enc_values_supported:z(P()).optional(),request_object_signing_alg_values_supported:z(P()).optional(),request_object_encryption_alg_values_supported:z(P()).optional(),request_object_encryption_enc_values_supported:z(P()).optional(),token_endpoint_auth_methods_supported:z(P()).optional(),token_endpoint_auth_signing_alg_values_supported:z(P()).optional(),display_values_supported:z(P()).optional(),claim_types_supported:z(P()).optional(),claims_supported:z(P()).optional(),service_documentation:P().optional(),claims_locales_supported:z(P()).optional(),ui_locales_supported:z(P()).optional(),claims_parameter_supported:L().optional(),request_parameter_supported:L().optional(),request_uri_parameter_supported:L().optional(),require_request_uri_registration:L().optional(),op_policy_uri:yp.optional(),op_tos_uri:yp.optional(),client_id_metadata_document_supported:L().optional()}).shape,...xp.pick({code_challenge_methods_supported:!0}).shape}),Cp=B({access_token:P(),id_token:P().optional(),token_type:P(),expires_in:tc().optional(),scope:P().optional(),refresh_token:P().optional()}).strip(),wp=B({error:P(),error_description:P().optional(),error_uri:P().optional()}),Tp=yp.optional().or(W(``).transform(()=>void 0)),Ep=B({redirect_uris:z(yp),token_endpoint_auth_method:P().optional(),grant_types:z(P()).optional(),response_types:z(P()).optional(),client_name:P().optional(),client_uri:yp.optional(),logo_uri:Tp,scope:P().optional(),contacts:z(P()).optional(),tos_uri:Tp,policy_uri:P().optional(),jwks_uri:yp.optional(),jwks:fs().optional(),software_id:P().optional(),software_version:P().optional(),software_statement:P().optional()}).strip(),Dp=B({client_id:P(),client_secret:P().optional(),client_id_issued_at:I().optional(),client_secret_expires_at:I().optional()}).strip(),Op=Ep.merge(Dp);B({error:P(),error_description:P().optional()}).strip(),B({token:P(),token_type_hint:P().optional()}).strip();function kp(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function Ap({requestedResource:e,configuredResource:t}){let n=typeof e==`string`?new URL(e):new URL(e.href),r=typeof t==`string`?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length=400&&e.status<500&&t!==`/`}async function gm(e,t,n,r){let i=new URL(e),a=r?.protocolVersion??`2025-11-25`,o;if(r?.metadataUrl)o=new URL(r.metadataUrl);else{let e=pm(t,i.pathname);o=new URL(e,r?.metadataServerUrl??i),o.search=i.search}let s=await mm(o,a,n);return!r?.metadataUrl&&hm(s,i.pathname)&&(s=await mm(new URL(`/.well-known/${t}`,i),a,n)),s}function _m(e){let t=typeof e==`string`?new URL(e):e,n=t.pathname!==`/`,r=[];if(!n)return r.push({url:new URL(`/.well-known/oauth-authorization-server`,t.origin),type:`oauth`}),r.push({url:new URL(`/.well-known/openid-configuration`,t.origin),type:`oidc`}),r;let i=t.pathname;return i.endsWith(`/`)&&(i=i.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,t.origin),type:`oauth`}),r.push({url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:`oidc`}),r.push({url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:`oidc`}),r}async function vm(e,{fetchFn:t=fetch,protocolVersion:n=nc}={}){let r={"MCP-Protocol-Version":n,Accept:`application/json`},i=_m(e);for(let{url:e,type:n}of i){let i=await fm(e,r,t);if(i){if(!i.ok){if(await i.body?.cancel(),i.status>=400&&i.status<500)continue;throw Error(`HTTP ${i.status} trying to load ${n===`oauth`?`OAuth`:`OpenID provider`} metadata from ${e}`)}return n===`oauth`?xp.parse(await i.json()):Sp.parse(await i.json())}}}async function ym(e,t){let n,r;try{n=await dm(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||=String(new URL(`/`,e));let i=await vm(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:i,resourceMetadata:n}}async function bm(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:i,state:a,resource:o}){let s;if(t){if(s=new URL(t.authorization_endpoint),!t.response_types_supported.includes(Zp))throw Error(`Incompatible auth server: does not support response type ${Zp}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(Qp))throw Error(`Incompatible auth server: does not support code challenge method ${Qp}`)}else s=new URL(`/authorize`,e);let c=await vp(),l=c.code_verifier,u=c.code_challenge;return s.searchParams.set(`response_type`,Zp),s.searchParams.set(`client_id`,n.client_id),s.searchParams.set(`code_challenge`,u),s.searchParams.set(`code_challenge_method`,Qp),s.searchParams.set(`redirect_uri`,String(r)),a&&s.searchParams.set(`state`,a),i&&s.searchParams.set(`scope`,i),i?.includes(`offline_access`)&&s.searchParams.append(`prompt`,`consent`),o&&s.searchParams.set(`resource`,o.href),{authorizationUrl:s,codeVerifier:l}}function xm(e,t,n){return new URLSearchParams({grant_type:`authorization_code`,code:e,code_verifier:t,redirect_uri:String(n)})}async function Sm(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:a,fetchFn:o}){let s=t?.token_endpoint?new URL(t.token_endpoint):new URL(`/token`,e),c=new Headers({"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`});a&&n.set(`resource`,a.href),i?await i(c,n,s,t):r&&em($p(r,t?.token_endpoint_auth_methods_supported??[]),r,c,n);let l=await(o??fetch)(s,{method:`POST`,headers:c,body:n});if(!l.ok)throw await im(l);return Cp.parse(await l.json())}async function Cm(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:a,fetchFn:o}){return{refresh_token:r,...await Sm(e,{metadata:t,tokenRequestParams:new URLSearchParams({grant_type:`refresh_token`,refresh_token:r}),clientInformation:n,addClientAuthentication:a,resource:i,fetchFn:o})}}async function wm(e,t,{metadata:n,resource:r,authorizationCode:i,fetchFn:a}={}){let o=e.clientMetadata.scope,s;if(e.prepareTokenRequest&&(s=await e.prepareTokenRequest(o)),!s){if(!i)throw Error(`Either provider.prepareTokenRequest() or authorizationCode is required`);if(!e.redirectUrl)throw Error(`redirectUrl is required for authorization_code flow`);s=xm(i,await e.codeVerifier(),e.redirectUrl)}let c=await e.clientInformation();return Sm(t,{metadata:n,tokenRequestParams:s,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:a})}async function Tm(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:i}){let a;if(t){if(!t.registration_endpoint)throw Error(`Incompatible auth server: does not support dynamic client registration`);a=new URL(t.registration_endpoint)}else a=new URL(`/register`,e);let o=await(i??fetch)(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...n,...r===void 0?{}:{scope:r}})});if(!o.ok)throw await im(o);return Op.parse(await o.json())}var Em=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},Dm=10,Om=13,km=32;function Am(e){}function jm(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:t=Am,onError:n=Am,onRetry:r=Am,onComment:i,maxBufferSize:a}=e,o=[],s=0,c=!0,l,u=``,d=0,f,p=!1;function m(e){if(p)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(c&&(c=!1,e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),o.length===0){let t=g(e);t!==``&&(o.push(t),s=t.length),h();return}if(e.indexOf(` -`)===-1&&e.indexOf(`\r`)===-1){o.push(e),s+=e.length,h();return}o.push(e);let t=o.join(``);o.length=0,s=0;let n=g(t);n!==``&&(o.push(n),s=n.length),h()}function h(){a!==void 0&&(s+u.length<=a||(p=!0,o.length=0,s=0,l=void 0,u=``,d=0,f=void 0,n(new Em(`Buffered data exceeded max buffer size of ${a} characters`,{type:`max-buffer-size-exceeded`}))))}function g(e){let n=0;if(e.indexOf(`\r`)===-1){let r=e.indexOf(` -`,n);for(;r!==-1;){if(n===r){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0,n=r+1,r=e.indexOf(` -`,n);continue}let i=e.charCodeAt(n);if(Mm(e,n,i)){let i=e.charCodeAt(n+5)===km?n+6:n+5,a=e.slice(i,r);if(d===0&&e.charCodeAt(r+1)===Dm){t({id:l,event:f,data:a}),l=void 0,u=``,f=void 0,n=r+2,r=e.indexOf(` -`,n);continue}u=d===0?a:`${u} -${a}`,d++}else Nm(e,n,i)?f=e.slice(e.charCodeAt(n+6)===km?n+7:n+6,r)||void 0:_(e,n,r);n=r+1,r=e.indexOf(` -`,n)}return e.slice(n)}for(;n20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}))}}function y(){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0}function b(e={}){if(e.consume&&o.length>0){let e=o.join(``);_(e,0,e.length)}c=!0,l=void 0,u=``,d=0,f=void 0,o.length=0,s=0,p=!1}return{feed:m,reset:b}}function Mm(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function Nm(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}var Pm=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n,maxBufferSize:r}={}){let i;super({start(a){i=jm({onEvent:e=>{a.enqueue(e)},onError(t){typeof e==`function`&&e(t),(e===`terminate`||t.type===`max-buffer-size-exceeded`)&&a.error(t)},onRetry:t,onComment:n,maxBufferSize:r})},transform(e){i.feed(e)}})}},Fm={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},Im=class extends Error{constructor(e,t){super(`Streamable HTTP error: ${t}`),this.code=e}},Lm=class{constructor(e,t){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=fp(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._reconnectionOptions=t?.reconnectionOptions??Fm}async _authThenStart(){if(!this._authProvider)throw new Yp(`No auth provider`);let e;try{e=await am(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(e){throw this.onerror?.(e),e}if(e!==`AUTHORIZED`)throw new Yp;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){let e={};if(this._authProvider){let t=await this._authProvider.tokens();t&&(e.Authorization=`Bearer ${t.access_token}`)}this._sessionId&&(e[`mcp-session-id`]=this._sessionId),this._protocolVersion&&(e[`mcp-protocol-version`]=this._protocolVersion);let t=dp(this._requestInit?.headers);return new Headers({...e,...t})}async _startOrAuthSse(e){let{resumptionToken:t}=e;try{let n=await this._commonHeaders();n.set(`Accept`,`text/event-stream`),t&&n.set(`last-event-id`,t);let r=await(this._fetch??fetch)(this._url,{method:`GET`,headers:n,signal:this._abortController?.signal});if(!r.ok){if(await r.body?.cancel(),r.status===401&&this._authProvider)return await this._authThenStart();if(r.status===405)return;throw new Im(r.status,`Failed to open SSE stream: ${r.statusText}`)}this._handleSseStream(r.body,e,!0)}catch(e){throw this.onerror?.(e),e}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let t=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*n**+e,r)}_scheduleReconnection(e,t=0){let n=this._reconnectionOptions.maxRetries;if(t>=n){this.onerror?.(Error(`Maximum reconnection attempts (${n}) exceeded.`));return}let r=this._getNextReconnectionDelay(t);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(n=>{this.onerror?.(Error(`Failed to reconnect SSE stream: ${n instanceof Error?n.message:String(n)}`)),this._scheduleReconnection(e,t+1)})},r)}_handleSseStream(e,t,n){if(!e)return;let{onresumptiontoken:r,replayMessageId:i}=t,a,o=!1,s=!1;(async()=>{try{let t=e.pipeThrough(new TextDecoderStream).pipeThrough(new Pm({onRetry:e=>{this._serverRetryMs=e}})).getReader();for(;;){let{value:e,done:n}=await t.read();if(n)break;if(e.id&&(a=e.id,o=!0,r?.(e.id)),e.data&&(!e.event||e.event===`message`))try{let t=wc.parse(JSON.parse(e.data));xc(t)&&(s=!0,i!==void 0&&(t.id=i)),this.onmessage?.(t)}catch(e){this.onerror?.(e)}}(n||o)&&!s&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:a,onresumptiontoken:r,replayMessageId:i},0)}catch(e){if(this.onerror?.(Error(`SSE stream disconnected: ${e}`)),(n||o)&&!s&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:r,replayMessageId:i},0)}catch(e){this.onerror?.(Error(`Failed to reconnect: ${e instanceof Error?e.message:String(e)}`))}}})()}async start(){if(this._abortController)throw Error(`StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.`);this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new Yp(`No auth provider`);if(await am(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!==`AUTHORIZED`)throw new Yp(`Failed to authorize`)}async close(){this._reconnectionTimeout&&=(clearTimeout(this._reconnectionTimeout),void 0),this._abortController?.abort(),this.onclose?.()}async send(e,t){try{let{resumptionToken:n,onresumptiontoken:r}=t||{};if(n){this._startOrAuthSse({resumptionToken:n,replayMessageId:_c(e)?e.id:void 0}).catch(e=>this.onerror?.(e));return}let i=await this._commonHeaders();i.set(`content-type`,`application/json`),i.set(`accept`,`application/json, text/event-stream`);let a={...this._requestInit,method:`POST`,headers:i,body:JSON.stringify(e),signal:this._abortController?.signal},o=await(this._fetch??fetch)(this._url,a),s=o.headers.get(`mcp-session-id`);if(s&&(this._sessionId=s),!o.ok){let t=await o.text().catch(()=>null);if(o.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new Im(401,`Server returned 401 after successful authentication`);let{resourceMetadataUrl:t,scope:n}=lm(o);if(this._resourceMetadataUrl=t,this._scope=n,await am(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!==`AUTHORIZED`)throw new Yp;return this._hasCompletedAuthFlow=!0,this.send(e)}if(o.status===403&&this._authProvider){let{resourceMetadataUrl:t,scope:n,error:r}=lm(o);if(r===`insufficient_scope`){let r=o.headers.get(`WWW-Authenticate`);if(this._lastUpscopingHeader===r)throw new Im(403,`Server returned 403 after trying upscoping`);if(n&&(this._scope=n),t&&(this._resourceMetadataUrl=t),this._lastUpscopingHeader=r??void 0,await am(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!==`AUTHORIZED`)throw new Yp;return this.send(e)}}throw new Im(o.status,`Error POSTing to endpoint: ${t}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,o.status===202){await o.body?.cancel(),Bc(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(e=>this.onerror?.(e));return}let c=(Array.isArray(e)?e:[e]).filter(e=>`method`in e&&`id`in e&&e.id!==void 0).length>0,l=o.headers.get(`content-type`),u=up(l);if(c){if(u===`text/event-stream`)this._handleSseStream(o.body,{onresumptiontoken:r},!1);else if(u===`application/json`){let e=await o.json(),t=Array.isArray(e)?e.map(e=>wc.parse(e)):[wc.parse(e)];for(let e of t)this.onmessage?.(e)}else throw await o.body?.cancel(),new Im(-1,`Unexpected content type: ${l}`)}else await o.body?.cancel()}catch(e){throw this.onerror?.(e),e}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{let e=await this._commonHeaders(),t={...this._requestInit,method:`DELETE`,headers:e,signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._url,t);if(await n.body?.cancel(),!n.ok&&n.status!==405)throw new Im(n.status,`Failed to terminate session: ${n.statusText}`);this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}},Rm=e(o(),1),zm=c(),Bm=`text/html;profile=mcp-app`,Vm=`io.modelcontextprotocol/ui`,Hm=3,Um=5,Wm=2e3,Gm=class extends Error{},Km=null,qm=null;async function Jm(){let e=new Lm(new URL(`/api/mcp`,location.origin),{fetch:(e,t)=>p(e,t)}),t=new cp({name:`fanout-browser`,version:`0.2.0`},{capabilities:{extensions:{[Vm]:{mimeTypes:[Bm]}}}});try{await t.connect(e);let n={client:t,references:0,closed:!1,closeListeners:new Set};return t.onclose=()=>Xm(n,!1),t.onerror=()=>Xm(n,!0),n}catch(t){throw await e.close().catch(()=>void 0),t}}async function Ym(){for(let e=0;e{qm===e&&!t.closed&&(Km=t)}).catch(()=>{qm===e&&(qm=null)})}let e=qm;if(!e)continue;let t=await e;if(t.closed){qm===e&&(qm=null);continue}return t.closeTimer&&=(clearTimeout(t.closeTimer),void 0),t.references+=1,t}throw Error(`MCP connection closed during setup`)}function Xm(e,t){if(!e.closed){e.closed=!0,e.closeTimer&&clearTimeout(e.closeTimer),e.closeTimer=void 0,Km===e&&(Km=null),qm=null;for(let t of[...e.closeListeners])t();t&&e.client.close().catch(()=>void 0)}}function Zm(e){e.references=Math.max(0,e.references-1),!(e.closed||e.references||e.closeTimer)&&(e.closeTimer=setTimeout(()=>{e.closeTimer=void 0,!(e.references||Km!==e)&&(e.closed=!0,Km=null,qm=null,e.client.close().catch(()=>void 0))},0))}function Qm(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function $m(e,t){if(!Array.isArray(e))return[];let n=new Set(t);return e.filter(e=>{if(typeof e!=`string`||/[\s;'\"]/.test(e))return!1;let t=e.match(/^([a-z]+):\/\/([^/]+)$/i);return!!(t&&n.has(t[1].toLowerCase()))})}function eh(e){let t=Qm(Qm(Qm(e)?.ui)?.csp),n=$m(t?.connectDomains,[`http`,`https`,`ws`,`wss`]),r=$m(t?.resourceDomains,[`http`,`https`]),i=$m(t?.frameDomains,[`http`,`https`]),a=$m(t?.baseUriDomains,[`http`,`https`]),o=r.length?` ${r.join(` `)}`:``,s=[`default-src 'none'`,`script-src 'self' 'unsafe-inline'${o}`,`style-src 'self' 'unsafe-inline'${o}`,`img-src 'self' data:${o}`,`media-src 'self' data:${o}`,`font-src 'self' data:${o}`,`connect-src ${n.length?n.join(` `):`'none'`}`];return i.length&&s.push(`frame-src ${i.join(` `)}`),a.length&&s.push(`base-uri ${a.join(` `)}`),`${s.join(`; `)};`}function th(e,t){let n=``;return/]*)?>/i.test(e)?e.replace(/]*)?>/i,e=>`${e}${n}`):/]*)?>/i.test(e)?e.replace(/]*)?>/i,e=>`${e}${n}`):`${n}${e}`}function nh(e){return e.filter(e=>e.type===`text`).map(e=>String(e.text??``)).join(` -`)}function rh({content:e,onMessage:n}){let r=(0,Rm.useRef)(null),o=(0,Rm.useRef)(null),c=(0,Rm.useRef)(null),l=(0,Rm.useRef)(null),[d,f]=(0,Rm.useState)(``),[p,h]=(0,Rm.useState)(240),[g,_]=(0,Rm.useState)(``),[v,y]=(0,Rm.useState)(0),b=(0,Rm.useRef)(0),x=m(`light`),S=(0,Rm.useRef)(x);S.current=x,(0,Rm.useEffect)(()=>{l.current?.setHostContext({theme:x,displayMode:`inline`})},[x]),(0,Rm.useEffect)(()=>{b.current=0},[e.resourceUri]),(0,Rm.useEffect)(()=>{let t=!1,n;f(``),_(``);let r=()=>{let e=b.current+1;if(e>Um)return;b.current=e;let t=e===1?0:Math.min(750*2**(e-2),6e3);t===0?y(e=>e+1):n=setTimeout(()=>y(e=>e+1),t)},i=()=>r();async function a(){try{let n=await Ym();if(t){Zm(n);return}c.current=n,n.closeListeners.add(i),o.current=n.client;let r=(await n.client.readResource({uri:e.resourceUri})).contents[0];if(!r||!(`text`in r)||!r.text)throw new Gm(`MCP App resource has no HTML content`);if(r.uri!==e.resourceUri)throw new Gm(`MCP App resource URI does not match the requested URI`);if(r.mimeType!==Bm)throw new Gm(`MCP App resource has an unsupported MIME type`);t||(b.current=0,f(th(r.text,r._meta)))}catch(e){console.error(`MCP app resource load failed`,e),t||(_(`This view could not be loaded. Please try again.`),b.current>0&&!(e instanceof Gm)&&r())}}return a(),()=>{t=!0,n&&clearTimeout(n);let e=l.current?.teardownResource({}).catch(()=>void 0)??Promise.resolve(),r=c.current;r&&(r.closeListeners.delete(i),e.finally(()=>Zm(r))),l.current=null,o.current=null,c.current=null}},[e.resourceUri,v]);async function C(){let t=r.current,i=o.current;if(t?.contentWindow&&d&&i&&!l.current)try{let r=new bd(null,{name:`Fanout`,version:`0.2.0`},{openLinks:{},serverTools:{},logging:{}},{hostContext:{theme:S.current,displayMode:`inline`}});r.oncalltool=(e,t)=>i.request({method:`tools/call`,params:e},Xl,{signal:t.signal}),l.current=r,r.onsizechange=({height:e})=>{e&&h(Math.min(Wm,Math.max(240,Math.ceil(e)+32)))},r.onmessage=async({content:e})=>{let t=nh(e);return t?(await n(t),{}):{isError:!0}},r.oninitialized=async()=>{await r.sendToolInput({arguments:e.toolInput??{}}),await r.sendToolResult({content:[{type:`text`,text:JSON.stringify(e.toolResult??{})}],structuredContent:e.toolResult,isError:e.isError})},await r.connect(new vd(t.contentWindow,t.contentWindow))}catch(e){console.error(`MCP app bridge connect failed`,e),_(`This view could not be loaded. Please try again.`)}}return g?(0,zm.jsx)(a,{color:`bad`,m:`md`,children:g}):d?(0,zm.jsx)(u,{component:`iframe`,ref:r,title:`Fanout analysis view`,sandbox:`allow-scripts`,scrolling:`auto`,srcDoc:d,w:`100%`,bd:0,bg:`var(--mantine-color-body)`,style:{display:`block`,height:p,transition:`height 200ms ease`},onLoad:()=>void C()}):(0,zm.jsxs)(s,{mih:180,p:`xl`,children:[(0,zm.jsx)(t,{size:`sm`}),(0,zm.jsx)(i,{c:`dimmed`,size:`sm`,ml:`sm`,children:`Preparing view…`})]})}export{rh as default,eh as mcpAppCSP}; \ No newline at end of file diff --git a/internal/ui/dist/assets/preload-helper-C6Mr44w1.js b/internal/ui/dist/assets/preload-helper-C6Mr44w1.js deleted file mode 100644 index 4983639c..00000000 --- a/internal/ui/dist/assets/preload-helper-C6Mr44w1.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,St as n,X as r,_ as i,at as a,b as o,dt as s,gt as c,it as l,j as u,k as d,mt as f,st as p,v as m,x as h}from"./brand-MzZ03bSa.js";var g={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},_=f(),v={orientation:`horizontal`},y=r((e,{borderWidth:t})=>({group:{"--ai-border-width":s(t)}})),b=e(e=>{let t=u(`ActionIconGroup`,v,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:f,mod:p,attributes:m,...b}=t;return(0,_.jsx)(h,{...d({name:`ActionIconGroup`,props:t,classes:g,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:y,rootSelector:`group`})(`group`),variant:f,mod:[{"data-orientation":s},p],role:`group`,...b})});b.classes=g,b.varsResolver=y,b.displayName=`@mantine/core/ActionIconGroup`;var x=r((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:o,size:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{groupSection:{"--section-height":p(s,`section-height`),"--section-padding-x":p(s,`section-padding-x`),"--section-fz":l(s),"--section-radius":t===void 0?void 0:a(t),"--section-bg":n||i?c.background:void 0,"--section-color":c.color,"--section-bd":n||i?c.border:void 0}}}),S=e(e=>{let t=u(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:f,autoContrast:p,attributes:m,...v}=t;return(0,_.jsx)(h,{...d({name:`ActionIconGroupSection`,props:t,classes:g,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:x,rootSelector:`groupSection`})(`groupSection`),variant:c,...v})});S.classes=g,S.varsResolver=x,S.displayName=`@mantine/core/ActionIconGroupSection`;var C=r((e,{size:t,radius:n,variant:r,gradient:i,color:o,autoContrast:s})=>{let c=e.variantColorResolver({color:o||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:s});return{root:{"--ai-size":p(t,`ai-size`),"--ai-radius":n===void 0?void 0:a(n),"--ai-bg":o||r?c.background:void 0,"--ai-hover":o||r?c.hover:void 0,"--ai-hover-color":o||r?c.hoverColor:void 0,"--ai-color":c.color,"--ai-bd":o||r?c.border:void 0}}}),w=t(e=>{let t=u(`ActionIcon`,null,e),{className:n,unstyled:r,variant:a,classNames:s,styles:c,style:l,loading:f,loaderProps:p,size:v,color:y,radius:b,__staticSelector:x,gradient:S,vars:w,children:T,disabled:E,"data-disabled":D,autoContrast:O,mod:k,attributes:A,...j}=t,M=d({name:[`ActionIcon`,x],props:t,className:n,style:l,classes:g,classNames:s,styles:c,unstyled:r,attributes:A,vars:w,varsResolver:C});return(0,_.jsxs)(o,{...M(`root`,{active:!E&&!f&&!D}),"aria-busy":f||void 0,...j,unstyled:r,variant:a,size:v,disabled:E||f,mod:[{loading:f,disabled:E||D},k],children:[typeof f==`boolean`&&(0,_.jsx)(m,{mounted:f,transition:`slide-down`,duration:150,children:e=>(0,_.jsx)(h,{component:`span`,...M(`loader`,{style:e}),"aria-hidden":!0,children:(0,_.jsx)(i,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...p})})}),(0,_.jsx)(h,{component:`span`,mod:{loading:f},...M(`icon`),children:T})]})});w.classes=g,w.varsResolver=C,w.displayName=`@mantine/core/ActionIcon`,w.Group=b,w.GroupSection=S;var T=n(c(),1),E=(0,T.createContext)(null);function D(){let e=(0,T.useContext)(E);if(!e)throw Error(`Fanout app context is unavailable`);return e}var O=`Create a new dashboard for me. First ask what I want to monitor, then design it when you have enough context.`,k={get_observability_overview:{activity:`Checking system health…`,title:`System health`},get_service_topology:{activity:`Mapping service dependencies…`,title:`Service map`},get_service_performance:{activity:`Reading performance signals…`,title:`Performance`},inspect_trace:{activity:`Inspecting a trace…`,title:`Trace analysis`},search_logs:{activity:`Searching logs…`,title:`Logs`},get_intelligence_snapshot:{activity:`Reviewing detected anomalies…`,title:`Detected anomalies`}};function A(e){return k[e]?.activity??`Working on it…`}function j(e){return k[e]?.title??`System analysis`}var M=`modulepreload`,N=function(e){return`/`+e},P={},F=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=N(t,n),t=s(t),t in P)return;P[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:M,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{j as a,O as i,E as n,D as o,A as r,w as s,F as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/preload-helper-CT-UWP0u.js b/internal/ui/dist/assets/preload-helper-CT-UWP0u.js new file mode 100644 index 00000000..6c2bda92 --- /dev/null +++ b/internal/ui/dist/assets/preload-helper-CT-UWP0u.js @@ -0,0 +1 @@ +import{C as e,S as t,X as n,_ as r,at as i,b as a,dt as o,gt as s,it as c,j as l,k as u,mt as d,st as f,v as p,x as m,yt as h}from"./brand-CnsMBQCm.js";var g={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},_=d(),v={orientation:`horizontal`},y=n((e,{borderWidth:t})=>({group:{"--ai-border-width":o(t)}})),b=e(e=>{let t=l(`ActionIconGroup`,v,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:d,variant:f,mod:p,attributes:h,...b}=t,x=u({name:`ActionIconGroup`,props:t,classes:g,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:h,vars:c,varsResolver:y,rootSelector:`group`});return(0,_.jsx)(m,{...x(`group`),variant:f,mod:[{orientation:s},p],role:`group`,...b})});b.classes=g,b.varsResolver=y,b.displayName=`@mantine/core/ActionIconGroup`;var x=n((e,{radius:t,color:n,gradient:r,variant:a,autoContrast:o,size:s})=>{let l=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:a||`filled`,autoContrast:o});return{groupSection:{"--section-height":f(s,`section-height`),"--section-padding-x":f(s,`section-padding-x`),"--section-fz":c(s),"--section-radius":t===void 0?void 0:i(t),"--section-bg":n||a?l.background:void 0,"--section-color":l.color,"--section-bd":n||a?l.border:void 0}}}),S=e(e=>{let t=l(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:d,radius:f,autoContrast:p,attributes:h,...v}=t,y=u({name:`ActionIconGroupSection`,props:t,classes:g,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:x,rootSelector:`groupSection`});return(0,_.jsx)(m,{...y(`groupSection`),variant:c,...v})});S.classes=g,S.varsResolver=x,S.displayName=`@mantine/core/ActionIconGroupSection`;var C=n((e,{size:t,radius:n,variant:r,gradient:a,color:o,autoContrast:s})=>{let c=e.variantColorResolver({color:o||e.primaryColor,theme:e,gradient:a,variant:r||`filled`,autoContrast:s});return{root:{"--ai-size":f(t,`ai-size`),"--ai-radius":n===void 0?void 0:i(n),"--ai-bg":o||r?c.background:void 0,"--ai-hover":o||r?c.hover:void 0,"--ai-hover-color":o||r?c.hoverColor:void 0,"--ai-color":c.color,"--ai-bd":o||r?c.border:void 0}}}),w=t(e=>{let t=l(`ActionIcon`,null,e),{className:n,unstyled:i,variant:o,classNames:s,styles:c,style:d,loading:f,loaderProps:h,size:v,color:y,radius:b,__staticSelector:x,gradient:S,vars:w,children:T,disabled:E,"data-disabled":D,autoContrast:O,mod:k,attributes:A,...j}=t,M=u({name:[`ActionIcon`,x],props:t,className:n,style:d,classes:g,classNames:s,styles:c,unstyled:i,attributes:A,vars:w,varsResolver:C});return(0,_.jsxs)(a,{...M(`root`,{active:!E&&!f&&!D}),"aria-busy":f||void 0,...j,unstyled:i,variant:o,size:v,disabled:E||f,mod:[{loading:f,disabled:E||D},k],children:[typeof f==`boolean`&&(0,_.jsx)(p,{mounted:f,transition:`slide-down`,duration:150,children:e=>(0,_.jsx)(m,{component:`span`,...M(`loader`,{style:e}),"aria-hidden":!0,children:(0,_.jsx)(r,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...h})})}),(0,_.jsx)(m,{component:`span`,mod:{loading:f},...M(`icon`),children:T})]})});w.classes=g,w.varsResolver=C,w.displayName=`@mantine/core/ActionIcon`,w.Group=b,w.GroupSection=S;var T=h(s(),1),E=(0,T.createContext)(null);function D(){let e=(0,T.useContext)(E);if(!e)throw Error(`Fanout app context is unavailable`);return e}var O=`Create a new dashboard for me. First ask what I want to monitor, then design it when you have enough context.`,k={get_observability_overview:{activity:`Checking system health…`,title:`System health`},get_service_topology:{activity:`Mapping service dependencies…`,title:`Service map`},get_service_performance:{activity:`Reading performance signals…`,title:`Performance`},inspect_trace:{activity:`Inspecting a trace…`,title:`Trace analysis`},search_logs:{activity:`Searching logs…`,title:`Logs`},get_intelligence_snapshot:{activity:`Reviewing detected anomalies…`,title:`Detected anomalies`}};function A(e){return k[e]?.activity??`Working on it…`}function j(e){return k[e]?.title??`System analysis`}var M=`modulepreload`,N=function(e){return`/`+e},P={},F=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},i=function(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href},a=document.getElementsByTagName(`link`),o=document.querySelector(`meta[property=csp-nonce]`),s=o?.nonce||o?.getAttribute(`nonce`);r=e(t.map(e=>{if(e=N(e,n),e=i(e),e in P)return;P[e]=!0;let t=e.endsWith(`.css`);for(let n=a.length-1;n>=0;n--){let r=a[n];if(r.href===e&&(!t||r.rel===`stylesheet`))return}let r=document.createElement(`link`);if(r.rel=t?`stylesheet`:M,t||(r.as=`script`),r.crossOrigin=``,r.href=e,s&&r.setAttribute(`nonce`,s),document.head.appendChild(r),t)return new Promise((t,n)=>{r.addEventListener(`load`,t),r.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${e}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{j as a,O as i,E as n,D as o,A as r,w as s,F as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/routes-CVfQ2xl8.js b/internal/ui/dist/assets/routes-Cjen0w58.js similarity index 69% rename from internal/ui/dist/assets/routes-CVfQ2xl8.js rename to internal/ui/dist/assets/routes-Cjen0w58.js index 1c457d0c..17a3632b 100644 --- a/internal/ui/dist/assets/routes-CVfQ2xl8.js +++ b/internal/ui/dist/assets/routes-Cjen0w58.js @@ -1 +1 @@ -import{mt as e}from"./brand-MzZ03bSa.js";import{l as t,n}from"./auth-Co_9Gxq0.js";var r=e();function i(){let{agent_available:e}=n();if(!e)return(0,r.jsx)(t,{to:`/dashboards`,replace:!0});let i=localStorage.getItem(`fanout.thread-id`);return i?(localStorage.removeItem(`fanout.thread-id`),(0,r.jsx)(t,{to:`/chat/$threadId`,params:{threadId:i},replace:!0})):(0,r.jsx)(t,{to:`/chat`,replace:!0})}export{i as component}; \ No newline at end of file +import{mt as e}from"./brand-CnsMBQCm.js";import{l as t,n}from"./auth-DmDDao4N.js";var r=e();function i(){let{agent_available:e}=n();if(!e)return(0,r.jsx)(t,{to:`/dashboards`,replace:!0});let i=localStorage.getItem(`fanout.thread-id`);return i?(localStorage.removeItem(`fanout.thread-id`),(0,r.jsx)(t,{to:`/chat/$threadId`,params:{threadId:i},replace:!0})):(0,r.jsx)(t,{to:`/chat`,replace:!0})}export{i as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/settings-D3GW5SB3.js b/internal/ui/dist/assets/settings-Bzn5FZaN.js similarity index 62% rename from internal/ui/dist/assets/settings-D3GW5SB3.js rename to internal/ui/dist/assets/settings-Bzn5FZaN.js index a3ed93f2..c69b06e0 100644 --- a/internal/ui/dist/assets/settings-D3GW5SB3.js +++ b/internal/ui/dist/assets/settings-Bzn5FZaN.js @@ -1,4 +1,4 @@ -import{S as e,St as t,Y as n,_ as r,a as i,d as a,f as o,gt as s,h as c,i as l,j as u,mt as d,o as f,r as p,s as m,u as h,x as g,y as _}from"./brand-MzZ03bSa.js";import{i as v,o as y,r as b,s as x}from"./auth-Co_9Gxq0.js";import{t as S}from"./Tooltip-BJiO7C_G.js";import{O as C,i as w,k as T,n as E}from"./api-D6Wt-jwp.js";import{n as D,t as O}from"./WarningCircle.es-hJZtxy-A.js";import{r as k}from"./index-DPHpSRp0.js";var A=t(s(),1);function j(e={}){let t=e.timeout??2e3,[n,r]=(0,A.useState)(null),[i,a]=(0,A.useState)(!1),o=(0,A.useRef)(null);(0,A.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]);let s=e=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),t),a(e)};return{copy:e=>{`clipboard`in navigator?navigator.clipboard.writeText(e).then(()=>{r(null),s(!0)}).catch(e=>r(e)):r(Error(`useClipboard: navigator.clipboard is not supported`))},reset:()=>{a(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}var M={root:`m_849cf0da`},N=d(),P={underline:`hover`},F=e(e=>{let{underline:t,className:r,unstyled:i,mod:o,...s}=u(`Anchor`,P,e);return(0,N.jsx)(a,{component:`a`,className:n({[M.root]:!i},r),...s,mod:[{underline:t},o],__staticSelector:`Anchor`,unstyled:i})});F.classes=M,F.displayName=`@mantine/core/Anchor`;var I={timeout:1e3};function L(e){let{children:t,timeout:n,value:r,...i}=u(`CopyButton`,I,e),a=j({timeout:n});return(0,N.jsx)(N.Fragment,{children:t({copy:()=>a.copy(r),copied:a.copied,...i})})}L.displayName=`@mantine/core/CopyButton`;var R=new Map([[`bold`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),A.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),z=A.forwardRef((e,t)=>A.createElement(i,{ref:t,...e,weights:R}));z.displayName=`ArrowsClockwiseIcon`;var B=z,V=[`settings`,`ingest`];function H(e,t){let n=e.trim();return t||/^https:\/\//i.test(n)||/:443$/.test(n)}function U(e,t,n){if(/^https?:\/\//i.test(e.trim()))try{let t=new URL(e);e=`${t.protocol}//${t.hostname}:${t.port||(t.protocol===`https:`?`443`:`80`)}`}catch{}let r=H(e,n)?``:` +import{S as e,Y as t,_ as n,a as r,d as i,f as a,gt as o,h as s,i as c,j as l,mt as u,o as d,r as f,s as p,u as m,x as h,y as g,yt as _}from"./brand-CnsMBQCm.js";import{i as v,o as y,r as b,s as x}from"./auth-DmDDao4N.js";import{t as S}from"./Tooltip-DTTsbr27.js";import{O as C,i as w,k as T,n as E}from"./api-R4Y_TvpM.js";import{n as D,t as O}from"./WarningCircle.es-BNrNGQli.js";import{r as k}from"./index-e7JI4Tgx.js";var A=_(o(),1);function j(e={}){let t=e.timeout??2e3,[n,r]=(0,A.useState)(null),[i,a]=(0,A.useState)(!1),o=(0,A.useRef)(null);(0,A.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]);let s=e=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),t),a(e)};return{copy:e=>{`clipboard`in navigator?navigator.clipboard.writeText(e).then(()=>{r(null),s(!0)}).catch(e=>r(e)):r(Error(`useClipboard: navigator.clipboard is not supported`))},reset:()=>{a(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}var M={root:`m_849cf0da`},N=u(),P={underline:`hover`},F=e(e=>{let{underline:n,className:r,unstyled:a,mod:o,...s}=l(`Anchor`,P,e);return(0,N.jsx)(i,{component:`a`,className:t({[M.root]:!a},r),...s,mod:[{underline:n},o],__staticSelector:`Anchor`,unstyled:a})});F.classes=M,F.displayName=`@mantine/core/Anchor`;var I={timeout:1e3};function L(e){let{children:t,timeout:n,value:r,...i}=l(`CopyButton`,I,e),a=j({timeout:n});return(0,N.jsx)(N.Fragment,{children:t({copy:()=>a.copy(r),copied:a.copied,...i})})}L.displayName=`@mantine/core/CopyButton`;var R=new Map([[`bold`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),A.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),z=A.forwardRef((e,t)=>A.createElement(r,{ref:t,...e,weights:R}));z.displayName=`ArrowsClockwiseIcon`;var B=z,V=[`settings`,`ingest`];function H(e,t){let n=e.trim();return t||/^https:\/\//i.test(n)||/:443$/.test(n)}function U(e,t,n){if(/^https?:\/\//i.test(e.trim()))try{let t=new URL(e);e=`${t.protocol}//${t.hostname}:${t.port||(t.protocol===`https:`?`443`:`80`)}`}catch{}let r=H(e,n)?``:` tls: insecure: true`;return`exporters: otlp/fanout: @@ -13,4 +13,4 @@ service: logs: exporters: [otlp/fanout] metrics: - exporters: [otlp/fanout]`}function W({label:e,value:t,hint:n}){return(0,N.jsxs)(m,{gap:4,children:[(0,N.jsx)(a,{size:`sm`,fw:600,children:e}),(0,N.jsxs)(c,{gap:`xs`,wrap:`nowrap`,align:`center`,children:[(0,N.jsx)(x,{style:{flex:1,overflowX:`auto`},children:t}),(0,N.jsx)(L,{value:t,timeout:1500,children:({copied:t,copy:n})=>(0,N.jsx)(S,{label:t?`Copied`:`Copy ${e.toLowerCase()}`,withArrow:!0,children:(0,N.jsx)(h,{variant:`subtle`,color:`gray`,size:`compact-sm`,onClick:n,"aria-label":`Copy ${e.toLowerCase()}`,children:t?(0,N.jsx)(l,{size:15,weight:`bold`}):(0,N.jsx)(p,{size:15})})})})]}),n&&(0,N.jsx)(a,{c:`dimmed`,size:`xs`,children:n})]})}function G(){let e=b(),t=C(),n=w({queryKey:V,queryFn:()=>E(`/api/settings/ingest`)}),[r,i]=(0,A.useState)(!1),[s,u]=(0,A.useState)(null),[d,j]=(0,A.useState)(null),M=D({gcTime:0,onMutate:()=>t.cancelQueries({queryKey:V}),mutationFn:async()=>{let e=await v(`/api/settings/ingest/token/rotate`,{method:`POST`}).catch(()=>{throw Error(`Fanout could not be reached. A token may still have been issued — reload this page before trying again.`)});if(!e.ok)throw Error(`Fanout could not issue a new token. Try again.`);return e.json()},onSuccess:e=>{i(!1),u(e.ingest_token??null),t.setQueryData(V,{token_required:e.token_required,suggested_endpoint:e.suggested_endpoint,tls_configured:e.tls_configured,header_name:e.header_name})}});function P(){u(null),M.reset()}if(!n.data)return n.isLoading?(0,N.jsx)(K,{}):(0,N.jsx)(q,{onRetry:()=>void n.refetch()});let{suggested_endpoint:I,header_name:R,tls_configured:z,token_required:G}=n.data,J=d??I,Y=J.trim()||I,X=e.role===`admin`,Z=`${R}: Bearer `;return(0,N.jsxs)(g,{component:`main`,maw:760,mx:`auto`,px:{base:`md`,sm:`xl`},pt:{base:`lg`,sm:`xl`},pb:`xl`,children:[(0,N.jsxs)(m,{gap:`xl`,children:[(0,N.jsxs)(g,{children:[(0,N.jsx)(f,{order:1,fz:32,lts:`-0.03em`,children:`Connect telemetry`}),(0,N.jsx)(a,{c:`dimmed`,mt:2,children:`Point an OpenTelemetry collector or SDK at this workspace.`})]}),(0,N.jsx)(_,{withBorder:!0,radius:`lg`,p:`lg`,children:(0,N.jsxs)(m,{gap:`lg`,children:[(0,N.jsxs)(m,{gap:4,children:[(0,N.jsx)(a,{size:`sm`,fw:600,children:`Endpoint`}),(0,N.jsxs)(c,{gap:`xs`,wrap:`nowrap`,align:`center`,children:[(0,N.jsx)(y,{"aria-label":`Endpoint`,value:J,onChange:e=>j(e.currentTarget.value),style:{flex:1},styles:{input:{fontFamily:`var(--mantine-font-family-monospace)`}}}),(0,N.jsx)(L,{value:Y,timeout:1500,children:({copied:e,copy:t})=>(0,N.jsx)(S,{label:e?`Copied`:`Copy endpoint`,withArrow:!0,children:(0,N.jsx)(h,{variant:`subtle`,color:`gray`,size:`compact-sm`,onClick:t,"aria-label":`Copy endpoint`,children:e?(0,N.jsx)(l,{size:15,weight:`bold`}):(0,N.jsx)(p,{size:15})})})})]}),(0,N.jsxs)(a,{c:`dimmed`,size:`xs`,children:[H(Y,z)?`OTLP over gRPC, secured with TLS.`:`OTLP over gRPC. Fanout serves this endpoint in plaintext, so an exporter needs tls.insecure unless a proxy in front of it terminates TLS.`,` Edit this when collectors reach Fanout through another hostname.`]})]}),(0,N.jsx)(W,{label:`Authorization`,value:Z,hint:`Send the token your workspace issued. Fanout stores only its hash, so it cannot show you an existing one.`})]})}),(0,N.jsxs)(m,{gap:`sm`,children:[(0,N.jsxs)(g,{children:[(0,N.jsx)(f,{order:2,fz:22,lts:`-0.02em`,children:`Collector configuration`}),(0,N.jsx)(a,{c:`dimmed`,size:`sm`,mt:2,children:`Merge these blocks into your collector configuration, alongside the receivers it already has, and set INGEST_TOKEN in its environment.`})]}),(0,N.jsx)(_,{withBorder:!0,radius:`lg`,p:`md`,children:(0,N.jsxs)(m,{gap:`sm`,children:[(0,N.jsx)(x,{block:!0,style:{fontSize:12},children:U(Y,R,z)}),(0,N.jsx)(c,{justify:`flex-end`,children:(0,N.jsx)(L,{value:U(Y,R,z),timeout:1500,children:({copied:e,copy:t})=>(0,N.jsx)(h,{variant:`light`,size:`compact-sm`,leftSection:e?(0,N.jsx)(l,{size:15,weight:`bold`}):(0,N.jsx)(p,{size:15}),onClick:t,children:e?`Copied`:`Copy configuration`})})})]})})]}),(0,N.jsxs)(m,{gap:`sm`,children:[(0,N.jsxs)(g,{children:[(0,N.jsx)(f,{order:2,fz:22,lts:`-0.02em`,children:`Ingest token`}),(0,N.jsx)(a,{c:`dimmed`,size:`sm`,mt:2,children:G?`This workspace has a token. Rotating issues a new one and stops the current one working immediately.`:`This workspace has no token yet, so it is rejecting telemetry. Issue one to start accepting data.`})]}),(0,N.jsx)(_,{withBorder:!0,radius:`lg`,p:`lg`,children:s?(0,N.jsxs)(m,{gap:`sm`,children:[(0,N.jsx)(a,{size:`sm`,fw:600,children:`Your new token`}),(0,N.jsx)(x,{block:!0,children:`${R}: Bearer ${s}`}),(0,N.jsx)(a,{c:`dimmed`,size:`xs`,children:`Fanout shows this once and keeps only its hash. Store it with your collector secrets before closing this, then update any collector still using the old token. Lose it and the only way back is another rotation.`}),(0,N.jsxs)(c,{children:[(0,N.jsx)(L,{value:`${R}: Bearer ${s}`,timeout:1500,children:({copied:e,copy:t})=>(0,N.jsx)(h,{variant:`light`,size:`compact-sm`,leftSection:e?(0,N.jsx)(l,{size:15,weight:`bold`}):(0,N.jsx)(p,{size:15}),onClick:t,children:e?`Copied`:`Copy header`})}),(0,N.jsx)(h,{variant:`subtle`,color:`gray`,size:`compact-sm`,onClick:P,children:`Done`})]})]}):X?(0,N.jsxs)(c,{justify:`space-between`,align:`center`,children:[(0,N.jsx)(a,{size:`sm`,c:`dimmed`,children:G?`Rotate when a token may have been exposed.`:`No token issued yet.`}),(0,N.jsx)(h,{variant:G?`default`:`filled`,leftSection:(0,N.jsx)(B,{size:15,weight:`bold`}),onClick:()=>{M.reset(),i(!0)},children:G?`Rotate token`:`Issue token`})]}):(0,N.jsx)(a,{size:`sm`,c:`dimmed`,children:`An administrator issues and rotates the ingest token.`})})]}),(0,N.jsxs)(a,{c:`dimmed`,size:`xs`,children:[(0,N.jsx)(F,{href:k.ingest,target:`_blank`,rel:`noopener noreferrer`,inherit:!0,children:`Sending telemetry`}),` covers SDK setup, the collector, and the OTLP/HTTP endpoint.`]})]}),(0,N.jsx)(T,{opened:r,onClose:()=>!M.isPending&&i(!1),title:G?`Rotate the ingest token?`:`Issue an ingest token?`,centered:!0,radius:`md`,children:(0,N.jsxs)(m,{gap:`md`,children:[(0,N.jsx)(a,{size:`sm`,c:`dimmed`,children:G?`The current token stops working the moment the new one is issued. Any collector still sending with it will be rejected until you update it. Fanout shows the new token once and stores only its hash.`:`Fanout will show the new token once, and store only its hash.`}),M.isError&&(0,N.jsx)(o,{color:`bad`,radius:`md`,icon:(0,N.jsx)(O,{size:18,weight:`fill`}),children:M.error instanceof Error?M.error.message:`Fanout could not issue a new token.`}),(0,N.jsxs)(c,{justify:`flex-end`,gap:`sm`,children:[(0,N.jsx)(h,{variant:`default`,size:`sm`,onClick:()=>{M.reset(),i(!1)},disabled:M.isPending,children:`Cancel`}),(0,N.jsx)(h,{color:G?`bad`:void 0,size:`sm`,loading:M.isPending,onClick:()=>M.mutate(),children:G?`Rotate token`:`Issue token`})]})]})})]})}function K(){return(0,N.jsxs)(c,{justify:`center`,mih:`50vh`,gap:`sm`,children:[(0,N.jsx)(r,{size:`sm`}),(0,N.jsx)(a,{c:`dimmed`,size:`sm`,children:`Loading connection details…`})]})}function q({onRetry:e}){return(0,N.jsx)(c,{justify:`center`,mih:`50vh`,children:(0,N.jsx)(o,{color:`bad`,radius:`md`,icon:(0,N.jsx)(O,{size:18,weight:`fill`}),maw:420,children:(0,N.jsxs)(m,{gap:`sm`,align:`flex-start`,children:[(0,N.jsx)(a,{size:`sm`,children:`Fanout could not load this workspace's connection details.`}),(0,N.jsx)(h,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:e,children:`Try again`})]})})})}var J=G;export{J as component}; \ No newline at end of file + exporters: [otlp/fanout]`}function W({label:e,value:t,hint:n}){return(0,N.jsxs)(p,{gap:4,children:[(0,N.jsx)(i,{size:`sm`,fw:600,children:e}),(0,N.jsxs)(s,{gap:`xs`,wrap:`nowrap`,align:`center`,children:[(0,N.jsx)(x,{style:{flex:1,overflowX:`auto`},children:t}),(0,N.jsx)(L,{value:t,timeout:1500,children:({copied:t,copy:n})=>(0,N.jsx)(S,{label:t?`Copied`:`Copy ${e.toLowerCase()}`,withArrow:!0,children:(0,N.jsx)(m,{variant:`subtle`,color:`gray`,size:`compact-sm`,onClick:n,"aria-label":`Copy ${e.toLowerCase()}`,children:t?(0,N.jsx)(c,{size:15,weight:`bold`}):(0,N.jsx)(f,{size:15})})})})]}),n&&(0,N.jsx)(i,{c:`dimmed`,size:`xs`,children:n})]})}function G(){let e=b(),t=C(),n=w({queryKey:V,queryFn:()=>E(`/api/settings/ingest`)}),[r,o]=(0,A.useState)(!1),[l,u]=(0,A.useState)(null),[_,j]=(0,A.useState)(null),M=D({gcTime:0,onMutate:()=>t.cancelQueries({queryKey:V}),mutationFn:async()=>{let e=await v(`/api/settings/ingest/token/rotate`,{method:`POST`}).catch(()=>{throw Error(`Fanout could not be reached. A token may still have been issued — reload this page before trying again.`)});if(!e.ok)throw Error(`Fanout could not issue a new token. Try again.`);return e.json()},onSuccess:e=>{o(!1),u(e.ingest_token??null),t.setQueryData(V,{token_required:e.token_required,suggested_endpoint:e.suggested_endpoint,tls_configured:e.tls_configured,header_name:e.header_name})}});function P(){u(null),M.reset()}if(!n.data)return n.isLoading?(0,N.jsx)(K,{}):(0,N.jsx)(q,{onRetry:()=>void n.refetch()});let{suggested_endpoint:I,header_name:R,tls_configured:z,token_required:G}=n.data,J=_??I,Y=J.trim()||I,X=e.role===`admin`,Z=`${R}: Bearer `;return(0,N.jsxs)(h,{component:`main`,maw:760,mx:`auto`,px:{base:`md`,sm:`xl`},pt:{base:`lg`,sm:`xl`},pb:`xl`,children:[(0,N.jsxs)(p,{gap:`xl`,children:[(0,N.jsxs)(h,{children:[(0,N.jsx)(d,{order:1,fz:32,lts:`-0.03em`,children:`Connect telemetry`}),(0,N.jsx)(i,{c:`dimmed`,mt:2,children:`Point an OpenTelemetry collector or SDK at this workspace.`})]}),(0,N.jsx)(g,{withBorder:!0,radius:`lg`,p:`lg`,children:(0,N.jsxs)(p,{gap:`lg`,children:[(0,N.jsxs)(p,{gap:4,children:[(0,N.jsx)(i,{size:`sm`,fw:600,children:`Endpoint`}),(0,N.jsxs)(s,{gap:`xs`,wrap:`nowrap`,align:`center`,children:[(0,N.jsx)(y,{"aria-label":`Endpoint`,value:J,onChange:e=>j(e.currentTarget.value),style:{flex:1},styles:{input:{fontFamily:`var(--mantine-font-family-monospace)`}}}),(0,N.jsx)(L,{value:Y,timeout:1500,children:({copied:e,copy:t})=>(0,N.jsx)(S,{label:e?`Copied`:`Copy endpoint`,withArrow:!0,children:(0,N.jsx)(m,{variant:`subtle`,color:`gray`,size:`compact-sm`,onClick:t,"aria-label":`Copy endpoint`,children:e?(0,N.jsx)(c,{size:15,weight:`bold`}):(0,N.jsx)(f,{size:15})})})})]}),(0,N.jsxs)(i,{c:`dimmed`,size:`xs`,children:[H(Y,z)?`OTLP over gRPC, secured with TLS.`:`OTLP over gRPC. Fanout serves this endpoint in plaintext, so an exporter needs tls.insecure unless a proxy in front of it terminates TLS.`,` Edit this when collectors reach Fanout through another hostname.`]})]}),(0,N.jsx)(W,{label:`Authorization`,value:Z,hint:`Send the token your workspace issued. Fanout stores only its hash, so it cannot show you an existing one.`})]})}),(0,N.jsxs)(p,{gap:`sm`,children:[(0,N.jsxs)(h,{children:[(0,N.jsx)(d,{order:2,fz:22,lts:`-0.02em`,children:`Collector configuration`}),(0,N.jsx)(i,{c:`dimmed`,size:`sm`,mt:2,children:`Merge these blocks into your collector configuration, alongside the receivers it already has, and set INGEST_TOKEN in its environment.`})]}),(0,N.jsx)(g,{withBorder:!0,radius:`lg`,p:`md`,children:(0,N.jsxs)(p,{gap:`sm`,children:[(0,N.jsx)(x,{block:!0,style:{fontSize:12},children:U(Y,R,z)}),(0,N.jsx)(s,{justify:`flex-end`,children:(0,N.jsx)(L,{value:U(Y,R,z),timeout:1500,children:({copied:e,copy:t})=>(0,N.jsx)(m,{variant:`light`,size:`compact-sm`,leftSection:e?(0,N.jsx)(c,{size:15,weight:`bold`}):(0,N.jsx)(f,{size:15}),onClick:t,children:e?`Copied`:`Copy configuration`})})})]})})]}),(0,N.jsxs)(p,{gap:`sm`,children:[(0,N.jsxs)(h,{children:[(0,N.jsx)(d,{order:2,fz:22,lts:`-0.02em`,children:`Ingest token`}),(0,N.jsx)(i,{c:`dimmed`,size:`sm`,mt:2,children:G?`This workspace has a token. Rotating issues a new one and stops the current one working immediately.`:`This workspace has no token yet, so it is rejecting telemetry. Issue one to start accepting data.`})]}),(0,N.jsx)(g,{withBorder:!0,radius:`lg`,p:`lg`,children:l?(0,N.jsxs)(p,{gap:`sm`,children:[(0,N.jsx)(i,{size:`sm`,fw:600,children:`Your new token`}),(0,N.jsx)(x,{block:!0,children:`${R}: Bearer ${l}`}),(0,N.jsx)(i,{c:`dimmed`,size:`xs`,children:`Fanout shows this once and keeps only its hash. Store it with your collector secrets before closing this, then update any collector still using the old token. Lose it and the only way back is another rotation.`}),(0,N.jsxs)(s,{children:[(0,N.jsx)(L,{value:`${R}: Bearer ${l}`,timeout:1500,children:({copied:e,copy:t})=>(0,N.jsx)(m,{variant:`light`,size:`compact-sm`,leftSection:e?(0,N.jsx)(c,{size:15,weight:`bold`}):(0,N.jsx)(f,{size:15}),onClick:t,children:e?`Copied`:`Copy header`})}),(0,N.jsx)(m,{variant:`subtle`,color:`gray`,size:`compact-sm`,onClick:P,children:`Done`})]})]}):X?(0,N.jsxs)(s,{justify:`space-between`,align:`center`,children:[(0,N.jsx)(i,{size:`sm`,c:`dimmed`,children:G?`Rotate when a token may have been exposed.`:`No token issued yet.`}),(0,N.jsx)(m,{variant:G?`default`:`filled`,leftSection:(0,N.jsx)(B,{size:15,weight:`bold`}),onClick:()=>{M.reset(),o(!0)},children:G?`Rotate token`:`Issue token`})]}):(0,N.jsx)(i,{size:`sm`,c:`dimmed`,children:`An administrator issues and rotates the ingest token.`})})]}),(0,N.jsxs)(i,{c:`dimmed`,size:`xs`,children:[(0,N.jsx)(F,{href:k.ingest,target:`_blank`,rel:`noopener noreferrer`,inherit:!0,children:`Sending telemetry`}),` covers SDK setup, the collector, and the OTLP/HTTP endpoint.`]})]}),(0,N.jsx)(T,{opened:r,onClose:()=>!M.isPending&&o(!1),title:G?`Rotate the ingest token?`:`Issue an ingest token?`,centered:!0,radius:`md`,children:(0,N.jsxs)(p,{gap:`md`,children:[(0,N.jsx)(i,{size:`sm`,c:`dimmed`,children:G?`The current token stops working the moment the new one is issued. Any collector still sending with it will be rejected until you update it. Fanout shows the new token once and stores only its hash.`:`Fanout will show the new token once, and store only its hash.`}),M.isError&&(0,N.jsx)(a,{color:`bad`,radius:`md`,icon:(0,N.jsx)(O,{size:18,weight:`fill`}),children:M.error instanceof Error?M.error.message:`Fanout could not issue a new token.`}),(0,N.jsxs)(s,{justify:`flex-end`,gap:`sm`,children:[(0,N.jsx)(m,{variant:`default`,size:`sm`,onClick:()=>{M.reset(),o(!1)},disabled:M.isPending,children:`Cancel`}),(0,N.jsx)(m,{color:G?`bad`:void 0,size:`sm`,loading:M.isPending,onClick:()=>M.mutate(),children:G?`Rotate token`:`Issue token`})]})]})})]})}function K(){return(0,N.jsxs)(s,{justify:`center`,mih:`50vh`,gap:`sm`,children:[(0,N.jsx)(n,{size:`sm`}),(0,N.jsx)(i,{c:`dimmed`,size:`sm`,children:`Loading connection details…`})]})}function q({onRetry:e}){return(0,N.jsx)(s,{justify:`center`,mih:`50vh`,children:(0,N.jsx)(a,{color:`bad`,radius:`md`,icon:(0,N.jsx)(O,{size:18,weight:`fill`}),maw:420,children:(0,N.jsxs)(p,{gap:`sm`,align:`flex-start`,children:[(0,N.jsx)(i,{size:`sm`,children:`Fanout could not load this workspace's connection details.`}),(0,N.jsx)(m,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:e,children:`Try again`})]})})})}var J=G;export{J as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/tokens-BZZ0emRD.js b/internal/ui/dist/assets/tokens-BZZ0emRD.js new file mode 100644 index 00000000..9efe7229 --- /dev/null +++ b/internal/ui/dist/assets/tokens-BZZ0emRD.js @@ -0,0 +1 @@ +import{$ as e,A as t,C as n,G as r,J as i,K as a,N as o,S as s,X as c,Y as l,_t as u,a as d,at as f,b as p,dt as m,et as h,gt as g,j as _,k as v,m as y,mt as b,nt as x,ot as S,q as C,st as w,tt as T,v as E,x as D,yt as O,z as k}from"./brand-CnsMBQCm.js";import{c as A,d as ee,p as j,u as M}from"./auth-DmDDao4N.js";import{C as N,S as P,T as F,_ as I,a as L,b as R,c as z,d as te,f as B,g as ne,h as V,i as re,l as ie,m as ae,n as oe,p as se,r as ce,s as le,u as ue,v as de,w as fe,x as pe,y as me}from"./Tooltip-DTTsbr27.js";import{r as he}from"./use-computed-color-scheme-B3cychmA.js";import{B as ge,O as _e,U as ve,i as ye,n as be,z as xe}from"./api-R4Y_TvpM.js";function H(e){return e[e.length-1]}function Se(e,t){return typeof e==`function`?e(t):e}var Ce=Object.prototype.hasOwnProperty;function we(e){for(let t in e)if(Ce.call(e,t))return!0;return!1}var Te=()=>Object.create(null),Ee=(e,t)=>U(e,t,!0);function U(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(De(e)&&De(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&H(a)!==`${o-1}`||c&&H(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;ll&&(u=t[f],u=d===u?d:typeof d==`object`?U(d,u,n,r):u),p[f]=o`{}]/g;function Ae(e){return e.replace(ke,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function je(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return Ae(t)}var Me=[`http:`,`https:`,`mailto:`,`tel:`];function Ne(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var Pe=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Fe(e,t){if(!e)return!1;if(Pe.test(e))return!0;let n=Ne(e);return n?!t.has(n):!1}function Ie(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=je(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=je(r?e.slice(r):e)}return t}function Le(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Re(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function Ue(e){return He(Ve(e))}function We(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Ge(e,t,n=`never`,r){if(t.includes(`//`)&&(t=Be(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=Be(e)),o=e.split(`/`);o.length>1&&H(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(H(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?Be(s):s)||`/`;return a&&r&&r.set(a,c),c}function Ke(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function qe(e){return e==null||e===``}function Je(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function Ye(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&qe(f)){if(c===`/`&&!d)continue;f=``}o+=c+Je(s,f,r)+(d||``)}}return o+a||`/`}var Xe=`__root__`;function Ze(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Qe(e){return e instanceof Response&&!!e.options}var $e=`Error preloading route! ☝️`,et=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Xe:this.parentRoute||ze();let r=n?Xe:t?.path;r&&r!==`/`&&(r=Ve(r));let i=t?.id||r,a=n?Xe:Be((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:Be(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=He(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Ze({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},tt=class extends et{constructor(e){super(e)}},G=O(g(),1),K=b(),nt=()=>!0,rt=()=>!1;function it({children:e,fallback:t=null}){return(0,K.jsx)(G.Fragment,{children:at()?e:t})}function at(e=!0){return G.useSyncExternalStore(ot,nt,e?rt:nt)}function ot(){return()=>{}}var st=G.createContext(void 0),ct=G.createContext(void 0),lt=u((e=>{var t=g();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),ut=u(((e,t)=>{t.exports=lt()})),dt=u((e=>{var t=g(),n=ut();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),ft=u(((e,t)=>{t.exports=dt()}))();function pt(e,t){return e===t}function mt(e,t=e=>e,n){let r=n?.compare??pt,i=(0,G.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,G.useCallback)(()=>e.get(),[e]);return(0,ft.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var ht={};function gt(e,t){let n=G.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=U(n.current,i):i}}function q(e){let t=ee(),n=G.useContext(e.from?ct:st),r=e.from??n,i=t.stores.getMatchStore(r),a=gt(e,t),o=mt(i,e=>e?a(e):ht);if(o!==ht)return o;(e.shouldThrow??!0)&&ze()}function _t(e){return q({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function vt(e){let{select:t,...n}=e;return q({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function yt(e){return q({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function bt(e){return q({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function xt(e){return q({...e,select:t=>e.select?e.select(t.context):t.context})}function St(...e){let t=G.useRef(e),n=t.current;return e.forEach((e,t)=>{W(n[t],e,!1,!0)||(n[t]=e)}),t.current}function Ct(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn($e)})}var wt={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function Tt(e,t){let n=typeof e==`string`&&Ne(e);if(n)return t.has(n)?e:null}function Et(e,t,n,r,i){let a=We(e.pathname,r),o=We(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!W(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||i&&e.hash===t.hash}function Dt(e,t,n){let r=ee(),i=G.useRef(null),a=G.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,hashScrollIntoView:u,replace:d,startTransition:f,resetScroll:p,viewTransition:m,ignoreBlocker:h,disabled:g,target:_,onClick:v,onBlur:y,onFocus:b,onMouseEnter:x,onMouseLeave:S,onTouchStart:C}=e,w=at(!!o?.includeHash),[T,E,D]=St(e.search,e.params,o),[O,k]=G.useMemo(()=>[e,{...e}],[r,e.from,e._fromLocation,e.hash,e.to,T,E,e.state,e.mask,e.unsafeRelative]),A=G.useMemo(()=>{let e=Tt(s,r.protocolAllowlist);if(e!==void 0){let t=[e??void 0];return()=>t}let t,n;return e=>{O._fromLocation||(k._fromLocation=e);let i=r.buildLocation(k),a=It(i,r,g);return(!t||t[0]!==a)&&(t=[a,!(g||a&&!Ne(a))&&void 0],n=[a,!0]),t[1]!==void 0&&Et(e,i,D,r.basepath,w)?n:t}},[D,g,w,O,k,r,s]),[j,M]=mt(r.stores.location,A,wt),N=M===void 0&&j,P=g||j===void 0,F=G.useRef(!1),I=e.reloadDocument||N||P?!1:c??r.options.defaultPreload,L=l??r.options.defaultPreloadDelay??0,R=G.useCallback(e=>{let t=e?.isIntersecting;if(!(t??I===`intent`)){t===!1&&Pt(i);return}if(!L){Ct(r,O);return}Nt.has(i)||Nt.set(i,setTimeout(()=>{Nt.delete(i),Ct(r,O)},L))},[r,O,i,I,L]);G.useEffect(()=>{if(!I)return;I===`render`&&!F.current&&(F.current=!0,Ct(r,O));let e=!0,t;return I===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&R(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),Pt(i)}},[r,O,I,R,i]);let z=jt(e,n);if(z.ref=t?a:i,N)return z.href=N,z;let te=e=>{let t=_??e.currentTarget.getAttribute(`target`);!P&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!t||t===`_self`)&&e.button===0&&(e.preventDefault(),r.navigate({...O,replace:d,resetScroll:p,hashScrollIntoView:u,startTransition:f,viewTransition:m,ignoreBlocker:h}))},B=()=>{I===`intent`&&Ct(r,O)},ne=()=>{I===`intent`&&Pt(i)};return z.onClick=Ft(v,te),z.onBlur=Ft(y,ne),z.onFocus=Ft(b,R),z.onMouseEnter=Ft(x,R),z.onMouseLeave=Ft(S,ne),z.onTouchStart=Ft(C,B),Mt(z,e,M,j,P,n)}var Ot={},kt={className:`active`},At=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`_fromLocation`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function jt(e,t){let n={};for(let r in e)At.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function Mt(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=Se(n?o:s,{})??(n?kt:Ot);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var Nt=new WeakMap,Pt=e=>{clearTimeout(Nt.get(e)),Nt.delete(e)},Ft=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function It(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!Fe(i,t.protocolAllowlist))return i}var Lt=G.memo(G.forwardRef((e,t)=>{let n=e._asChild||`a`,r=Dt(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return G.createElement(n,r,i)}),Rt);function Rt(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!At.has(r)||!W(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var zt=class extends et{constructor(e){super(e),this.useMatch=e=>q({...e,from:this.id}),this.useRouteContext=e=>xt({...e,from:this.id}),this.useSearch=e=>bt({...e,from:this.id}),this.useParams=e=>yt({...e,from:this.id}),this.useLoaderDeps=e=>vt({...e,from:this.id}),this.useLoaderData=e=>_t({...e,from:this.id}),this.useNavigate=()=>M({from:this.fullPath}),this.Link=G.forwardRef((e,t)=>(0,K.jsx)(Lt,{ref:t,from:this.fullPath,...e}))}};function Bt(e){return new zt(e)}var Vt=class extends tt{constructor(e){super(e),this.useMatch=e=>q({...e,from:this.id}),this.useRouteContext=e=>xt({...e,from:this.id}),this.useSearch=e=>bt({...e,from:this.id}),this.useParams=e=>yt({...e,from:this.id}),this.useLoaderDeps=e=>vt({...e,from:this.id}),this.useLoaderData=e=>_t({...e,from:this.id}),this.useNavigate=()=>M({from:this.fullPath}),this.Link=G.forwardRef((e,t)=>(0,K.jsx)(Lt,{ref:t,from:this.fullPath,...e}))}};function Ht(e){return new Vt(e)}function Ut(e){return e=>{let t=Bt(e);return t.isRoot=!1,t}}function Wt(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(Oe(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(j)j(a());else throw a()}return G.createElement(r,e)};return o.preload=a,o}function Gt(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function Kt(e){let t=Gt(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function qt(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function Jt(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function Yt(e,t,n){for(let n=e+1;n{n?.(s);let c=Array.from(qt(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>Xt(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=Yt(l,c,r),d=Jt(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[Yt(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[Jt(c.length,c,!1)]?.focus()}}}function Qt(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||he:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function J(e,t){return n=>{e?.(n),t?.(n)}}function $t(e,t){return e in t?Kt(t[e]):Kt(e)}function en(e,t){let n=e.map(e=>({value:e,px:$t(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function tn(e,t,n){return n?Array.from(qt(n,t)?.querySelectorAll(e)||[]).findIndex(e=>e===n):null}var nn=[`mousedown`,`touchstart`];function rn(e,t,n,r=!0,i=!1){let a=(0,G.useRef)(null),o=t||nn,s=(0,G.useEffectEvent)(t=>{let{target:r}=t??{};if(!document.body.contains(r)&&r?.tagName!==`HTML`)return;let i=t.composedPath();Array.isArray(n)?n.every(e=>!!e&&!i.includes(e))&&e(t):a.current&&!i.includes(a.current)&&e(t)}),c=o.join(`,`);return(0,G.useEffect)(()=>{if(!r)return;let e=c.split(`,`);return e.forEach(e=>document.addEventListener(e,s,i)),()=>{e.forEach(e=>document.removeEventListener(e,s,i))}},[c,r,i]),a}var an=[`mouse`,`touch`],on=10;function sn(e,t={}){let{threshold:n=400,events:r=an,cancelOnMove:i=!1,onStart:a,onFinish:o,onCancel:s}=t,c=(0,G.useRef)(!1),l=(0,G.useRef)(!1),u=(0,G.useRef)(-1),d=(0,G.useRef)(null);(0,G.useEffect)(()=>()=>window.clearTimeout(u.current),[]);let f=r.join(`,`);return(0,G.useMemo)(()=>{if(typeof e!=`function`)return{};let t=i!==!1,f=i===!0?on:i===!1?0:i,p=t=>{(un(t)||ln(t))&&(a&&a(t),d.current=cn(t),l.current=!0,u.current=window.setTimeout(()=>{e(t),c.current=!0},n))},m=e=>{(un(e)||ln(e))&&(c.current?o&&o(e):l.current&&s&&s(e),c.current=!1,l.current=!1,d.current=null,u.current!==-1&&(window.clearTimeout(u.current),u.current=-1))},h=e=>{if(!t||!l.current||c.current)return;let n=cn(e);if(!n||!d.current)return;let r=n.x-d.current.x,i=n.y-d.current.y;Math.sqrt(r*r+i*i)>f&&m(e)},g={};return r.includes(`mouse`)&&(g.onMouseDown=p,g.onMouseUp=m,g.onMouseLeave=m,t&&(g.onMouseMove=h)),r.includes(`touch`)&&(g.onTouchStart=p,g.onTouchEnd=m,g.onTouchCancel=m,t&&(g.onTouchMove=h)),g},[e,n,s,o,a,i,f])}function cn(e){if(ln(e)){let t=e.touches[0]??e.changedTouches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function ln(e){return window.TouchEvent?e.nativeEvent instanceof TouchEvent:`touches`in e.nativeEvent}function un(e){return e.nativeEvent instanceof MouseEvent}function dn({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&C({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function fn(e,t,n){return dn({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function pn(e,t){let n=e.colors[e.primaryColor];return r(n)?e.autoContrast?fn(n,e,t):`var(--mantine-color-white)`:dn({color:n[i(e,t)],theme:e,autoContrast:null})}function mn({open:e,close:t,openDelay:n,closeDelay:r}){let i=(0,G.useRef)(-1),a=(0,G.useRef)(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(a.current)};return(0,G.useEffect)(()=>o,[]),{openDropdown:()=>{o(),n===0||n===void 0?e():i.current=window.setTimeout(e,n)},closeDropdown:()=>{o(),r===0||r===void 0?t():a.current=window.setTimeout(t,r)}}}var[hn,gn]=fe(`Popover component was not found in the tree`);function _n({childProps:e,disabled:t,opened:n,longPressDelay:r=500,setReference:i,open:a}){let o=(0,G.useRef)(!1),s=(0,G.useRef)(!1),c=(0,G.useRef)(null),l=(0,G.useRef)(t);l.current=t;let u=(e,t,n)=>{i({getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t,toJSON:()=>void 0}),contextElement:n}),a()},d=J(e.onMouseDown,e=>{t||e.button===2&&e.stopPropagation()}),f=J(e.onContextMenu,e=>{t||e.defaultPrevented||(e.preventDefault(),!s.current&&(u(e.clientX,e.clientY,e.currentTarget),o.current&&(s.current=!0)))}),p=sn(e=>{if(l.current||s.current)return;let t=e,n=t.touches[0]??t.changedTouches[0];n&&(u(n.clientX,n.clientY,c.current),s.current=!0)},{threshold:r,events:[`touch`],cancelOnMove:!0,onStart:e=>{o.current=!0,s.current=!1,c.current=e.currentTarget},onFinish:e=>{o.current=!1,s.current=!1,l.current||e.preventDefault()},onCancel:()=>{o.current=!1,s.current=!1}});return{onContextMenu:f,onMouseDown:d,onTouchStart:J(e.onTouchStart,p.onTouchStart),onTouchEnd:J(e.onTouchEnd,p.onTouchEnd),onTouchCancel:J(e.onTouchCancel,p.onTouchCancel),onTouchMove:J(e.onTouchMove,p.onTouchMove),style:t?e.style:{...e.style,WebkitTouchCallout:`none`,WebkitUserSelect:`none`,userSelect:`none`},"data-expanded":n?!0:void 0}}function vn(e){let{children:t,disabled:n,longPressDelay:r}=_(`PopoverContextMenu`,null,e),i=pe(t);if(!i)throw Error(`Popover.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=gn(),o=_n({childProps:i.props,disabled:n||a.disabled,opened:a.opened,longPressDelay:r,setReference:a.reference,open:()=>{a.opened||a.onToggle()}});return(0,G.cloneElement)(i,o)}vn.displayName=`@mantine/core/PopoverContextMenu`;var yn={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`},bn=n(t=>{let n=_(`PopoverDropdown`,null,t),{className:r,style:i,vars:a,children:o,onKeyDownCapture:s,variant:c,classNames:l,styles:u,ref:d,...f}=n,p=gn(),{dir:h}=R(),g=p.arrowPosition===`merge`&&p.withArrow?L({position:p.placement,dir:h}):void 0,v=ve({opened:p.opened,shouldReturnFocus:p.returnFocus}),y=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:`dialog`,tabIndex:-1}:{},b=e(d,p.floating);return p.disabled?null:(0,K.jsx)(oe,{...p.portalProps,withinPortal:p.withinPortal,children:(0,K.jsx)(E,{mounted:p.opened,...p.transitionProps,transition:p.transitionProps?.transition||`fade`,duration:p.transitionProps?.duration??150,keepMounted:p.keepMounted,keepMountedMode:p.keepMountedMode,exitDuration:typeof p.transitionProps?.exitDuration==`number`?p.transitionProps.exitDuration:p.transitionProps?.duration,children:e=>(0,K.jsx)(xe,{active:p.trapFocus&&p.opened,innerRef:b,children:(0,K.jsxs)(D,{...y,...f,variant:c,onKeyDownCapture:Qt(()=>{p.onClose?.(),p.onDismiss?.()},{active:p.closeOnEscape,onTrigger:v,onKeyDown:s}),"data-position":p.placement,"data-fixed":p.floatingStrategy===`fixed`||void 0,...p.getStyles(`dropdown`,{className:r,props:n,classNames:l,styles:u,style:[{...e,...g,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width===`target`?void 0:m(p.width),...p.referenceHidden?{display:`none`}:null},p.resolvedStyles?.dropdown,u?.dropdown,i]}),children:[o,(0,K.jsx)(re,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles(`arrow`,{props:n,classNames:l,styles:u})})]})})})})});bn.classes=yn,bn.displayName=`@mantine/core/PopoverDropdown`;var xn={refProp:`ref`,popupType:`dialog`},Sn=n(t=>{let{children:n,refProp:r,popupType:i,ref:a,...o}=_(`PopoverTarget`,xn,t),s=pe(n);if(!s)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let c=o,u=gn(),d=e(u.reference,P(s),a),f=u.withRoles?{"aria-haspopup":i,"aria-expanded":u.opened,"aria-controls":u.opened?u.getDropdownId():void 0,id:u.getTargetId()}:{},p=s.props;return(0,G.cloneElement)(s,{...c,...f,...u.targetProps,className:l(u.targetProps.className,c.className,p.className),[r]:d,...u.controlled?null:{onClick:e=>{u.onToggle(),p.onClick?.(e)}}})});Sn.displayName=`@mantine/core/PopoverTarget`;function Cn(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function wn(e,t,n,r){let i=Cn(e.middlewares),a=[ne(e.offset),se()];if(i.flip&&!n){let e=typeof i.flip==`boolean`?{}:i.flip,t=r?{fallbackStrategy:`initialPlacement`,...e}:e;a.push(B(t))}if(i.shift){let t=typeof i.shift==`boolean`?{}:i.shift;a.push(I(n=>{let r=n.placement.startsWith(`top`)||n.placement.startsWith(`bottom`);return{limiter:V(),padding:5,...e.width===`target`&&r?{mainAxis:!1}:null,...t}}))}return i.inline&&a.push(typeof i.inline==`boolean`?ae():ae(i.inline)),a.push(te({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width===`target`)&&a.push(de({...typeof i.size==`boolean`?{}:i.size,apply({rects:n,availableWidth:r,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};i.size&&(typeof i.size==`object`&&i.size.apply?i.size.apply({rects:n,availableWidth:r,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${r}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),a}function Tn(e){let[t,n]=A({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=(0,G.useRef)(t),i=(0,G.useRef)(!1),[a,o]=(0,G.useState)(null),s=e.preventPositionChangeWhenVisible!==!1,c=(0,G.useRef)(t);t!==c.current&&(c.current=t,t&&a!==null&&o(null));let l=(0,G.useRef)(e.position);e.position!==l.current&&(l.current=e.position,i.current=!1,a!==null&&o(null));let u=(0,G.useCallback)(()=>o(null),[]),d=()=>{t&&!e.disabled&&n(!1)},f=()=>{e.disabled||n(!t)},p=z({open:t,strategy:e.strategy,placement:s?a??e.position:e.position,middleware:wn(e,()=>p,s&&a!==null,s),whileElementsMounted:e.keepMounted?void 0:me});(0,G.useEffect)(()=>{if(!e.keepMounted)return;let n=p.refs.reference.current,r=p.refs.floating.current;if(t&&n&&r)return me(n,r,p.update)},[e.keepMounted,t,p.update,p.elements.reference,p.elements.floating]),x(()=>{if(!t){i.current=!1;return}if(!s||a!==null)return;let e=p.refs.floating.current;if(e&&e.offsetHeight!==0&&e.offsetWidth!==0){if(!i.current){i.current=!0,p.update();return}p.isPositioned&&o(p.placement)}},[s,t,p.isPositioned,p.placement,a,p.update]);let m=(0,G.useRef)(p.placement);return x(()=>{m.current!==p.placement&&(m.current=p.placement,e.onPositionChange?.(p.placement))},[p.placement]),T(()=>{t!==r.current&&(t?e.onOpen?.():e.onClose?.()),r.current=t},[t,e.onClose,e.onOpen]),{floating:p,controlled:typeof e.opened==`boolean`,opened:t,onClose:d,onToggle:f,resetLockedPlacement:u}}var En={position:`bottom`,offset:8,transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,preventPositionChangeWhenVisible:!0,clickOutsideEvents:[`mousedown`,`touchstart`],zIndex:N(`popover`),__staticSelector:`Popover`,width:`max-content`},Dn=c((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:f(t),"--popover-shadow":S(n)}}));function Y(e){let n=_(`Popover`,En,e),{children:r,position:i,offset:a,onPositionChange:o,opened:s,transitionProps:c,onExitTransitionEnd:l,onEnterTransitionEnd:u,width:d,middlewares:f,withArrow:p,arrowSize:m,arrowOffset:g,arrowRadius:y,arrowPosition:b,unstyled:x,classNames:S,styles:C,closeOnClickOutside:w,withinPortal:T,portalProps:D,closeOnEscape:O,clickOutsideEvents:A,trapFocus:ee,onClose:j,onDismiss:M,onOpen:N,onChange:P,zIndex:F,radius:I,shadow:L,id:z,defaultOpened:te,__staticSelector:B,withRoles:ne,disabled:V,returnFocus:re,variant:ie,keepMounted:ae,keepMountedMode:se,vars:le,floatingStrategy:ue,withOverlay:de,overlayProps:fe,hideDetached:pe,attributes:me,preventPositionChangeWhenVisible:he,..._e}=n,ve=v({name:B,props:n,classes:yn,classNames:S,styles:C,unstyled:x,attributes:me,rootSelector:`dropdown`,vars:le,varsResolver:Dn}),{resolvedStyles:ye}=t({classNames:S,styles:C,props:n}),be=(0,G.useRef)(null),[xe,H]=(0,G.useState)(null),[Se,Ce]=(0,G.useState)(null),{dir:we}=R(),Te=k(),Ee=h(z),U=Tn({middlewares:f,width:d,position:ce(we,i),offset:typeof a==`number`?a+(p?m/2:0):a,arrowRef:be,arrowOffset:g,onPositionChange:o,opened:s,defaultOpened:te,onChange:P,onOpen:N,onClose:j,onDismiss:M,strategy:ue,disabled:V,preventPositionChangeWhenVisible:he,keepMounted:ae});rn(()=>{w&&(U.onClose(),M?.())},A,[xe,Se]);let De=(0,G.useCallback)(e=>{H(e),U.floating.refs.setReference(e)},[U.floating.refs.setReference]),W=(0,G.useCallback)(e=>{Ce(e),U.floating.refs.setFloating(e)},[U.floating.refs.setFloating]),Oe=(0,G.useCallback)(()=>{c?.onExited?.(),l?.(),U.resetLockedPlacement()},[c?.onExited,l,U.resetLockedPlacement]),ke=(0,G.useCallback)(()=>{c?.onEntered?.(),u?.()},[c?.onEntered,u]);return(0,K.jsxs)(hn,{value:{returnFocus:re,disabled:V,controlled:U.controlled,reference:De,floating:W,x:U.floating.x,y:U.floating.y,arrowX:U.floating?.middlewareData?.arrow?.x,arrowY:U.floating?.middlewareData?.arrow?.y,opened:U.opened,arrowRef:be,transitionProps:{...c,onExited:Oe,onEntered:ke},width:d,withArrow:p,arrowSize:m,arrowOffset:g,arrowRadius:y,arrowPosition:b,placement:U.floating.placement,trapFocus:ee,withinPortal:T,portalProps:D,zIndex:F,radius:I,shadow:L,closeOnEscape:O,onDismiss:M,onClose:U.onClose,onToggle:U.onToggle,getTargetId:()=>Ee,getDropdownId:()=>`${Ee}-dropdown`,withRoles:ne,targetProps:_e,__staticSelector:B,classNames:S,styles:C,unstyled:x,variant:ie,keepMounted:ae,keepMountedMode:se,getStyles:ve,resolvedStyles:ye,floatingStrategy:ue,referenceHidden:pe&&Te!==`test`?U.floating.middlewareData.hide?.referenceHidden:!1},children:[r,de&&(0,K.jsx)(E,{transition:`fade`,mounted:U.opened,duration:c?.duration||250,exitDuration:c?.exitDuration||250,children:e=>(0,K.jsx)(oe,{withinPortal:T,children:(0,K.jsx)(ge,{...fe,...ve(`overlay`,{className:fe?.className,style:[e,fe?.style]})})})})]})}Y.Target=Sn,Y.Dropdown=bn,Y.ContextMenu=vn,Y.varsResolver=Dn,Y.displayName=`@mantine/core/Popover`,Y.extend=e=>e,Y.withProps=e=>{let t=t=>(0,K.jsx)(Y,{...e,...t});return t.extend=Y.extend,t.displayName=`WithProps(${Y.displayName})`,t};function On({style:e,size:t=16,...n}){return(0,K.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:m(t),height:m(t),display:`block`},...n,children:(0,K.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}On.displayName=`@mantine/core/AccordionChevron`;function kn({size:e,style:t,...n}){let r=e===void 0?t:{width:m(e),height:m(e),...t};return(0,K.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:r,"aria-hidden":!0,...n,children:(0,K.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var An={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},jn=c((e,{radius:t,color:n,gradient:r,variant:i,size:o,autoContrast:s,circle:c})=>{let l=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--badge-height":w(o,`badge-height`),"--badge-padding-x":w(o,`badge-padding-x`),"--badge-fz":w(o,`badge-fz`),"--badge-radius":c||t===void 0?void 0:f(t),"--badge-bg":n||i?l.background:void 0,"--badge-color":n||i?l.color:void 0,"--badge-bd":n||i?l.border:void 0,"--badge-dot-color":i===`dot`?a(n,e):void 0}}}),Mn=s(e=>{let t=_(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:y,mod:b,attributes:x,...S}=t,C=v({name:`Badge`,props:t,classes:An,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:x,vars:s,varsResolver:jn});return(0,K.jsxs)(D,{variant:m,mod:[{block:h,circle:y,"with-right-section":!!f,"with-left-section":!!d},b],...C(`root`,{variant:m}),...S,children:[d&&(0,K.jsx)(`span`,{...C(`section`),"data-position":`left`,children:d}),(0,K.jsx)(`span`,{...C(`label`),children:p}),f&&(0,K.jsx)(`span`,{...C(`section`),"data-position":`right`,children:f})]})});Mn.classes=An,Mn.varsResolver=jn,Mn.displayName=`@mantine/core/Badge`;var[Nn,X]=fe(`Menu component was not found in the tree`),Pn=(0,G.createContext)(null);function Fn(e){let{value:t,defaultValue:n,onChange:r,children:i}=_(`MenuCheckboxGroup`,null,e),[a,o]=A({value:t,defaultValue:n,finalValue:[],onChange:r}),s=(0,G.useCallback)(e=>{o(a.includes(e)?a.filter(t=>t!==e):[...a,e])},[a,o]);return(0,K.jsx)(Pn,{value:{values:a,onChange:s},children:i})}Fn.displayName=`@mantine/core/MenuCheckboxGroup`;var In=(0,G.createContext)(null);function Ln({role:t,checked:n,indicator:r,onSelect:i,color:a,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,dataDisabled:d,className:f,style:m,styles:h,classNames:g,buttonRef:_,others:v}){let y=X(),b=(0,G.use)(In),x=o(),{dir:S}=R(),w=(0,G.useRef)(null),T=J(v.onClick,()=>{d||(i(),s&&y.closeDropdownImmediately())}),E=J(v.onMouseMove,()=>{if(!y.hasSearch)return;let e=w.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==w.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),D=J(v.onKeyDown,e=>{e.key===`ArrowLeft`&&b&&(b.close(),b.focusParentItem())}),O=a?x.variantColorResolver({color:a,theme:x,variant:`light`}):void 0,k=a?C({color:a,theme:x}):null,A=y.alignItemsLabels!==`none`||n;return(0,K.jsxs)(p,{onMouseDown:e=>e.preventDefault(),...v,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:f,style:m,styles:h,classNames:g}),ref:e(w,_),role:t,"aria-checked":n,disabled:u,"data-menu-item":!0,"data-checked":n||void 0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onClick:T,onMouseMove:E,onKeyDown:Zt({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:D}),__vars:{"--menu-item-color":k?.isThemeColor&&k?.shade===void 0?`var(--mantine-color-${k.color}-6)`:O?.color,"--menu-item-hover":O?.hover},children:[A&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:h,classNames:g}),"data-checked":n||void 0,children:n?r:null}),l&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:h,classNames:g}),"data-menu-item-label":!0,children:l}),c&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:h,classNames:g}),"data-position":`right`,children:c})]})}var Z={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,search:`m_ef8769b6`,itemLabel:`m_5476e0d3`,itemIndicator:`m_8395186e`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},Rn=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,defaultChecked:m,onChange:h,checkIcon:g,ref:v,...y}=_(`MenuCheckboxItem`,null,e),b=X(),x=(0,G.use)(Pn),S=x&&f!==void 0?x.values.includes(f):void 0,[C,w]=A({value:p??S,defaultValue:m,finalValue:!1,onChange:h}),T=g??b.checkIcon??(0,K.jsx)(kn,{size:10});return(0,K.jsx)(Ln,{role:`menuitemcheckbox`,checked:C,indicator:T,onSelect:()=>{h?w(!C):x&&f!==void 0?x.onChange(f):w(!C)},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:v,others:y,children:l})});Rn.classes=Z,Rn.displayName=`@mantine/core/MenuCheckboxItem`;function zn(e){let{children:t,disabled:n,longPressDelay:r}=_(`MenuContextMenu`,null,e),i=pe(t);if(!i)throw Error(`Menu.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=X(),o=gn(),s=_n({childProps:i.props,disabled:n||o.disabled,opened:a.opened,longPressDelay:r,setReference:o.reference,open:()=>a.openDropdown()});return(0,G.cloneElement)(i,s)}zn.displayName=`@mantine/core/MenuContextMenu`;var Bn=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=_(`MenuDivider`,null,e),s=X();return(0,K.jsx)(D,{...s.getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});Bn.classes=Z,Bn.displayName=`@mantine/core/MenuDivider`;var Vn=500;function Hn(e){return((e.querySelector(`[data-menu-item-label]`)??e).textContent??``).trim().toLowerCase()}function Un(e){return e.length>1&&e.split(``).every(t=>t===e[0])}function Wn({enabled:e,opened:t,getDropdown:n}){let r=(0,G.useRef)({buffer:``,timeoutId:null});return(0,G.useEffect)(()=>{if(t&&e)return;let n=r.current;n.timeoutId!==null&&(window.clearTimeout(n.timeoutId),n.timeoutId=null),n.buffer=``},[t,e]),(0,G.useEffect)(()=>()=>{let{timeoutId:e}=r.current;e!==null&&window.clearTimeout(e)},[]),t=>{if(!e||t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||t.key===` `)return;let i=t.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.tagName===`SELECT`||i.isContentEditable))return;let a=n();if(!a)return;let o=Array.from(a.querySelectorAll(`[data-menu-item]:not([data-disabled])`)).filter(e=>e.closest(`[data-menu-dropdown]`)===a);if(o.length===0)return;let s=r.current;s.buffer=(s.buffer+t.key).toLowerCase(),s.timeoutId!==null&&window.clearTimeout(s.timeoutId),s.timeoutId=window.setTimeout(()=>{s.buffer=``,s.timeoutId=null},Vn);let c=document.activeElement,l=c?o.indexOf(c):-1,u=null;if(s.buffer.length===1||Un(s.buffer)){let e=s.buffer[0],t=l+1;for(let n=0;n{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onKeyDown:l,children:u,ref:d,...f}=_(`MenuDropdown`,null,t),p=(0,G.useRef)(null),m=X(),h=Wn({enabled:!m.hasSearch,opened:m.opened,getDropdown:()=>p.current}),g=J(l,e=>{h(e),!(e.defaultPrevented||m.hasSearch)&&(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),p.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),v=J(s,()=>(m.trigger===`hover`||m.trigger===`click-hover`)&&m.openDropdown()),y=J(c,()=>(m.trigger===`hover`||m.trigger===`click-hover`)&&m.closeDropdown());return(0,K.jsxs)(Y.Dropdown,{...f,onMouseEnter:v,onMouseLeave:y,role:`menu`,"aria-orientation":`vertical`,ref:e(d,p),...m.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:g,children:[m.withInitialFocusPlaceholder&&!m.hasSearch&&(0,K.jsx)(`div`,{role:`presentation`,tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),u]})});Gn.classes=Z,Gn.displayName=`@mantine/core/MenuDropdown`;var Kn=s(t=>{let{classNames:n,className:r,style:i,styles:a,vars:s,color:c,closeMenuOnClick:l,leftSection:u,rightSection:d,children:f,disabled:m,"data-disabled":h,ref:g,...v}=_(`MenuItem`,null,t),y=X(),b=(0,G.use)(In),x=o(),{dir:S}=R(),w=(0,G.useRef)(null),T=v,E=J(T.onClick,()=>{h||(typeof l==`boolean`?l&&y.closeDropdownImmediately():y.closeOnItemClick&&y.closeDropdownImmediately())}),D=J(T.onMouseMove,()=>{if(!y.hasSearch)return;let e=w.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==w.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),O=c?x.variantColorResolver({color:c,theme:x,variant:`light`}):void 0,k=c?C({color:c,theme:x}):null,A=J(T.onKeyDown,e=>{e.key===`ArrowLeft`&&b&&(b.close(),b.focusParentItem())});return(0,K.jsxs)(p,{onMouseDown:e=>e.preventDefault(),...v,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:e(w,g),role:`menuitem`,disabled:m,"data-menu-item":!0,"data-disabled":m||h||void 0,"data-mantine-stop-propagation":!0,onClick:E,onMouseMove:D,onKeyDown:Zt({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:A}),__vars:{"--menu-item-color":k?.isThemeColor&&k?.shade===void 0?`var(--mantine-color-${k.color}-6)`:O?.color,"--menu-item-hover":O?.hover},children:[y.alignItemsLabels===`all`&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:a,classNames:n}),"data-placeholder":!0}),u&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:u}),f&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:a,classNames:n}),"data-menu-item-label":!0,children:f}),d&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:d})]})});Kn.classes=Z,Kn.displayName=`@mantine/core/MenuItem`;var qn=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=_(`MenuLabel`,null,e),s=X();return(0,K.jsx)(D,{...s.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});qn.classes=Z,qn.displayName=`@mantine/core/MenuLabel`;var Jn=(0,G.createContext)(null);function Yn(e){let{value:t,defaultValue:n,onChange:r,children:i}=_(`MenuRadioGroup`,null,e),[a,o]=A({value:t,defaultValue:n,finalValue:null,onChange:r});return(0,K.jsx)(Jn,{value:{value:a,onChange:e=>o(e)},children:i})}Yn.displayName=`@mantine/core/MenuRadioGroup`;function Xn({size:e,style:t,...n}){return(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:m(e),height:m(e),...t},"aria-hidden":!0,...n,children:(0,K.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var Zn=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,onChange:m,checkIcon:h,ref:g,...v}=_(`MenuRadioItem`,null,e),y=X(),b=(0,G.use)(Jn),x=p??(b?b.value===f:!1),S=h??y.checkIcon??(0,K.jsx)(Xn,{size:5});return(0,K.jsx)(Ln,{role:`menuitemradio`,checked:x,indicator:S,onSelect:()=>{x||(m?m(f):b&&b.onChange(f))},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:g,others:v,children:l})});Zn.classes=Z,Zn.displayName=`@mantine/core/MenuRadioItem`;var Qn=`[data-menu-item]:not([data-disabled])`,$n=`[data-menu-active]`;function er(e){return e?.closest(`[data-menu-dropdown]`)}function tr(e){return e?Array.from(e.querySelectorAll(Qn)).filter(t=>t.closest(`[data-menu-dropdown]`)===e):[]}function nr(e){e&&e.querySelectorAll($n).forEach(t=>{t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}function rr(e,t){nr(t),e&&(e.setAttribute(`data-menu-active`,`true`),e.scrollIntoView({block:`nearest`}))}function ir(e){return e.findIndex(e=>e.hasAttribute(`data-menu-active`))}var ar={clearSearchOnClose:!0},or=n(t=>{let{classNames:n,styles:r,onKeyDown:i,onChange:a,size:o,clearSearchOnClose:s,ref:c,...l}=_(`MenuSearch`,ar,t),u=X(),d=(0,G.useRef)(null),f=e(c,d),p=(0,G.useRef)(a);p.current=a,(0,G.useEffect)(()=>u.registerSearch(),[u.registerSearch]),(0,G.useEffect)(()=>{s?u.searchExitClearRef.current=()=>{p.current?.({currentTarget:{value:``}})}:u.searchExitClearRef.current=null},[s,u.searchExitClearRef]),(0,G.useEffect)(()=>{u.opened||nr(er(d.current))},[u.opened]);let m=J(a,e=>{nr(er(e.currentTarget))}),h=J(i,e=>{if(e.defaultPrevented)return;let t=er(e.currentTarget),n=tr(t);if(e.key===`ArrowDown`){if(e.preventDefault(),n.length===0)return;let r=ir(n);rr(n[r>=n.length-1?u.loop?0:r:r+1]??null,t)}else if(e.key===`ArrowUp`){if(e.preventDefault(),n.length===0)return;let r=ir(n);rr(n[r<=0?r===-1||u.loop?n.length-1:0:r-1]??null,t)}else if(e.key===`Home`)e.preventDefault(),n.length>0&&rr(n[0],t);else if(e.key===`End`)e.preventDefault(),n.length>0&&rr(n[n.length-1],t);else if(e.key===`Enter`){if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=n[ir(n)];t&&(e.preventDefault(),t.hasAttribute(`data-sub-menu-item`)?(t.focus(),t.dispatchEvent(new KeyboardEvent(`keydown`,{key:`ArrowRight`,bubbles:!0}))):t.click())}}),g=u.getStyles(`search`);return(0,K.jsx)(y,{"data-autofocus":!0,"data-mantine-stop-propagation":!0,type:`search`,size:o,...l,ref:f,classNames:[{input:g.className},n],styles:[{input:g.style},r],onKeyDown:h,onChange:m,__staticSelector:`Menu`})});or.classes=Z,or.displayName=`@mantine/core/MenuSearch`;var sr=n(t=>{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onPointerEnter:l,onPointerLeave:u,onKeyDown:d,children:f,ref:p,...m}=_(`MenuSubDropdown`,null,t),h=(0,G.useRef)(null),g=X(),v=(0,G.use)(In),y=Wn({enabled:!g.hasSearch,opened:v?.opened??!1,getDropdown:()=>h.current}),b=J(d,e=>{y(e),!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&e.key!==` `&&e.stopPropagation()}),x=v?.getFloatingProps({onMouseEnter:s,onMouseLeave:c,onPointerEnter:l,onPointerLeave:u});return(0,K.jsx)(Y.Dropdown,{...m,...x,role:`menu`,"aria-orientation":`vertical`,ref:e(p,h,v?.setFloating),...g.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:f})});sr.classes=Z,sr.displayName=`@mantine/core/MenuSubDropdown`;var cr=s(t=>{let{classNames:n,className:r,style:i,styles:a,vars:s,color:c,leftSection:l,rightSection:u,children:d,disabled:f,"data-disabled":m,closeMenuOnClick:h,ref:g,...v}=_(`MenuSubItem`,null,t),y=X(),b=(0,G.use)(In),x=o(),{dir:S}=R(),w=(0,G.useRef)(null),T=v,E=c?x.variantColorResolver({color:c,theme:x,variant:`light`}):void 0,D=c?C({color:c,theme:x}):null,O=J(T.onKeyDown,e=>{e.key===`ArrowRight`&&(b?.open(),b?.focusFirstItem()),e.key===`ArrowLeft`&&b?.parentContext&&(b.parentContext.close(),b.parentContext.focusParentItem())}),k=J(T.onClick,()=>{!m&&h&&y.closeDropdownImmediately()}),A=J(T.onMouseMove,()=>{if(!y.hasSearch)return;let e=w.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==w.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),ee=b?.getReferenceProps({onMouseEnter:T.onMouseEnter,onMouseLeave:T.onMouseLeave,onPointerEnter:T.onPointerEnter,onPointerLeave:T.onPointerLeave});return(0,K.jsxs)(p,{onMouseDown:e=>e.preventDefault(),...v,...ee,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:e(w,g,b?.setReference),role:`menuitem`,disabled:f,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":f||m||void 0,"data-mantine-stop-propagation":!0,onClick:k,onMouseMove:A,onKeyDown:Zt({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:O}),__vars:{"--menu-item-color":D?.isThemeColor&&D?.shade===void 0?`var(--mantine-color-${D.color}-6)`:E?.color,"--menu-item-hover":E?.hover},children:[y.alignItemsLabels===`all`&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:a,classNames:n}),"data-placeholder":!0}),l&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:l}),d&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:a,classNames:n}),"data-menu-item-label":!0,children:d}),(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:u||(0,K.jsx)(On,{...y.getStyles(`chevron`),size:14})})]})});cr.classes=Z,cr.displayName=`@mantine/core/MenuSubItem`;function lr({children:e,refProp:t}){if(!F(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return X(),(0,K.jsx)(Y.Target,{refProp:t,popupType:`menu`,children:e})}lr.displayName=`@mantine/core/MenuSubTarget`;var ur={offset:0,position:`right-start`,safeAreaPolygon:!0,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function dr(e){let{children:t,closeDelay:n,openDelay:r,position:i,safeAreaPolygon:a,opened:o,onChange:s,...c}=_(`MenuSub`,ur,e),l=h(),[u,d]=A({value:o,finalValue:!1,onChange:s}),f=(0,G.use)(In),p=X(),{dir:m}=R(),g=ce(m,i),v=f?.registerOpenSub??p.registerOpenSub,y=(0,G.useRef)(null),b=(0,G.useCallback)(e=>{let t=y.current;return t&&t!==e&&t(),y.current=e,()=>{y.current===e&&(y.current=null)}},[]),x=(0,G.useRef)(d);x.current=d;let S=(0,G.useCallback)(()=>x.current(!0),[]),C=(0,G.useCallback)(()=>x.current(!1),[]);(0,G.useEffect)(()=>{if(u)return v(C)},[u,v,C]);let{context:w,refs:T}=z({placement:g,open:u,onOpenChange:e=>{e?S():C()}}),{getReferenceProps:E,getFloatingProps:D}=ue([ie(w,{handleClose:a?le(typeof a==`object`?a:void 0):void 0,delay:{open:r,close:n}})]);return(0,K.jsx)(In,{value:{opened:u,close:C,open:S,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-target`)?.focus()},16),parentContext:f,setReference:T.setReference,setFloating:T.setFloating,getReferenceProps:E,getFloatingProps:D,registerOpenSub:b},children:(0,K.jsx)(Y,{opened:u,onChange:e=>e?S():C(),withArrow:!1,id:l,position:i,...c,withinPortal:!1,children:t})})}dr.extend=e=>e,dr.displayName=`@mantine/core/MenuSub`,dr.Target=lr,dr.Dropdown=sr,dr.Item=cr;var fr={refProp:`ref`};function pr(e){let{children:t,refProp:n,...r}=_(`MenuTarget`,fr,e),i=pe(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=X(),o=i.props,s=J(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=J(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=J(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,K.jsx)(Y.Target,{refProp:n,popupType:`menu`,...r,children:(0,G.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}pr.displayName=`@mantine/core/MenuTarget`;var mr={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1,alignItemsLabels:`with-indicators`},Q=n(e=>{let n=_(`Menu`,mr,e),{children:r,onOpen:i,onClose:a,opened:o,defaultOpened:s,trapFocus:c,onChange:l,closeOnItemClick:u,loop:d,closeOnEscape:f,trigger:p,openDelay:m,closeDelay:h,classNames:g,styles:y,unstyled:b,variant:x,vars:S,menuItemTabIndex:C,keepMounted:w,withInitialFocusPlaceholder:T,attributes:E,onExitTransitionEnd:D,alignItemsLabels:O,checkIcon:k,...ee}=n,j=v({name:`Menu`,classes:Z,props:n,classNames:g,styles:y,unstyled:b,attributes:E}),[M,N]=A({value:o,defaultValue:s,finalValue:!1,onChange:l}),[P,F]=(0,G.useState)(!1),I=()=>{N(!1),F(!1),M&&a?.()},L=()=>{N(!0),!M&&i?.()},R=()=>{M?I():L()},{openDropdown:z,closeDropdown:te}=mn({open:L,close:I,closeDelay:h,openDelay:m}),B=(0,G.useRef)(null),ne=(0,G.useCallback)(e=>{let t=B.current;return t&&t!==e&&t(),B.current=e,()=>{B.current===e&&(B.current=null)}},[]),V=(0,G.useRef)(0),[re,ie]=(0,G.useState)(!1),ae=(0,G.useCallback)(()=>(V.current+=1,V.current===1&&ie(!0),()=>{--V.current,V.current===0&&ie(!1)}),[]),oe=(0,G.useRef)(null),se=()=>{oe.current?.(),D?.()},ce=e=>tn(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:le,resolvedStyles:ue}=t({classNames:g,styles:y,props:n});return(0,K.jsx)(Nn,{value:{getStyles:j,opened:M,toggleDropdown:R,getItemIndex:ce,openedViaClick:P,setOpenedViaClick:F,closeOnItemClick:u,closeDropdown:p===`click`?I:te,openDropdown:p===`click`?L:z,closeDropdownImmediately:I,loop:d,trigger:p,unstyled:b,menuItemTabIndex:C,withInitialFocusPlaceholder:T,registerOpenSub:ne,hasSearch:re,registerSearch:ae,searchExitClearRef:oe,alignItemsLabels:O,checkIcon:k},children:(0,K.jsx)(Y,{returnFocus:!0,...ee,opened:M,onChange:R,defaultOpened:s,trapFocus:!w&&c,closeOnEscape:f,__staticSelector:`Menu`,classNames:le,styles:ue,unstyled:b,variant:x,keepMounted:w,onExitTransitionEnd:se,children:r})})});Q.displayName=`@mantine/core/Menu`,Q.classes=Z,Q.Item=Kn,Q.Label=qn,Q.Dropdown=Gn,Q.Target=pr,Q.Divider=Bn,Q.Search=or,Q.Sub=dr,Q.CheckboxItem=Rn,Q.CheckboxGroup=Fn,Q.RadioItem=Zn,Q.RadioGroup=Yn,Q.ContextMenu=zn;var hr=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z`}))]]),gr=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),_r=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z`}))]]),vr=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),yr=G.forwardRef((e,t)=>G.createElement(d,{ref:t,...e,weights:hr}));yr.displayName=`DotsThreeIcon`;var br=yr,xr=G.forwardRef((e,t)=>G.createElement(d,{ref:t,...e,weights:gr}));xr.displayName=`PlusIcon`;var Sr=xr,Cr=G.forwardRef((e,t)=>G.createElement(d,{ref:t,...e,weights:_r}));Cr.displayName=`SparkleIcon`;var wr=Cr,Tr=G.forwardRef((e,t)=>G.createElement(d,{ref:t,...e,weights:vr}));Tr.displayName=`TrashIcon`;var Er=Tr,$=[];for(let e=0;e<256;++e)$.push((e+256).toString(16).slice(1));function Dr(e,t=0){return($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+`-`+$[e[t+4]]+$[e[t+5]]+`-`+$[e[t+6]]+$[e[t+7]]+`-`+$[e[t+8]]+$[e[t+9]]+`-`+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase()}var Or=new Uint8Array(16);function kr(){return crypto.getRandomValues(Or)}var Ar={};function jr(e,t,n){let r;if(e)r=Nr(e.random??e.rng?.()??kr(),e.msecs,e.seq,t,n);else{let e=Date.now(),i=kr();Mr(Ar,e,i),r=Nr(i,Ar.msecs,Ar.seq,t,n)}return t??Dr(r)}function Mr(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=Pr(n),e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function Nr(e,t,n,r,i=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=Pr(e),r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}function Pr(e){return(e[6]&127)<<24|e[7]<<16|e[8]<<8|e[9]}function Fr(){return jr()}var Ir=[{value:`15m`,label:`15 minutes`},{value:`1h`,label:`1 hour`},{value:`6h`,label:`6 hours`},{value:`24h`,label:`24 hours`},{value:`168h`,label:`7 days`},{value:`720h`,label:`30 days`}];function Lr(e){return Ir.find(t=>t.value===e)?.label??e}function Rr(e,t){let n=e?.[t];return typeof n==`string`?n:``}function zr(e,t,n=[]){let r=new URLSearchParams({window:e.window,limit:`40`});e.namespace&&r.set(`namespace`,e.namespace);for(let e of n){let n=Rr(t,e);n&&r.set(e,n)}return r}function Br(e,t){return[`observability`,e,t.toString()]}var Vr=e=>e.state.status===`error`?15e3:3e4,Hr=15e3;function Ur(e,t,n=!0){return ye({queryKey:Br(e,t),queryFn:()=>be(`/api/observability/${e}?${t}`),enabled:n,refetchInterval:Vr,staleTime:Hr})}function Wr(e){return e.getQueryCache().findAll({queryKey:[`observability`]}).reduce((e,t)=>Math.max(e,t.state.dataUpdatedAt),0)||null}function Gr(){let e=_e(),[t,n]=(0,G.useState)(()=>Wr(e));return(0,G.useEffect)(()=>e.getQueryCache().subscribe(()=>n(Wr(e))),[e]),t}function Kr(e){let t={};return typeof e.window==`string`&&Ir.some(t=>t.value===e.window)&&(t.window=e.window),typeof e.namespace==`string`&&e.namespace.trim()&&(t.namespace=e.namespace.trim()),t}var qr=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],Jr=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],Yr=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],Xr=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],Zr=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],Qr=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],$r={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},ei={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},ti={micro:11,small:12,body:14,title:16,section:22,page:32},ni={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`};export{Te as $,fn as A,st as B,br as C,Y as D,kn as E,Ut as F,Ke as G,Qe as H,Ht as I,Ue as J,Ye as K,yt as L,$t as M,Kt as N,dn as O,Wt as P,Re as Q,gt as R,Sr as S,Mn as T,Xe as U,it as V,Be as W,ze as X,He as Y,Me as Z,zr as _,ni as a,we as at,Er as b,ei as c,H as ct,Kr as d,U as dt,Ie as et,Rr as f,Ur as g,Gr as h,$r as i,Ne as it,en as j,pn as k,ti as l,Ee as lt,Hr as m,Zr as n,Le as nt,Qr as o,Ce as ot,Ir as p,Ge as q,Jr as r,Se as rt,Yr as s,Fe as st,qr as t,W as tt,Xr as u,Pe as ut,Lr as v,Q as w,wr as x,Fr as y,mt as z}; \ No newline at end of file diff --git a/internal/ui/dist/assets/tokens-eDtvR5uq.js b/internal/ui/dist/assets/tokens-eDtvR5uq.js deleted file mode 100644 index 470a674f..00000000 --- a/internal/ui/dist/assets/tokens-eDtvR5uq.js +++ /dev/null @@ -1 +0,0 @@ -import{$ as e,A as t,C as n,G as r,J as i,K as a,N as o,S as s,St as c,X as l,Y as u,_t as d,a as f,at as p,b as m,dt as h,et as g,gt as _,j as v,k as y,m as b,mt as x,nt as S,ot as C,q as w,st as T,tt as E,v as D,x as O,z as k}from"./brand-MzZ03bSa.js";import{c as A,d as ee,h as te,m as j,p as ne,u as re}from"./auth-Co_9Gxq0.js";import{C as ie,S as ae,T as oe,_ as se,a as ce,b as M,c as N,d as le,f as P,g as F,h as ue,i as de,l as I,m as L,n as R,p as z,r as fe,s as pe,u as B,v as V,w as me,x as H,y as he}from"./Tooltip-BJiO7C_G.js";import{r as ge}from"./use-computed-color-scheme-6JIsge00.js";import{B as _e,O as ve,U as ye,i as be,n as xe,z as Se}from"./api-D6Wt-jwp.js";function Ce(e){return e[e.length-1]}function we(e,t){return typeof e==`function`?e(t):e}var Te=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;function U(e){for(let t in e)if(Te.call(e,t))return!0;return!1}var De=()=>Object.create(null),Oe=(e,t)=>ke(e,t,De);function ke(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=Ne(e)&&Ne(i);if(!a&&!(je(e)&&je(i)))return i;let o=a?e:Ae(e);if(!o)return i;let s=a?i:Ae(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;ti||!Pe(e[o],t[o],n)))return!1;return i===a}return!1}function Fe(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var Ie=/[\x00-\x1f\x7f"<>`{}]/g;function Le(e){return e.replace(Ie,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Re(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return Le(t)}var ze=[`http:`,`https:`,`mailto:`,`tel:`];function Be(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Ve(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=Re(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=Re(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function He(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Ue(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var W=4,Ke=5;function qe(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=Ze(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=Xe(r);e.kind=Ke,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=Xe(r);e.kind=W,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)Je(e,t,r,c,i,a,o,s)}function Ye(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Xe(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function Ze(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Qe(e,t){let n=Xe(`/`),r=new Uint16Array(6),i=[];for(let t of e)Je(!1,r,t,1,n,0,i);for(let e of i)e.sort(Ye);t.masksTree=n,t.flatCache=Ge(1e3)}function $e(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=it(e,t.masksTree);return t.flatCache.set(e,r),r}function et(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Xe(`/`),Je(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),it(r,o,n)}function tt(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=it(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=ot(a.route)),t.matchCache.set(r,a),a}function nt(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function rt(e,t=!1,n){let r=Xe(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;Je(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&We(),o[e.id]=e,c!==0&&e.path){let t=nt(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(Ye);return{processedTree:{segmentTree:r,singleCache:Ge(1e3),matchCache:Ge(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function it(e,t,n=!1){let r=e.split(`/`),i=ct(e,r,t,n);if(!i)return null;let[a]=at(e,r,i);return{route:i.node.route,rawParams:a}}function at(e,t,n){let r=st(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;ee.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===W)>(e.node.kind===W)||t.node.kind===W==(e.node.kind===W)&&t.node.depth>e.node.depth)))}function pt(e){return mt(e.filter(e=>e!==void 0).join(`/`))}function mt(e){return e.replace(/\/{2,}/g,`/`)}function ht(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function gt(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function _t(e){return gt(ht(e))}function vt(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function yt(e,t,n){return vt(e,n)===vt(t,n)}function bt({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=mt(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=mt(e)),o=e.split(`/`);o.length>1&&Ce(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(Ce(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?mt(s):s)||`/`;return a&&r&&r.set(a,c),c}function xt(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function St(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>wt(e,n)).join(`/`):wt(r,n):r}function Ct({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Tt:this.parentRoute||We();let r=n?Tt:t?.path;r&&r!==`/`&&(r=ht(r));let i=t?.id||r,a=n?Tt:pt([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=pt([`/`,a]));let o=a===`__root__`?`/`:pt([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=gt(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Et({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},At=class extends kt{constructor(e){super(e)}},G=c(_(),1),K=x();function jt({children:e,fallback:t=null}){return(0,K.jsx)(G.Fragment,{children:Mt()?e:t})}function Mt(){return G.useSyncExternalStore(Nt,()=>!0,()=>!1)}function Nt(){return()=>{}}var Pt=G.createContext(void 0),Ft=G.createContext(void 0),It=d((e=>{var t=_();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Lt=d(((e,t)=>{t.exports=It()})),Rt=d((e=>{var t=_(),n=Lt();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),zt=d(((e,t)=>{t.exports=Rt()}))();function Bt(e,t){return e===t}function Vt(e,t,n=Bt){let r=(0,G.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,G.useCallback)(()=>e?.get(),[e]);return(0,zt.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Ht={};function Ut(e,t){let n=G.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=ke(n.current,i):i}}function q(e){let t=ee(),n=G.useContext(e.from?Ft:Pt),r=e.from??n,i=t.stores.getMatchStore(r),a=Ut(e,t),o=Vt(i,e=>e?a(e):Ht);if(o!==Ht)return o;(e.shouldThrow??!0)&&We()}function Wt(e){return q({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Gt(e){let{select:t,...n}=e;return q({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Kt(e){return q({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function qt(e){return q({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Jt(e){return q({...e,select:t=>e.select?e.select(t.context):t.context})}function Yt(e){let t=G.useRef(e);return Pe(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function Xt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Zt(e,t,n){if(e?.external)return Be(e.href,n)?void 0:e.href;if(!ln(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),Be(t,n)?void 0:t}catch{}}function Qt(e,t,n,r,i,a){if(a)return!1;if(n?.exact){if(!yt(e.pathname,t.pathname,r))return!1}else{let n=vt(e.pathname,r),i=vt(t.pathname,r);if(!n.startsWith(i)||n.length!==i.length&&n[i.length]!==`/`)return!1}return(n?.includeSearch??!0)&&!Pe(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function $t(e,t){let n=ee(),r=j(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:b,onClick:x,onBlur:S,onFocus:C,onMouseEnter:w,onMouseLeave:T,onTouchStart:E,ignoreBlocker:D,params:O,search:k,hash:A,state:ne,mask:re,reloadDocument:ie,unsafeRelative:ae,from:oe,_fromLocation:se,...ce}=e,M=Mt(),N=Yt(e.search),le=Yt(e.params),P=Yt(o),F=G.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,N,le,e.state,e.mask,e.unsafeRelative]),ue=G.useCallback(e=>{let t=n.buildLocation({_fromLocation:e,...F}),r=cn(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,v),i=Zt(r,s,n.protocolAllowlist);return[r?.href,i,Qt(e,t,P,n.basepath,M,i!==void 0)]},[P,v,M,F,n,s]),[de,I,L]=Vt(n.stores.location,ue,Xt),R=L?we(i,{})??tn:en,z=L?en:we(a,{})??en,fe=[b,R.className,z.className].filter(Boolean).join(` `),pe=(y||R.style||z.style)&&{...y,...R.style,...z.style},B=G.useRef(!1),V=e.reloadDocument||I||v?!1:c??n.options.defaultPreload,me=l??n.options.defaultPreloadDelay??0,H=G.useCallback(()=>{n.preloadRoute(F).catch(e=>{console.warn(e),console.warn(Ot)})},[n,F]),he=G.useCallback(e=>{if(!e){on(r);return}if(!(e.isIntersecting??V===`intent`)){e.isIntersecting===!1&&on(r);return}if(!me){H();return}an.has(r)||an.set(r,setTimeout(()=>{an.delete(r),H()},me))},[H,r,V,me]);te(r,he,V!==`viewport`),G.useEffect(()=>{B.current||V===`render`&&(H(),B.current=!0)},[H,V]);let ge=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;!v&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...F,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:D}))};if(I)return{...ce,ref:r,href:I,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...b&&{className:b},...x&&{onClick:x},...S&&{onBlur:S},...C&&{onFocus:C},...w&&{onMouseEnter:w},...T&&{onMouseLeave:T},...E&&{onTouchStart:E}};let _e=()=>{V===`intent`&&H()},ve=()=>{V===`intent`&&on(r)};return{...ce,...R,...z,href:de,ref:r,onClick:sn([x,ge]),onBlur:sn([S,ve]),onFocus:sn([C,he]),onMouseEnter:sn([w,he]),onMouseLeave:sn([T,ve]),onTouchStart:sn([E,_e]),disabled:!!v,target:_,...pe&&{style:pe},...fe&&{className:fe},...v&&nn,...L&&rn}}var en={},tn={className:`active`},nn={role:`link`,"aria-disabled":!0},rn={"data-status":`active`,"aria-current":`page`},an=new WeakMap,on=e=>{clearTimeout(an.get(e)),an.delete(e)},sn=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function cn(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function ln(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var un=G.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=$t(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return G.createElement(`a`,t,o)}return G.createElement(n,a,o)}),dn=class extends kt{constructor(e){super(e),this.useMatch=e=>q({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Jt({...e,from:this.id}),this.useSearch=e=>qt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Kt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Gt({...e,from:this.id}),this.useLoaderData=e=>Wt({...e,from:this.id}),this.useNavigate=()=>re({from:this.fullPath}),this.Link=G.forwardRef((e,t)=>(0,K.jsx)(un,{ref:t,from:this.fullPath,...e}))}};function fn(e){return new dn(e)}var pn=class extends At{constructor(e){super(e),this.useMatch=e=>q({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Jt({...e,from:this.id}),this.useSearch=e=>qt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Kt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Gt({...e,from:this.id}),this.useLoaderData=e=>Wt({...e,from:this.id}),this.useNavigate=()=>re({from:this.fullPath}),this.Link=G.forwardRef((e,t)=>(0,K.jsx)(un,{ref:t,from:this.fullPath,...e}))}};function mn(e){return new pn(e)}function hn(e){return e=>{let t=fn(e);return t.isRoot=!1,t}}function gn(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(Fe(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(ne)ne(a());else throw a()}return G.createElement(r,e)};return o.preload=a,o}function _n(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function vn(e){let t=_n(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function yn(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function bn(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function xn(e,t,n){for(let n=e+1;n{n?.(s);let c=Array.from(yn(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>Sn(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=xn(l,c,r),d=bn(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[xn(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[bn(c.length,c,!1)]?.focus()}}}function wn(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||ge:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function J(e,t){return n=>{e?.(n),t?.(n)}}function Tn(e,t){return e in t?vn(t[e]):vn(e)}function En(e,t){let n=e.map(e=>({value:e,px:Tn(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function Dn(e,t,n){return n?Array.from(yn(n,t)?.querySelectorAll(e)||[]).findIndex(e=>e===n):null}var On=[`mousedown`,`touchstart`];function kn(e,t,n,r=!0){let i=(0,G.useRef)(null),a=t||On,o=(0,G.useEffectEvent)(t=>{let{target:r}=t??{};if(!document.body.contains(r)&&r?.tagName!==`HTML`)return;let a=t.composedPath();Array.isArray(n)?n.every(e=>!!e&&!a.includes(e))&&e(t):i.current&&!a.includes(i.current)&&e(t)}),s=a.join(`,`);return(0,G.useEffect)(()=>{if(!r)return;let e=s.split(`,`);return e.forEach(e=>document.addEventListener(e,o)),()=>{e.forEach(e=>document.removeEventListener(e,o))}},[s,r]),i}var An=[`mouse`,`touch`],jn=10;function Mn(e,t={}){let{threshold:n=400,events:r=An,cancelOnMove:i=!1,onStart:a,onFinish:o,onCancel:s}=t,c=(0,G.useRef)(!1),l=(0,G.useRef)(!1),u=(0,G.useRef)(-1),d=(0,G.useRef)(null);return(0,G.useEffect)(()=>()=>window.clearTimeout(u.current),[]),(0,G.useMemo)(()=>{if(typeof e!=`function`)return{};let t=i!==!1,f=i===!0?jn:i===!1?0:i,p=t=>{(Fn(t)||Pn(t))&&(a&&a(t),d.current=Nn(t),l.current=!0,u.current=window.setTimeout(()=>{e(t),c.current=!0},n))},m=e=>{(Fn(e)||Pn(e))&&(c.current?o&&o(e):l.current&&s&&s(e),c.current=!1,l.current=!1,d.current=null,u.current!==-1&&(window.clearTimeout(u.current),u.current=-1))},h=e=>{if(!t||!l.current||c.current)return;let n=Nn(e);if(!n||!d.current)return;let r=n.x-d.current.x,i=n.y-d.current.y;Math.sqrt(r*r+i*i)>f&&m(e)},g={};return r.includes(`mouse`)&&(g.onMouseDown=p,g.onMouseUp=m,g.onMouseLeave=m,t&&(g.onMouseMove=h)),r.includes(`touch`)&&(g.onTouchStart=p,g.onTouchEnd=m,g.onTouchCancel=m,t&&(g.onTouchMove=h)),g},[e,n,s,o,a,i,r.join(`,`)])}function Nn(e){if(Pn(e)){let t=e.touches[0]??e.changedTouches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function Pn(e){return window.TouchEvent?e.nativeEvent instanceof TouchEvent:`touches`in e.nativeEvent}function Fn(e){return e.nativeEvent instanceof MouseEvent}function In({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&w({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Ln(e,t,n){return In({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function Rn(e,t){let n=e.colors[e.primaryColor];return r(n)?e.autoContrast?Ln(n,e,t):`var(--mantine-color-white)`:In({color:n[i(e,t)],theme:e,autoContrast:null})}function zn({open:e,close:t,openDelay:n,closeDelay:r}){let i=(0,G.useRef)(-1),a=(0,G.useRef)(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(a.current)};return(0,G.useEffect)(()=>o,[]),{openDropdown:()=>{o(),n===0||n===void 0?e():i.current=window.setTimeout(e,n)},closeDropdown:()=>{o(),r===0||r===void 0?t():a.current=window.setTimeout(t,r)}}}var[Bn,Vn]=me(`Popover component was not found in the tree`);function Hn({childProps:e,disabled:t,opened:n,longPressDelay:r=500,setReference:i,open:a}){let o=(0,G.useRef)(!1),s=(0,G.useRef)(!1),c=(0,G.useRef)(null),l=(0,G.useRef)(t);l.current=t;let u=(e,t,n)=>{i({getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t,toJSON:()=>void 0}),contextElement:n}),a()},d=J(e.onMouseDown,e=>{t||e.button===2&&e.stopPropagation()}),f=J(e.onContextMenu,e=>{t||e.defaultPrevented||(e.preventDefault(),!s.current&&(u(e.clientX,e.clientY,e.currentTarget),o.current&&(s.current=!0)))}),p=Mn(e=>{if(l.current||s.current)return;let t=e,n=t.touches[0]??t.changedTouches[0];n&&(u(n.clientX,n.clientY,c.current),s.current=!0)},{threshold:r,events:[`touch`],cancelOnMove:!0,onStart:e=>{o.current=!0,s.current=!1,c.current=e.currentTarget},onFinish:e=>{o.current=!1,s.current=!1,l.current||e.preventDefault()},onCancel:()=>{o.current=!1,s.current=!1}});return{onContextMenu:f,onMouseDown:d,onTouchStart:J(e.onTouchStart,p.onTouchStart),onTouchEnd:J(e.onTouchEnd,p.onTouchEnd),onTouchCancel:J(e.onTouchCancel,p.onTouchCancel),onTouchMove:J(e.onTouchMove,p.onTouchMove),style:t?e.style:{...e.style,WebkitTouchCallout:`none`,WebkitUserSelect:`none`,userSelect:`none`},"data-expanded":n?!0:void 0}}function Un(e){let{children:t,disabled:n,longPressDelay:r}=v(`PopoverContextMenu`,null,e),i=H(t);if(!i)throw Error(`Popover.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=Vn();return(0,G.cloneElement)(i,Hn({childProps:i.props,disabled:n||a.disabled,opened:a.opened,longPressDelay:r,setReference:a.reference,open:()=>{a.opened||a.onToggle()}}))}Un.displayName=`@mantine/core/PopoverContextMenu`;var Wn={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`},Gn=n(t=>{let n=v(`PopoverDropdown`,null,t),{className:r,style:i,vars:a,children:o,onKeyDownCapture:s,variant:c,classNames:l,styles:u,ref:d,...f}=n,p=Vn(),{dir:m}=M(),g=p.arrowPosition===`merge`&&p.withArrow?ce({position:p.placement,dir:m}):void 0,_=ye({opened:p.opened,shouldReturnFocus:p.returnFocus}),y=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:`dialog`,tabIndex:-1}:{},b=e(d,p.floating);return p.disabled?null:(0,K.jsx)(R,{...p.portalProps,withinPortal:p.withinPortal,children:(0,K.jsx)(D,{mounted:p.opened,...p.transitionProps,transition:p.transitionProps?.transition||`fade`,duration:p.transitionProps?.duration??150,keepMounted:p.keepMounted,keepMountedMode:p.keepMountedMode,exitDuration:typeof p.transitionProps?.exitDuration==`number`?p.transitionProps.exitDuration:p.transitionProps?.duration,children:e=>(0,K.jsx)(Se,{active:p.trapFocus&&p.opened,innerRef:b,children:(0,K.jsxs)(O,{...y,...f,variant:c,onKeyDownCapture:wn(()=>{p.onClose?.(),p.onDismiss?.()},{active:p.closeOnEscape,onTrigger:_,onKeyDown:s}),"data-position":p.placement,"data-fixed":p.floatingStrategy===`fixed`||void 0,...p.getStyles(`dropdown`,{className:r,props:n,classNames:l,styles:u,style:[{...e,...g,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width===`target`?void 0:h(p.width),...p.referenceHidden?{display:`none`}:null},p.resolvedStyles?.dropdown,u?.dropdown,i]}),children:[o,(0,K.jsx)(de,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles(`arrow`,{props:n,classNames:l,styles:u})})]})})})})});Gn.classes=Wn,Gn.displayName=`@mantine/core/PopoverDropdown`;var Kn={refProp:`ref`,popupType:`dialog`},qn=n(t=>{let{children:n,refProp:r,popupType:i,ref:a,...o}=v(`PopoverTarget`,Kn,t),s=H(n);if(!s)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let c=o,l=Vn(),d=e(l.reference,ae(s),a),f=l.withRoles?{"aria-haspopup":i,"aria-expanded":l.opened,"aria-controls":l.opened?l.getDropdownId():void 0,id:l.getTargetId()}:{},p=s.props;return(0,G.cloneElement)(s,{...c,...f,...l.targetProps,className:u(l.targetProps.className,c.className,p.className),[r]:d,...l.controlled?null:{onClick:e=>{l.onToggle(),p.onClick?.(e)}}})});qn.displayName=`@mantine/core/PopoverTarget`;function Jn(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Yn(e,t,n,r){let i=Jn(e.middlewares),a=[F(e.offset),z()];if(i.flip&&!n){let e=typeof i.flip==`boolean`?{}:i.flip,t=r?{fallbackStrategy:`initialPlacement`,...e}:e;a.push(P(t))}if(i.shift){let t=typeof i.shift==`boolean`?{}:i.shift;a.push(se(n=>{let r=n.placement.startsWith(`top`)||n.placement.startsWith(`bottom`);return{limiter:ue(),padding:5,...e.width===`target`&&r?{mainAxis:!1}:null,...t}}))}return i.inline&&a.push(typeof i.inline==`boolean`?L():L(i.inline)),a.push(le({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width===`target`)&&a.push(V({...typeof i.size==`boolean`?{}:i.size,apply({rects:n,availableWidth:r,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};i.size&&(typeof i.size==`object`&&i.size.apply?i.size.apply({rects:n,availableWidth:r,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${r}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),a}function Xn(e){let[t,n]=A({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=(0,G.useRef)(t),[i,a]=(0,G.useState)(null),o=e.preventPositionChangeWhenVisible!==!1,s=(0,G.useRef)(t);t!==s.current&&(s.current=t,t&&i!==null&&a(null));let c=(0,G.useCallback)(()=>a(null),[]),l=()=>{t&&!e.disabled&&n(!1)},u=()=>{e.disabled||n(!t)},d=N({open:t,strategy:e.strategy,placement:o?i??e.position:e.position,middleware:Yn(e,()=>d,o&&i!==null,o),whileElementsMounted:e.keepMounted?void 0:he});(0,G.useEffect)(()=>{if(!e.keepMounted)return;let n=d.refs.reference.current,r=d.refs.floating.current;if(t&&n&&r)return he(n,r,d.update)},[e.keepMounted,t,d.update,d.elements.reference,d.elements.floating]);let f=(0,G.useRef)(!1);S(()=>{if(!t){f.current=!1;return}if(!o||i!==null)return;let e=d.refs.floating.current;if(e&&e.offsetHeight!==0&&e.offsetWidth!==0){if(!f.current){f.current=!0,d.update();return}d.isPositioned&&a(d.placement)}},[o,t,d.isPositioned,d.placement,i,d.update]);let p=(0,G.useRef)(d.placement);return S(()=>{p.current!==d.placement&&(p.current=d.placement,e.onPositionChange?.(d.placement))},[d.placement]),E(()=>{t!==r.current&&(t?e.onOpen?.():e.onClose?.()),r.current=t},[t,e.onClose,e.onOpen]),{floating:d,controlled:typeof e.opened==`boolean`,opened:t,onClose:l,onToggle:u,resetLockedPlacement:c}}var Zn={position:`bottom`,offset:8,transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,preventPositionChangeWhenVisible:!0,clickOutsideEvents:[`mousedown`,`touchstart`],zIndex:ie(`popover`),__staticSelector:`Popover`,width:`max-content`},Qn=l((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:p(t),"--popover-shadow":C(n)}}));function Y(e){let n=v(`Popover`,Zn,e),{children:r,position:i,offset:a,onPositionChange:o,opened:s,transitionProps:c,onExitTransitionEnd:l,onEnterTransitionEnd:u,width:d,middlewares:f,withArrow:p,arrowSize:m,arrowOffset:h,arrowRadius:_,arrowPosition:b,unstyled:x,classNames:S,styles:C,closeOnClickOutside:w,withinPortal:T,portalProps:E,closeOnEscape:O,clickOutsideEvents:A,trapFocus:ee,onClose:te,onDismiss:j,onOpen:ne,onChange:re,zIndex:ie,radius:ae,shadow:oe,id:se,defaultOpened:ce,__staticSelector:N,withRoles:le,disabled:P,returnFocus:F,variant:ue,keepMounted:de,keepMountedMode:I,vars:L,floatingStrategy:z,withOverlay:pe,overlayProps:B,hideDetached:V,attributes:me,preventPositionChangeWhenVisible:H,...he}=n,ge=y({name:N,props:n,classes:Wn,classNames:S,styles:C,unstyled:x,attributes:me,rootSelector:`dropdown`,vars:L,varsResolver:Qn}),{resolvedStyles:ve}=t({classNames:S,styles:C,props:n}),ye=(0,G.useRef)(null),[be,xe]=(0,G.useState)(null),[Se,Ce]=(0,G.useState)(null),{dir:we}=M(),Te=k(),Ee=g(se),U=Xn({middlewares:f,width:d,position:fe(we,i),offset:typeof a==`number`?a+(p?m/2:0):a,arrowRef:ye,arrowOffset:h,onPositionChange:o,opened:s,defaultOpened:ce,onChange:re,onOpen:ne,onClose:te,onDismiss:j,strategy:z,disabled:P,preventPositionChangeWhenVisible:H,keepMounted:de});kn(()=>{w&&(U.onClose(),j?.())},A,[be,Se]);let De=(0,G.useCallback)(e=>{xe(e),U.floating.refs.setReference(e)},[U.floating.refs.setReference]),Oe=(0,G.useCallback)(e=>{Ce(e),U.floating.refs.setFloating(e)},[U.floating.refs.setFloating]),ke=(0,G.useCallback)(()=>{c?.onExited?.(),l?.(),U.resetLockedPlacement()},[c?.onExited,l,U.resetLockedPlacement]),Ae=(0,G.useCallback)(()=>{c?.onEntered?.(),u?.()},[c?.onEntered,u]);return(0,K.jsxs)(Bn,{value:{returnFocus:F,disabled:P,controlled:U.controlled,reference:De,floating:Oe,x:U.floating.x,y:U.floating.y,arrowX:U.floating?.middlewareData?.arrow?.x,arrowY:U.floating?.middlewareData?.arrow?.y,opened:U.opened,arrowRef:ye,transitionProps:{...c,onExited:ke,onEntered:Ae},width:d,withArrow:p,arrowSize:m,arrowOffset:h,arrowRadius:_,arrowPosition:b,placement:U.floating.placement,trapFocus:ee,withinPortal:T,portalProps:E,zIndex:ie,radius:ae,shadow:oe,closeOnEscape:O,onDismiss:j,onClose:U.onClose,onToggle:U.onToggle,getTargetId:()=>Ee,getDropdownId:()=>`${Ee}-dropdown`,withRoles:le,targetProps:he,__staticSelector:N,classNames:S,styles:C,unstyled:x,variant:ue,keepMounted:de,keepMountedMode:I,getStyles:ge,resolvedStyles:ve,floatingStrategy:z,referenceHidden:V&&Te!==`test`?U.floating.middlewareData.hide?.referenceHidden:!1},children:[r,pe&&(0,K.jsx)(D,{transition:`fade`,mounted:U.opened,duration:c?.duration||250,exitDuration:c?.exitDuration||250,children:e=>(0,K.jsx)(R,{withinPortal:T,children:(0,K.jsx)(_e,{...B,...ge(`overlay`,{className:B?.className,style:[e,B?.style]})})})})]})}Y.Target=qn,Y.Dropdown=Gn,Y.ContextMenu=Un,Y.varsResolver=Qn,Y.displayName=`@mantine/core/Popover`,Y.extend=e=>e,Y.withProps=e=>{let t=t=>(0,K.jsx)(Y,{...e,...t});return t.extend=Y.extend,t.displayName=`WithProps(${Y.displayName})`,t};function $n({style:e,size:t=16,...n}){return(0,K.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:h(t),height:h(t),display:`block`},...n,children:(0,K.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}$n.displayName=`@mantine/core/AccordionChevron`;function er({size:e,style:t,...n}){return(0,K.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:h(e),height:h(e),...t},"aria-hidden":!0,...n,children:(0,K.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var tr={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},nr=l((e,{radius:t,color:n,gradient:r,variant:i,size:o,autoContrast:s,circle:c})=>{let l=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--badge-height":T(o,`badge-height`),"--badge-padding-x":T(o,`badge-padding-x`),"--badge-fz":T(o,`badge-fz`),"--badge-radius":c||t===void 0?void 0:p(t),"--badge-bg":n||i?l.background:void 0,"--badge-color":n||i?l.color:void 0,"--badge-bd":n||i?l.border:void 0,"--badge-dot-color":i===`dot`?a(n,e):void 0}}}),rr=s(e=>{let t=v(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:b,attributes:x,...S}=t,C=y({name:`Badge`,props:t,classes:tr,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:x,vars:s,varsResolver:nr});return(0,K.jsxs)(O,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},b],...C(`root`,{variant:m}),...S,children:[d&&(0,K.jsx)(`span`,{...C(`section`),"data-position":`left`,children:d}),(0,K.jsx)(`span`,{...C(`label`),children:p}),f&&(0,K.jsx)(`span`,{...C(`section`),"data-position":`right`,children:f})]})});rr.classes=tr,rr.varsResolver=nr,rr.displayName=`@mantine/core/Badge`;var[ir,X]=me(`Menu component was not found in the tree`),ar=(0,G.createContext)(null);function or(e){let{value:t,defaultValue:n,onChange:r,children:i}=v(`MenuCheckboxGroup`,null,e),[a,o]=A({value:t,defaultValue:n,finalValue:[],onChange:r});return(0,K.jsx)(ar,{value:{values:a,onChange:(0,G.useCallback)(e=>{o(a.includes(e)?a.filter(t=>t!==e):[...a,e])},[a,o])},children:i})}or.displayName=`@mantine/core/MenuCheckboxGroup`;var sr=(0,G.createContext)(null);function cr({role:t,checked:n,indicator:r,onSelect:i,color:a,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,dataDisabled:d,className:f,style:p,styles:h,classNames:g,buttonRef:_,others:v}){let y=X(),b=(0,G.use)(sr),x=o(),{dir:S}=M(),C=(0,G.useRef)(null),T=J(v.onClick,()=>{d||(i(),s&&y.closeDropdownImmediately())}),E=J(v.onMouseMove,()=>{if(!y.hasSearch)return;let e=C.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==C.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),D=J(v.onKeyDown,e=>{e.key===`ArrowLeft`&&b&&(b.close(),b.focusParentItem())}),O=a?x.variantColorResolver({color:a,theme:x,variant:`light`}):void 0,k=a?w({color:a,theme:x}):null,A=y.alignItemsLabels!==`none`||n;return(0,K.jsxs)(m,{onMouseDown:e=>e.preventDefault(),...v,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:f,style:p,styles:h,classNames:g}),ref:e(C,_),role:t,"aria-checked":n,disabled:u,"data-menu-item":!0,"data-checked":n||void 0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onClick:T,onMouseMove:E,onKeyDown:Cn({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:D}),__vars:{"--menu-item-color":k?.isThemeColor&&k?.shade===void 0?`var(--mantine-color-${k.color}-6)`:O?.color,"--menu-item-hover":O?.hover},children:[A&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:h,classNames:g}),"data-checked":n||void 0,children:n?r:null}),l&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:h,classNames:g}),"data-menu-item-label":!0,children:l}),c&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:h,classNames:g}),"data-position":`right`,children:c})]})}var Z={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,search:`m_ef8769b6`,itemLabel:`m_5476e0d3`,itemIndicator:`m_8395186e`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},lr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,defaultChecked:m,onChange:h,checkIcon:g,ref:_,...y}=v(`MenuCheckboxItem`,null,e),b=X(),x=(0,G.use)(ar),S=x&&f!==void 0?x.values.includes(f):void 0,[C,w]=A({value:p??S,defaultValue:m,finalValue:!1,onChange:h});return(0,K.jsx)(cr,{role:`menuitemcheckbox`,checked:C,indicator:g??b.checkIcon??(0,K.jsx)(er,{size:10}),onSelect:()=>{h?w(!C):x&&f!==void 0?x.onChange(f):w(!C)},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:_,others:y,children:l})});lr.classes=Z,lr.displayName=`@mantine/core/MenuCheckboxItem`;function ur(e){let{children:t,disabled:n,longPressDelay:r}=v(`MenuContextMenu`,null,e),i=H(t);if(!i)throw Error(`Menu.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=X(),o=Vn();return(0,G.cloneElement)(i,Hn({childProps:i.props,disabled:n||o.disabled,opened:a.opened,longPressDelay:r,setReference:o.reference,open:()=>a.openDropdown()}))}ur.displayName=`@mantine/core/MenuContextMenu`;var dr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=v(`MenuDivider`,null,e);return(0,K.jsx)(O,{...X().getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});dr.classes=Z,dr.displayName=`@mantine/core/MenuDivider`;var fr=500;function pr(e){return((e.querySelector(`[data-menu-item-label]`)??e).textContent??``).trim().toLowerCase()}function mr(e){return e.length>1&&e.split(``).every(t=>t===e[0])}function hr({enabled:e,opened:t,getDropdown:n}){let r=(0,G.useRef)({buffer:``,timeoutId:null});return(0,G.useEffect)(()=>{if(t&&e)return;let n=r.current;n.timeoutId!==null&&(window.clearTimeout(n.timeoutId),n.timeoutId=null),n.buffer=``},[t,e]),(0,G.useEffect)(()=>()=>{let{timeoutId:e}=r.current;e!==null&&window.clearTimeout(e)},[]),t=>{if(!e||t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||t.key===` `)return;let i=t.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.tagName===`SELECT`||i.isContentEditable))return;let a=n();if(!a)return;let o=Array.from(a.querySelectorAll(`[data-menu-item]:not([data-disabled])`)).filter(e=>e.closest(`[data-menu-dropdown]`)===a);if(o.length===0)return;let s=r.current;s.buffer=(s.buffer+t.key).toLowerCase(),s.timeoutId!==null&&window.clearTimeout(s.timeoutId),s.timeoutId=window.setTimeout(()=>{s.buffer=``,s.timeoutId=null},fr);let c=document.activeElement,l=c?o.indexOf(c):-1,u=null;if(s.buffer.length===1||mr(s.buffer)){let e=s.buffer[0],t=l+1;for(let n=0;n{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onKeyDown:l,children:u,ref:d,...f}=v(`MenuDropdown`,null,t),p=(0,G.useRef)(null),m=X(),h=hr({enabled:!m.hasSearch,opened:m.opened,getDropdown:()=>p.current}),g=J(l,e=>{h(e),!(e.defaultPrevented||m.hasSearch)&&(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),p.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),_=J(s,()=>(m.trigger===`hover`||m.trigger===`click-hover`)&&m.openDropdown()),y=J(c,()=>(m.trigger===`hover`||m.trigger===`click-hover`)&&m.closeDropdown());return(0,K.jsxs)(Y.Dropdown,{...f,onMouseEnter:_,onMouseLeave:y,role:`menu`,"aria-orientation":`vertical`,ref:e(d,p),...m.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:g,children:[m.withInitialFocusPlaceholder&&!m.hasSearch&&(0,K.jsx)(`div`,{role:`presentation`,tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),u]})});gr.classes=Z,gr.displayName=`@mantine/core/MenuDropdown`;var _r=s(t=>{let{classNames:n,className:r,style:i,styles:a,vars:s,color:c,closeMenuOnClick:l,leftSection:u,rightSection:d,children:f,disabled:p,"data-disabled":h,ref:g,..._}=v(`MenuItem`,null,t),y=X(),b=(0,G.use)(sr),x=o(),{dir:S}=M(),C=(0,G.useRef)(null),T=_,E=J(T.onClick,()=>{h||(typeof l==`boolean`?l&&y.closeDropdownImmediately():y.closeOnItemClick&&y.closeDropdownImmediately())}),D=J(T.onMouseMove,()=>{if(!y.hasSearch)return;let e=C.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==C.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),O=c?x.variantColorResolver({color:c,theme:x,variant:`light`}):void 0,k=c?w({color:c,theme:x}):null,A=J(T.onKeyDown,e=>{e.key===`ArrowLeft`&&b&&(b.close(),b.focusParentItem())});return(0,K.jsxs)(m,{onMouseDown:e=>e.preventDefault(),..._,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:e(C,g),role:`menuitem`,disabled:p,"data-menu-item":!0,"data-disabled":p||h||void 0,"data-mantine-stop-propagation":!0,onClick:E,onMouseMove:D,onKeyDown:Cn({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:A}),__vars:{"--menu-item-color":k?.isThemeColor&&k?.shade===void 0?`var(--mantine-color-${k.color}-6)`:O?.color,"--menu-item-hover":O?.hover},children:[y.alignItemsLabels===`all`&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:a,classNames:n}),"data-placeholder":!0}),u&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:u}),f&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:a,classNames:n}),"data-menu-item-label":!0,children:f}),d&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:d})]})});_r.classes=Z,_r.displayName=`@mantine/core/MenuItem`;var vr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=v(`MenuLabel`,null,e);return(0,K.jsx)(O,{...X().getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});vr.classes=Z,vr.displayName=`@mantine/core/MenuLabel`;var yr=(0,G.createContext)(null);function br(e){let{value:t,defaultValue:n,onChange:r,children:i}=v(`MenuRadioGroup`,null,e),[a,o]=A({value:t,defaultValue:n,finalValue:null,onChange:r});return(0,K.jsx)(yr,{value:{value:a,onChange:e=>o(e)},children:i})}br.displayName=`@mantine/core/MenuRadioGroup`;function xr({size:e,style:t,...n}){return(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:h(e),height:h(e),...t},"aria-hidden":!0,...n,children:(0,K.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var Sr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,onChange:m,checkIcon:h,ref:g,..._}=v(`MenuRadioItem`,null,e),y=X(),b=(0,G.use)(yr),x=p??(b?b.value===f:!1);return(0,K.jsx)(cr,{role:`menuitemradio`,checked:x,indicator:h??y.checkIcon??(0,K.jsx)(xr,{size:5}),onSelect:()=>{x||(m?m(f):b&&b.onChange(f))},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:g,others:_,children:l})});Sr.classes=Z,Sr.displayName=`@mantine/core/MenuRadioItem`;var Cr=`[data-menu-item]:not([data-disabled])`,wr=`[data-menu-active]`;function Tr(e){return e?.closest(`[data-menu-dropdown]`)}function Er(e){return e?Array.from(e.querySelectorAll(Cr)).filter(t=>t.closest(`[data-menu-dropdown]`)===e):[]}function Dr(e){e&&e.querySelectorAll(wr).forEach(t=>{t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}function Or(e,t){Dr(t),e&&(e.setAttribute(`data-menu-active`,`true`),e.scrollIntoView({block:`nearest`}))}function kr(e){return e.findIndex(e=>e.hasAttribute(`data-menu-active`))}var Ar={clearSearchOnClose:!0},jr=n(t=>{let{classNames:n,styles:r,onKeyDown:i,onChange:a,size:o,clearSearchOnClose:s,ref:c,...l}=v(`MenuSearch`,Ar,t),u=X(),d=(0,G.useRef)(null),f=e(c,d),p=(0,G.useRef)(a);p.current=a,(0,G.useEffect)(()=>u.registerSearch(),[u.registerSearch]),(0,G.useEffect)(()=>{s?u.searchExitClearRef.current=()=>{p.current?.({currentTarget:{value:``}})}:u.searchExitClearRef.current=null},[s,u.searchExitClearRef]),(0,G.useEffect)(()=>{u.opened||Dr(Tr(d.current))},[u.opened]);let m=J(a,e=>{Dr(Tr(e.currentTarget))}),h=J(i,e=>{if(e.defaultPrevented)return;let t=Tr(e.currentTarget),n=Er(t);if(e.key===`ArrowDown`){if(e.preventDefault(),n.length===0)return;let r=kr(n);Or(n[r>=n.length-1?u.loop?0:r:r+1]??null,t)}else if(e.key===`ArrowUp`){if(e.preventDefault(),n.length===0)return;let r=kr(n);Or(n[r<=0?r===-1||u.loop?n.length-1:0:r-1]??null,t)}else if(e.key===`Home`)e.preventDefault(),n.length>0&&Or(n[0],t);else if(e.key===`End`)e.preventDefault(),n.length>0&&Or(n[n.length-1],t);else if(e.key===`Enter`){if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=n[kr(n)];t&&(e.preventDefault(),t.hasAttribute(`data-sub-menu-item`)?(t.focus(),t.dispatchEvent(new KeyboardEvent(`keydown`,{key:`ArrowRight`,bubbles:!0}))):t.click())}}),g=u.getStyles(`search`);return(0,K.jsx)(b,{"data-autofocus":!0,"data-mantine-stop-propagation":!0,type:`search`,size:o,...l,ref:f,classNames:[{input:g.className},n],styles:[{input:g.style},r],onKeyDown:h,onChange:m,__staticSelector:`Menu`})});jr.classes=Z,jr.displayName=`@mantine/core/MenuSearch`;var Mr=n(t=>{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onPointerEnter:l,onPointerLeave:u,onKeyDown:d,children:f,ref:p,...m}=v(`MenuSubDropdown`,null,t),h=(0,G.useRef)(null),g=X(),_=(0,G.use)(sr),y=hr({enabled:!g.hasSearch,opened:_?.opened??!1,getDropdown:()=>h.current}),b=J(d,e=>{y(e),!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&e.key!==` `&&e.stopPropagation()}),x=_?.getFloatingProps({onMouseEnter:s,onMouseLeave:c,onPointerEnter:l,onPointerLeave:u});return(0,K.jsx)(Y.Dropdown,{...m,...x,role:`menu`,"aria-orientation":`vertical`,ref:e(p,h,_?.setFloating),...g.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:f})});Mr.classes=Z,Mr.displayName=`@mantine/core/MenuSubDropdown`;var Nr=s(t=>{let{classNames:n,className:r,style:i,styles:a,vars:s,color:c,leftSection:l,rightSection:u,children:d,disabled:f,"data-disabled":p,closeMenuOnClick:h,ref:g,..._}=v(`MenuSubItem`,null,t),y=X(),b=(0,G.use)(sr),x=o(),{dir:S}=M(),C=(0,G.useRef)(null),T=_,E=c?x.variantColorResolver({color:c,theme:x,variant:`light`}):void 0,D=c?w({color:c,theme:x}):null,O=J(T.onKeyDown,e=>{e.key===`ArrowRight`&&(b?.open(),b?.focusFirstItem()),e.key===`ArrowLeft`&&b?.parentContext&&(b.parentContext.close(),b.parentContext.focusParentItem())}),k=J(T.onClick,()=>{!p&&h&&y.closeDropdownImmediately()}),A=J(T.onMouseMove,()=>{if(!y.hasSearch)return;let e=C.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==C.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),ee=b?.getReferenceProps({onMouseEnter:T.onMouseEnter,onMouseLeave:T.onMouseLeave,onPointerEnter:T.onPointerEnter,onPointerLeave:T.onPointerLeave});return(0,K.jsxs)(m,{onMouseDown:e=>e.preventDefault(),..._,...ee,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:e(C,g,b?.setReference),role:`menuitem`,disabled:f,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":f||p||void 0,"data-mantine-stop-propagation":!0,onClick:k,onMouseMove:A,onKeyDown:Cn({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:O}),__vars:{"--menu-item-color":D?.isThemeColor&&D?.shade===void 0?`var(--mantine-color-${D.color}-6)`:E?.color,"--menu-item-hover":E?.hover},children:[y.alignItemsLabels===`all`&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:a,classNames:n}),"data-placeholder":!0}),l&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:l}),d&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:a,classNames:n}),"data-menu-item-label":!0,children:d}),(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:u||(0,K.jsx)($n,{...y.getStyles(`chevron`),size:14})})]})});Nr.classes=Z,Nr.displayName=`@mantine/core/MenuSubItem`;function Pr({children:e,refProp:t}){if(!oe(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return X(),(0,K.jsx)(Y.Target,{refProp:t,popupType:`menu`,children:e})}Pr.displayName=`@mantine/core/MenuSubTarget`;var Fr={offset:0,position:`right-start`,safeAreaPolygon:!0,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Ir(e){let{children:t,closeDelay:n,openDelay:r,position:i,safeAreaPolygon:a,opened:o,onChange:s,...c}=v(`MenuSub`,Fr,e),l=g(),[u,d]=A({value:o,finalValue:!1,onChange:s}),f=(0,G.use)(sr),p=X(),{dir:m}=M(),h=fe(m,i),_=f?.registerOpenSub??p.registerOpenSub,y=(0,G.useRef)(null),b=(0,G.useCallback)(e=>{let t=y.current;return t&&t!==e&&t(),y.current=e,()=>{y.current===e&&(y.current=null)}},[]),x=(0,G.useRef)(d);x.current=d;let S=(0,G.useCallback)(()=>x.current(!0),[]),C=(0,G.useCallback)(()=>x.current(!1),[]);(0,G.useEffect)(()=>{if(u)return _(C)},[u,_,C]);let{context:w,refs:T}=N({placement:h,open:u,onOpenChange:e=>{e?S():C()}}),{getReferenceProps:E,getFloatingProps:D}=B([I(w,{handleClose:a?pe(typeof a==`object`?a:void 0):void 0,delay:{open:r,close:n}})]);return(0,K.jsx)(sr,{value:{opened:u,close:C,open:S,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-target`)?.focus()},16),parentContext:f,setReference:T.setReference,setFloating:T.setFloating,getReferenceProps:E,getFloatingProps:D,registerOpenSub:b},children:(0,K.jsx)(Y,{opened:u,onChange:e=>e?S():C(),withinPortal:!1,withArrow:!1,id:l,position:i,...c,children:t})})}Ir.extend=e=>e,Ir.displayName=`@mantine/core/MenuSub`,Ir.Target=Pr,Ir.Dropdown=Mr,Ir.Item=Nr;var Lr={refProp:`ref`};function Rr(e){let{children:t,refProp:n,...r}=v(`MenuTarget`,Lr,e),i=H(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=X(),o=i.props,s=J(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=J(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=J(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,K.jsx)(Y.Target,{refProp:n,popupType:`menu`,...r,children:(0,G.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Rr.displayName=`@mantine/core/MenuTarget`;var zr={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1,alignItemsLabels:`with-indicators`},Q=n(e=>{let n=v(`Menu`,zr,e),{children:r,onOpen:i,onClose:a,opened:o,defaultOpened:s,trapFocus:c,onChange:l,closeOnItemClick:u,loop:d,closeOnEscape:f,trigger:p,openDelay:m,closeDelay:h,classNames:g,styles:_,unstyled:b,variant:x,vars:S,menuItemTabIndex:C,keepMounted:w,withInitialFocusPlaceholder:T,attributes:E,onExitTransitionEnd:D,alignItemsLabels:O,checkIcon:k,...ee}=n,te=y({name:`Menu`,classes:Z,props:n,classNames:g,styles:_,unstyled:b,attributes:E}),[j,ne]=A({value:o,defaultValue:s,finalValue:!1,onChange:l}),[re,ie]=(0,G.useState)(!1),ae=()=>{ne(!1),ie(!1),j&&a?.()},oe=()=>{ne(!0),!j&&i?.()},se=()=>{j?ae():oe()},{openDropdown:ce,closeDropdown:M}=zn({open:oe,close:ae,closeDelay:h,openDelay:m}),N=(0,G.useRef)(null),le=(0,G.useCallback)(e=>{let t=N.current;return t&&t!==e&&t(),N.current=e,()=>{N.current===e&&(N.current=null)}},[]),P=(0,G.useRef)(0),[F,ue]=(0,G.useState)(!1),de=(0,G.useCallback)(()=>(P.current+=1,P.current===1&&ue(!0),()=>{--P.current,P.current===0&&ue(!1)}),[]),I=(0,G.useRef)(null),L=()=>{I.current?.(),D?.()},R=e=>Dn(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:z,resolvedStyles:fe}=t({classNames:g,styles:_,props:n});return(0,K.jsx)(ir,{value:{getStyles:te,opened:j,toggleDropdown:se,getItemIndex:R,openedViaClick:re,setOpenedViaClick:ie,closeOnItemClick:u,closeDropdown:p===`click`?ae:M,openDropdown:p===`click`?oe:ce,closeDropdownImmediately:ae,loop:d,trigger:p,unstyled:b,menuItemTabIndex:C,withInitialFocusPlaceholder:T,registerOpenSub:le,hasSearch:F,registerSearch:de,searchExitClearRef:I,alignItemsLabels:O,checkIcon:k},children:(0,K.jsx)(Y,{returnFocus:!0,...ee,opened:j,onChange:se,defaultOpened:s,trapFocus:!w&&c,closeOnEscape:f,__staticSelector:`Menu`,classNames:z,styles:fe,unstyled:b,variant:x,keepMounted:w,onExitTransitionEnd:L,children:r})})});Q.displayName=`@mantine/core/Menu`,Q.classes=Z,Q.Item=_r,Q.Label=vr,Q.Dropdown=gr,Q.Target=Rr,Q.Divider=dr,Q.Search=jr,Q.Sub=Ir,Q.CheckboxItem=lr,Q.CheckboxGroup=or,Q.RadioItem=Sr,Q.RadioGroup=br,Q.ContextMenu=ur;var Br=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z`}))]]),Vr=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),Hr=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z`}))]]),Ur=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),Wr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Br}));Wr.displayName=`DotsThreeIcon`;var Gr=Wr,Kr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Vr}));Kr.displayName=`PlusIcon`;var qr=Kr,Jr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Hr}));Jr.displayName=`SparkleIcon`;var Yr=Jr,Xr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Ur}));Xr.displayName=`TrashIcon`;var Zr=Xr,$=[];for(let e=0;e<256;++e)$.push((e+256).toString(16).slice(1));function Qr(e,t=0){return($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+`-`+$[e[t+4]]+$[e[t+5]]+`-`+$[e[t+6]]+$[e[t+7]]+`-`+$[e[t+8]]+$[e[t+9]]+`-`+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase()}var $r=new Uint8Array(16);function ei(){return crypto.getRandomValues($r)}var ti={};function ni(e,t,n){let r;if(e)r=ii(e.random??e.rng?.()??ei(),e.msecs,e.seq,t,n);else{let e=Date.now(),i=ei();ri(ti,e,i),r=ii(i,ti.msecs,ti.seq,t,n)}return t??Qr(r)}function ri(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=ai(n),e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function ii(e,t,n,r,i=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=ai(e),r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}function ai(e){return(e[6]&127)<<24|e[7]<<16|e[8]<<8|e[9]}function oi(){return ni()}var si=[{value:`15m`,label:`15 minutes`},{value:`1h`,label:`1 hour`},{value:`6h`,label:`6 hours`},{value:`24h`,label:`24 hours`},{value:`168h`,label:`7 days`},{value:`720h`,label:`30 days`}];function ci(e){return si.find(t=>t.value===e)?.label??e}function li(e,t){let n=e?.[t];return typeof n==`string`?n:``}function ui(e,t,n=[]){let r=new URLSearchParams({window:e.window,limit:`40`});e.namespace&&r.set(`namespace`,e.namespace);for(let e of n){let n=li(t,e);n&&r.set(e,n)}return r}function di(e,t){return[`observability`,e,t.toString()]}var fi=e=>e.state.status===`error`?15e3:3e4,pi=15e3;function mi(e,t,n=!0){return be({queryKey:di(e,t),queryFn:()=>xe(`/api/observability/${e}?${t}`),enabled:n,refetchInterval:fi,staleTime:pi})}function hi(e){return e.getQueryCache().findAll({queryKey:[`observability`]}).reduce((e,t)=>Math.max(e,t.state.dataUpdatedAt),0)||null}function gi(){let e=ve(),[t,n]=(0,G.useState)(()=>hi(e));return(0,G.useEffect)(()=>e.getQueryCache().subscribe(()=>n(hi(e))),[e]),t}function _i(e){let t={};return typeof e.window==`string`&&si.some(t=>t.value===e.window)&&(t.window=e.window),typeof e.namespace==`string`&&e.namespace.trim()&&(t.namespace=e.namespace.trim()),t}var vi=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],yi=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],bi=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],xi=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],Si=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],Ci=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],wi={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},Ti={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},Ei={micro:11,small:12,body:14,title:16,section:22,page:32},Di={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`};export{et as $,Ln as A,Pt as B,Gr as C,Y as D,er as E,hn as F,Ct as G,Dt as H,mn as I,_t as J,pt as K,Kt as L,Tn as M,vn as N,In as O,gn as P,tt as Q,Ut as R,qr as S,rr as T,Tt as U,jt as V,xt as W,ot as X,gt as Y,$e as Z,ui as _,Di as a,Ve as at,Zr as b,Ti as c,we as ct,_i as d,Ce as dt,Qe as et,li as f,Oe as ft,mi as g,gi as h,wi as i,Ue as it,En as j,Rn as k,Ei as l,U as lt,pi as m,Si as n,Ge as nt,Ci as o,Pe as ot,si as p,ke as pt,bt as q,yi as r,ze as rt,bi as s,He as st,vi as t,rt as tt,xi as u,Be as ut,ci as v,Q as w,Yr as x,oi as y,Vt as z}; \ No newline at end of file diff --git a/internal/ui/dist/assets/use-computed-color-scheme-6JIsge00.js b/internal/ui/dist/assets/use-computed-color-scheme-6JIsge00.js deleted file mode 100644 index f98be131..00000000 --- a/internal/ui/dist/assets/use-computed-color-scheme-6JIsge00.js +++ /dev/null @@ -1 +0,0 @@ -import{B as e,F as t,St as n,gt as r,rt as i}from"./brand-MzZ03bSa.js";var a=()=>{};function o(e,t){return i(`(prefers-color-scheme: dark)`,e===`dark`,t)?`dark`:`light`}var s=n(r(),1);function c(e){let t=document.createElement(`style`);return t.setAttribute(`data-mantine-styles`,`inline`),t.innerHTML=`*, *::before, *::after {transition: none !important;}`,t.setAttribute(`data-mantine-disable-transition`,`true`),e&&t.setAttribute(`nonce`,e),document.head.appendChild(t),()=>document.querySelectorAll(`[data-mantine-disable-transition]`).forEach(e=>e.remove())}function l({keepTransitions:n}={}){let r=(0,s.useRef)(a),i=(0,s.useRef)(-1),l=(0,s.use)(t),u=(0,s.useRef)(e()?.());if(!l)throw Error(`[@mantine/core] MantineProvider was not found in tree`);let d=e=>{l.setColorScheme(e),r.current=n?()=>{}:c(u.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{r.current?.()},10)},f=()=>{l.clearColorScheme(),r.current=n?()=>{}:c(u.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{r.current?.()},10)},p=o(`light`,{getInitialValueInEffect:!1}),m=l.colorScheme===`auto`?p:l.colorScheme,h=(0,s.useCallback)(()=>d(m===`light`?`dark`:`light`),[d,m]);return(0,s.useEffect)(()=>()=>{r.current?.(),window.clearTimeout(i.current)},[]),{colorScheme:l.colorScheme,setColorScheme:d,clearColorScheme:f,toggleColorScheme:h}}function u(e,t={getInitialValueInEffect:!0}){let n=o(e,t),{colorScheme:r}=l();return r===`auto`?n:r}export{l as n,a as r,u as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/use-computed-color-scheme-B3cychmA.js b/internal/ui/dist/assets/use-computed-color-scheme-B3cychmA.js new file mode 100644 index 00000000..c68cf15e --- /dev/null +++ b/internal/ui/dist/assets/use-computed-color-scheme-B3cychmA.js @@ -0,0 +1 @@ +import{B as e,F as t,gt as n,rt as r,yt as i}from"./brand-CnsMBQCm.js";var a=()=>{};function o(e,t){return r(`(prefers-color-scheme: dark)`,e===`dark`,t)?`dark`:`light`}var s=i(n(),1);function c(e){let t=document.createElement(`style`);return t.setAttribute(`data-mantine-styles`,`inline`),t.innerHTML=`*, *::before, *::after {transition: none !important;}`,t.setAttribute(`data-mantine-disable-transition`,`true`),e&&t.setAttribute(`nonce`,e),document.head.appendChild(t),()=>document.querySelectorAll(`[data-mantine-disable-transition]`).forEach(e=>e.remove())}function l({keepTransitions:n}={}){let r=(0,s.useRef)(a),i=(0,s.useRef)(-1),l=(0,s.use)(t),u=e(),d=(0,s.useRef)(u?.());if(!l)throw Error(`[@mantine/core] MantineProvider was not found in tree`);let f=e=>{l.setColorScheme(e),r.current=n?()=>{}:c(d.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{r.current?.()},10)},p=()=>{l.clearColorScheme(),r.current=n?()=>{}:c(d.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>{r.current?.()},10)},m=o(`light`,{getInitialValueInEffect:!1}),h=l.colorScheme===`auto`?m:l.colorScheme,g=(0,s.useCallback)(()=>f(h===`light`?`dark`:`light`),[f,h]);return(0,s.useEffect)(()=>()=>{r.current?.(),window.clearTimeout(i.current)},[]),{colorScheme:l.colorScheme,setColorScheme:f,clearColorScheme:p,toggleColorScheme:g}}function u(e,t={getInitialValueInEffect:!0}){let n=o(e,t),{colorScheme:r}=l();return r===`auto`?n:r}export{l as n,a as r,u as t}; \ No newline at end of file diff --git a/internal/ui/dist/index.html b/internal/ui/dist/index.html index cb7adfbb..754c32bf 100644 --- a/internal/ui/dist/index.html +++ b/internal/ui/dist/index.html @@ -21,15 +21,15 @@ document.documentElement.setAttribute("data-mantine-color-scheme", computed); } catch (e) {} - - - - - - - - - + + + + + + + + +
diff --git a/justfile b/justfile index 8526f8e7..ab0a7dbe 100644 --- a/justfile +++ b/justfile @@ -59,7 +59,7 @@ ui: ui-apps ui-host # Browser assets, then the binary that embeds them. build VERSION=`git describe --tags --always --dirty 2>/dev/null || echo dev`: ui - go build -ldflags "-s -w -X main.version={{VERSION}}" -o bin/fanout ./cmd/fanout + bash scripts/with-duckdb.sh go build -ldflags "-s -w -X main.version={{VERSION}}" -o bin/fanout ./cmd/fanout # CI publishes ghcr.io/labstack/fanout; this is for trying the image locally # without pushing anything. @@ -82,13 +82,17 @@ release: release-test: bash ./scripts/release_test.sh +# Caller tags must never replace the pinned native binding. +duckdb-wrapper-test: + bash scripts/go-build-tags_test.sh + # Regenerate the legal inventory for every shipped Go target and browser app. notices: - go run ./internal/cmd/notices -root . + bash scripts/with-duckdb.sh go run ./internal/cmd/notices -root . # Fail if THIRD_PARTY_NOTICES does not match the release dependency graph. notices-check: - go run ./internal/cmd/notices -root . -check + bash scripts/with-duckdb.sh go run ./internal/cmd/notices -root . -check # ── Database ───────────────────────────────────────────────────────────────── @@ -115,13 +119,13 @@ fmt-check: # Standalone; `lint` already runs govet via golangci-lint's standard set. vet: - go vet ./... + bash scripts/with-duckdb.sh go vet ./... lint: - golangci-lint run + bash scripts/with-duckdb.sh golangci-lint run test *ARGS='./...': - go test {{ARGS}} + bash scripts/with-duckdb.sh go test {{ARGS}} # duckdb-go's CGO vector readers trip checkptr's unsafe-pointer *alignment* # check under -race on linux/amd64 and abort with "misaligned pointer @@ -130,7 +134,7 @@ test *ARGS='./...': # Run the Go tests under the race detector. test-race: - go test -race -gcflags=all=-d=checkptr=0 ./... + bash scripts/with-duckdb.sh go test -race -gcflags=all=-d=checkptr=0 ./... # ── Browser quality ────────────────────────────────────────────────────────── @@ -216,11 +220,11 @@ diagrams-check: # Rewrite the generated settings reference from internal/config. docs-generate: - go run ./cmd/fanout-docgen + bash scripts/with-duckdb.sh go run ./cmd/fanout-docgen # Fail when a committed settings page is behind the configuration type. docs-generate-check: - go run ./cmd/fanout-docgen --check + bash scripts/with-duckdb.sh go run ./cmd/fanout-docgen --check # Install the documentation site's dependencies from the lockfile. # @@ -313,7 +317,7 @@ social-card: # a settings page that no longer matches the type the loader binds is a # documented setting the binary would reject, and it should fail here rather # than be published. -check: fmt-check lint release-test ui-audit ui-check notices-check test ui-test docs-generate-check site-build +check: fmt-check lint release-test duckdb-wrapper-test ui-audit ui-check notices-check test ui-test docs-generate-check site-build @echo "All checks passed" clean: diff --git a/lefthook.yml b/lefthook.yml index c9236062..927bc051 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -33,7 +33,7 @@ pre-commit: glob: "*.go" # ~3s for the whole module, so scoping to changed packages would buy # nothing and risks missing cross-package breakage. - run: golangci-lint run + run: bash scripts/with-duckdb.sh golangci-lint run - name: ui-host-lint glob: "{ui/host/**/*.{ts,tsx},ui/theme.ts}" diff --git a/scripts/go-build-tags.sh b/scripts/go-build-tags.sh new file mode 100644 index 00000000..6e65616c --- /dev/null +++ b/scripts/go-build-tags.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +# Preserve caller build tags while requiring the pinned DuckDB native binding. +duckdb_build_tags() { + local remaining="${GOFLAGS:-}" flags='' tags='duckdb_use_static_lib' + local token raw quote value i command='' run=false stop=false + local positions=() prefixes=() position_count=0 + duckdb_go_args=("$@") + while [[ -n "$remaining" ]]; do + remaining="${remaining#"${remaining%%[!$' \t\r\n']*}"}" + [[ -n "$remaining" ]] || break + case "$remaining" in + \'* | \"*) + quote="${remaining:0:1}" + remaining="${remaining:1}" + if [[ "$remaining" != *"$quote"* ]]; then + echo 'Unterminated quote in GOFLAGS.' >&2 + return 2 + fi + token="${remaining%%"$quote"*}" + raw="$quote$token$quote" + remaining="${remaining#*"$quote"}" + ;; + *) + token="${remaining%%[$' \t\r\n']*}" + raw="$token" + remaining="${remaining:${#token}}" + ;; + esac + if [[ "$token" == -tags=* || "$token" == --tags=* ]]; then + value="${token#*=}" + tags+=",${value// /,}" + else + flags+=" $raw" + fi + done + # Go command-line flags override GOFLAGS. Merge explicit tags as well. + if [[ "${duckdb_go_args[0]##*/}" == go ]]; then + for ((i = 1; i < ${#duckdb_go_args[@]}; i++)); do + token="${duckdb_go_args[i]}" + if [[ -z "$command" ]]; then + case "$token" in + -C) + ((i += 1)) + continue + ;; + -C=*) continue ;; + *) + command="$token" + [[ "$command" != run ]] || run=true + continue + ;; + esac + fi + [[ "$stop" == false ]] || continue + case "$token" in + -- | -args) stop=true ;; + -tags=* | --tags=*) + tags+=",${token#*=}" + positions+=("$i") + prefixes+=("-tags=") + ((position_count += 1)) + ;; + -tags | --tags) + ((i += 1)) + if ((i >= ${#duckdb_go_args[@]})); then + echo 'Missing value for -tags.' >&2 + return 2 + fi + tags+=",${duckdb_go_args[i]// /,}" + positions+=("$i") + prefixes+=("") + ((position_count += 1)) + ;; + -C | -o | -p | -asmflags | -buildmode | -compiler | -covermode | -coverpkg | -gccgoflags | -gcflags | -installsuffix | -ldflags | -mod | -modfile | -overlay | -pgo | -pkgdir | -toolexec | -run | -bench | -fuzz | -skip | -benchtime | -blockprofile | -blockprofilerate | -count | -coverprofile | -cpu | -cpuprofile | -fuzztime | -fuzzminimizetime | -list | -memprofile | -memprofilerate | -mutexprofile | -mutexprofilefraction | -outputdir | -parallel | -shuffle | -timeout | -trace | -vet) + ((i += 1)) + ;; + -*) ;; + *) [[ "$run" == false ]] || stop=true ;; + esac + done + # Replace only build flags, never flags forwarded to a program/test binary. + for ((i = 0; i < position_count; i++)); do + duckdb_go_args[${positions[i]}]="${prefixes[i]}${tags// /,}" + done + fi + export GOFLAGS="$flags -tags=${tags// /,}" +} diff --git a/scripts/go-build-tags_test.sh b/scripts/go-build-tags_test.sh new file mode 100644 index 00000000..6cb9ac40 --- /dev/null +++ b/scripts/go-build-tags_test.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +set -euo pipefail +source "$(dirname "${BASH_SOURCE[0]}")/go-build-tags.sh" + +GOFLAGS='-mod=readonly -tags=custom' +duckdb_build_tags go test -tags=integration ./... +[[ "$GOFLAGS" == ' -mod=readonly -tags=duckdb_use_static_lib,custom,integration' ]] +[[ "${duckdb_go_args[2]}" == '-tags=duckdb_use_static_lib,custom,integration' ]] + +GOFLAGS="'-ldflags=-s -w' '-tags=custom other'" +duckdb_build_tags go test ./... -tags 'integration transportbench' -args -tags=runtime +[[ "$GOFLAGS" == " '-ldflags=-s -w' -tags=duckdb_use_static_lib,custom,other,integration,transportbench" ]] +[[ "${duckdb_go_args[4]}" == 'duckdb_use_static_lib,custom,other,integration,transportbench' ]] +[[ "${duckdb_go_args[6]}" == '-tags=runtime' ]] + +GOFLAGS='' +duckdb_build_tags go run -ldflags '-s -w' -tags=custom ./cmd/fanout -tags=runtime +[[ "${duckdb_go_args[4]}" == '-tags=duckdb_use_static_lib,custom' ]] +[[ "${duckdb_go_args[6]}" == '-tags=runtime' ]] + +GOFLAGS='' +duckdb_build_tags go -C /tmp test -tags=one -tags=two ./... +[[ "${duckdb_go_args[4]}" == '-tags=duckdb_use_static_lib,one,two' ]] +[[ "${duckdb_go_args[5]}" == '-tags=duckdb_use_static_lib,one,two' ]] + +GOFLAGS='-tags=custom' +duckdb_build_tags golangci-lint run +[[ "$GOFLAGS" == ' -tags=duckdb_use_static_lib,custom' ]] +[[ "${duckdb_go_args[*]}" == 'golangci-lint run' ]] + +GOFLAGS='' +duckdb_build_tags go test -tags=integration ./... -- -tags=runtime +[[ "${duckdb_go_args[5]}" == '-tags=runtime' ]] + +GOFLAGS='' +duckdb_build_tags go test ./... +[[ "$GOFLAGS" == ' -tags=duckdb_use_static_lib' ]] + +GOFLAGS='' +duckdb_build_tags go test -run '-tags=pattern' -tags=integration ./... +[[ "${duckdb_go_args[3]}" == '-tags=pattern' ]] +[[ "${duckdb_go_args[4]}" == '-tags=duckdb_use_static_lib,integration' ]] + +GOFLAGS='--tags=custom' +duckdb_build_tags go test --tags=integration ./... +[[ "${duckdb_go_args[2]}" == '-tags=duckdb_use_static_lib,custom,integration' ]] +GOFLAGS='' +duckdb_build_tags go test --tags integration ./... +[[ "${duckdb_go_args[3]}" == 'duckdb_use_static_lib,integration' ]] + +GOFLAGS="'-tags=unclosed" +if duckdb_build_tags go test ./... 2>/dev/null; then + echo 'Accepted unterminated GOFLAGS quote.' >&2 + exit 1 +fi +echo 'DuckDB build-tag tests passed.' diff --git a/scripts/with-duckdb.sh b/scripts/with-duckdb.sh new file mode 100644 index 00000000..8175e277 --- /dev/null +++ b/scripts/with-duckdb.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash +# Use the same pinned engine and headers for every local/CI/release Go command. +set -euo pipefail + +root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +version=v2.0.0-alpha43763 +case "$(uname -s)/$(uname -m)" in +Darwin/arm64) + platform=osx-arm64 + checksum=42320cd312d1a55f2fbe2e527b4f95aed6e0b9ee77e64092fa2a5b0879024206 + system_libs='-lc++ -Wl,-no_warn_duplicate_libraries' + ;; +Darwin/x86_64) + platform=osx-amd64 + checksum=c13adabde6b7aac99281d745da2bdfad0c482b306e1b3d3d7391ef806e967368 + system_libs='-lc++ -Wl,-no_warn_duplicate_libraries' + ;; +Linux/x86_64) + platform=linux-amd64 + checksum=5d62c5bca5474722e172d19c51ba4c7b3711444b70f6478b3b38b94bfb5681b2 + system_libs='-lstdc++ -lm -ldl -pthread' + ;; +Linux/aarch64) + platform=linux-arm64 + checksum=af0ed15848a76a013764419b4f47020ae0aa7e71396f2365aa61a95ecba456ee + system_libs='-lstdc++ -lm -ldl -pthread' + ;; +*) + echo 'DuckDB builds require a supported native macOS/Linux runner.' >&2 + exit 1 + ;; +esac + +libs="$root/.cache/duckdb/$version/$platform" +if [[ ! -f "$libs/.verified" ]]; then + mkdir -p "$(dirname "$libs")" + lock="$libs.lock" + acquired=false + for ((attempt = 0; attempt < 300; attempt++)); do + if mkdir "$lock" 2>/dev/null; then + acquired=true + break + fi + if [[ -f "$libs/.verified" ]]; then break; fi + sleep 1 + done + if [[ "$acquired" == false && ! -f "$libs/.verified" ]]; then + echo "Timed out waiting for DuckDB cache lock: $lock" >&2 + exit 1 + fi + if [[ "$acquired" == true ]]; then + trap 'rmdir "$lock"' EXIT + if [[ ! -f "$libs/.verified" ]]; then + stage="$(mktemp -d "$(dirname "$libs")/.download.XXXXXX")" + trap 'rm -rf "$stage"; rmdir "$lock"' EXIT + url="https://github.com/labstack/fanout/releases/download/duckdb-$version/duckdb-static-libs-$platform.tar.gz" + curl --fail --location --silent --show-error "$url" -o "$stage/archive.tar.gz" + if [[ "$platform" == osx-* ]]; then + actual="$(shasum -a 256 "$stage/archive.tar.gz" | awk '{print $1}')" + else + actual="$(sha256sum "$stage/archive.tar.gz" | awk '{print $1}')" + fi + [[ "$actual" == "$checksum" ]] || { + echo 'DuckDB archive checksum mismatch.' >&2 + exit 1 + } + mkdir "$stage/lib" + tar -xzf "$stage/archive.tar.gz" -C "$stage/lib" + for file in duckdb.h duckdb_static_extension.h libduckdb_static.a libcore_functions_extension.a libjson_extension.a libparquet_extension.a libicu_extension.a; do + [[ -s "$stage/lib/$file" ]] || { + echo "DuckDB archive lacks $file" >&2 + exit 1 + } + done + printf '%s\n' "$checksum" >"$stage/lib/.verified" + mv "$stage/lib" "$libs" + rm -rf "$stage" + fi + rmdir "$lock" + trap - EXIT + fi +fi + +[[ "$(cat "$libs/.verified")" == "$checksum" ]] || { + echo 'DuckDB cache pin mismatch.' >&2 + exit 1 +} + +# Go's CGO flag parser understands double-quoted arguments, including spaces. +escaped_libs="${libs//\\/\\\\}" +escaped_libs="${escaped_libs//\"/\\\"}" + +export CGO_ENABLED=1 +source "$root/scripts/go-build-tags.sh" +duckdb_build_tags "$@" +export CGO_CPPFLAGS="${CGO_CPPFLAGS:-} -DDUCKDB_STATIC_BUILD \"-I$escaped_libs\"" +export CGO_LDFLAGS="${CGO_LDFLAGS:-} \"$escaped_libs/libcore_functions_extension.a\" \"$escaped_libs/libjson_extension.a\" \"$escaped_libs/libparquet_extension.a\" \"$escaped_libs/libicu_extension.a\" \"$escaped_libs/libduckdb_static.a\" $system_libs" +exec "${duckdb_go_args[@]}" diff --git a/site/astro.config.mjs b/site/astro.config.mjs index fd27ac2b..86ae342c 100644 --- a/site/astro.config.mjs +++ b/site/astro.config.mjs @@ -1,6 +1,7 @@ // @ts-check import { defineConfig } from "astro/config"; import starlight from "@astrojs/starlight"; +import { unified } from "@astrojs/markdown-remark"; import { rehypeTableWrap } from "./src/plugins/rehype-table-wrap.mjs"; import { fanoutCodeDark, fanoutCodeLight } from "./src/styles/code-theme.mjs"; @@ -21,7 +22,7 @@ export default defineConfig({ // a busy port is an error rather than the site silently moving to 7522, where // nobody is looking for it. vite: { server: { strictPort: true } }, - markdown: { rehypePlugins: [rehypeTableWrap] }, + markdown: { processor: unified({ rehypePlugins: [rehypeTableWrap] }) }, integrations: [ starlight({ title: "Fanout", @@ -29,12 +30,6 @@ export default defineConfig({ titleDelimiter: "·", description: "One binary that ingests OpenTelemetry, stores it, and answers questions about it.", - // The project tagline, in the same words as the GitHub description and the - // landing page. Starlight renders this only on a splash page that does not - // supply its own hero tagline; index.mdx supplies one, so today this has - // no output. It is kept in step anyway, because the day a second splash - // page exists is not the day to discover the tagline drifted. - tagline: "OpenTelemetry observability in one binary.", social: [ { icon: "github", diff --git a/site/package-lock.json b/site/package-lock.json index 135a48e1..20ad78c8 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -8,17 +8,17 @@ "name": "fanout-website", "version": "0.0.0", "dependencies": { - "@astrojs/markdown-remark": "^7.2.4", - "@astrojs/starlight": "0.41.10", - "@fontsource/ibm-plex-mono": "^5.3.0", - "@fontsource/ibm-plex-sans": "^5.3.0", - "@phosphor-icons/core": "^2.1.1", - "astro": "7.2.9", - "sharp": "^0.35.4" + "@astrojs/markdown-remark": "7.3.1", + "@astrojs/starlight": "0.42.4", + "@fontsource/ibm-plex-mono": "5.3.0", + "@fontsource/ibm-plex-sans": "5.3.0", + "@phosphor-icons/core": "2.1.1", + "astro": "7.3.5", + "sharp": "0.35.5" }, "devDependencies": { - "@astrojs/check": "^0.9.10", - "typescript": "^6.0.3" + "@astrojs/check": "0.9.10", + "typescript": "6.0.3" }, "engines": { "node": ">=22.12.0" @@ -51,29 +51,46 @@ "license": "MIT" }, "node_modules/@astrojs/compiler-binding": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding/-/compiler-binding-0.4.0.tgz", - "integrity": "sha512-x2RjDUuWfwLNtc3mjAdSRInwqh/rqbLar9cm/5FOMbHvmYZB7yfKewzSclAxWjIZsypJDXv1lhaP2WG+P8TK3g==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding/-/compiler-binding-0.5.1.tgz", + "integrity": "sha512-oczyolLUl9mNrtuBuNjuvn5thpHrFLXAHAWGTRg0JDHQ8cGVsVeFekOu2uSoQGgainJIi+A3/9m0DyYwz3Nlnw==", "license": "MIT", "engines": { "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@astrojs/compiler-binding-darwin-arm64": "0.4.0", - "@astrojs/compiler-binding-darwin-x64": "0.4.0", - "@astrojs/compiler-binding-linux-arm64-gnu": "0.4.0", - "@astrojs/compiler-binding-linux-arm64-musl": "0.4.0", - "@astrojs/compiler-binding-linux-x64-gnu": "0.4.0", - "@astrojs/compiler-binding-linux-x64-musl": "0.4.0", - "@astrojs/compiler-binding-wasm32-wasi": "0.4.0", - "@astrojs/compiler-binding-win32-arm64-msvc": "0.4.0", - "@astrojs/compiler-binding-win32-x64-msvc": "0.4.0" + "@astrojs/compiler-binding-android-arm64": "0.5.1", + "@astrojs/compiler-binding-darwin-arm64": "0.5.1", + "@astrojs/compiler-binding-darwin-x64": "0.5.1", + "@astrojs/compiler-binding-linux-arm64-gnu": "0.5.1", + "@astrojs/compiler-binding-linux-arm64-musl": "0.5.1", + "@astrojs/compiler-binding-linux-x64-gnu": "0.5.1", + "@astrojs/compiler-binding-linux-x64-musl": "0.5.1", + "@astrojs/compiler-binding-wasm32-wasi": "0.5.1", + "@astrojs/compiler-binding-win32-arm64-msvc": "0.5.1", + "@astrojs/compiler-binding-win32-x64-msvc": "0.5.1" + } + }, + "node_modules/@astrojs/compiler-binding-android-arm64": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-android-arm64/-/compiler-binding-android-arm64-0.5.1.tgz", + "integrity": "sha512-nMb2nMIJtcWLNH+fV75Enmi+jp4tIOYOfsv4XtpgdOWkqc9P4uSSdK5u1xb340AzrXo5V18SxLl/nc3vcqtamQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, "node_modules/@astrojs/compiler-binding-darwin-arm64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-darwin-arm64/-/compiler-binding-darwin-arm64-0.4.0.tgz", - "integrity": "sha512-ZVUwHundaQyFNjE6uoa0usaC0WOCitDCLS/4mdb4rOiJXwVUuKJBMxI5WMzXLWmamsXtK/Z//ifLXvV5Yeh4Hw==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-darwin-arm64/-/compiler-binding-darwin-arm64-0.5.1.tgz", + "integrity": "sha512-5k4+nZ/WRt+dcVow4z7rBuI7iv9A58h/uQ91YJe1PrTivbcCkq3u2Ynx/AZJwII4CsZawBCeGpojkFjutZBhBQ==", "cpu": [ "arm64" ], @@ -87,9 +104,9 @@ } }, "node_modules/@astrojs/compiler-binding-darwin-x64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-darwin-x64/-/compiler-binding-darwin-x64-0.4.0.tgz", - "integrity": "sha512-FI6G8AY8u6fR1SI/QRR5yGMwtvZwP34CDmZpZ5HwJGa50UM1VISTLhqkhV4a476pmgd25X1Aur2dqw6hUnrlKA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-darwin-x64/-/compiler-binding-darwin-x64-0.5.1.tgz", + "integrity": "sha512-0Buw+YST9Ff2EqQyhRMQujuFq/dijLw3zXWhsvI0dJ2pGrT38iVoxTEca2eBX/PfhlwkVWSRJEKO5gMqKHyeHg==", "cpu": [ "x64" ], @@ -103,9 +120,9 @@ } }, "node_modules/@astrojs/compiler-binding-linux-arm64-gnu": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-arm64-gnu/-/compiler-binding-linux-arm64-gnu-0.4.0.tgz", - "integrity": "sha512-lB9gLFJK7m82EnjaU8nlRBEfcwGNeHidW3sSjODTUjMNaoewVuUz9fwwdY5M4jiSXIqWLH3yl6TX8FTDKA74Sw==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-arm64-gnu/-/compiler-binding-linux-arm64-gnu-0.5.1.tgz", + "integrity": "sha512-x5LRpyCoMKuu3INr18cn42YhwSOaRpp9b5Ny3eJJ/sWVeejC16Zeshu1JlvlSmEZACLeWxU5JM0RX6T6nI+YyA==", "cpu": [ "arm64" ], @@ -122,9 +139,9 @@ } }, "node_modules/@astrojs/compiler-binding-linux-arm64-musl": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-arm64-musl/-/compiler-binding-linux-arm64-musl-0.4.0.tgz", - "integrity": "sha512-HPbvWqbxFxyaoQJhLxCaSjtYBx9KBo7JGVzEFZCmMl968a2PsSH0UfiODYgYPXofTOIsIH2aoCcrHXML0IA3ig==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-arm64-musl/-/compiler-binding-linux-arm64-musl-0.5.1.tgz", + "integrity": "sha512-mL7tQEuDk3rGfaKmrO63nw6WBy1TPVioQGmVyjcAr+C+a/k3SVMYBytNSMqH9mZPT/Swj30JaZ2N842Z1NnOEQ==", "cpu": [ "arm64" ], @@ -141,9 +158,9 @@ } }, "node_modules/@astrojs/compiler-binding-linux-x64-gnu": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-x64-gnu/-/compiler-binding-linux-x64-gnu-0.4.0.tgz", - "integrity": "sha512-tQKolMxoJ/+0AmLWm1PmJ/i+z3i10ZU1bNuVjEDulCf48azEMtUNjTZgHJ5MPtpYRNc7dlETr8QujUfduzoC7Q==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-x64-gnu/-/compiler-binding-linux-x64-gnu-0.5.1.tgz", + "integrity": "sha512-uLGc9jtxwiDe4cQyhNPQim4ECiB/YzbWlXssfLAv8r374kArfTwBHjwR2+j+XVyF71yCx5mF9YNRclRqdNBgeg==", "cpu": [ "x64" ], @@ -160,9 +177,9 @@ } }, "node_modules/@astrojs/compiler-binding-linux-x64-musl": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-x64-musl/-/compiler-binding-linux-x64-musl-0.4.0.tgz", - "integrity": "sha512-5v5YymudsxMHp3NBLCS8BUlu5CRqeLtWD9cKS/4nIhIEHCbpz9okmVV6I0HWqmBAPhWYcDa3vw/vltYPrOQCTA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-x64-musl/-/compiler-binding-linux-x64-musl-0.5.1.tgz", + "integrity": "sha512-G0cywinaQUc8v1MrytvYKUX7svTDMmYtOCZfxjwKPbJi59zIqM+Ll0rWgO0GQWLZH3XoPYo19ZwlP3Xt9ep9YA==", "cpu": [ "x64" ], @@ -179,25 +196,27 @@ } }, "node_modules/@astrojs/compiler-binding-wasm32-wasi": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-wasm32-wasi/-/compiler-binding-wasm32-wasi-0.4.0.tgz", - "integrity": "sha512-m/phuH3x3PREvv1OnkM44NoPh4MatUadix1fB1u5SvMLCyDTUZykDJbKnWf1cjnYmHdlB8HcjTjl6JrCqAIXcw==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-wasm32-wasi/-/compiler-binding-wasm32-wasi-0.5.1.tgz", + "integrity": "sha512-yMhLL8asmLydoAdnEZxAw6eLfNDs3YJl6jqn0pjPt6zrb2U5qIDLnii4/twThpIFODKkQ6YDpBRTOz/vSfZCxw==", "cpu": [ "wasm32" ], "license": "MIT", "optional": true, "dependencies": { - "@napi-rs/wasm-runtime": "^1.2.2" + "@emnapi/core": "1.11.3", + "@emnapi/runtime": "1.11.3", + "@napi-rs/wasm-runtime": "^1.2.4" }, "engines": { - "node": ">=14.0.0" + "node": "^20.19.0 || >=22.12.0" } }, "node_modules/@astrojs/compiler-binding-win32-arm64-msvc": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-win32-arm64-msvc/-/compiler-binding-win32-arm64-msvc-0.4.0.tgz", - "integrity": "sha512-B9zYf3okEY83kM8gydlpH2BHP00w4ifxPqlYlWrgTwuD6wnkrJDCwBlgy1q31cERjCJRXN1lrE2VmkLvFjv/6g==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-win32-arm64-msvc/-/compiler-binding-win32-arm64-msvc-0.5.1.tgz", + "integrity": "sha512-aClIG6poFt3Wf/bZykrEAX2nAnKvBHW6RXiKUa69QjBtWH0/FOlOAjnFcxRNlhej2AMWNYFx0o+LGjwMcH8P7Q==", "cpu": [ "arm64" ], @@ -211,9 +230,9 @@ } }, "node_modules/@astrojs/compiler-binding-win32-x64-msvc": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-win32-x64-msvc/-/compiler-binding-win32-x64-msvc-0.4.0.tgz", - "integrity": "sha512-zB0Nrv0dGc0zZWPGDRmmETTPhDRqyZjAjk+gWMlVrJX5U89obpB3VUUE1ZiHxOCN5LQojeLK6O8L/dnoHolvNQ==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-win32-x64-msvc/-/compiler-binding-win32-x64-msvc-0.5.1.tgz", + "integrity": "sha512-/E6uBCagY70YpWqssBC+/FuniNSloeQPRgj7l3LDWiqjxIyTLnIgX1sTt18FU7jrigetpSnC9cHAM6b6IxSgPw==", "cpu": [ "x64" ], @@ -227,21 +246,21 @@ } }, "node_modules/@astrojs/compiler-rs": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-rs/-/compiler-rs-0.4.0.tgz", - "integrity": "sha512-koVikeon1kreEy+/JzLQRy3vzHHQVOjycs4degg4vFufKApZOwMZvSSAEztYNhmcQVfNVsVZZI4cEge3cexAbQ==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@astrojs/compiler-rs/-/compiler-rs-0.5.1.tgz", + "integrity": "sha512-1k1acnX7DepIiea9U9/Y+d1hdAFfylu1ZQQkkYgRSwBOBAsXInolyZuh/2tax+83vu/A+hOYP6P3+265RvMTvw==", "license": "MIT", "dependencies": { - "@astrojs/compiler-binding": "0.4.0" + "@astrojs/compiler-binding": "0.5.1" }, "engines": { "node": ">=22.12.0" } }, "node_modules/@astrojs/internal-helpers": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.10.4.tgz", - "integrity": "sha512-nozZSy/mKYLqe4YrqbKtdOszedAfXYCtw3wZ0d+CAjz4GqQ4L9rl1ltIL5BlgwmYVinJg/RZ0MgGuWOdlyRZlA==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.11.0.tgz", + "integrity": "sha512-3rzxJ+xbo0+8YyqOzLziIN32wmsHdCjEVz2sGOpRxJ+Ben/KiLph4ItxBy1abEL+E8fkRzqjg0rfXmaHJGw9JA==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.4", @@ -297,15 +316,19 @@ } }, "node_modules/@astrojs/markdown-remark": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-7.2.4.tgz", - "integrity": "sha512-MvspGMynWKAjTe4/lTUdmBPHIFKNVLTCF6UlyWGogTGzNrTvjD+D4n48k7h8swxsEPKHK2TwxkZO7uoaCv1Pow==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-7.3.1.tgz", + "integrity": "sha512-QCjsjZQl0+Cgb91+T3Ip9hyUe1r5aLm4udi584rML9YO3syupbAYE+jWpAxYg+z4lFLNUugPrylFxZ+8qFTClg==", "license": "MIT", "dependencies": { - "@astrojs/internal-helpers": "0.10.4", + "@astrojs/internal-helpers": "0.11.0", "@astrojs/prism": "4.0.2", + "@mdx-js/mdx": "^3.1.1", + "acorn": "^8.16.0", + "estree-util-visit": "^2.0.0", "github-slugger": "^2.0.0", "hast-util-from-html": "^2.0.3", + "hast-util-to-html": "^9.0.5", "hast-util-to-text": "^4.0.2", "mdast-util-definitions": "^6.0.0", "rehype-raw": "^7.0.0", @@ -314,6 +337,7 @@ "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "remark-smartypants": "^3.0.2", + "source-map": "^0.7.6", "unified": "^11.0.5", "unist-util-remove-position": "^5.0.0", "unist-util-visit": "^5.1.0", @@ -322,235 +346,37 @@ } }, "node_modules/@astrojs/markdown-satteri": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-satteri/-/markdown-satteri-0.3.8.tgz", - "integrity": "sha512-n8ItpFTCmlDsVR5+rwDmehSf+jFCYLWmZiisZNGuF7xILqYhsVeBfcha4qgS2Seq3fAc9Tm58ZVrvqFQ6RQgRQ==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-satteri/-/markdown-satteri-0.4.2.tgz", + "integrity": "sha512-g4QehXnB/MzxQWnSf17NciFInMqEJy9948p8cc7zGg/r7995m0Ln5PMr3Xlnj24iey1LchaoZ3SzTOa3D4P/3w==", "license": "MIT", "dependencies": { - "@astrojs/internal-helpers": "0.10.4", + "@astrojs/internal-helpers": "0.11.0", "@astrojs/prism": "4.0.2", "github-slugger": "^2.0.0", "satteri": "^0.10.3" } }, - "node_modules/@astrojs/markdown-satteri/node_modules/@bruits/satteri-darwin-arm64": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-arm64/-/satteri-darwin-arm64-0.10.5.tgz", - "integrity": "sha512-27KTVl4TJkVahMy/ohyA7qd4938G5UNneFUz/PsScYfpIhj0IVAS23mpcJXdPF44sa6nva198lmV/cKIb2YPyA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@bruits/satteri-darwin-x64": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-x64/-/satteri-darwin-x64-0.10.5.tgz", - "integrity": "sha512-IjnLe3nKspq6qaeqGgjT7MT8VrTV74yWRlaag7ZdNsI8TDAYZ0iPxMCo+9KQZHUk5EyVB+reBI/PFWL5KuFw9Q==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@bruits/satteri-linux-arm64-gnu": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-gnu/-/satteri-linux-arm64-gnu-0.10.5.tgz", - "integrity": "sha512-glkYXZCJywjP13v67eAyAMSJdF+ncvEbYvgi/wOtffL9tQ27lr/zsyzUfgs+ovjJ9d8JNQKiXeiArJcX8PJL9w==", - "cpu": [ - "arm64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@bruits/satteri-linux-arm64-musl": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-musl/-/satteri-linux-arm64-musl-0.10.5.tgz", - "integrity": "sha512-yWdgG1g17Nh2QyGVlFUxGRa3FEFwiMcpZEyMNWkbM3deC94cmVc+/i9OuyFpdKuWo3GkgoCtYVOoxk1uCnCZIA==", - "cpu": [ - "arm64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@bruits/satteri-linux-x64-gnu": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-gnu/-/satteri-linux-x64-gnu-0.10.5.tgz", - "integrity": "sha512-FVaLoPT1fBgGl0J+AYebyyXJYBachGl8Oyyrf1lye4RTqCB4S0Gwkj1uM9RJyThUOvx5VUmAT1CnNh1SFHA+kw==", - "cpu": [ - "x64" - ], - "libc": [ - "glibc" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@bruits/satteri-linux-x64-musl": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-musl/-/satteri-linux-x64-musl-0.10.5.tgz", - "integrity": "sha512-EHpVAx2bqW3GINHTKkljtxVfQmVDGWIuwOYOP5YghTj+0PkBa2o8oKPRtQ9Kbsr1Fye8jtUcDjhwj2jMNugZKg==", - "cpu": [ - "x64" - ], - "libc": [ - "musl" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@bruits/satteri-wasm32-wasi": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-wasm32-wasi/-/satteri-wasm32-wasi-0.10.5.tgz", - "integrity": "sha512-ypz8c/Zmipxp4IoeDa228Gstv6TLzVmNs3yC6wKCoNSOjx1iwpgzu87Y3hTkXFdwChVGU85qeUDuOIarGUZQLw==", - "cpu": [ - "wasm32" - ], - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "1.11.1", - "@emnapi/runtime": "1.11.1", - "@napi-rs/wasm-runtime": "^1.2.3" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@bruits/satteri-win32-arm64-msvc": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-arm64-msvc/-/satteri-win32-arm64-msvc-0.10.5.tgz", - "integrity": "sha512-siTV88nb0LRqNpkL2gXboqCwVdq95sLtzMHS1/3eONV2gLbB3NAK46wmSMvCO/yquBvI2lvaFIfd8P12ecsxBw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@bruits/satteri-win32-x64-msvc": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-x64-msvc/-/satteri-win32-x64-msvc-0.10.5.tgz", - "integrity": "sha512-C3IfPvfvMXmlzBxaMPKFS1XiuV9pu2mC7YqkPk7PSvTgPZ8gbdASIpHpztDLvTTQjqZ0z1Ol8tK5X+V6XXC0wQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@emnapi/core": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", - "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.2", - "tslib": "^2.4.0" - } - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@emnapi/runtime": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", - "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@astrojs/markdown-satteri/node_modules/@emnapi/wasi-threads": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", - "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@astrojs/markdown-satteri/node_modules/satteri": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/satteri/-/satteri-0.10.5.tgz", - "integrity": "sha512-Ao1LKpAEa9Wdg0otgbVKViZHEq9ebdXe4DMrp3s9vQAU0HNIuHnFEuMuOcm0ZIXyV0Yzxj91NvhLpvXZJO/5ZQ==", - "license": "MIT", - "dependencies": { - "@types/estree-jsx": "^1.0.5", - "@types/hast": "^3.0.5", - "@types/mdast": "^4.0.4", - "@types/unist": "^3.0.3" - }, - "optionalDependencies": { - "@bruits/satteri-darwin-arm64": "0.10.5", - "@bruits/satteri-darwin-x64": "0.10.5", - "@bruits/satteri-linux-arm64-gnu": "0.10.5", - "@bruits/satteri-linux-arm64-musl": "0.10.5", - "@bruits/satteri-linux-x64-gnu": "0.10.5", - "@bruits/satteri-linux-x64-musl": "0.10.5", - "@bruits/satteri-wasm32-wasi": "0.10.5", - "@bruits/satteri-win32-arm64-msvc": "0.10.5", - "@bruits/satteri-win32-x64-msvc": "0.10.5" - } - }, "node_modules/@astrojs/mdx": { - "version": "7.0.8", - "resolved": "https://registry.npmjs.org/@astrojs/mdx/-/mdx-7.0.8.tgz", - "integrity": "sha512-RNuwq2ccTSi7NX9YqlR0noaWoVdOrZuJvdfWXotAzdhMVB0b0zEMLnNU+xar7le0GwTMlTObD/QAu8jeHA/3nA==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@astrojs/mdx/-/mdx-8.0.2.tgz", + "integrity": "sha512-WedIVP2Bu8fXSzxb3ZYZ8xDrWWjf2SRKCneh52Llhoa+O3lcpHPhoZVP3FerlivUaH/0LJz2yVaCNvMdg0u8Bw==", "license": "MIT", "dependencies": { - "@astrojs/internal-helpers": "0.10.4", - "@astrojs/markdown-remark": "7.2.4", - "@mdx-js/mdx": "^3.1.1", - "acorn": "^8.16.0", - "es-module-lexer": "^2.0.0", - "estree-util-visit": "^2.0.0", - "hast-util-to-html": "^9.0.5", - "piccolore": "^0.1.3", - "rehype-raw": "^7.0.0", - "remark-gfm": "^4.0.1", - "remark-smartypants": "^3.0.2", - "source-map": "^0.7.6", - "unist-util-visit": "^5.1.0", - "vfile": "^6.0.3" + "@astrojs/internal-helpers": "0.11.0", + "@astrojs/markdown-satteri": "0.4.2", + "es-module-lexer": "^2.0.0" }, "engines": { "node": ">=22.12.0" }, "peerDependencies": { - "@astrojs/markdown-satteri": "^0.3.1", - "astro": "^7.0.0" + "@astrojs/markdown-remark": "^7.3.0", + "@astrojs/markdown-satteri": "^0.4.0", + "astro": "^7.2.10" }, "peerDependenciesMeta": { - "@astrojs/markdown-satteri": { + "@astrojs/markdown-remark": { "optional": true } } @@ -579,44 +405,43 @@ } }, "node_modules/@astrojs/starlight": { - "version": "0.41.10", - "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.41.10.tgz", - "integrity": "sha512-xE+OO2zzJkHPzc+giuFj+1c0sYw3//goo31PEksguNTd3XpXvV7TaJ0TzQzBUSCxYtBwWjAPkJfqR2W4aMQdhQ==", + "version": "0.42.4", + "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.42.4.tgz", + "integrity": "sha512-EsQsqGJ1uTBQcIMojvLqqg4Ku9idwi6PSNuppIOoYmvVP18xjoUkijMdKoDkhmmwKdhbB4ctLhGjPRJzxaq+Jw==", "license": "MIT", "dependencies": { - "@astrojs/markdown-satteri": "^0.3.5", - "@astrojs/mdx": "^7.0.5", + "@astrojs/markdown-satteri": "^0.4.0", + "@astrojs/mdx": "^8.0.0", "@astrojs/sitemap": "^3.7.3", "@pagefind/default-ui": "^1.3.0", - "@types/hast": "^3.0.4", + "@types/hast": "^3.0.5", "@types/js-yaml": "^4.0.9", "@types/mdast": "^4.0.4", "astro-expressive-code": "^0.44.0", "bcp-47": "^2.1.0", - "hast-util-from-html": "^2.0.3", + "hast-util-format": "^1.1.0", "hast-util-select": "^6.0.4", + "hast-util-to-html": "^9.0.5", "hast-util-to-string": "^3.0.1", "hastscript": "^9.0.1", "i18next": "^26.0.7", "js-yaml": "^4.1.1", "klona": "^2.0.6", - "magic-string": "^0.30.21", + "magic-string": "^1.2.3", "mdast-util-directive": "^3.1.0", "mdast-util-to-markdown": "^2.1.2", "mdast-util-to-string": "^4.0.0", "pagefind": "^1.5.2", - "rehype": "^13.0.2", - "rehype-format": "^5.0.1", "remark-directive": "^4.0.0", - "satteri": "^0.9.1", + "satteri": "^0.10.3", "ultrahtml": "^1.6.0", "unified": "^11.0.5", "unist-util-visit": "^5.1.0", "vfile": "^6.0.3" }, "peerDependencies": { - "@astrojs/markdown-remark": "^7.2.0", - "astro": "^7.0.2" + "@astrojs/markdown-remark": "^7.3.0", + "astro": "^7.2.10" }, "peerDependenciesMeta": { "@astrojs/markdown-remark": { @@ -668,9 +493,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz", - "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==", + "version": "7.29.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz", + "integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==", "license": "MIT", "dependencies": { "@babel/types": "^7.29.8" @@ -696,9 +521,9 @@ } }, "node_modules/@bruits/satteri-darwin-arm64": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-arm64/-/satteri-darwin-arm64-0.9.5.tgz", - "integrity": "sha512-iw4nZgx9v30lWo/MTngQqi1pI78KI0DnkSm+lVJGYdmPLgAyDNJigVhpG42/Iq55A6c1Ll8q66ljyyRiQUxwow==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-arm64/-/satteri-darwin-arm64-0.10.5.tgz", + "integrity": "sha512-27KTVl4TJkVahMy/ohyA7qd4938G5UNneFUz/PsScYfpIhj0IVAS23mpcJXdPF44sa6nva198lmV/cKIb2YPyA==", "cpu": [ "arm64" ], @@ -709,9 +534,9 @@ ] }, "node_modules/@bruits/satteri-darwin-x64": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-x64/-/satteri-darwin-x64-0.9.5.tgz", - "integrity": "sha512-6T26Z5Kf3cFW2PSlk9p7zT7yVxvuBSiJvYyz9u8KjYwMTqZyIDOj2wDyNpxKV4+6yUVG7rddq2QwvG/8LJA2+Q==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-x64/-/satteri-darwin-x64-0.10.5.tgz", + "integrity": "sha512-IjnLe3nKspq6qaeqGgjT7MT8VrTV74yWRlaag7ZdNsI8TDAYZ0iPxMCo+9KQZHUk5EyVB+reBI/PFWL5KuFw9Q==", "cpu": [ "x64" ], @@ -722,9 +547,9 @@ ] }, "node_modules/@bruits/satteri-linux-arm64-gnu": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-gnu/-/satteri-linux-arm64-gnu-0.9.5.tgz", - "integrity": "sha512-u51id17uJwNEMK9nBlICsq6U31c+XVqQueVBkwRIzZG+gMpS8TOJctt5h5Wz33Z8xnMdTd+adtACVz0yHgGuOA==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-gnu/-/satteri-linux-arm64-gnu-0.10.5.tgz", + "integrity": "sha512-glkYXZCJywjP13v67eAyAMSJdF+ncvEbYvgi/wOtffL9tQ27lr/zsyzUfgs+ovjJ9d8JNQKiXeiArJcX8PJL9w==", "cpu": [ "arm64" ], @@ -738,9 +563,9 @@ ] }, "node_modules/@bruits/satteri-linux-arm64-musl": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-musl/-/satteri-linux-arm64-musl-0.9.5.tgz", - "integrity": "sha512-v39HxiwGC5Rqm01HksP6+5Y+xKLPlsuVFgIgpEAo+SiQ22c+mJVhS3u7Z6ePAKdhL5NJoK1xq70kLz3L13AhpQ==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-musl/-/satteri-linux-arm64-musl-0.10.5.tgz", + "integrity": "sha512-yWdgG1g17Nh2QyGVlFUxGRa3FEFwiMcpZEyMNWkbM3deC94cmVc+/i9OuyFpdKuWo3GkgoCtYVOoxk1uCnCZIA==", "cpu": [ "arm64" ], @@ -754,9 +579,9 @@ ] }, "node_modules/@bruits/satteri-linux-x64-gnu": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-gnu/-/satteri-linux-x64-gnu-0.9.5.tgz", - "integrity": "sha512-F3uO8uFp3pAP5ZGXttwvh57GS7s0lL953tnNdyI2gRyP4kOOkp6pyGojNJzCjkDvWI2Cvb9iNrKok3aqQPauAw==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-gnu/-/satteri-linux-x64-gnu-0.10.5.tgz", + "integrity": "sha512-FVaLoPT1fBgGl0J+AYebyyXJYBachGl8Oyyrf1lye4RTqCB4S0Gwkj1uM9RJyThUOvx5VUmAT1CnNh1SFHA+kw==", "cpu": [ "x64" ], @@ -770,9 +595,9 @@ ] }, "node_modules/@bruits/satteri-linux-x64-musl": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-musl/-/satteri-linux-x64-musl-0.9.5.tgz", - "integrity": "sha512-bicEqglLlz++mWyADaZoP0JY20s4vDfLjaPYgQqC+NI4zZLTOOg1T4GB8aqtc822Pqji8SQBmSrTb7CrP8i08Q==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-musl/-/satteri-linux-x64-musl-0.10.5.tgz", + "integrity": "sha512-EHpVAx2bqW3GINHTKkljtxVfQmVDGWIuwOYOP5YghTj+0PkBa2o8oKPRtQ9Kbsr1Fye8jtUcDjhwj2jMNugZKg==", "cpu": [ "x64" ], @@ -786,9 +611,9 @@ ] }, "node_modules/@bruits/satteri-wasm32-wasi": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-wasm32-wasi/-/satteri-wasm32-wasi-0.9.5.tgz", - "integrity": "sha512-zauAuMwfPnKPUkd4AFixRFpXdgKwP2mKgxrIIo2gJzW0/ZneF9dbHnLkojSpaBnCCp7VUL1hIi5WWZvB1CqmAQ==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@bruits/satteri-wasm32-wasi/-/satteri-wasm32-wasi-0.10.5.tgz", + "integrity": "sha512-ypz8c/Zmipxp4IoeDa228Gstv6TLzVmNs3yC6wKCoNSOjx1iwpgzu87Y3hTkXFdwChVGU85qeUDuOIarGUZQLw==", "cpu": [ "wasm32" ], @@ -797,7 +622,7 @@ "dependencies": { "@emnapi/core": "1.11.1", "@emnapi/runtime": "1.11.1", - "@napi-rs/wasm-runtime": "^1.1.6" + "@napi-rs/wasm-runtime": "^1.2.3" }, "engines": { "node": ">=14.0.0" @@ -835,9 +660,9 @@ } }, "node_modules/@bruits/satteri-win32-arm64-msvc": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-arm64-msvc/-/satteri-win32-arm64-msvc-0.9.5.tgz", - "integrity": "sha512-SrfE7NEsgZjBvU3c+RR6oQRu0ToXY5uVJEbieXEF0YTctIV2zAVlbaMjWLts074QCgh3a+XHWkR/lWh2VH2LUg==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-arm64-msvc/-/satteri-win32-arm64-msvc-0.10.5.tgz", + "integrity": "sha512-siTV88nb0LRqNpkL2gXboqCwVdq95sLtzMHS1/3eONV2gLbB3NAK46wmSMvCO/yquBvI2lvaFIfd8P12ecsxBw==", "cpu": [ "arm64" ], @@ -848,9 +673,9 @@ ] }, "node_modules/@bruits/satteri-win32-x64-msvc": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-x64-msvc/-/satteri-win32-x64-msvc-0.9.5.tgz", - "integrity": "sha512-5Kw9ZAtTGS8WHizyn+CJhjjfIQrw+7jcZodpmpXJjefnO15M8UexIi6JR2E5thyvsmHyhL6ZDDMUNR4bKJPd4g==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-x64-msvc/-/satteri-win32-x64-msvc-0.10.5.tgz", + "integrity": "sha512-C3IfPvfvMXmlzBxaMPKFS1XiuV9pu2mC7YqkPk7PSvTgPZ8gbdASIpHpztDLvTTQjqZ0z1Ol8tK5X+V6XXC0wQ==", "cpu": [ "x64" ], @@ -873,9 +698,9 @@ } }, "node_modules/@clack/core": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.4.3.tgz", - "integrity": "sha512-/kr3UWNtdJfxZtPgDqUOmG2pvwlmcLGheex5yiZKdwbzZJxhV+HMNR9QNmyY5cGwTNV6LrR7Jtp+KjhUAP1qBQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.5.1.tgz", + "integrity": "sha512-iHTrHA8MtVuLl2TfZySmcKv1qO2PoyC9Z7pfSDozEuV5vtY3/wcOPKJXlqJ5Oq2Cx5DDGQGAMVx6HZfRRoVEbQ==", "license": "MIT", "dependencies": { "fast-wrap-ansi": "^0.2.0", @@ -886,12 +711,12 @@ } }, "node_modules/@clack/prompts": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.7.0.tgz", - "integrity": "sha512-y7/yvZ2TPAnR9+jnc00klvNNLkJiXFFrQA/hlLCcxA9a2A4zQIOimyFQ9XfwYKiGD1fb5GY8vbKIIgO8d5Tb2A==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.8.1.tgz", + "integrity": "sha512-dlT1m5e/0yUL0kRNcQn7yGLVThkgbB0Ga/1AmfDDC/8ik6AIiSf2QLQO2zPYvefsHP0aFgxO93cVLCCfDp7kzQ==", "license": "MIT", "dependencies": { - "@clack/core": "1.4.3", + "@clack/core": "1.5.1", "fast-string-width": "^3.0.2", "fast-wrap-ansi": "^0.2.0", "sisteransi": "^1.0.5" @@ -901,9 +726,9 @@ } }, "node_modules/@ctrl/tinycolor": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-4.2.0.tgz", - "integrity": "sha512-kzyuwOAQnXJNLS9PSyrk0CWk35nWJW/zl/6KvnTBMFK65gm7U1/Z5BqjxeapjZCIhQcM/DsrEmcbRwDyXyXK4A==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-4.2.1.tgz", + "integrity": "sha512-Vh5uy9Y1JBMId6J1f68TMXnZrTCvNdo9Fu2k0d1YnJngR+sM5kWTKl441c/3TFs+cG0NWOjRWgQ/iaWhbYx+7A==", "license": "MIT", "engines": { "node": ">=14" @@ -977,7 +802,6 @@ "integrity": "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" @@ -999,7 +823,6 @@ "integrity": "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -1421,9 +1244,9 @@ } }, "node_modules/@expressive-code/core": { - "version": "0.44.1", - "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.44.1.tgz", - "integrity": "sha512-3dDo9N8D7hYrLNNMMWFovg3+aDUtnQm7c7z0GZc1c0LEFVBc0Q6lKG+tVT28gDadOvsgOANfCn35fgpe97Pmgg==", + "version": "0.44.2", + "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.44.2.tgz", + "integrity": "sha512-Yw5KonQCD1HoOO2P89y4wifqS9qrJcGVY0LkVMUsVZjhi++bhz4WwQ37inenKFNOEVo50P7cjoVsCdaVnUbq8w==", "license": "MIT", "dependencies": { "@ctrl/tinycolor": "^4.0.4", @@ -1438,31 +1261,31 @@ } }, "node_modules/@expressive-code/plugin-frames": { - "version": "0.44.1", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-frames/-/plugin-frames-0.44.1.tgz", - "integrity": "sha512-HC/bdRao9225ApcgO/e3jn8ZOhldKO7ob1O/Tcipvtv7Vb5nMphZhMtD9uuywpvxkPYBHJi3504WhrKg05Dwqg==", + "version": "0.44.2", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-frames/-/plugin-frames-0.44.2.tgz", + "integrity": "sha512-gVLm6TQMNIRWIaM7o+mCtxkGNjLZY5/2faSTLoXeo9wv/Pkj/0QAtZyXPVPrRsPARqiipATNFmfvQFLJudxPHQ==", "license": "MIT", "dependencies": { - "@expressive-code/core": "^0.44.1" + "@expressive-code/core": "^0.44.2" } }, "node_modules/@expressive-code/plugin-shiki": { - "version": "0.44.1", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-shiki/-/plugin-shiki-0.44.1.tgz", - "integrity": "sha512-YApiZt3buUzBwL5tqj8G+sYC5NjMjRCHgQwr9bmGl69rtcHy6fE9dooWUeKYB978fJT2BuxT5FeHcF47rA3SEg==", + "version": "0.44.2", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-shiki/-/plugin-shiki-0.44.2.tgz", + "integrity": "sha512-ebWIvCDzXvjyD8rH6T6DfytYJw1GoArLR4nusIAE4VxXrCQf3d+owytiv010KU/dUg+SRLZskDn0N+HaFXeuSg==", "license": "MIT", "dependencies": { - "@expressive-code/core": "^0.44.1", + "@expressive-code/core": "^0.44.2", "shiki": "^4.0.2" } }, "node_modules/@expressive-code/plugin-text-markers": { - "version": "0.44.1", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-text-markers/-/plugin-text-markers-0.44.1.tgz", - "integrity": "sha512-B3BsJoJ8CFMlcIX9f+X9tcI3C4zPDO601+YuLi9GheSTNro7ZfqSjLptMQKBHOWZvxnAtY5zvIX7iO/qtBhNBg==", + "version": "0.44.2", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-text-markers/-/plugin-text-markers-0.44.2.tgz", + "integrity": "sha512-SNI7EgUSiADqbqUzzMbj1ZeC/r2pa5eg3KyFOGAd3a7EsIA4qzjXQLp+ODWQtHVDKFCdGs4J3ovSJUqvKIK96g==", "license": "MIT", "dependencies": { - "@expressive-code/core": "^0.44.1" + "@expressive-code/core": "^0.44.2" } }, "node_modules/@fontsource/ibm-plex-mono": { @@ -1493,9 +1316,9 @@ } }, "node_modules/@img/sharp-darwin-arm64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.4.tgz", - "integrity": "sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.5.tgz", + "integrity": "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==", "cpu": [ "arm64" ], @@ -1511,13 +1334,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.3.3" + "@img/sharp-libvips-darwin-arm64": "1.3.4" } }, "node_modules/@img/sharp-darwin-x64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.4.tgz", - "integrity": "sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.5.tgz", + "integrity": "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==", "cpu": [ "x64" ], @@ -1533,20 +1356,20 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.3.3" + "@img/sharp-libvips-darwin-x64": "1.3.4" } }, "node_modules/@img/sharp-freebsd-wasm32": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.4.tgz", - "integrity": "sha512-lIsKw/BU+kjB4eZjxrYrZmwOJYi3Ajrv66iAlBmUPyKc3HpnloevB1g3wxGD9P/5BbQ1brBGl65VRRrCvQDEqA==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.5.tgz", + "integrity": "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==", "license": "Apache-2.0", "optional": true, "os": [ "freebsd" ], "dependencies": { - "@img/sharp-wasm32": "0.35.4" + "@img/sharp-wasm32": "0.35.5" }, "engines": { "node": ">=20.9.0" @@ -1556,9 +1379,9 @@ } }, "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.3.tgz", - "integrity": "sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.4.tgz", + "integrity": "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==", "cpu": [ "arm64" ], @@ -1572,9 +1395,9 @@ } }, "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.3.tgz", - "integrity": "sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.4.tgz", + "integrity": "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==", "cpu": [ "x64" ], @@ -1588,9 +1411,9 @@ } }, "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.3.tgz", - "integrity": "sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.4.tgz", + "integrity": "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==", "cpu": [ "arm" ], @@ -1607,9 +1430,9 @@ } }, "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.3.tgz", - "integrity": "sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.4.tgz", + "integrity": "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==", "cpu": [ "arm64" ], @@ -1626,9 +1449,9 @@ } }, "node_modules/@img/sharp-libvips-linux-ppc64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.3.tgz", - "integrity": "sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.4.tgz", + "integrity": "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==", "cpu": [ "ppc64" ], @@ -1645,9 +1468,9 @@ } }, "node_modules/@img/sharp-libvips-linux-riscv64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.3.tgz", - "integrity": "sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.4.tgz", + "integrity": "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==", "cpu": [ "riscv64" ], @@ -1664,9 +1487,9 @@ } }, "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.3.tgz", - "integrity": "sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.4.tgz", + "integrity": "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==", "cpu": [ "s390x" ], @@ -1683,9 +1506,9 @@ } }, "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.3.tgz", - "integrity": "sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.4.tgz", + "integrity": "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==", "cpu": [ "x64" ], @@ -1702,9 +1525,9 @@ } }, "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.3.tgz", - "integrity": "sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.4.tgz", + "integrity": "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==", "cpu": [ "arm64" ], @@ -1721,9 +1544,9 @@ } }, "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.3.tgz", - "integrity": "sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.4.tgz", + "integrity": "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==", "cpu": [ "x64" ], @@ -1740,9 +1563,9 @@ } }, "node_modules/@img/sharp-linux-arm": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.4.tgz", - "integrity": "sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.5.tgz", + "integrity": "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==", "cpu": [ "arm" ], @@ -1761,13 +1584,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.3.3" + "@img/sharp-libvips-linux-arm": "1.3.4" } }, "node_modules/@img/sharp-linux-arm64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.4.tgz", - "integrity": "sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.5.tgz", + "integrity": "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==", "cpu": [ "arm64" ], @@ -1786,13 +1609,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.3.3" + "@img/sharp-libvips-linux-arm64": "1.3.4" } }, "node_modules/@img/sharp-linux-ppc64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.4.tgz", - "integrity": "sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.5.tgz", + "integrity": "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==", "cpu": [ "ppc64" ], @@ -1811,13 +1634,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-ppc64": "1.3.3" + "@img/sharp-libvips-linux-ppc64": "1.3.4" } }, "node_modules/@img/sharp-linux-riscv64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.4.tgz", - "integrity": "sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.5.tgz", + "integrity": "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==", "cpu": [ "riscv64" ], @@ -1836,13 +1659,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-riscv64": "1.3.3" + "@img/sharp-libvips-linux-riscv64": "1.3.4" } }, "node_modules/@img/sharp-linux-s390x": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.4.tgz", - "integrity": "sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.5.tgz", + "integrity": "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==", "cpu": [ "s390x" ], @@ -1861,13 +1684,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.3.3" + "@img/sharp-libvips-linux-s390x": "1.3.4" } }, "node_modules/@img/sharp-linux-x64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.4.tgz", - "integrity": "sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.5.tgz", + "integrity": "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==", "cpu": [ "x64" ], @@ -1886,13 +1709,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.3.3" + "@img/sharp-libvips-linux-x64": "1.3.4" } }, "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.4.tgz", - "integrity": "sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.5.tgz", + "integrity": "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==", "cpu": [ "arm64" ], @@ -1911,13 +1734,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.3.3" + "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" } }, "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.4.tgz", - "integrity": "sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.5.tgz", + "integrity": "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==", "cpu": [ "x64" ], @@ -1936,13 +1759,13 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.3.3" + "@img/sharp-libvips-linuxmusl-x64": "1.3.4" } }, "node_modules/@img/sharp-wasm32": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.4.tgz", - "integrity": "sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.5.tgz", + "integrity": "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==", "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", "optional": true, "dependencies": { @@ -1956,16 +1779,16 @@ } }, "node_modules/@img/sharp-webcontainers-wasm32": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.4.tgz", - "integrity": "sha512-ESfNkywmCfPNyaZjxooddJQiQ+l/nTpGEOGthxiLnIHXC/CmcBixnfwUleX9mCz9ovrUUvKMap/pm8RYbzfwaA==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.5.tgz", + "integrity": "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==", "cpu": [ "wasm32" ], "license": "Apache-2.0", "optional": true, "dependencies": { - "@img/sharp-wasm32": "0.35.4" + "@img/sharp-wasm32": "0.35.5" }, "engines": { "node": ">=20.9.0" @@ -1975,9 +1798,9 @@ } }, "node_modules/@img/sharp-win32-arm64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.4.tgz", - "integrity": "sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.5.tgz", + "integrity": "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==", "cpu": [ "arm64" ], @@ -1994,9 +1817,9 @@ } }, "node_modules/@img/sharp-win32-ia32": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.4.tgz", - "integrity": "sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.5.tgz", + "integrity": "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==", "cpu": [ "ia32" ], @@ -2013,9 +1836,9 @@ } }, "node_modules/@img/sharp-win32-x64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.4.tgz", - "integrity": "sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.5.tgz", + "integrity": "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==", "cpu": [ "x64" ], @@ -2032,9 +1855,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", "license": "MIT" }, "node_modules/@mdx-js/mdx": { @@ -2075,9 +1898,9 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.3.tgz", - "integrity": "sha512-UMduMbqO5s5zF2NkNacMT/yK5Y5QiKvWr2+50bzIIxFDwVJ2h49b+oyjaCGPhJxd2/gC2x39EHv/gHVuu36x2Q==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.4.tgz", + "integrity": "sha512-AJxoUD2/15ESHbvpcyjU274nsAPLuOtPHCk0vKJM5pj//Fg/B1FXNWjPnXTT9PymCYYiHo4zPj0ZomXBKhoy7g==", "license": "MIT", "optional": true, "dependencies": { @@ -2102,12 +1925,12 @@ "license": "MIT" }, "node_modules/@oxc-project/types": { - "version": "0.146.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz", - "integrity": "sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==", + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.152.0.tgz", + "integrity": "sha512-oM/5rLBm2tPkg0iBgkH/FOeR3PCDpY19GTgAZjMFM8h9WI9VW7cLgzp6nwtarYKmovavIQZ+Fe/RKX/8C8O/Rw==", "license": "MIT", "funding": { - "url": "https://github.com/sponsors/Boshen" + "url": "https://github.com/sponsors/oxc-project" } }, "node_modules/@pagefind/darwin-arm64": { @@ -2214,9 +2037,9 @@ "license": "MIT" }, "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.5.tgz", - "integrity": "sha512-DLe/i+l8ynIBY7XEQ191TeZvCoowIGa18R+dIV30GW7DiOtp74i/xX8hs8GUjW5ARV7VZuie3d6AumSmCwbeRA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.12.tgz", + "integrity": "sha512-dB/a1214qKfHMXCpgqR4OZT+jS4kTyEXbQGJPqzobt5EwH5rX080pxE37alt3RzvR1bf1Yz/yGqRfrYAxuPw0A==", "cpu": [ "arm" ], @@ -2230,9 +2053,9 @@ } }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.5.tgz", - "integrity": "sha512-zXcwKlQApYAOELHd8PwKDFkagYF9Wy4e0RJ+0qnzl9Pjnpj75TEG8ufv40p2J7kCEfwZAsNiuzRIyNNMWT38ig==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.12.tgz", + "integrity": "sha512-7KHFgQ5VJxIHcLlrwrc3Xbds7oTNQT7Pgi9gQCJKrd2VGab/UksIOYp6VD8MzCstGxOKMgNamPwUCfxPdP1OHg==", "cpu": [ "arm64" ], @@ -2246,9 +2069,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.5.tgz", - "integrity": "sha512-dK4QakI42nzWgJT5sm4y4y/O//D4OxM75/cH28RLV+nzIN9AY+YsbuUVrUTjlLjXR6vpyxFbSsbmNuJ6BP9sww==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.12.tgz", + "integrity": "sha512-3YIhqHD96nA5SaYNRBR16HnGv4oavZvXfD/ayHM+oYZ0WD/8lBAtf6zQua4kEyAvpqrluKXl0lnOBoiNby7x9w==", "cpu": [ "arm64" ], @@ -2262,9 +2085,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.5.tgz", - "integrity": "sha512-fqSALaUu1Wjd1nK2uW2kJDWdLCc8lx1IcY+MTY26Aurfdx19anlzhqXOgCFbBFQnlFDTn4TC1/7Nz4Bl2mLP3A==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.12.tgz", + "integrity": "sha512-UuuJ35MFw4gmFOrE9pEqIV+K3syIKveph+Qc1/ljHZVdoDW4pz/JHR/eMVom+TZGl/5OOvGJOWaOCVt3ZfqhxA==", "cpu": [ "x64" ], @@ -2278,9 +2101,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.5.tgz", - "integrity": "sha512-/vCnNxlkxs9tKxNDcyWUePpJ/PgTzxIaVhoM5SmG8UV+GR/IcPam4VYxi7GIMo7PSDuNqlJqvprqii9NqqVCMw==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.12.tgz", + "integrity": "sha512-uMvssit0a4W+/7D8CbHUvG719mH3R2jwXAlh/XcPvuHTE0g++LymF88DCGNX0HM2rBOn0xrzgXktIB6fLSJBTQ==", "cpu": [ "x64" ], @@ -2294,9 +2117,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.5.tgz", - "integrity": "sha512-abk0NLA519LxRCszmbE0jYKuQ9YPocOXTiOXOo6Yr+YAT95VH+PtqYAjOJvGKt3viEd/x4qzabAlwd5bHOOARg==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.12.tgz", + "integrity": "sha512-XcFu0R0xWnwzSf4IQgFH1rJIckPN1pLy2R+4r9IDB7Yfu/ys9cVqfa4pBrMHj7a3gl8mIR4nRNPg0e5IvEVs6g==", "cpu": [ "arm" ], @@ -2310,9 +2133,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.5.tgz", - "integrity": "sha512-Y7eALiJ8lr0M2HH103Js+g7V34wf6snlpZLAsHI90uLhr3PVlNsbFVAXJC9d/V6BnPyKtpSwI+NcB/RLxsQxuA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.12.tgz", + "integrity": "sha512-260UrKgn8tz39ak+SMDOirKzr7V04M9dWPw5llW00SwBivCZoWcRBKV1d8cXnRkUmSZA3BdiUmBHWk7734Ulpw==", "cpu": [ "arm64" ], @@ -2329,9 +2152,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.5.tgz", - "integrity": "sha512-xMvZgnbZg4YVnR/AX2b3oOPDTFYJvUVaJg5FedA/LuvexAtXibZQej4cnTkw3rjsJ/ggUROB64TdtETiim+FYA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.12.tgz", + "integrity": "sha512-5YK1I9SqDkbPgc1IA8BgDl34suqUS2q0KWnBrirm0E51YjOs6eo6dV6jbQfNE/argHRSvd0QUGgtpIoYx+WWpw==", "cpu": [ "arm64" ], @@ -2348,9 +2171,9 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.5.tgz", - "integrity": "sha512-GRjeqTUDHTo5GwntsLaAMcBahG3nlpjftXWZLN73HiYQlhwEowvarFgQnRnQZtIp4keXX7quXFbG38uPZBa2EA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.12.tgz", + "integrity": "sha512-Rkcrmp7eFRg74yL5fXEU91JEWbdEPLevWwGtXpmhbjlD1StScbWTmO94Bhly+Mo+ketKYkdmM1vNUKeWSlx8cQ==", "cpu": [ "ppc64" ], @@ -2367,9 +2190,9 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.5.tgz", - "integrity": "sha512-vLNTR45F2Uwc8AufkNXPmB4VliaXs+FvcheEogIzOXzO4l+LzieXF5A/TWxLy5HtqpsRCHUfd0lPVrrdgXdLHQ==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.12.tgz", + "integrity": "sha512-qvK4DuAsQc2BSjlx+Xr+IzOIvvxbGZqxFwdWfG6F518Erj0GGISyQbJ6pIappnOxlNPzNHvo/L0BwB30GZ+zVw==", "cpu": [ "s390x" ], @@ -2386,9 +2209,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.5.tgz", - "integrity": "sha512-Mgj59/HTuYeK9Gz2MA+mBWKnHsAgkBSec15ZMb1st3oIfFbX7gCjOae7GydHhzcyQi9Z/7M1QuN9bR3oFqF0jQ==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.12.tgz", + "integrity": "sha512-Q9uLBO53Xd4QIq1WOycVQyPP1O4HhraEV2qqb3uTrnVw6QZih9duY4vNXOivL1xoUS1/z+W8eF4NMfl2a8Sdjw==", "cpu": [ "x64" ], @@ -2405,9 +2228,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.5.tgz", - "integrity": "sha512-mY8AP0/ichsbhAxGnLa3d3+MwV0EfgrPND2bplI3Ym8T6R2pJ0N87bvrKVwNXmdy3jnr6eQBecdqx/HMknBmpA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.12.tgz", + "integrity": "sha512-3IBxWFMjbOZskDPKv8Lf9BCnahlKuHthWkYnyIxOH/QcJrFcS4EmcenthApkwr/5+nEqZlLzeYbxeMaX7A5u4g==", "cpu": [ "x64" ], @@ -2424,9 +2247,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.5.tgz", - "integrity": "sha512-8SLssA2oweAxyRgDp789ACfRb/3P+zNRJpzZxSizxF9m8NUDQ4+3xjo8ttjhVGGw6Qxb70oZiEtIjaKikCO7Yw==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.12.tgz", + "integrity": "sha512-xtX61xg4LKPkPWilZU1ynKClz5Gj4bf74LML4r3eVLWumKnGjoEr1OSHQhMdbBDoYTi+yjrujvpZe2pUnqCrrA==", "cpu": [ "arm64" ], @@ -2440,9 +2263,9 @@ } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.5.tgz", - "integrity": "sha512-vGbruD5zquhoc8D9SViXgN2FBJtNdTyQ4DtG+SWiEGlJiAzoKcZ2xp+xuXCffhubVdt0NJlTZqkeRuERy7g8Cw==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.12.tgz", + "integrity": "sha512-At7fPB6PCaIjzgIhEZFxuT+BBFqiQibJDT4d3PhiR3f4E7bbMZF4aKblbFfEM3sETRDd1YiQx/+U/g/B/ou5Ew==", "cpu": [ "arm64" ], @@ -2456,9 +2279,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.5.tgz", - "integrity": "sha512-e/SXpgISz+IoqVcSSI0rx/d/he8zqLex+/rCWpnHpmVfmPIUjag9H6P7zotf0gJHwPUhQxZ/mF8tr6acebT9yw==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.12.tgz", + "integrity": "sha512-WIw2haVKwjuYdXkHaoC0mF8Le71TuCBxjrdKqLbJGctbBABj+ClfmNvtbOnzpq3RokNo5+V1qhtSzJyXorsklQ==", "cpu": [ "x64" ], @@ -2578,9 +2401,9 @@ "license": "MIT" }, "node_modules/@tybys/wasm-util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", - "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.4.tgz", + "integrity": "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==", "license": "MIT", "optional": true, "dependencies": { @@ -2958,14 +2781,14 @@ } }, "node_modules/astro": { - "version": "7.2.9", - "resolved": "https://registry.npmjs.org/astro/-/astro-7.2.9.tgz", - "integrity": "sha512-o5nZFo/bieF6rp4x9sQSLhI7GO7Bahpld38Y4LvX27nFoxNiuttjI+Hea81w5ksORLHgdPUlQpU9obPz5QRa8g==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/astro/-/astro-7.3.5.tgz", + "integrity": "sha512-1p/ernaq/RuESbM5NMjWzbO6SiebMGrGcYlGjMfBhzzgM+n/X7AUmVyw8BqW2QYCdivpsHwJBcD1fqmlTZjZHg==", "license": "MIT", "dependencies": { - "@astrojs/compiler-rs": "^0.4.0", - "@astrojs/internal-helpers": "0.10.4", - "@astrojs/markdown-satteri": "0.3.8", + "@astrojs/compiler-rs": "^0.5.0", + "@astrojs/internal-helpers": "0.11.0", + "@astrojs/markdown-satteri": "0.4.2", "@astrojs/telemetry": "3.3.3", "@capsizecss/unpack": "^4.0.0", "@clack/prompts": "^1.1.0", @@ -2982,40 +2805,40 @@ "dset": "^3.1.4", "es-module-lexer": "^2.0.0", "esbuild": "^0.28.0", - "find-proc": "0.1.0", + "find-proc": "0.2.0", "flattie": "^1.1.1", "fontace": "~0.4.1", "get-tsconfig": "5.0.0-beta.4", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.2.0", - "js-yaml": "^4.3.0", + "js-yaml": "^4.3.2", "jsonc-parser": "^3.3.1", "magic-string": "^1.0.0", "magicast": "^0.5.2", "mrmime": "^2.0.1", "neotraverse": "^1.0.1", - "obug": "^2.1.1", + "obug": "^3.0.0", "p-limit": "^7.3.0", "p-queue": "^9.1.0", "package-manager-detector": "^1.6.0", "piccolore": "^0.1.3", "picomatch": "^4.0.4", - "semver": "^7.7.4", "shiki": "^4.0.2", - "smol-toml": "^1.6.0", - "svgo": "^4.0.1", - "tinyclip": "^0.1.12", + "smol-toml": "^1.8.0", + "svgo": "^4.1.0", + "tinyclip": "^1.0.1", "tinyexec": "^1.0.4", "tinyglobby": "^0.2.15", "ultrahtml": "^1.6.0", "unifont": "~0.7.5", "unstorage": "^1.17.5", + "verkit": "^0.4.0", "vite": "^8.0.13", "vitefu": "^1.1.2", "xxhash-wasm": "^1.1.0", "yargs-parser": "^22.0.0", - "zod": "^4.3.6" + "zod": "^4.5.4" }, "bin": { "astro": "bin/astro.mjs" @@ -3033,7 +2856,7 @@ "sharp": "^0.35.4" }, "peerDependencies": { - "@astrojs/markdown-remark": "7.2.4" + "@astrojs/markdown-remark": "^7.3.0" }, "peerDependenciesMeta": { "@astrojs/markdown-remark": { @@ -3042,27 +2865,18 @@ } }, "node_modules/astro-expressive-code": { - "version": "0.44.1", - "resolved": "https://registry.npmjs.org/astro-expressive-code/-/astro-expressive-code-0.44.1.tgz", - "integrity": "sha512-DT1LnCqbHasBKlvzJ3m6LR4VI94wwx3W9EV/YbP1te4rqjOHsvsezHYuqb5MeLWLftXms/1FA9QBbwCo43DnJQ==", + "version": "0.44.2", + "resolved": "https://registry.npmjs.org/astro-expressive-code/-/astro-expressive-code-0.44.2.tgz", + "integrity": "sha512-avop7nZcRwC7quvIxVguhwEZ9Tp6IoTzKUCLwP30Fb7+er+pWQgcysP01dcuzRIJo81kLGg30q/YAI2Yb1Sdzg==", "license": "MIT", "dependencies": { - "rehype-expressive-code": "^0.44.1", + "rehype-expressive-code": "^0.44.2", "url-extras": "^0.1.0" }, "peerDependencies": { "astro": "^4.0.0-beta || ^5.0.0-beta || ^3.3.0 || ^6.0.0-beta || ^7.0.0" } }, - "node_modules/astro/node_modules/magic-string": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.2.2.tgz", - "integrity": "sha512-veT/+7iXrXzT39XnEN4lOxtNl72dMgJ8Lp+5Bd6YcMSWpb0n0MjBM8Uuooi6jgJr8dhUW2swQgBmoZVMni5SVg==", - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, "node_modules/axobject-query": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", @@ -3303,16 +3117,16 @@ } }, "node_modules/css-select": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", - "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-6.0.0.tgz", + "integrity": "sha512-rZZVSLle8v0+EY8QAkDWrKhpgt6SA5OtHsgBnsj6ZaLb5dmDVOWUDtQitd9ydxxvEjhewNudS6eTVU7uOyzvXw==", "license": "BSD-2-Clause", "dependencies": { "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" + "css-what": "^7.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "nth-check": "^2.1.1" }, "funding": { "url": "https://github.com/sponsors/fb55" @@ -3348,9 +3162,9 @@ } }, "node_modules/css-what": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", - "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-7.0.0.tgz", + "integrity": "sha512-wD5oz5xibMOPHzy13CyGmogB3phdvcDaB5t0W/Nr5Z2O/agcB8YwOz6e2Lsp10pNDzBoDO9nVa3RGs/2BttpHQ==", "license": "BSD-2-Clause", "engines": { "node": ">= 6" @@ -3465,9 +3279,9 @@ } }, "node_modules/devalue": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.9.1.tgz", - "integrity": "sha512-+17vil3EVQRzvtDJSFuTWEb8XJRvXqAiV3qZyQWD398QeXUa6CxsUyMdD1fxzEhUrd4FojitFz7lhIHBTlV4fw==", + "version": "5.9.4", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.9.4.tgz", + "integrity": "sha512-sPAT4pztbu6586/hrhOnMKS17IJrvg12mXiSPSS3W5qDeN2RGgvZ0diZCm31dBbnevfVmujNO3IM2wrS4Y2Rhg==", "license": "MIT" }, "node_modules/devlop": { @@ -3816,15 +3630,15 @@ "license": "MIT" }, "node_modules/expressive-code": { - "version": "0.44.1", - "resolved": "https://registry.npmjs.org/expressive-code/-/expressive-code-0.44.1.tgz", - "integrity": "sha512-GakidxhapWDzpKLqEaFQ8wGk6gAqEtPQibu8+yPBfnDLgev5Vdsh1pasTxnrXL/mzIknyqeTwhMHTghdaiUrTg==", + "version": "0.44.2", + "resolved": "https://registry.npmjs.org/expressive-code/-/expressive-code-0.44.2.tgz", + "integrity": "sha512-MLNghkvhyFgVW4oCD5DxBuYnnTXIf0PygzGmfT6OZeOOYWh/D4sH1j931biElkA5RG/J9wY/iuSMGAPF5vzHOg==", "license": "MIT", "dependencies": { - "@expressive-code/core": "^0.44.1", - "@expressive-code/plugin-frames": "^0.44.1", - "@expressive-code/plugin-shiki": "^0.44.1", - "@expressive-code/plugin-text-markers": "^0.44.1" + "@expressive-code/core": "^0.44.2", + "@expressive-code/plugin-frames": "^0.44.2", + "@expressive-code/plugin-shiki": "^0.44.2", + "@expressive-code/plugin-text-markers": "^0.44.2" } }, "node_modules/extend": { @@ -3856,9 +3670,9 @@ } }, "node_modules/fast-uri": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.7.tgz", - "integrity": "sha512-dOvZVzjdZdz7phd9v6jCbwxrBW3fK6n8Rc0CtdmM4bumzMnxywBYhuph6J819RRw/ku+rLbelwfMunktuzVVHg==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz", + "integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==", "dev": true, "funding": [ { @@ -3899,9 +3713,9 @@ } }, "node_modules/find-proc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/find-proc/-/find-proc-0.1.0.tgz", - "integrity": "sha512-OaOpEYv2PiQ7SQ5LIrl+deA1XaWcxEjnpM6VuWXTUvn+teIXxeFTLDmu18/zDQpFmHN4o3oDBX+BT0AGwEhemg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/find-proc/-/find-proc-0.2.0.tgz", + "integrity": "sha512-a6h2nTrgB3g5Wrn4au9Ux4kMk7IJtyF6oA8uGn+mk3weLZssUtc1cp6meHIzzuW2o1srrBAxzkmXLbqjRkgB6w==", "license": "MIT", "engines": { "node": "^20.19.0 || >=22.12.0" @@ -4524,9 +4338,9 @@ } }, "node_modules/js-yaml": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", - "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "funding": [ { "type": "github", @@ -4849,27 +4663,27 @@ } }, "node_modules/lru-cache": { - "version": "11.5.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", - "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==", + "version": "11.5.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", + "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", "license": "BlueOak-1.0.0", "engines": { "node": "20 || >=22" } }, "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.2.tgz", + "integrity": "sha512-vG+rjFRj1PqdIBozIxAGMjPlOhaVe+GXpbttY/iSK7rGcJRMlwNJO7dcUwmUqkymsFLJiNGI06t4D7Fr7yRC9g==", "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" + "@jridgewell/sourcemap-codec": "^1.6.0" } }, "node_modules/magicast": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.4.tgz", - "integrity": "sha512-llBEhWm1SacoRwgHUoQJYtwp4PBLF4faQi5TCpIGyGs9n4y5+juI0tDgyKIfpqxckRHaHzouUEph3THklWh03w==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.5.tgz", + "integrity": "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==", "license": "MIT", "dependencies": { "@babel/parser": "^7.29.7", @@ -5987,9 +5801,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.18", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", - "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", + "version": "3.3.19", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz", + "integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==", "funding": [ { "type": "github", @@ -6060,9 +5874,9 @@ } }, "node_modules/obug": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", - "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz", + "integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==", "funding": [ "https://github.com/sponsors/sxzz", "https://opencollective.com/debug" @@ -6107,9 +5921,9 @@ } }, "node_modules/p-limit": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-7.3.1.tgz", - "integrity": "sha512-0trZaiG7Y7kN/Egy9a8j47t9osC0Tch4PaIWd9yGF6bvmlk7muExRvGNYb8sXBwEKMoNKsbNN9P8EefuQekE4Q==", + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-7.3.3.tgz", + "integrity": "sha512-SKgVvDU5TNIxQ4r30U75BNLC6a+6GOEjngrk/ysM5+Zu3oJuk1SC5ApzIzY/7PjCEjoVPMWJ0zho/4QUiEB7TQ==", "license": "MIT", "dependencies": { "yocto-queue": "^1.2.1" @@ -6138,9 +5952,9 @@ } }, "node_modules/p-timeout": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-7.0.1.tgz", - "integrity": "sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-7.0.2.tgz", + "integrity": "sha512-prbX4Z3YszrFNgH+MW5Zoeq3baXrMtP/MQnFeET90UB/GtGcGDQ5Usg9OCy6ETjTTntOw1SL2z9fMPUppN3Guw==", "license": "MIT", "engines": { "node": ">=20" @@ -6248,9 +6062,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", - "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "license": "MIT", "engines": { "node": ">=12" @@ -6260,9 +6074,9 @@ } }, "node_modules/postcss": { - "version": "8.5.26", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", - "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", + "version": "8.5.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", + "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", "funding": [ { "type": "opencollective", @@ -6279,7 +6093,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.17", + "nanoid": "^3.3.18", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -6480,58 +6294,13 @@ "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", "license": "MIT" }, - "node_modules/rehype": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/rehype/-/rehype-13.0.2.tgz", - "integrity": "sha512-j31mdaRFrwFRUIlxGeuPXXKWQxet52RBQRvCmzl5eCefn/KGbomK5GMHNMsOJf55fgo3qw5tST5neDuarDYR2A==", - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0", - "rehype-parse": "^9.0.0", - "rehype-stringify": "^10.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/rehype-expressive-code": { - "version": "0.44.1", - "resolved": "https://registry.npmjs.org/rehype-expressive-code/-/rehype-expressive-code-0.44.1.tgz", - "integrity": "sha512-+VZgs7Evw4LXRN3owpoBNSTpYuW6GeOdjqcUT1TuY8o/4MGPtbd0EU7Bgrju7X8KrQ6SslOBAuGWJ5fV5TriJQ==", - "license": "MIT", - "dependencies": { - "expressive-code": "^0.44.1" - } - }, - "node_modules/rehype-format": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/rehype-format/-/rehype-format-5.0.1.tgz", - "integrity": "sha512-zvmVru9uB0josBVpr946OR8ui7nJEdzZobwLOOqHb/OOD88W0Vk2SqLwoVOj0fM6IPCCO6TaV9CvQvJMWwukFQ==", + "version": "0.44.2", + "resolved": "https://registry.npmjs.org/rehype-expressive-code/-/rehype-expressive-code-0.44.2.tgz", + "integrity": "sha512-jvjQpsfWKBquDrEl5YQA3CJybRRIuDOYsui1BJTs5oKDUK8pPkJSSxY8FjxNlIFIdtgrTjC1zuahuY4Cc1j9SQ==", "license": "MIT", "dependencies": { - "@types/hast": "^3.0.0", - "hast-util-format": "^1.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/rehype-parse": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/rehype-parse/-/rehype-parse-9.0.1.tgz", - "integrity": "sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag==", - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0", - "hast-util-from-html": "^2.0.0", - "unified": "^11.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" + "expressive-code": "^0.44.2" } }, "node_modules/rehype-raw": { @@ -6778,12 +6547,12 @@ } }, "node_modules/rolldown": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz", - "integrity": "sha512-VD2IE5PUG4Oj8zz2VGykiYd5wbnjdIiSsNQb8Qu5B+noEp+A78mu2iVvpp27g8es14Tk9rofNs5Tku9iQCS4fA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.12.tgz", + "integrity": "sha512-8wafseiaG80xmXSfqidUNqZcylTlhmPZZt+za2m+js2sFZ8dTNlhIOV2WcbIPx2hgwPBJpEUGFAMZ9bgBBLTSQ==", "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.146.0", + "@oxc-project/types": "=0.152.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -6793,44 +6562,44 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm-eabi": "1.2.5", - "@rolldown/binding-android-arm64": "1.2.5", - "@rolldown/binding-darwin-arm64": "1.2.5", - "@rolldown/binding-darwin-x64": "1.2.5", - "@rolldown/binding-freebsd-x64": "1.2.5", - "@rolldown/binding-linux-arm-gnueabihf": "1.2.5", - "@rolldown/binding-linux-arm64-gnu": "1.2.5", - "@rolldown/binding-linux-arm64-musl": "1.2.5", - "@rolldown/binding-linux-ppc64-gnu": "1.2.5", - "@rolldown/binding-linux-s390x-gnu": "1.2.5", - "@rolldown/binding-linux-x64-gnu": "1.2.5", - "@rolldown/binding-linux-x64-musl": "1.2.5", - "@rolldown/binding-openharmony-arm64": "1.2.5", - "@rolldown/binding-win32-arm64-msvc": "1.2.5", - "@rolldown/binding-win32-x64-msvc": "1.2.5" + "@rolldown/binding-android-arm-eabi": "1.2.12", + "@rolldown/binding-android-arm64": "1.2.12", + "@rolldown/binding-darwin-arm64": "1.2.12", + "@rolldown/binding-darwin-x64": "1.2.12", + "@rolldown/binding-freebsd-x64": "1.2.12", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.12", + "@rolldown/binding-linux-arm64-gnu": "1.2.12", + "@rolldown/binding-linux-arm64-musl": "1.2.12", + "@rolldown/binding-linux-ppc64-gnu": "1.2.12", + "@rolldown/binding-linux-s390x-gnu": "1.2.12", + "@rolldown/binding-linux-x64-gnu": "1.2.12", + "@rolldown/binding-linux-x64-musl": "1.2.12", + "@rolldown/binding-openharmony-arm64": "1.2.12", + "@rolldown/binding-win32-arm64-msvc": "1.2.12", + "@rolldown/binding-win32-x64-msvc": "1.2.12" } }, "node_modules/satteri": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/satteri/-/satteri-0.9.5.tgz", - "integrity": "sha512-ZuWVl+vnM64y+/TtX8Kosv2c00W+hLQiiwnEL6H0UKVVrxFqMw4D2CJHHQaouVd89OAhtBBfjWLqhKi3TVUV4w==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/satteri/-/satteri-0.10.5.tgz", + "integrity": "sha512-Ao1LKpAEa9Wdg0otgbVKViZHEq9ebdXe4DMrp3s9vQAU0HNIuHnFEuMuOcm0ZIXyV0Yzxj91NvhLpvXZJO/5ZQ==", "license": "MIT", "dependencies": { "@types/estree-jsx": "^1.0.5", - "@types/hast": "^3.0.4", + "@types/hast": "^3.0.5", "@types/mdast": "^4.0.4", "@types/unist": "^3.0.3" }, "optionalDependencies": { - "@bruits/satteri-darwin-arm64": "0.9.5", - "@bruits/satteri-darwin-x64": "0.9.5", - "@bruits/satteri-linux-arm64-gnu": "0.9.5", - "@bruits/satteri-linux-arm64-musl": "0.9.5", - "@bruits/satteri-linux-x64-gnu": "0.9.5", - "@bruits/satteri-linux-x64-musl": "0.9.5", - "@bruits/satteri-wasm32-wasi": "0.9.5", - "@bruits/satteri-win32-arm64-msvc": "0.9.5", - "@bruits/satteri-win32-x64-msvc": "0.9.5" + "@bruits/satteri-darwin-arm64": "0.10.5", + "@bruits/satteri-darwin-x64": "0.10.5", + "@bruits/satteri-linux-arm64-gnu": "0.10.5", + "@bruits/satteri-linux-arm64-musl": "0.10.5", + "@bruits/satteri-linux-x64-gnu": "0.10.5", + "@bruits/satteri-linux-x64-musl": "0.10.5", + "@bruits/satteri-wasm32-wasi": "0.10.5", + "@bruits/satteri-win32-arm64-msvc": "0.10.5", + "@bruits/satteri-win32-x64-msvc": "0.10.5" } }, "node_modules/sax": { @@ -6855,9 +6624,9 @@ } }, "node_modules/sharp": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.4.tgz", - "integrity": "sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.5.tgz", + "integrity": "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==", "license": "Apache-2.0", "dependencies": { "@img/colour": "^1.1.0", @@ -6871,31 +6640,31 @@ "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.35.4", - "@img/sharp-darwin-x64": "0.35.4", - "@img/sharp-freebsd-wasm32": "0.35.4", - "@img/sharp-libvips-darwin-arm64": "1.3.3", - "@img/sharp-libvips-darwin-x64": "1.3.3", - "@img/sharp-libvips-linux-arm": "1.3.3", - "@img/sharp-libvips-linux-arm64": "1.3.3", - "@img/sharp-libvips-linux-ppc64": "1.3.3", - "@img/sharp-libvips-linux-riscv64": "1.3.3", - "@img/sharp-libvips-linux-s390x": "1.3.3", - "@img/sharp-libvips-linux-x64": "1.3.3", - "@img/sharp-libvips-linuxmusl-arm64": "1.3.3", - "@img/sharp-libvips-linuxmusl-x64": "1.3.3", - "@img/sharp-linux-arm": "0.35.4", - "@img/sharp-linux-arm64": "0.35.4", - "@img/sharp-linux-ppc64": "0.35.4", - "@img/sharp-linux-riscv64": "0.35.4", - "@img/sharp-linux-s390x": "0.35.4", - "@img/sharp-linux-x64": "0.35.4", - "@img/sharp-linuxmusl-arm64": "0.35.4", - "@img/sharp-linuxmusl-x64": "0.35.4", - "@img/sharp-webcontainers-wasm32": "0.35.4", - "@img/sharp-win32-arm64": "0.35.4", - "@img/sharp-win32-ia32": "0.35.4", - "@img/sharp-win32-x64": "0.35.4" + "@img/sharp-darwin-arm64": "0.35.5", + "@img/sharp-darwin-x64": "0.35.5", + "@img/sharp-freebsd-wasm32": "0.35.5", + "@img/sharp-libvips-darwin-arm64": "1.3.4", + "@img/sharp-libvips-darwin-x64": "1.3.4", + "@img/sharp-libvips-linux-arm": "1.3.4", + "@img/sharp-libvips-linux-arm64": "1.3.4", + "@img/sharp-libvips-linux-ppc64": "1.3.4", + "@img/sharp-libvips-linux-riscv64": "1.3.4", + "@img/sharp-libvips-linux-s390x": "1.3.4", + "@img/sharp-libvips-linux-x64": "1.3.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", + "@img/sharp-libvips-linuxmusl-x64": "1.3.4", + "@img/sharp-linux-arm": "0.35.5", + "@img/sharp-linux-arm64": "0.35.5", + "@img/sharp-linux-ppc64": "0.35.5", + "@img/sharp-linux-riscv64": "0.35.5", + "@img/sharp-linux-s390x": "0.35.5", + "@img/sharp-linux-x64": "0.35.5", + "@img/sharp-linuxmusl-arm64": "0.35.5", + "@img/sharp-linuxmusl-x64": "0.35.5", + "@img/sharp-webcontainers-wasm32": "0.35.5", + "@img/sharp-win32-arm64": "0.35.5", + "@img/sharp-win32-ia32": "0.35.5", + "@img/sharp-win32-x64": "0.35.5" }, "peerDependenciesMeta": { "@types/node": { @@ -6948,9 +6717,9 @@ } }, "node_modules/smol-toml": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.8.0.tgz", - "integrity": "sha512-kCZr2V3ch9i00x8zXRhjUNVcjG9ijES5dDudkXvUVCT5QlJNQWElSJdZqyPemffHoLNUYwOcou0Fy+ojN0uHSQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.9.0.tgz", + "integrity": "sha512-hpd+HLON7HdZXqYchMM/+LaTTbdK0AU3NngIJ4KVyWbY9bfQqdL9cD+4yf6dUoU2Ap4VsU0JkQi6FxAI1B2mXQ==", "license": "BSD-3-Clause", "engines": { "node": ">= 18" @@ -6969,9 +6738,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -7059,18 +6828,18 @@ } }, "node_modules/svgo": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-4.0.2.tgz", - "integrity": "sha512-ekx94z1rRc5LDi6oSUaeRnYhd0UOJxdtQCL2rF8xpWxD3TPAsISWOrxezqGovqS38GRZOdpDfvQe3ts6F7nsng==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-4.1.0.tgz", + "integrity": "sha512-bkxnTg1kSU0guhIBmibA6UUhrQmPVA1XsQLN+ylCd+UWzbnLkySOcXpyk1mrl05f+pcaCx2eHb+sp6BgMZWX+Q==", "license": "MIT", "dependencies": { "commander": "^11.1.0", - "css-select": "^5.1.0", + "css-select": "^6.0.0", "css-tree": "^3.0.1", - "css-what": "^6.1.0", + "css-what": "^7.0.0", "csso": "^5.0.5", "picocolors": "^1.1.1", - "sax": "^1.5.0" + "sax": "1.6.1" }, "bin": { "svgo": "bin/svgo.js" @@ -7090,18 +6859,18 @@ "license": "MIT" }, "node_modules/tinyclip": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/tinyclip/-/tinyclip-0.1.15.tgz", - "integrity": "sha512-uo33abH+Ays0xYaDysoBt494Hb3hsEczMpcC0MwFl773pazORx4fmvKhclhR1wonUbB6vvpRsvVMwnhfqeMc+A==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tinyclip/-/tinyclip-1.0.3.tgz", + "integrity": "sha512-nTv2raKFMzGG6JJp0lpNDsRPdfFE6UHlu2rVEjXo8vkx1ZS3LW2CVXqIaLu8xZlu+6tbFs9V58Qc/Jmk/Ii7wA==", "license": "MIT", "engines": { "node": "^16.14.0 || >= 17.3.0" } }, "node_modules/tinyexec": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz", - "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz", + "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==", "license": "MIT", "engines": { "node": ">=18" @@ -7200,9 +6969,9 @@ "license": "MIT" }, "node_modules/undici": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-8.10.0.tgz", - "integrity": "sha512-HvltHd7avK13QIw/oLe4qoOLyoVSoafqJ2jYOrtMRBkbYT31eiBQ8O0ehRKZiEZCMEyLFQNIADpgCWC5fALvYQ==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-8.11.2.tgz", + "integrity": "sha512-u4UB2/IrKdU6lFxumHmmo1a3fCQO5tzQllRorfoRS63txhrB7xTpSn1PftwC4qEHkOaqP95fCWW4lJzwErwzhQ==", "license": "MIT", "engines": { "node": ">=22.19.0" @@ -7522,6 +7291,18 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, + "node_modules/verkit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/verkit/-/verkit-0.4.1.tgz", + "integrity": "sha512-mMVzj0TXExtVdlDEq+Mzp0eyOuyznNpFobNM3uAqe3HVm/Ps2c+u17BligMkZjZCA6EiXpoon8iRTer3iu40SQ==", + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, "node_modules/vfile": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", @@ -7565,15 +7346,15 @@ } }, "node_modules/vite": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", - "integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.1.tgz", + "integrity": "sha512-/bvH9E9tmCXRGp2uXY3WbOldqpTwFkbha/8ANaEQ6VkxhH60KyqLwgZq6lG2y+4uT55x9+9eUHMpQ7uGnOCKjA==", "license": "MIT", "dependencies": { "lightningcss": "^1.33.0", - "picomatch": "^4.0.5", - "postcss": "^8.5.26", - "rolldown": "~1.2.4", + "picomatch": "^4.0.7", + "postcss": "^8.5.28", + "rolldown": "~1.2.9", "tinyglobby": "^0.2.17" }, "bin": { @@ -7590,7 +7371,7 @@ }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", - "@vitejs/devtools": "^0.4.0 || ^0.5.0", + "@vitejs/devtools": "^0.7.1", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", @@ -8108,9 +7889,9 @@ } }, "node_modules/zod": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", - "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", + "version": "4.6.5", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.5.tgz", + "integrity": "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/site/package.json b/site/package.json index f3c01ac2..27edee69 100644 --- a/site/package.json +++ b/site/package.json @@ -14,16 +14,16 @@ "astro": "astro" }, "dependencies": { - "@astrojs/markdown-remark": "^7.2.4", - "@astrojs/starlight": "0.41.10", - "@fontsource/ibm-plex-mono": "^5.3.0", - "@fontsource/ibm-plex-sans": "^5.3.0", - "@phosphor-icons/core": "^2.1.1", - "astro": "7.2.9", - "sharp": "^0.35.4" + "@astrojs/markdown-remark": "7.3.1", + "@astrojs/starlight": "0.42.4", + "@fontsource/ibm-plex-mono": "5.3.0", + "@fontsource/ibm-plex-sans": "5.3.0", + "@phosphor-icons/core": "2.1.1", + "astro": "7.3.5", + "sharp": "0.35.5" }, "devDependencies": { - "@astrojs/check": "^0.9.10", - "typescript": "^6.0.3" + "@astrojs/check": "0.9.10", + "typescript": "6.0.3" } } diff --git a/site/src/content/docs/explanation/storage-model.mdx b/site/src/content/docs/explanation/storage-model.mdx index 06a91559..457ceceb 100644 --- a/site/src/content/docs/explanation/storage-model.mdx +++ b/site/src/content/docs/explanation/storage-model.mdx @@ -59,6 +59,60 @@ The sidecar is an index, not another telemetry representation. Dashboard rollups are rebuildable DuckDB caches. SQLite remains independent and stores only transactional product state. +## Attributes retain their types + +Span, log, and metric attributes and resource attributes use Parquet VARIANT +columns. Frequently queried resource and messaging fields also have typed +Parquet columns inside the VARIANT encoding. The span read view exposes +`messaging_system` and `messaging_destination` directly from those shredded +fields, so messaging rollups can avoid decoding the whole attributes object. +Values with different types remain in the residual encoding; +an integer does not become a string just because another row uses one. + +Integers, booleans, binary values, nulls, arrays, and nested objects survive +ingestion, indexed reads, and compaction. Event timestamps retain nanosecond +precision as UTC instants (`TIMESTAMPTZ_NS`). Keep timestamp columns unchanged +in filters so Parquet row-group statistics can prune the scan. For datetime +functions that require a timestamp without a timezone, cast their argument to +`TIMESTAMP_NS`; the JSON result boundary handles returned timestamps automatically. +Attribute names such as +`service.name` are literal keys. In SQL, use `attr(attributes, 'service.name')` +and an explicit cast when a scalar type is needed, for example +`TRY_CAST(attr(attributes, 'retry.count') AS BIGINT)`. General attribute extracts +through views retain their types, but this engine preview does not propagate +their extraction across view projections. Prefer the existing scalar service, +namespace, version, environment, and messaging columns for those hot queries. + +The JSON SQL response converts nested values only when returning results. +Integer tokens retain their full precision; clients that parse JSON numbers as +floating-point values should cast large integers to strings in their query. +Non-finite floats are returned as `"NaN"`, `"Infinity"`, or `"-Infinity"`. +Binary values stay binary in storage; cast them explicitly to the desired +string encoding when querying them for a JSON client. + +## Engine and format are pinned + +Fanout embeds DuckDB `v2.0.0-alpha43763`, a preview engine, with its extensions +compiled into the binary. It downloads no extensions at runtime. Native source +builds use `scripts/with-duckdb.sh`, which checks the platform archive and uses +the matching engine headers; the ordinary `just` build and test recipes invoke +it automatically. DuckDB 2's asynchronous I/O uses its default memory-governed +read-ahead rather than an unlimited queue. Rooted service traversal uses keyed +recursion with explicit hop, accumulated-node, and execution-time limits. + +Offline verification decodes every Parquet column with the native engine and +separately checks physical schemas, span ordering, row counts, and trace-index +ranges. It reuses one bounded in-memory engine and creates no spill files. +Discarded hashes force decoding; they do not establish a stored checksum. +Verification failures such as memory exhaustion or cancellation never authorize +quarantine. + +Telemetry batches use format 3. An older or unknown batch format makes startup +fail before cleanup or schema rewriting, leaving the files intact. This build +has no reader or automatic conversion for previous formats. Start with an +empty telemetry directory; retain previous data separately for its original +reader. SQLite control state is independent of this telemetry format change. + ## Small files are bounded by compaction Atomic ingestion creates immutable batch directories. Maintenance drains every @@ -76,9 +130,68 @@ that work is prepared. Retention is based on ingestion time rather than event time. A service with a bad clock therefore cannot pin a batch on disk by emitting a far-future event. +## Dashboard reads pin completed batches + +Dashboard log, metric, and span scans select immutable files from their actual +minimum and maximum event timestamps. Bounds come from every Parquet row-group +footer, including negative timestamps. Files without complete statistics remain +eligible. Late-arriving telemetry is selected by its event time, independently of +its ingestion timestamp. Arbitrary SQL retains access to all active files. + +Endpoints merge fixed-boundary duration histograms for completed minutes with +Parquet rows from the two clipped boundary minutes. A complete file whose +event bounds lie entirely inside the window contributes its cached counts +even for a clipped minute. Log histograms merge minute counts by namespace, +service, and original severity; text searches count rows whose redacted body +matches. Notable-trace selection keeps one indexed candidate per trace, updated +from new batches. A candidate records whether its namespace and service are unambiguous; +mixed scopes use exact per-batch contributions for the requested scope. Error +priority, duration, and trace-ID tie ordering are preserved. Boundary trace +parts are recomputed from Parquet. + +These caches acknowledge complete batch IDs rather than an ingestion watermark. +A batch's aggregates, trace bounds, and acknowledgement commit in one transaction. +A read pins active files and reads cache rows and acknowledgements from one +DuckDB transaction. Newly published uncached files are read directly, so cache +backfill does not delay visibility. Retired batch contributions are excluded by +active ID even before cleanup; they cannot invalidate unrelated traces. +Compaction derives the output aggregates from complete cached inputs. If an input +is not yet cached, the output remains directly queryable until its own backfill. + +The private cache stores minute aggregates, per-batch trace parts, and one +incremental candidate per trace. It does not copy every span or log timestamp +or maintain four global trace indexes. Complete cached compaction replacements +preserve candidate bounds without recomputation. Retention and incomplete +replacements recompute only affected trace IDs from active contributions. +A semantic version covers the cache schema and aggregation rules; a version +change atomically discards all private +read tables and rebuilds from authoritative format-3 Parquet. The background +worker processes bounded groups; `fanout_read_cache_pending_batches` reports its +backlog independently of the service and edge rollups' safety window. +Completed-batch and analytical writers use separate gates and two connections +outside the read pool. They modify disjoint tables; maintenance holds both gates +for checkpointing. Trace reads avoid materializing every retained candidate into +a temporary relation for each request. A snapshot-local ambiguity probe keeps +unused batch-parts aggregation out of single-scope read plans. + +Narrow file selections use explicit lists from footer bounds. Broad selections +use a glob with a captured-batch-ID filter, which excludes files published after +snapshot capture. Only signals referenced by a query are bound. + +`storage.rollup_skip_to_latest` skips historical service and edge aggregation. +Completed-batch endpoint, log, and trace caches still rebuild retained history +in bounded passes; uncached files remain immediately queryable. + ## Rollups lag deliberately Overview and alert queries read rebuildable DuckDB rollups. Their watermark trails committed telemetry by a fixed safety window so out-of-order events from bounded commit retries are not skipped. Raw committed telemetry is queryable before it appears in a rollup. + +Service dependency traversal reads the complete edge rollup within the selected +window, including edges outside the topology view's displayed page. It follows +upstream or downstream edges from a named service, retains the minimum hop +count per namespace and service, and bounds depth, accumulated nodes, and +execution time. A truncated result states which limit was reached. Rollup lag +still applies; dependency edges describe observed calls, not proof of causality. diff --git a/site/src/content/docs/reference/http-routes.mdx b/site/src/content/docs/reference/http-routes.mdx index 8cc612a0..a331dc2b 100644 --- a/site/src/content/docs/reference/http-routes.mdx +++ b/site/src/content/docs/reference/http-routes.mdx @@ -96,6 +96,7 @@ Capabilities map to roles in [roles](/reference/roles). | `GET` | `/api/observability/logs` | `telemetry:read` | | `GET` | `/api/observability/overview` | `telemetry:read` | | `GET` | `/api/observability/performance` | `telemetry:read` | +| `GET` | `/api/observability/services/dependencies` | `telemetry:read` | | `GET` | `/api/observability/topology` | `telemetry:read` | | `GET` | `/api/observability/trace` | `telemetry:read` | | `GET` | `/api/settings/ingest` | `ingest:read-metadata` | diff --git a/site/src/content/docs/reference/mcp-tools.mdx b/site/src/content/docs/reference/mcp-tools.mdx index dc2cb623..da76c589 100644 --- a/site/src/content/docs/reference/mcp-tools.mdx +++ b/site/src/content/docs/reference/mcp-tools.mdx @@ -1,7 +1,7 @@ --- title: "MCP tools" description: "Every tool a Fanout instance exposes over MCP, with its inputs and whether it changes anything." -summary: "Ten tools served at /mcp, each with its inputs and mutation semantics, taken from the server's own tools/list answer." +summary: "Eleven tools served at /mcp, each with its inputs and mutation semantics, taken from the server's own tools/list answer." read_when: - "You are connecting an agent and want to know what it can call." - "You need to know which tools mutate state and which cannot." @@ -13,7 +13,7 @@ generated: true tool list rather than reading the registrations. Edit the generator, not this page. */} -A Fanout instance serves MCP at `/mcp`. Ten tools, listed below exactly as the +A Fanout instance serves MCP at `/mcp`. Eleven tools, listed below exactly as the server reports them to a connecting client. Every tool is **closed-world**: it reads or writes what this instance holds @@ -25,6 +25,7 @@ and reaches nothing else. | [`get_dashboard`](#get_dashboard) | No — read-only | | [`get_intelligence_snapshot`](#get_intelligence_snapshot) | No — read-only | | [`get_observability_overview`](#get_observability_overview) | No — read-only | +| [`get_service_dependencies`](#get_service_dependencies) | No — read-only | | [`get_service_performance`](#get_service_performance) | No — read-only | | [`get_service_topology`](#get_service_topology) | No — read-only | | [`inspect_trace`](#inspect_trace) | No — read-only | @@ -74,6 +75,21 @@ Read-only. Calling it changes nothing. | `namespace` | `string` | no | OpenTelemetry service namespace; empty queries all namespaces | | `window` | `string` | no | Time window such as 15m, 1h, 24h, 168h, or 720h; defaults to 1h | +## get_service_dependencies + +**Service dependency traversal** — Find upstream or downstream dependencies of one service with minimum hop counts. Uses the full scoped edge rollup, handles cycles, and reports truncation from depth or node limits. + +Read-only. Calling it changes nothing. + +| Input | Type | Required | Means | +|---|---|---|---| +| `service` | `string` | **yes** | Root service name | +| `direction` | `string` | no | upstream or downstream; defaults to downstream | +| `max_depth` | `integer` | no | Maximum hops from 1 to 32; defaults to 8 | +| `max_nodes` | `integer` | no | Maximum accumulated nodes from 1 to 500 including roots; defaults to 100 | +| `namespace` | `string` | no | Filter by namespace; traversal always keeps namespaces separate | +| `window` | `string` | no | Bounded telemetry window, defaults to 1h | + ## get_service_performance **Service performance explorer** — Inspect activity, errors, latency, endpoints, cross-signal correlation, and change over time for one service or the system. diff --git a/site/src/content/docs/reference/settings/storage.mdx b/site/src/content/docs/reference/settings/storage.mdx index b40862ef..c5bca7b9 100644 --- a/site/src/content/docs/reference/settings/storage.mdx +++ b/site/src/content/docs/reference/settings/storage.mdx @@ -47,4 +47,4 @@ Controls Parquet retention and compaction, and query-cache checkpointing. ### `storage.rollup_skip_to_latest` -RollupSkipToLatest, set once at boot, advances every rollup watermark to the current max ingested timestamp so existing data is treated as already-rolled-up instead of aggregated as a backlog. Stands up a large pre-seeded historical dataset (benchmarks, restores) without a multi-minute first-rollup catch-up that monopolizes DuckDB write capacity. Off in normal operation. +RollupSkipToLatest, set once at boot, advances the service and edge rollup watermarks to the current max ingested timestamp. Existing history is not aggregated into those analytical rollups. Completed-batch endpoint, log, and trace caches still rebuild all retained history in bounded passes; uncached files remain immediately queryable. Useful for large pre-seeded datasets (benchmarks, restores); off in normal operation. diff --git a/third_party/notices/duckdb-NOTICE.txt b/third_party/notices/duckdb-NOTICE.txt new file mode 100644 index 00000000..256d6756 --- /dev/null +++ b/third_party/notices/duckdb-NOTICE.txt @@ -0,0 +1,2179 @@ +DuckDB 96063b9e39749cc0f087bb11501d7edbee527957 — upstream license and bundled third-party notices. +Source: https://github.com/duckdb/duckdb/tree/96063b9e39749cc0f087bb11501d7edbee527957 + +--- LICENSE --- + +Copyright 2018-2026 Stichting DuckDB Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- src/include/duckdb/storage/compression/alp/algorithm/LICENSE --- + +MIT License + +Copyright (c) 2023 CWI, Azim Afroozeh, Leonardo Xavier Kuffo Rivero + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- src/include/duckdb/storage/compression/alprd/algorithm/LICENSE --- + +MIT License + +Copyright (c) 2023 CWI, Azim Afroozeh, Leonardo Xavier Kuffo Rivero + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- third_party/brotli/LICENSE --- + +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- third_party/concurrentqueue/LICENSE --- + +This license file applies to everything in this repository except that which +is explicitly annotated as being written by other authors, i.e. the Boost +queue (included in the benchmarks for comparison), Intel's TBB library (ditto), +the CDSChecker tool (used for verification), the Relacy model checker (ditto), +and Jeff Preshing's semaphore implementation (used in the blocking queue) which +has a zlib license (embedded in lightweightsempahore.h). + +--- + +Simplified BSD License: + +Copyright (c) 2013-2016, Cameron Desrochers. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright notice, this list of +conditions and the following disclaimer in the documentation and/or other materials +provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + +I have also chosen to dual-license under the Boost Software License as an alternative to +the Simplified BSD license above: + +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +--- third_party/fast_float/LICENSE --- + +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +--- third_party/fastpforlib/LICENSE --- + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--- third_party/fmt/LICENSE --- + +Copyright (c) 2012 - present, Victor Zverovich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- Optional exception to the license --- + +As an exception, if, as a result of your compiling your source code, portions +of this Software are embedded into a machine-executable object form of such +source code, you may redistribute such embedded portions in such object form +without including the above copyright and permission notices. + +--- third_party/fsst/LICENSE --- + +MIT License + +Copyright (c) 2018-2020, CWI, TU Munich, FSU Jena + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- third_party/httplib/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2017 yhirose + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- third_party/hyperloglog/LICENSE --- + +Copyright (c) 2012 Art.sy, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- third_party/jaro_winkler/LICENSE --- + +Copyright © 2022 Max Bachmann + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- third_party/jemalloc/LICENSE --- + +Unless otherwise specified, files in the jemalloc source distribution are +subject to the following license: +-------------------------------------------------------------------------------- +Copyright (C) 2002-present Jason Evans . +All rights reserved. +Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved. +Copyright (C) 2009-present Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice(s), + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice(s), + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- + +--- third_party/lz4/LICENSE --- + +LZ4 Library +Copyright (c) 2011-2020, Yann Collet +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- third_party/mbedtls/LICENSE --- + +Mbed TLS files are provided under a dual [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) +OR [GPL-2.0-or-later](https://spdx.org/licenses/GPL-2.0-or-later.html) license. +This means that users may choose which of these licenses they take the code +under. + +The full text of each of these licenses is given below. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +=============================================================================== + + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +--- third_party/miniz/LICENSE --- + +Copyright 2013-2014 RAD Game Tools and Valve Software +Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC + +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- third_party/parquet/LICENSE --- + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +-------------------------------------------------------------------------------- + +This product includes code from Apache Avro. + +Copyright: 2014 The Apache Software Foundation. +Home page: https://avro.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This project includes code from Daniel Lemire's JavaFastPFOR project. The +"Lemire" bit packing source code produced by parquet-generator is derived from +the JavaFastPFOR project. + +Copyright: 2013 Daniel Lemire +Home page: http://lemire.me/en/ +Project page: https://github.com/lemire/JavaFastPFOR +License: Apache License Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This product includes code from Apache Spark. + +* dev/merge_parquet_pr.py is based on Spark's dev/merge_spark_pr.py + +Copyright: 2014 The Apache Software Foundation. +Home page: https://spark.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This product includes code from Twitter's ElephantBird project. + +* parquet-hadoop's UnmaterializableRecordCounter.java includes code from + ElephantBird's LzoRecordReader.java + +Copyright: 2012-2014 Twitter +Home page: https://github.com/twitter/elephant-bird +License: http://www.apache.org/licenses/LICENSE-2.0 + +--- third_party/pcg/LICENSE --- + +Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- third_party/pdqsort/LICENSE --- + +Copyright (c) 2021 Orson Peters + +This software is provided 'as-is', without any express or implied warranty. In no event will the +authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial +applications, and to alter it and redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the + original software. If you use this software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be misrepresented as + being the original software. + +3. This notice may not be removed or altered from any source distribution. + +--- third_party/re2/LICENSE --- + +// Copyright (c) 2009 The RE2 Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- third_party/ska_sort/LICENSE --- + +Copyright Malte Skarupke 2016. + Distributed under the Boost Software License, Version 1.0. + (See http://www.boost.org/LICENSE_1_0.txt) + +--- third_party/skiplist/LICENSE --- + +MIT License + +Copyright (c) 2017-2023 Paul Ross + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- third_party/snappy/LICENSE --- + +Copyright 2011, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +=== + +Some of the benchmark data in testdata/ is licensed differently: + + - fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and + is licensed under the Creative Commons Attribution 3.0 license + (CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/ + for more information. + + - kppkn.gtb is taken from the Gaviota chess tablebase set, and + is licensed under the MIT License. See + https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1 + for more information. + + - paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper + “Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA + Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro, + which is licensed under the CC-BY license. See + http://www.ploscompbiol.org/static/license for more ifnormation. + + - alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project + Gutenberg. The first three have expired copyrights and are in the public + domain; the latter does not have expired copyright, but is still in the + public domain according to the license information + (http://www.gutenberg.org/ebooks/53). + +--- third_party/tdigest/LICENSE --- + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--- third_party/tdigest/NOTICES --- + +The Java version of the t-digest was originally authored by Ted Dunning + +A number of small but very helpful changes have been contributed by Adrien Grand (https://github.com/jpountz) to the Java version. + +The C++ version herein is a derivative of the Java version. It was written by Derrick R. Burns (https:://github.com/derrickburns). +The main modifications are 1) higher performance multi- t-digest merging and 2) faster quantile() and cdf() computation. + +--- third_party/thrift/thrift/LICENSE --- + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +-------------------------------------------------- +SOFTWARE DISTRIBUTED WITH THRIFT: + +The Apache Thrift software includes a number of subcomponents with +separate copyright notices and license terms. Your use of the source +code for the these subcomponents is subject to the terms and +conditions of the following licenses. + +-------------------------------------------------- +Portions of the following files are licensed under the MIT License: + + lib/erl/src/Makefile.am + +Please see doc/otp-base-license.txt for the full terms of this license. + +-------------------------------------------------- +For the aclocal/ax_boost_base.m4 and contrib/fb303/aclocal/ax_boost_base.m4 components: + +# Copyright (c) 2007 Thomas Porschberg +# +# Copying and distribution of this file, with or without +# modification, are permitted in any medium without royalty provided +# the copyright notice and this notice are preserved. + +-------------------------------------------------- +For the lib/nodejs/lib/thrift/json_parse.js: + +/* + json_parse.js + 2015-05-02 + Public Domain. + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + +*/ +(By Douglas Crockford ) +-------------------------------------------------- + +--- third_party/utf8proc/LICENSE --- + +## utf8proc license ## + +**utf8proc** is a software package originally developed +by Jan Behrens and the rest of the Public Software Group, who +deserve nearly all of the credit for this library, that is now maintained by the Julia-language developers. Like the original utf8proc, +whose copyright and license statements are reproduced below, all new +work on the utf8proc library is licensed under the [MIT "expat" +license](http://opensource.org/licenses/MIT): + +*Copyright © 2014-2019 by Steven G. Johnson, Jiahao Chen, Tony Kelman, Jonas Fonseca, and other contributors listed in the git history.* + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +## Original utf8proc license ## + +*Copyright (c) 2009, 2013 Public Software Group e. V., Berlin, Germany* + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +## Unicode data license ## + +This software contains data (`utf8proc_data.c`) derived from processing +the Unicode data files. The following license applies to that data: + +**COPYRIGHT AND PERMISSION NOTICE** + +*Copyright (c) 1991-2007 Unicode, Inc. All rights reserved. Distributed +under the Terms of Use in http://www.unicode.org/copyright.html.* + +Permission is hereby granted, free of charge, to any person obtaining a +copy of the Unicode data files and any associated documentation (the "Data +Files") or Unicode software and any associated documentation (the +"Software") to deal in the Data Files or Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, and/or sell copies of the Data Files or Software, and +to permit persons to whom the Data Files or Software are furnished to do +so, provided that (a) the above copyright notice(s) and this permission +notice appear with all copies of the Data Files or Software, (b) both the +above copyright notice(s) and this permission notice appear in associated +documentation, and (c) there is clear notice in each modified Data File or +in the Software as well as in the documentation associated with the Data +File(s) or Software that the data or software has been modified. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS +INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR +CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. + +Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be +registered in some jurisdictions. All other trademarks and registered +trademarks mentioned herein are the property of their respective owners. + +--- third_party/vergesort/LICENSE --- + +The MIT License (MIT) + +Copyright (c) 2015 Morwenn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- third_party/yyjson/LICENSE --- + +MIT License + +Copyright (c) 2020 YaoYuan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- third_party/zstd/LICENSE --- + +BSD License + +For Zstandard software + +Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +=== Unicode data used by the bundled time-zone and collation extension === +Source: https://www.unicode.org/license.txt + +UNICODE LICENSE V3 + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 1991-2026 Unicode, Inc. + +NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR +SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT +DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. diff --git a/ui/apps/bun.lock b/ui/apps/bun.lock index 2144a368..b29f405f 100644 --- a/ui/apps/bun.lock +++ b/ui/apps/bun.lock @@ -7,22 +7,21 @@ "dependencies": { "@fontsource-variable/geist": "5.3.0", "@fontsource-variable/geist-mono": "5.3.0", - "@mantine/core": "9.5.2", - "@mantine/hooks": "9.5.2", - "@modelcontextprotocol/ext-apps": "1.7.5", - "@modelcontextprotocol/sdk": "1.30.0", + "@mantine/core": "9.6.3", + "@mantine/hooks": "9.6.3", + "@modelcontextprotocol/ext-apps": "2.0.3", "@phosphor-icons/react": "2.1.10", "echarts": "6.1.0", - "react": "19.2.8", - "react-dom": "19.2.8", + "react": "19.3.0", + "react-dom": "19.3.0", }, "devDependencies": { - "@types/react": "19.2.18", - "@types/react-dom": "19.2.5", - "@vitejs/plugin-react": "6.1.0", + "@types/react": "19.3.0", + "@types/react-dom": "19.3.0", + "@vitejs/plugin-react": "6.1.1", "cross-env": "10.1.0", "typescript": "7.0.2", - "vite": "8.2.2", + "vite": "8.3.1", "vite-plugin-singlefile": "2.3.3", }, }, @@ -51,57 +50,57 @@ "@fontsource-variable/geist-mono": ["@fontsource-variable/geist-mono@5.3.0", "", {}, "sha512-vBbuwDEo9AkrqADMXOrlAR3DFcJi4/JxeuU43FoiQERnNwsfXNnvxvReZG02cQKmyk4DZkZdBZX3oTDvy2zBAw=="], - "@hono/node-server": ["@hono/node-server@1.19.15", "", { "peerDependencies": { "hono": "^4" } }, "sha512-Za2ai6TLdKjUvnur+eenO6nuYYipVAEhyCAdaV8IRvmU9kK8crOZUSYvIXn72E4f8fJqyAbpcJuTsYYmZp9Deg=="], + "@mantine/core": ["@mantine/core@9.6.3", "", { "dependencies": { "@floating-ui/react": "^0.27.20", "clsx": "^2.1.1", "react-number-format": "^5.4.5", "react-remove-scroll": "^2.7.2", "type-fest": "^5.8.0" }, "peerDependencies": { "@mantine/hooks": "9.6.3", "react": "^19.2.0", "react-dom": "^19.2.0" } }, "sha512-o9xzpkma6RiLbENNU4VoxKnCU4VaFlB6Yh6wAjAUiU329ypPV6tBY7VkVeQQ5Z+e12D3I+NTPrUw43onlYCqTg=="], - "@mantine/core": ["@mantine/core@9.5.2", "", { "dependencies": { "@floating-ui/react": "^0.27.19", "clsx": "^2.1.1", "react-number-format": "^5.4.5", "react-remove-scroll": "^2.7.2", "type-fest": "^5.8.0" }, "peerDependencies": { "@mantine/hooks": "9.5.2", "react": "^19.2.0", "react-dom": "^19.2.0" } }, "sha512-yhnR+XVGmy7S66abvj/tF9SxzNJ+k60w+UZlC/vGOztrU2Cxpbr95gtrBrin4fpWyiE80qzVC2AY0WzaHPufWw=="], + "@mantine/hooks": ["@mantine/hooks@9.6.3", "", { "peerDependencies": { "react": "^19.2.0" } }, "sha512-b3uJx1p5vlXOmLEgp4OqzC3FUxSIc5bmqPPxPLHsgR6S0aBiqn9psaihJP7u/v//mr3qeCmyMeIwSw9ROu4pXg=="], - "@mantine/hooks": ["@mantine/hooks@9.5.2", "", { "peerDependencies": { "react": "^19.2.0" } }, "sha512-CsANdaF07VRhcvDCupIvAPtIqU1NxYSc+bhFCCasDHpgJOUQxmqeMOGCCGSjtOOEIs+E+pt2ZbbdfnygDYPybA=="], + "@modelcontextprotocol/client": ["@modelcontextprotocol/client@2.2.0", "", { "dependencies": { "@modelcontextprotocol/core": "2.2.0", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "jose": "^6.1.3", "pkce-challenge": "^5.0.0", "zod": "^4.2.0" } }, "sha512-LxCou/CSYQ6dwEnjhLZY0KnEuc8V4UJ3IEQCl/uR2yHobSQIEdJKUlKLRYRF5i5FqRGHy1eK7une3aAWDHLtig=="], - "@modelcontextprotocol/ext-apps": ["@modelcontextprotocol/ext-apps@1.7.5", "", { "dependencies": { "@standard-schema/spec": "^1.1.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": "^1.29.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0", "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["react", "react-dom"] }, "sha512-TjPH2S2y5UEGKhmI6+XGFuqfqOV4ppe1x6DA3txnUaEWkgtA4G5vo14jGKFZmegdkZ1H4QMLyujLvoU1BEdnAg=="], + "@modelcontextprotocol/core": ["@modelcontextprotocol/core@2.2.0", "", { "dependencies": { "zod": "^4.2.0" } }, "sha512-iLhmprRmWI8EcosOA3wVvww22z02NkgqhV4fBH6f/odQBsi7xnJc0HGmi21yWO+/iKw2yzqVE127Zhna5/+JXw=="], - "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.30.0", "", { "dependencies": { "@hono/node-server": "^1.19.9 || ^2.0.5", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-xKd8OIzlqNzcqcNumGAa6g+PW2kjD5vrpcKOnfldAUPP3j7lnqMPwlTXQm8gF+UwH72z0lqaRbjr9hqGz0eITA=="], + "@modelcontextprotocol/ext-apps": ["@modelcontextprotocol/ext-apps@2.0.3", "", { "dependencies": { "@standard-schema/spec": "^1.1.0" }, "peerDependencies": { "@modelcontextprotocol/client": "^2.0.0", "@modelcontextprotocol/core": "^2.0.0", "@modelcontextprotocol/server": "^2.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0", "zod": "^4.2.0" }, "optionalPeers": ["@modelcontextprotocol/server", "react", "react-dom"] }, "sha512-Tn+4+cyhO4f4cQSDxNyLiIfEE+qlTTuIbWBJB8JTinEXOhDYgCT4wDTQplxD9MBYZH5pCYGC59GaxiwIT4bu8w=="], - "@oxc-project/types": ["@oxc-project/types@0.148.0", "", {}, "sha512-Nm4s/jB+4FpFsPhWGEC4h7rzksesmtnMXomo6rCMcg/b8zLQuOziRgkCS1fxDCXOlJB/6Q8oABOZ/OP6RIPj9A=="], + "@oxc-project/types": ["@oxc-project/types@0.152.0", "", {}, "sha512-oM/5rLBm2tPkg0iBgkH/FOeR3PCDpY19GTgAZjMFM8h9WI9VW7cLgzp6nwtarYKmovavIQZ+Fe/RKX/8C8O/Rw=="], "@phosphor-icons/react": ["@phosphor-icons/react@2.1.10", "", { "peerDependencies": { "react": ">= 16.8", "react-dom": ">= 16.8" } }, "sha512-vt8Tvq8GLjheAZZYa+YG/pW7HDbov8El/MANW8pOAz4eGxrwhnbfrQZq0Cp4q8zBEu8NIhHdnr+r8thnfRSNYA=="], - "@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.2.7", "", { "os": "android", "cpu": "arm" }, "sha512-EypzgnYCwyVY4NDHKzGmNJT5b+XaQEBniHxsMdeIQLB/tcCzZnhqrzHpZFbX9iaxx+5RiB8caATBtfvZP7zVxQ=="], + "@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.2.12", "", { "os": "android", "cpu": "arm" }, "sha512-dB/a1214qKfHMXCpgqR4OZT+jS4kTyEXbQGJPqzobt5EwH5rX080pxE37alt3RzvR1bf1Yz/yGqRfrYAxuPw0A=="], - "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.2.7", "", { "os": "android", "cpu": "arm64" }, "sha512-l17HE9EweWaqJZhuUuNBN/FzM62xw+DECVnJyvMsxn8vJFAGLy5QfLDoYAcronkAN8VxKZHezDpulHDPx95vFw=="], + "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.2.12", "", { "os": "android", "cpu": "arm64" }, "sha512-7KHFgQ5VJxIHcLlrwrc3Xbds7oTNQT7Pgi9gQCJKrd2VGab/UksIOYp6VD8MzCstGxOKMgNamPwUCfxPdP1OHg=="], - "@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.2.7", "", { "os": "darwin", "cpu": "arm64" }, "sha512-8ED8ELFvHXc6OCETIn4gXObPiaR6bckM/ipXtbzlPVDRMBfEGjCKgO90F9YtfdpDatVx/ZQw7aZ1vUMf/+T3Mw=="], + "@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.2.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-3YIhqHD96nA5SaYNRBR16HnGv4oavZvXfD/ayHM+oYZ0WD/8lBAtf6zQua4kEyAvpqrluKXl0lnOBoiNby7x9w=="], - "@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.2.7", "", { "os": "darwin", "cpu": "x64" }, "sha512-/WPripjtiAIZ2tWY7ddijORT0Ujg87wxWW/qcoFVCKAWVDPhtY0xr7Dj0M3GyNGz60jGwTElhro/mkF9dT7dDQ=="], + "@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.2.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-UuuJ35MFw4gmFOrE9pEqIV+K3syIKveph+Qc1/ljHZVdoDW4pz/JHR/eMVom+TZGl/5OOvGJOWaOCVt3ZfqhxA=="], - "@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.2.7", "", { "os": "freebsd", "cpu": "x64" }, "sha512-14DI4NcqpvbICxSnGLx3PmtDaWqRP/KGSGb6C+JLLVPeZRl6dKdHba3pGsqT3vpdTqhEYIPG0MMQ8c0xYqoJxA=="], + "@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.2.12", "", { "os": "freebsd", "cpu": "x64" }, "sha512-uMvssit0a4W+/7D8CbHUvG719mH3R2jwXAlh/XcPvuHTE0g++LymF88DCGNX0HM2rBOn0xrzgXktIB6fLSJBTQ=="], - "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.2.7", "", { "os": "linux", "cpu": "arm" }, "sha512-bxrWIRvHWQvbJwi+VIie/kDJmQxcNE6xxWwZdqF/ExVAigtHkv54WTLQPb+QsZdnFy18fg7JPfWGL0RH6vwIlQ=="], + "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.2.12", "", { "os": "linux", "cpu": "arm" }, "sha512-XcFu0R0xWnwzSf4IQgFH1rJIckPN1pLy2R+4r9IDB7Yfu/ys9cVqfa4pBrMHj7a3gl8mIR4nRNPg0e5IvEVs6g=="], - "@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.2.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-toOY2BChBZyuxU7OYX6Tn389di4IzAqPTycVcci0O7FSfBqzRB3RZn+K5Is6ANf4tmgRd/K1yZTsNTXbkXsnLg=="], + "@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.2.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-260UrKgn8tz39ak+SMDOirKzr7V04M9dWPw5llW00SwBivCZoWcRBKV1d8cXnRkUmSZA3BdiUmBHWk7734Ulpw=="], - "@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.2.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-lAIXTH/aiLRLxsTgQvfhjo4K1ydWIp00+V0voOr9beb/9ZmkUFrSIb03dXNFRgMNvkE6oGsF10ioQ6UsI+vS5Q=="], + "@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.2.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-5YK1I9SqDkbPgc1IA8BgDl34suqUS2q0KWnBrirm0E51YjOs6eo6dV6jbQfNE/argHRSvd0QUGgtpIoYx+WWpw=="], - "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.2.7", "", { "os": "linux", "cpu": "ppc64" }, "sha512-kdnwS28Pkenp/mZMRwjXXXwxQ7pIsm+bF919LUK93BOyhcLsrVKdP2p9fxpiPNPAbNuch8ypQt0pm2P2LYCAGg=="], + "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.2.12", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Rkcrmp7eFRg74yL5fXEU91JEWbdEPLevWwGtXpmhbjlD1StScbWTmO94Bhly+Mo+ketKYkdmM1vNUKeWSlx8cQ=="], - "@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.2.7", "", { "os": "linux", "cpu": "s390x" }, "sha512-516OdsyLdr5E65paF3yBF55t8mfm9+gmtCsK3xI7XKXIT7EfRlHhxL8K/NR6Hu8BWSgF5+1w74lTL0+nxcc8Qw=="], + "@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.2.12", "", { "os": "linux", "cpu": "s390x" }, "sha512-qvK4DuAsQc2BSjlx+Xr+IzOIvvxbGZqxFwdWfG6F518Erj0GGISyQbJ6pIappnOxlNPzNHvo/L0BwB30GZ+zVw=="], - "@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.2.7", "", { "os": "linux", "cpu": "x64" }, "sha512-r8/z8n7GFaYRln3xmP1Cxy0HH/HLM0uBUPkEuSVEfKGDA89M0FsZRZJRSwe/tJjRx+fpH/gjorfhB8tmEbSFLA=="], + "@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.2.12", "", { "os": "linux", "cpu": "x64" }, "sha512-Q9uLBO53Xd4QIq1WOycVQyPP1O4HhraEV2qqb3uTrnVw6QZih9duY4vNXOivL1xoUS1/z+W8eF4NMfl2a8Sdjw=="], - "@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.2.7", "", { "os": "linux", "cpu": "x64" }, "sha512-pAsE8iiDxUg1xBqdhrTfg45AVDVpirjz00sblEYClGNNcMnDb+e8beQgqIAw6LvauX/APvgxUnwrgun/YYGBhw=="], + "@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.2.12", "", { "os": "linux", "cpu": "x64" }, "sha512-3IBxWFMjbOZskDPKv8Lf9BCnahlKuHthWkYnyIxOH/QcJrFcS4EmcenthApkwr/5+nEqZlLzeYbxeMaX7A5u4g=="], - "@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.2.7", "", { "os": "none", "cpu": "arm64" }, "sha512-lTcIYmmnQQA8Or/2DatS6oSqcdLHvendjS+zLu+FwgToynWMRSmQdpM65fTANJgIS4mjbMOo5KT2lnT9SAb96w=="], + "@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.2.12", "", { "os": "none", "cpu": "arm64" }, "sha512-xtX61xg4LKPkPWilZU1ynKClz5Gj4bf74LML4r3eVLWumKnGjoEr1OSHQhMdbBDoYTi+yjrujvpZe2pUnqCrrA=="], - "@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.2.7", "", { "os": "win32", "cpu": "arm64" }, "sha512-e3Gu3WxbNk/UqQhxqU7YIYO+9ZBvWNz3U+h/qRFosscMFzdRPbXYSaSWgSnklv2fz1TgzBTcti2z35c/7irsHw=="], + "@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.2.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-At7fPB6PCaIjzgIhEZFxuT+BBFqiQibJDT4d3PhiR3f4E7bbMZF4aKblbFfEM3sETRDd1YiQx/+U/g/B/ou5Ew=="], - "@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.7", "", { "os": "win32", "cpu": "x64" }, "sha512-W/jg5qoRSqjsEv0+dZi4e687mcHqmVuU0P4fK6qS/xjetW2Gmc1W8j//z5nAeNcC8Ttm0hV46IjcYeuVwYhuiw=="], + "@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.12", "", { "os": "win32", "cpu": "x64" }, "sha512-WIw2haVKwjuYdXkHaoC0mF8Le71TuCBxjrdKqLbJGctbBABj+ClfmNvtbOnzpq3RokNo5+V1qhtSzJyXorsklQ=="], "@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.1", "", {}, "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw=="], "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="], - "@types/react": ["@types/react@19.2.18", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w=="], + "@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="], - "@types/react-dom": ["@types/react-dom@19.2.5", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-fMPwH9v7r/pp43yUd2/Mbiex5KouJwwR3dzHkhLREUC6764VyDsqxhAxv6OFEYR1RhjOyD1naqba8ECDBe7ZQg=="], + "@types/react-dom": ["@types/react-dom@19.3.0", "", { "peerDependencies": { "@types/react": "^19.3.0" } }, "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q=="], "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="], @@ -143,129 +142,41 @@ "@typescript/typescript-win32-x64": ["@typescript/typescript-win32-x64@7.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="], - "@vitejs/plugin-react": ["@vitejs/plugin-react@6.1.0", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1" }, "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", "babel-plugin-react-compiler": "^1.0.0", "oxc-transform-react": "^0.145.0", "vite": "^8.0.0" }, "optionalPeers": ["@rolldown/plugin-babel", "babel-plugin-react-compiler", "oxc-transform-react"] }, "sha512-qd2BzUBehkov86WFhg0JkEFEYyCLG9uPCe6qWTY/kRlss9OvJrOF2UbIWT7p+8IzZHkEu0DNGHc4HSv+JdDLsw=="], - - "accepts": ["accepts@2.0.0", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="], - - "ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="], - - "ajv-formats": ["ajv-formats@3.0.1", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="], - - "body-parser": ["body-parser@2.3.0", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^2.0.0", "debug": "^4.4.3", "http-errors": "^2.0.1", "iconv-lite": "^0.7.2", "on-finished": "^2.4.1", "qs": "^6.15.2", "raw-body": "^3.0.2", "type-is": "^2.1.0" } }, "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw=="], + "@vitejs/plugin-react": ["@vitejs/plugin-react@6.1.1", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1" }, "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", "babel-plugin-react-compiler": "^1.0.0", "oxc-transform-react": "^0.145.0", "vite": "^8.0.0" }, "optionalPeers": ["@rolldown/plugin-babel", "babel-plugin-react-compiler", "oxc-transform-react"] }, "sha512-yxLaQV9gkhS8ezJqCM6+ndU7mDY6gqAg75NQ+0IjwEI8IYOmQCgkRwHKVSfWXW076DsqMo0Dk+0FK1U+M5RgFw=="], "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], - "bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], - - "call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="], - - "call-bound": ["call-bound@1.0.4", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="], - "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], - "content-disposition": ["content-disposition@1.1.0", "", {}, "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g=="], - - "content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="], - - "cookie": ["cookie@0.7.2", "", {}, "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="], - - "cookie-signature": ["cookie-signature@1.2.2", "", {}, "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg=="], - - "cors": ["cors@2.8.6", "", { "dependencies": { "object-assign": "^4", "vary": "^1" } }, "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw=="], - "cross-env": ["cross-env@10.1.0", "", { "dependencies": { "@epic-web/invariant": "^1.0.0", "cross-spawn": "^7.0.6" }, "bin": { "cross-env": "dist/bin/cross-env.js", "cross-env-shell": "dist/bin/cross-env-shell.js" } }, "sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw=="], "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], - "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" }, "peerDependencies": { "supports-color": "*" }, "optionalPeers": ["supports-color"] }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], - - "depd": ["depd@2.0.0", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="], - "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], "detect-node-es": ["detect-node-es@1.1.0", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="], - "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], - "echarts": ["echarts@6.1.0", "", { "dependencies": { "tslib": "2.3.0", "zrender": "6.1.0" } }, "sha512-q0yaFPggC9FUdsWH4blavRWFmxdrIodbkoKNAjJudAI6CA9gNPxHtV2RcZNEepZVlk4yvBYkOkbk6HIVpIyHZA=="], - "ee-first": ["ee-first@1.1.1", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="], - - "encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="], - - "es-define-property": ["es-define-property@1.0.1", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="], - - "es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="], - - "es-object-atoms": ["es-object-atoms@1.1.2", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw=="], - - "escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="], - - "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], - "eventsource": ["eventsource@3.0.7", "", { "dependencies": { "eventsource-parser": "^3.0.1" } }, "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA=="], "eventsource-parser": ["eventsource-parser@3.1.1", "", {}, "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ=="], - "express": ["express@5.2.1", "", { "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", "depd": "^2.0.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "finalhandler": "^2.1.0", "fresh": "^2.0.0", "http-errors": "^2.0.0", "merge-descriptors": "^2.0.0", "mime-types": "^3.0.0", "on-finished": "^2.4.1", "once": "^1.4.0", "parseurl": "^1.3.3", "proxy-addr": "^2.0.7", "qs": "^6.14.0", "range-parser": "^1.2.1", "router": "^2.2.0", "send": "^1.1.0", "serve-static": "^2.2.0", "statuses": "^2.0.1", "type-is": "^2.0.1", "vary": "^1.1.2" } }, "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw=="], - - "express-rate-limit": ["express-rate-limit@8.7.0", "", { "dependencies": { "debug": "^4.4.3", "ip-address": "^10.2.0" }, "peerDependencies": { "express": ">= 4.11" } }, "sha512-hOwV7WOxXfjRpAM1DSJWZDXx3GhplwD8IfwuwvogD8i1Qnkgosw/H45s4ZnFAUHDAhPjlY9hLBvJhKmGMyY26g=="], - - "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], - - "fast-uri": ["fast-uri@3.1.8", "", {}, "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg=="], - "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], - "finalhandler": ["finalhandler@2.1.1", "", { "dependencies": { "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "on-finished": "^2.4.1", "parseurl": "^1.3.3", "statuses": "^2.0.1" } }, "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA=="], - - "forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="], - - "fresh": ["fresh@2.0.0", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="], - "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], - "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], - - "get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="], - "get-nonce": ["get-nonce@1.0.1", "", {}, "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q=="], - "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="], - - "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="], - - "has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="], - - "hasown": ["hasown@2.0.4", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A=="], - - "hono": ["hono@4.13.7", "", {}, "sha512-c8/gF9ac8Y78/agExVocyLevgR+JlpNB444Py0FSX8pJoPdYUfUzRcXtYEYGwt6l19qIlVZPN5Mfsw9jFShmQQ=="], - - "http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], - - "iconv-lite": ["iconv-lite@0.7.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ=="], - - "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], - - "ip-address": ["ip-address@10.7.1", "", {}, "sha512-4OUAqU9Z1i3vCnS05hzGiFnEMDpQ+62pAD/MVQOp83fYyNC8GleCqaS0QikQBmcWCrKFiUs/B8ztRRiYOAXuCA=="], - - "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], - "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], - "is-promise": ["is-promise@4.0.0", "", {}, "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="], - "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], - "jose": ["jose@6.2.10", "", {}, "sha512-iiW7J9qRFlGxvCOIBDBDxFePQSn7ZMAnrYGhrrOo6siO/MIqwfyilLR27pkfDgUk+raLuzADS8A3S/KLBisc0g=="], - - "json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], - - "json-schema-typed": ["json-schema-typed@8.0.2", "", {}, "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA=="], + "jose": ["jose@6.2.12", "", {}, "sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw=="], "lightningcss": ["lightningcss@1.33.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="], @@ -291,57 +202,23 @@ "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.33.0", "", { "os": "win32", "cpu": "x64" }, "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA=="], - "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], - - "media-typer": ["media-typer@1.1.1", "", {}, "sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ=="], - - "merge-descriptors": ["merge-descriptors@2.0.0", "", {}, "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="], - "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], - "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="], - - "mime-types": ["mime-types@3.0.2", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A=="], - - "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], - "nanoid": ["nanoid@3.3.18", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w=="], - "negotiator": ["negotiator@1.1.0", "", { "dependencies": { "content-type": "^2.1.0" } }, "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg=="], - - "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], - - "object-inspect": ["object-inspect@1.13.4", "", {}, "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="], - - "on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="], - - "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], - - "parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="], - "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], - "path-to-regexp": ["path-to-regexp@8.4.2", "", {}, "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA=="], - "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], "picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="], "pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="], - "postcss": ["postcss@8.5.27", "", { "dependencies": { "nanoid": "^3.3.18", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-79Iho8QeYyooJ8e9lCRyTVlyTAkS/kXBYKff6TMzS3kEWGQ8Ds5UEtXpGrSUDLUWok6QTvxeYy0GO8fopHnaSA=="], - - "proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="], - - "qs": ["qs@6.16.0", "", { "dependencies": { "es-define-property": "^1.0.1", "side-channel": "^1.1.1" } }, "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA=="], - - "range-parser": ["range-parser@1.3.0", "", {}, "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw=="], + "postcss": ["postcss@8.5.28", "", { "dependencies": { "nanoid": "^3.3.18", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A=="], - "raw-body": ["raw-body@3.0.2", "", { "dependencies": { "bytes": "~3.1.2", "http-errors": "~2.0.1", "iconv-lite": "~0.7.0", "unpipe": "~1.0.0" } }, "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA=="], + "react": ["react@19.3.0", "", {}, "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog=="], - "react": ["react@19.2.8", "", {}, "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw=="], - - "react-dom": ["react-dom@19.2.8", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.8" } }, "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ=="], + "react-dom": ["react-dom@19.3.0", "", { "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { "react": "^19.3.0" } }, "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q=="], "react-number-format": ["react-number-format@5.4.5", "", { "peerDependencies": { "react": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-y8O2yHHj3w0aE9XO8d2BCcUOOdQTRSVq+WIuMlLVucAm5XNjJAy+BoOJiuQMldVYVOKTMyvVNfnbl2Oqp+YxGw=="], @@ -351,37 +228,15 @@ "react-style-singleton": ["react-style-singleton@2.2.3", "", { "dependencies": { "get-nonce": "^1.0.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ=="], - "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], - - "rolldown": ["rolldown@1.2.7", "", { "dependencies": { "@oxc-project/types": "=0.148.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.7", "@rolldown/binding-android-arm64": "1.2.7", "@rolldown/binding-darwin-arm64": "1.2.7", "@rolldown/binding-darwin-x64": "1.2.7", "@rolldown/binding-freebsd-x64": "1.2.7", "@rolldown/binding-linux-arm-gnueabihf": "1.2.7", "@rolldown/binding-linux-arm64-gnu": "1.2.7", "@rolldown/binding-linux-arm64-musl": "1.2.7", "@rolldown/binding-linux-ppc64-gnu": "1.2.7", "@rolldown/binding-linux-s390x-gnu": "1.2.7", "@rolldown/binding-linux-x64-gnu": "1.2.7", "@rolldown/binding-linux-x64-musl": "1.2.7", "@rolldown/binding-openharmony-arm64": "1.2.7", "@rolldown/binding-win32-arm64-msvc": "1.2.7", "@rolldown/binding-win32-x64-msvc": "1.2.7" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-g0EtLvBjTUB7jhyV0S/TCup3v/XSVl45vUIGbOGU4QPiyjTenCe4mKuFvW9fEgYmS2Fo42AUssRmNuMziXdrig=="], - - "router": ["router@2.2.0", "", { "dependencies": { "debug": "^4.4.0", "depd": "^2.0.0", "is-promise": "^4.0.0", "parseurl": "^1.3.3", "path-to-regexp": "^8.0.0" } }, "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ=="], - - "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], - - "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + "rolldown": ["rolldown@1.2.12", "", { "dependencies": { "@oxc-project/types": "=0.152.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.12", "@rolldown/binding-android-arm64": "1.2.12", "@rolldown/binding-darwin-arm64": "1.2.12", "@rolldown/binding-darwin-x64": "1.2.12", "@rolldown/binding-freebsd-x64": "1.2.12", "@rolldown/binding-linux-arm-gnueabihf": "1.2.12", "@rolldown/binding-linux-arm64-gnu": "1.2.12", "@rolldown/binding-linux-arm64-musl": "1.2.12", "@rolldown/binding-linux-ppc64-gnu": "1.2.12", "@rolldown/binding-linux-s390x-gnu": "1.2.12", "@rolldown/binding-linux-x64-gnu": "1.2.12", "@rolldown/binding-linux-x64-musl": "1.2.12", "@rolldown/binding-openharmony-arm64": "1.2.12", "@rolldown/binding-win32-arm64-msvc": "1.2.12", "@rolldown/binding-win32-x64-msvc": "1.2.12" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-8wafseiaG80xmXSfqidUNqZcylTlhmPZZt+za2m+js2sFZ8dTNlhIOV2WcbIPx2hgwPBJpEUGFAMZ9bgBBLTSQ=="], - "send": ["send@1.2.1", "", { "dependencies": { "debug": "^4.4.3", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", "http-errors": "^2.0.1", "mime-types": "^3.0.2", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "statuses": "^2.0.2" } }, "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ=="], - - "serve-static": ["serve-static@2.2.1", "", { "dependencies": { "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "parseurl": "^1.3.3", "send": "^1.2.0" } }, "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw=="], - - "setprototypeof": ["setprototypeof@1.2.0", "", {}, "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="], + "scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], - "side-channel": ["side-channel@1.1.1", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.4", "side-channel-list": "^1.0.1", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" } }, "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ=="], - - "side-channel-list": ["side-channel-list@1.0.1", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.4" } }, "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w=="], - - "side-channel-map": ["side-channel-map@1.0.1", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3" } }, "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA=="], - - "side-channel-weakmap": ["side-channel-weakmap@1.0.2", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="], - - "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], - - "statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], + "source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="], "tabbable": ["tabbable@6.5.0", "", {}, "sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA=="], @@ -391,44 +246,36 @@ "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], - "toidentifier": ["toidentifier@1.0.1", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="], - "tslib": ["tslib@2.3.0", "", {}, "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="], - "type-fest": ["type-fest@5.9.0", "", { "dependencies": { "tagged-tag": "^1.0.0" } }, "sha512-yANm3Jr3GiJ1qgJlxGAVxTOIcEOk1rhQHamlXtnrCK7EHP4HeM9OGxtMg/W7HFdrVzw/ZWJKGVIJusVH85sLtw=="], - - "type-is": ["type-is@2.1.0", "", { "dependencies": { "content-type": "^2.0.0", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA=="], + "type-fest": ["type-fest@5.10.0", "", { "dependencies": { "tagged-tag": "^1.0.0" } }, "sha512-NoSdpq/WEiAg5sjmBkmV/hfxv6HJH4NqPNrqjtSO5CwRmpsDfaf4begxW34KdJykH/l1yHtwBWQkCRdoXO8mPA=="], "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="], - "unpipe": ["unpipe@1.0.0", "", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="], - "use-callback-ref": ["use-callback-ref@1.3.3", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="], "use-sidecar": ["use-sidecar@1.1.3", "", { "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ=="], - "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], - - "vite": ["vite@8.2.2", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.5", "postcss": "^8.5.26", "rolldown": "~1.2.4", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.4.0 || ^0.5.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q=="], + "vite": ["vite@8.3.1", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.28", "rolldown": "~1.2.9", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.7.1", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-/bvH9E9tmCXRGp2uXY3WbOldqpTwFkbha/8ANaEQ6VkxhH60KyqLwgZq6lG2y+4uT55x9+9eUHMpQ7uGnOCKjA=="], "vite-plugin-singlefile": ["vite-plugin-singlefile@2.3.3", "", { "dependencies": { "micromatch": "^4.0.8" }, "peerDependencies": { "rollup": "^4.59.0", "vite": "^5.4.21 || ^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["rollup"] }, "sha512-XVnGH0QzbOa8fxRSsHdCarVN1BSBXNi7uLMQYlrGRN5apdHkk62XQWRJhVever0lnfuyBkwn+kvVChdm/OoOUg=="], "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], - "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], + "zod": ["zod@4.6.5", "", {}, "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q=="], - "zod": ["zod@4.5.4", "", {}, "sha512-sC95tT5iHHH9gtpj6A81kh+NEaRAUFN+qlUPDUbRfOMvNf5QCBqsb3WgvnpVtK5Y+4UfA6KqufotuTvMGiTlsA=="], + "zrender": ["zrender@6.1.0", "", { "dependencies": { "tslib": "2.3.0" } }, "sha512-oEGMDB6pOP2S6OwRR4PdVv610zrjnA3Bh+JnSG12fYJlBKjtNAoEb5fSUoCOOINlH96I2fU38/A2UpRKs67xYQ=="], - "zod-to-json-schema": ["zod-to-json-schema@3.25.2", "", { "peerDependencies": { "zod": "^3.25.28 || ^4" } }, "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA=="], + "micromatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], - "zrender": ["zrender@6.1.0", "", { "dependencies": { "tslib": "2.3.0" } }, "sha512-oEGMDB6pOP2S6OwRR4PdVv610zrjnA3Bh+JnSG12fYJlBKjtNAoEb5fSUoCOOINlH96I2fU38/A2UpRKs67xYQ=="], + "react-remove-scroll/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "body-parser/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], + "react-remove-scroll-bar/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "micromatch/picomatch": ["picomatch@2.3.2", "", {}, "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA=="], + "react-style-singleton/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "negotiator/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], + "use-callback-ref/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "type-is/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], + "use-sidecar/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], } } diff --git a/ui/apps/package.json b/ui/apps/package.json index 9aa16b51..99847d73 100644 --- a/ui/apps/package.json +++ b/ui/apps/package.json @@ -15,22 +15,21 @@ "dependencies": { "@fontsource-variable/geist": "5.3.0", "@fontsource-variable/geist-mono": "5.3.0", - "@mantine/core": "9.5.2", - "@mantine/hooks": "9.5.2", - "@modelcontextprotocol/ext-apps": "1.7.5", - "@modelcontextprotocol/sdk": "1.30.0", + "@mantine/core": "9.6.3", + "@mantine/hooks": "9.6.3", + "@modelcontextprotocol/ext-apps": "2.0.3", "@phosphor-icons/react": "2.1.10", "echarts": "6.1.0", - "react": "19.2.8", - "react-dom": "19.2.8" + "react": "19.3.0", + "react-dom": "19.3.0" }, "devDependencies": { - "@types/react": "19.2.18", - "@types/react-dom": "19.2.5", - "@vitejs/plugin-react": "6.1.0", + "@types/react": "19.3.0", + "@types/react-dom": "19.3.0", + "@vitejs/plugin-react": "6.1.1", "cross-env": "10.1.0", "typescript": "7.0.2", - "vite": "8.2.2", + "vite": "8.3.1", "vite-plugin-singlefile": "2.3.3" }, "overrides": { diff --git a/ui/apps/src/use-fanout-app.ts b/ui/apps/src/use-fanout-app.ts index be890cc8..a3cb8a09 100644 --- a/ui/apps/src/use-fanout-app.ts +++ b/ui/apps/src/use-fanout-app.ts @@ -1,6 +1,5 @@ import type { App, McpUiHostContext } from "@modelcontextprotocol/ext-apps"; import { useApp } from "@modelcontextprotocol/ext-apps/react"; -import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; import { useEffect, useState } from "react"; export function useFanoutApp(name: string) { @@ -9,7 +8,7 @@ export function useFanoutApp(name: string) { const [host, setHost] = useState(); const [toolError, setToolError] = useState(null); - function acceptResult(incoming: CallToolResult) { + function acceptResult(incoming: Awaited>) { if (incoming.isError) { setToolError("This view could not be refreshed. Please try again."); return; diff --git a/ui/contracts.ts b/ui/contracts.ts index 2e348e9f..6adece8f 100644 --- a/ui/contracts.ts +++ b/ui/contracts.ts @@ -51,6 +51,17 @@ export interface Topology { edges: Edge[]; } +export interface Dependencies { + service: string; + direction: "upstream" | "downstream"; + nodes: { namespace: string; service: string; hops: number }[]; + max_depth: number; + max_nodes: number; + truncated: boolean; + depth_limit_reached: boolean; + node_limit_reached: boolean; +} + export interface PerformancePoint { time: string; spans: number; diff --git a/ui/host/bun.lock b/ui/host/bun.lock index 9194a423..8e5801fd 100644 --- a/ui/host/bun.lock +++ b/ui/host/bun.lock @@ -5,33 +5,33 @@ "": { "name": "@fanout/web", "dependencies": { - "@ag-ui/client": "0.0.59", + "@ag-ui/client": "1.0.1", "@fontsource-variable/geist": "5.3.0", "@fontsource-variable/geist-mono": "5.3.0", - "@mantine/core": "9.5.2", - "@mantine/hooks": "9.5.2", - "@modelcontextprotocol/ext-apps": "1.7.5", - "@modelcontextprotocol/sdk": "1.30.0", + "@mantine/core": "9.6.3", + "@mantine/hooks": "9.6.3", + "@modelcontextprotocol/client": "2.2.0", + "@modelcontextprotocol/ext-apps": "2.0.3", "@phosphor-icons/react": "2.1.10", - "@tanstack/react-query": "5.102.8", - "@tanstack/react-router": "1.170.32", + "@tanstack/react-query": "5.104.0", + "@tanstack/react-router": "1.170.41", "echarts": "6.1.0", - "react": "19.2.8", - "react-dom": "19.2.8", + "react": "19.3.0", + "react-dom": "19.3.0", "react-grid-layout": "2.2.4", - "react-markdown": "^10.1.0", - "remark-gfm": "^4.0.1", + "react-markdown": "10.1.0", + "remark-gfm": "4.0.1", "uuid": "14.0.2", }, "devDependencies": { - "@tanstack/router-plugin": "1.168.35", - "@types/react": "19.2.18", - "@types/react-dom": "19.2.5", - "@vitejs/plugin-react": "6.1.0", - "happy-dom": "20.11.12", + "@tanstack/router-plugin": "1.168.42", + "@types/react": "19.3.0", + "@types/react-dom": "19.3.0", + "@vitejs/plugin-react": "6.1.1", + "happy-dom": "20.14.5", "typescript": "7.0.2", - "vite": "8.2.2", - "vitest": "^4.1.11", + "vite": "8.3.1", + "vitest": "5.0.3", }, }, }, @@ -43,13 +43,13 @@ "nanoid": "3.3.18", }, "packages": { - "@ag-ui/client": ["@ag-ui/client@0.0.59", "", { "dependencies": { "@ag-ui/core": "0.0.59", "@ag-ui/encoder": "0.0.59", "@ag-ui/proto": "0.0.59", "@types/uuid": "^10.0.0", "compare-versions": "^6.1.1", "fast-json-patch": "^3.1.1", "rxjs": "7.8.1", "untruncate-json": "^0.0.1", "uuid": "^11.1.0", "zod": "^3.22.4" } }, "sha512-d7++r8sBAq6z9G/D/WKrMznQ1Mdvew14pCqOVATReFIvl06mCi1BPqTwmos3zCDGAIiSgcvxc/8m472rYQgFFQ=="], + "@ag-ui/client": ["@ag-ui/client@1.0.1", "", { "dependencies": { "@ag-ui/core": "1.0.1", "@ag-ui/encoder": "1.0.1", "@ag-ui/proto": "1.0.1", "@types/uuid": "^10.0.0", "compare-versions": "^6.1.1", "fast-json-patch": "^3.1.1", "rxjs": "7.8.1", "untruncate-json": "^0.0.1", "uuid": "^11.1.0", "zod": "^3.25.76" } }, "sha512-AxJ1+fnsRrhWBg+dXItoyXNqUhI/tOXk0/TxXrsuvdjtyTx216Hu+3q5DgQnTDbluP95fCW4buoCKQsKpHmmCw=="], - "@ag-ui/core": ["@ag-ui/core@0.0.59", "", { "dependencies": { "zod": "^3.22.4" } }, "sha512-hDgy4ipTqXieT8YG8Mr917Y+FD/f11VK1GefZ5CwTDCuNqS/oTwjJ5l/DZkicThgS8hQW/Y7wPylPBMBJ8BkUg=="], + "@ag-ui/core": ["@ag-ui/core@1.0.1", "", { "peerDependencies": { "zod": "^3.25.18 || ^4.0.0" }, "optionalPeers": ["zod"] }, "sha512-Q6pxgI7gcey/0pHfM37S7GNrsYqTrrjjFLpi1dckHNGX2l9VTL0CjnyNc44lwPfHIzFmmEvQfbrAeEPINGGg/Q=="], - "@ag-ui/encoder": ["@ag-ui/encoder@0.0.59", "", { "dependencies": { "@ag-ui/core": "0.0.59", "@ag-ui/proto": "0.0.59" } }, "sha512-wQCzBsStyZMm8nzhTdTx1G0B1C8yv5rbzZLnz1ka/l5LcJEsK3KTounU8CR9l+7QtcpOUUDJKd0xAbyI6gNcSw=="], + "@ag-ui/encoder": ["@ag-ui/encoder@1.0.1", "", { "dependencies": { "@ag-ui/core": "1.0.1", "@ag-ui/proto": "1.0.1" } }, "sha512-or0xYLdzGOuJg5avAtUxS1zNiMqO7MxUso+7z90Wl4jpl94QzfmfybXWopvPipVm/dh8IqkB/Zn+LHy4MI2e+g=="], - "@ag-ui/proto": ["@ag-ui/proto@0.0.59", "", { "dependencies": { "@ag-ui/core": "0.0.59", "@bufbuild/protobuf": "^2.2.5", "@protobuf-ts/protoc": "^2.11.1" } }, "sha512-X+uvDaegLEHw5kJu8tv2eSqHH8ouat+JCfFokGV1uuMquY8qCEQSlGsM7xzexwX9fujuxgHOWumg5kJDqa0+RA=="], + "@ag-ui/proto": ["@ag-ui/proto@1.0.1", "", { "dependencies": { "@ag-ui/core": "1.0.1", "@bufbuild/protobuf": "^2.2.5", "@protobuf-ts/protoc": "^2.11.1", "zod": "^3.25.76" } }, "sha512-w7R2gLeXv04Mss0B29thkF+nLitSx6aLeqhUpvmeJZNjBPbwZ6zkXdK3/KEqavCMtHvot7AGj6RaHG1DvbJwww=="], "@babel/code-frame": ["@babel/code-frame@7.29.7", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.29.7", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw=="], @@ -75,7 +75,7 @@ "@babel/helpers": ["@babel/helpers@7.29.7", "", { "dependencies": { "@babel/template": "^7.29.7", "@babel/types": "^7.29.7" } }, "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg=="], - "@babel/parser": ["@babel/parser@7.29.8", "", { "dependencies": { "@babel/types": "^7.29.8" }, "bin": "./bin/babel-parser.js" }, "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA=="], + "@babel/parser": ["@babel/parser@7.29.9", "", { "dependencies": { "@babel/types": "^7.29.8" }, "bin": "./bin/babel-parser.js" }, "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA=="], "@babel/template": ["@babel/template@7.29.7", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/parser": "^7.29.7", "@babel/types": "^7.29.7" } }, "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg=="], @@ -83,7 +83,7 @@ "@babel/types": ["@babel/types@7.29.8", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg=="], - "@bufbuild/protobuf": ["@bufbuild/protobuf@2.14.1", "", {}, "sha512-agRJn3+EJDUe8AvxTx/LnHA/GErvLE62pSaSk7+MwFOtOv8eWBu/qCq2qoZjBjVZ3C2aiFJCveuSs17KMkYGOw=="], + "@bufbuild/protobuf": ["@bufbuild/protobuf@2.16.0", "", {}, "sha512-FWa0sPlqYGJgpTs6OxBRcL/AW4JT0OIO+W1ajerluoTVh8CV0B7XM1qsNCRgnkSCkRCgOICKHRQlY17jrsm0+Q=="], "@floating-ui/core": ["@floating-ui/core@1.8.0", "", { "dependencies": { "@floating-ui/utils": "^0.2.12" } }, "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ=="], @@ -99,8 +99,6 @@ "@fontsource-variable/geist-mono": ["@fontsource-variable/geist-mono@5.3.0", "", {}, "sha512-vBbuwDEo9AkrqADMXOrlAR3DFcJi4/JxeuU43FoiQERnNwsfXNnvxvReZG02cQKmyk4DZkZdBZX3oTDvy2zBAw=="], - "@hono/node-server": ["@hono/node-server@1.19.15", "", { "peerDependencies": { "hono": "^4" } }, "sha512-Za2ai6TLdKjUvnur+eenO6nuYYipVAEhyCAdaV8IRvmU9kK8crOZUSYvIXn72E4f8fJqyAbpcJuTsYYmZp9Deg=="], - "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="], "@jridgewell/remapping": ["@jridgewell/remapping@2.3.5", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ=="], @@ -111,73 +109,75 @@ "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], - "@mantine/core": ["@mantine/core@9.5.2", "", { "dependencies": { "@floating-ui/react": "^0.27.19", "clsx": "^2.1.1", "react-number-format": "^5.4.5", "react-remove-scroll": "^2.7.2", "type-fest": "^5.8.0" }, "peerDependencies": { "@mantine/hooks": "9.5.2", "react": "^19.2.0", "react-dom": "^19.2.0" } }, "sha512-yhnR+XVGmy7S66abvj/tF9SxzNJ+k60w+UZlC/vGOztrU2Cxpbr95gtrBrin4fpWyiE80qzVC2AY0WzaHPufWw=="], + "@mantine/core": ["@mantine/core@9.6.3", "", { "dependencies": { "@floating-ui/react": "^0.27.20", "clsx": "^2.1.1", "react-number-format": "^5.4.5", "react-remove-scroll": "^2.7.2", "type-fest": "^5.8.0" }, "peerDependencies": { "@mantine/hooks": "9.6.3", "react": "^19.2.0", "react-dom": "^19.2.0" } }, "sha512-o9xzpkma6RiLbENNU4VoxKnCU4VaFlB6Yh6wAjAUiU329ypPV6tBY7VkVeQQ5Z+e12D3I+NTPrUw43onlYCqTg=="], + + "@mantine/hooks": ["@mantine/hooks@9.6.3", "", { "peerDependencies": { "react": "^19.2.0" } }, "sha512-b3uJx1p5vlXOmLEgp4OqzC3FUxSIc5bmqPPxPLHsgR6S0aBiqn9psaihJP7u/v//mr3qeCmyMeIwSw9ROu4pXg=="], - "@mantine/hooks": ["@mantine/hooks@9.5.2", "", { "peerDependencies": { "react": "^19.2.0" } }, "sha512-CsANdaF07VRhcvDCupIvAPtIqU1NxYSc+bhFCCasDHpgJOUQxmqeMOGCCGSjtOOEIs+E+pt2ZbbdfnygDYPybA=="], + "@modelcontextprotocol/client": ["@modelcontextprotocol/client@2.2.0", "", { "dependencies": { "@modelcontextprotocol/core": "2.2.0", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "jose": "^6.1.3", "pkce-challenge": "^5.0.0", "zod": "^4.2.0" } }, "sha512-LxCou/CSYQ6dwEnjhLZY0KnEuc8V4UJ3IEQCl/uR2yHobSQIEdJKUlKLRYRF5i5FqRGHy1eK7une3aAWDHLtig=="], - "@modelcontextprotocol/ext-apps": ["@modelcontextprotocol/ext-apps@1.7.5", "", { "dependencies": { "@standard-schema/spec": "^1.1.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": "^1.29.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0", "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["react", "react-dom"] }, "sha512-TjPH2S2y5UEGKhmI6+XGFuqfqOV4ppe1x6DA3txnUaEWkgtA4G5vo14jGKFZmegdkZ1H4QMLyujLvoU1BEdnAg=="], + "@modelcontextprotocol/core": ["@modelcontextprotocol/core@2.2.0", "", { "dependencies": { "zod": "^4.2.0" } }, "sha512-iLhmprRmWI8EcosOA3wVvww22z02NkgqhV4fBH6f/odQBsi7xnJc0HGmi21yWO+/iKw2yzqVE127Zhna5/+JXw=="], - "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.30.0", "", { "dependencies": { "@hono/node-server": "^1.19.9 || ^2.0.5", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-xKd8OIzlqNzcqcNumGAa6g+PW2kjD5vrpcKOnfldAUPP3j7lnqMPwlTXQm8gF+UwH72z0lqaRbjr9hqGz0eITA=="], + "@modelcontextprotocol/ext-apps": ["@modelcontextprotocol/ext-apps@2.0.3", "", { "dependencies": { "@standard-schema/spec": "^1.1.0" }, "peerDependencies": { "@modelcontextprotocol/client": "^2.0.0", "@modelcontextprotocol/core": "^2.0.0", "@modelcontextprotocol/server": "^2.0.0", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0", "zod": "^4.2.0" }, "optionalPeers": ["@modelcontextprotocol/server", "react", "react-dom"] }, "sha512-Tn+4+cyhO4f4cQSDxNyLiIfEE+qlTTuIbWBJB8JTinEXOhDYgCT4wDTQplxD9MBYZH5pCYGC59GaxiwIT4bu8w=="], - "@oxc-project/types": ["@oxc-project/types@0.148.0", "", {}, "sha512-Nm4s/jB+4FpFsPhWGEC4h7rzksesmtnMXomo6rCMcg/b8zLQuOziRgkCS1fxDCXOlJB/6Q8oABOZ/OP6RIPj9A=="], + "@oxc-project/types": ["@oxc-project/types@0.152.0", "", {}, "sha512-oM/5rLBm2tPkg0iBgkH/FOeR3PCDpY19GTgAZjMFM8h9WI9VW7cLgzp6nwtarYKmovavIQZ+Fe/RKX/8C8O/Rw=="], "@phosphor-icons/react": ["@phosphor-icons/react@2.1.10", "", { "peerDependencies": { "react": ">= 16.8", "react-dom": ">= 16.8" } }, "sha512-vt8Tvq8GLjheAZZYa+YG/pW7HDbov8El/MANW8pOAz4eGxrwhnbfrQZq0Cp4q8zBEu8NIhHdnr+r8thnfRSNYA=="], "@protobuf-ts/protoc": ["@protobuf-ts/protoc@2.11.1", "", { "bin": { "protoc": "protoc.js" } }, "sha512-mUZJaV0daGO6HUX90o/atzQ6A7bbN2RSuHtdwo8SSF2Qoe3zHwa4IHyCN1evftTeHfLmdz+45qo47sL+5P8nyg=="], - "@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.2.7", "", { "os": "android", "cpu": "arm" }, "sha512-EypzgnYCwyVY4NDHKzGmNJT5b+XaQEBniHxsMdeIQLB/tcCzZnhqrzHpZFbX9iaxx+5RiB8caATBtfvZP7zVxQ=="], + "@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.2.12", "", { "os": "android", "cpu": "arm" }, "sha512-dB/a1214qKfHMXCpgqR4OZT+jS4kTyEXbQGJPqzobt5EwH5rX080pxE37alt3RzvR1bf1Yz/yGqRfrYAxuPw0A=="], - "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.2.7", "", { "os": "android", "cpu": "arm64" }, "sha512-l17HE9EweWaqJZhuUuNBN/FzM62xw+DECVnJyvMsxn8vJFAGLy5QfLDoYAcronkAN8VxKZHezDpulHDPx95vFw=="], + "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.2.12", "", { "os": "android", "cpu": "arm64" }, "sha512-7KHFgQ5VJxIHcLlrwrc3Xbds7oTNQT7Pgi9gQCJKrd2VGab/UksIOYp6VD8MzCstGxOKMgNamPwUCfxPdP1OHg=="], - "@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.2.7", "", { "os": "darwin", "cpu": "arm64" }, "sha512-8ED8ELFvHXc6OCETIn4gXObPiaR6bckM/ipXtbzlPVDRMBfEGjCKgO90F9YtfdpDatVx/ZQw7aZ1vUMf/+T3Mw=="], + "@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.2.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-3YIhqHD96nA5SaYNRBR16HnGv4oavZvXfD/ayHM+oYZ0WD/8lBAtf6zQua4kEyAvpqrluKXl0lnOBoiNby7x9w=="], - "@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.2.7", "", { "os": "darwin", "cpu": "x64" }, "sha512-/WPripjtiAIZ2tWY7ddijORT0Ujg87wxWW/qcoFVCKAWVDPhtY0xr7Dj0M3GyNGz60jGwTElhro/mkF9dT7dDQ=="], + "@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.2.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-UuuJ35MFw4gmFOrE9pEqIV+K3syIKveph+Qc1/ljHZVdoDW4pz/JHR/eMVom+TZGl/5OOvGJOWaOCVt3ZfqhxA=="], - "@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.2.7", "", { "os": "freebsd", "cpu": "x64" }, "sha512-14DI4NcqpvbICxSnGLx3PmtDaWqRP/KGSGb6C+JLLVPeZRl6dKdHba3pGsqT3vpdTqhEYIPG0MMQ8c0xYqoJxA=="], + "@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.2.12", "", { "os": "freebsd", "cpu": "x64" }, "sha512-uMvssit0a4W+/7D8CbHUvG719mH3R2jwXAlh/XcPvuHTE0g++LymF88DCGNX0HM2rBOn0xrzgXktIB6fLSJBTQ=="], - "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.2.7", "", { "os": "linux", "cpu": "arm" }, "sha512-bxrWIRvHWQvbJwi+VIie/kDJmQxcNE6xxWwZdqF/ExVAigtHkv54WTLQPb+QsZdnFy18fg7JPfWGL0RH6vwIlQ=="], + "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.2.12", "", { "os": "linux", "cpu": "arm" }, "sha512-XcFu0R0xWnwzSf4IQgFH1rJIckPN1pLy2R+4r9IDB7Yfu/ys9cVqfa4pBrMHj7a3gl8mIR4nRNPg0e5IvEVs6g=="], - "@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.2.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-toOY2BChBZyuxU7OYX6Tn389di4IzAqPTycVcci0O7FSfBqzRB3RZn+K5Is6ANf4tmgRd/K1yZTsNTXbkXsnLg=="], + "@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.2.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-260UrKgn8tz39ak+SMDOirKzr7V04M9dWPw5llW00SwBivCZoWcRBKV1d8cXnRkUmSZA3BdiUmBHWk7734Ulpw=="], - "@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.2.7", "", { "os": "linux", "cpu": "arm64" }, "sha512-lAIXTH/aiLRLxsTgQvfhjo4K1ydWIp00+V0voOr9beb/9ZmkUFrSIb03dXNFRgMNvkE6oGsF10ioQ6UsI+vS5Q=="], + "@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.2.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-5YK1I9SqDkbPgc1IA8BgDl34suqUS2q0KWnBrirm0E51YjOs6eo6dV6jbQfNE/argHRSvd0QUGgtpIoYx+WWpw=="], - "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.2.7", "", { "os": "linux", "cpu": "ppc64" }, "sha512-kdnwS28Pkenp/mZMRwjXXXwxQ7pIsm+bF919LUK93BOyhcLsrVKdP2p9fxpiPNPAbNuch8ypQt0pm2P2LYCAGg=="], + "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.2.12", "", { "os": "linux", "cpu": "ppc64" }, "sha512-Rkcrmp7eFRg74yL5fXEU91JEWbdEPLevWwGtXpmhbjlD1StScbWTmO94Bhly+Mo+ketKYkdmM1vNUKeWSlx8cQ=="], - "@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.2.7", "", { "os": "linux", "cpu": "s390x" }, "sha512-516OdsyLdr5E65paF3yBF55t8mfm9+gmtCsK3xI7XKXIT7EfRlHhxL8K/NR6Hu8BWSgF5+1w74lTL0+nxcc8Qw=="], + "@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.2.12", "", { "os": "linux", "cpu": "s390x" }, "sha512-qvK4DuAsQc2BSjlx+Xr+IzOIvvxbGZqxFwdWfG6F518Erj0GGISyQbJ6pIappnOxlNPzNHvo/L0BwB30GZ+zVw=="], - "@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.2.7", "", { "os": "linux", "cpu": "x64" }, "sha512-r8/z8n7GFaYRln3xmP1Cxy0HH/HLM0uBUPkEuSVEfKGDA89M0FsZRZJRSwe/tJjRx+fpH/gjorfhB8tmEbSFLA=="], + "@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.2.12", "", { "os": "linux", "cpu": "x64" }, "sha512-Q9uLBO53Xd4QIq1WOycVQyPP1O4HhraEV2qqb3uTrnVw6QZih9duY4vNXOivL1xoUS1/z+W8eF4NMfl2a8Sdjw=="], - "@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.2.7", "", { "os": "linux", "cpu": "x64" }, "sha512-pAsE8iiDxUg1xBqdhrTfg45AVDVpirjz00sblEYClGNNcMnDb+e8beQgqIAw6LvauX/APvgxUnwrgun/YYGBhw=="], + "@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.2.12", "", { "os": "linux", "cpu": "x64" }, "sha512-3IBxWFMjbOZskDPKv8Lf9BCnahlKuHthWkYnyIxOH/QcJrFcS4EmcenthApkwr/5+nEqZlLzeYbxeMaX7A5u4g=="], - "@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.2.7", "", { "os": "none", "cpu": "arm64" }, "sha512-lTcIYmmnQQA8Or/2DatS6oSqcdLHvendjS+zLu+FwgToynWMRSmQdpM65fTANJgIS4mjbMOo5KT2lnT9SAb96w=="], + "@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.2.12", "", { "os": "none", "cpu": "arm64" }, "sha512-xtX61xg4LKPkPWilZU1ynKClz5Gj4bf74LML4r3eVLWumKnGjoEr1OSHQhMdbBDoYTi+yjrujvpZe2pUnqCrrA=="], - "@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.2.7", "", { "os": "win32", "cpu": "arm64" }, "sha512-e3Gu3WxbNk/UqQhxqU7YIYO+9ZBvWNz3U+h/qRFosscMFzdRPbXYSaSWgSnklv2fz1TgzBTcti2z35c/7irsHw=="], + "@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.2.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-At7fPB6PCaIjzgIhEZFxuT+BBFqiQibJDT4d3PhiR3f4E7bbMZF4aKblbFfEM3sETRDd1YiQx/+U/g/B/ou5Ew=="], - "@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.7", "", { "os": "win32", "cpu": "x64" }, "sha512-W/jg5qoRSqjsEv0+dZi4e687mcHqmVuU0P4fK6qS/xjetW2Gmc1W8j//z5nAeNcC8Ttm0hV46IjcYeuVwYhuiw=="], + "@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.12", "", { "os": "win32", "cpu": "x64" }, "sha512-WIw2haVKwjuYdXkHaoC0mF8Le71TuCBxjrdKqLbJGctbBABj+ClfmNvtbOnzpq3RokNo5+V1qhtSzJyXorsklQ=="], "@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.1", "", {}, "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw=="], "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="], - "@tanstack/history": ["@tanstack/history@1.162.1", "", {}, "sha512-DR9t6lfLVdrjgCwpglrR9DR7Ok8/HlXjcOE+goWXF3zyuLUO/ug7vMbSFxTqrQTtbRghJfyhmIZ0S6LhPIy44w=="], + "@tanstack/history": ["@tanstack/history@1.162.4", "", {}, "sha512-utTS5L2OkeYUzXGohL1Z8sefu1GLNOJcxe8Hd6iIdc/Xo1K1nDB2JEp4iSFhvYh33xKC9V91TxrS8qfrpoKobQ=="], - "@tanstack/query-core": ["@tanstack/query-core@5.102.8", "", {}, "sha512-ZNjkJ33CqvPNec/6lZBnHqLc3EVGPZ9ySLhYahU9TcuRFdmwXewuj0c4hwSWcGHqEUwcSrKeZ+oGcvPBqXcQcg=="], + "@tanstack/query-core": ["@tanstack/query-core@5.104.0", "", {}, "sha512-JrC2r/JQlXt7khBSdUpsgxNvybzOg+aITa+ARRMlP2AFo93Y8vIqz077rp+e61mJetSZ0T6AJbwW1JHer1vrPQ=="], - "@tanstack/react-query": ["@tanstack/react-query@5.102.8", "", { "dependencies": { "@tanstack/query-core": "5.102.8" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-TYBea4OuXWD7MhaSHq069TWbFe7rcwWN6kzT7JF0OKi1K6c1gTv2IzD6A6ExJsCMozdkqBWeuIUZmu4KQg0O5A=="], + "@tanstack/react-query": ["@tanstack/react-query@5.104.0", "", { "dependencies": { "@tanstack/query-core": "5.104.0" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-e1TZmDCQnWIfiDVryIHeA6Idj+Lfx1hORLOhXS/l5wcgvtVD4yYqbTDl378sGQKIi2cSgb0TEMC9cKK8GGoJEw=="], - "@tanstack/react-router": ["@tanstack/react-router@1.170.32", "", { "dependencies": { "@tanstack/history": "1.162.1", "@tanstack/react-store": "^0.9.3", "@tanstack/router-core": "1.171.27", "isbot": "^5.1.22" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-SIpxvaTKco100a5ZR3ePmArbhtm3XOx+w1dpGYY9gxHDta4iXSKDdQuhLonwJbIMkVJsU1rwXf0UDHMrF/1snw=="], + "@tanstack/react-router": ["@tanstack/react-router@1.170.41", "", { "dependencies": { "@tanstack/history": "1.162.4", "@tanstack/react-store": "^0.11.2", "@tanstack/router-core": "1.171.34", "isbot": "^5.1.22" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-Mpvw8Wm5MGDbTqI8Yc9flLKxbOHwoWocv0H2aGKcgw2a017oK5nZWqa954P+DrUx/8fI98YNywnHP5XcD3tQ9w=="], - "@tanstack/react-store": ["@tanstack/react-store@0.9.3", "", { "dependencies": { "@tanstack/store": "0.9.3", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-y2iHd/N9OkoQbFJLUX1T9vbc2O9tjH0pQRgTcx1/Nz4IlwLvkgpuglXUx+mXt0g5ZDFrEeDnONPqkbfxXJKwRg=="], + "@tanstack/react-store": ["@tanstack/react-store@0.11.2", "", { "dependencies": { "@tanstack/store": "0.11.2", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-oj5O5DmiMWE+ih+SioX2ayC1kbK7d3fpLx0B75fPJr9nY3zU+hoW010yr64qXsY/9fyiLVE2bn5mGNV3owm8RQ=="], - "@tanstack/router-core": ["@tanstack/router-core@1.171.27", "", { "dependencies": { "@tanstack/history": "1.162.1", "cookie-es": "^3.0.0", "seroval": "^1.6.2", "seroval-plugins": "^1.6.2" } }, "sha512-wDwSLvoLwIaNcnx9UNcN9Mb7Y8QwCYq1U1RQZwyN186gnkIoIYI2SOxy8VqH1vFigbkHkk4FmwMAQlghPgDK2g=="], + "@tanstack/router-core": ["@tanstack/router-core@1.171.34", "", { "dependencies": { "@tanstack/history": "1.162.4", "cookie-es": "^3.0.0", "seroval": "^1.6.7", "seroval-plugins": "^1.6.7" } }, "sha512-X+19pGuuLVPvvAvPYw9v/+ktRk5cCll8AtfpBpOhDRmVgUMrfqze0467xtq8YRVVs/mmo5rVtWn/7Tp32RDBKw=="], - "@tanstack/router-generator": ["@tanstack/router-generator@1.167.33", "", { "dependencies": { "@babel/types": "^7.28.5", "@tanstack/router-core": "1.171.27", "@tanstack/router-utils": "1.162.2", "@tanstack/virtual-file-routes": "1.162.0", "jiti": "^2.7.0", "magic-string": "^0.30.21", "prettier": "^3.5.0", "zod": "^4.4.3" } }, "sha512-Z3lCWIPuRUMPmuI8Mm48x/s49TxmHOaFVZ52j1W1QKYrsFHyT6U/h9bqfHJDxfQ8kz7y9q+W1YPKZ15Ee7yuCA=="], + "@tanstack/router-generator": ["@tanstack/router-generator@1.167.40", "", { "dependencies": { "@babel/types": "^7.29.8", "@tanstack/router-core": "1.171.34", "@tanstack/router-utils": "1.162.3", "@tanstack/virtual-file-routes": "1.162.0", "jiti": "^2.7.0", "magic-string": "^0.30.21", "prettier": "^3.9.6", "zod": "^4.5.4" } }, "sha512-WkEueqEvsBBudzO0fx1nWfOmRNW8OAvBoVABTGls9bAWzjdC+KDGHvjCNrvn88ofs1F6gqL8aWnzKCbxW3dCyQ=="], - "@tanstack/router-plugin": ["@tanstack/router-plugin@1.168.35", "", { "dependencies": { "@babel/core": "^7.28.5", "@babel/template": "^7.27.2", "@babel/types": "^7.28.5", "@tanstack/router-core": "1.171.27", "@tanstack/router-generator": "1.167.33", "@tanstack/router-utils": "1.162.2", "chokidar": "^5.0.0", "unplugin": "^3.0.0", "zod": "^4.4.3" }, "peerDependencies": { "@rsbuild/core": ">=1.0.2 || ^2.0.0", "@tanstack/react-router": "^1.170.32", "vite": ">=5.0.0 || >=6.0.0 || >=7.0.0 || >=8.0.0", "vite-plugin-solid": "^2.11.10 || ^3.0.0-0", "webpack": ">=5.92.0" }, "optionalPeers": ["@rsbuild/core", "@tanstack/react-router", "vite", "vite-plugin-solid", "webpack"] }, "sha512-foDAZKFqHXae+oFbIgcsSvy2QCVRn7XdS3nhwcRvD+ed6JrKPUP/1lQMsZLJqWycgR1vkZF7gs955KGa0NZQ0w=="], + "@tanstack/router-plugin": ["@tanstack/router-plugin@1.168.42", "", { "dependencies": { "@babel/core": "^7.29.7", "@babel/template": "^7.29.7", "@babel/types": "^7.29.8", "@tanstack/router-core": "1.171.34", "@tanstack/router-generator": "1.167.40", "@tanstack/router-utils": "1.162.3", "chokidar": "^5.0.0", "unplugin": "^3.3.0", "zod": "^4.5.4" }, "peerDependencies": { "@rsbuild/core": ">=1.0.2 || ^2.0.0", "@tanstack/react-router": "^1.170.41", "vite": ">=5.0.0 || >=6.0.0 || >=7.0.0 || >=8.0.0", "vite-plugin-solid": "^2.11.10 || ^3.0.0-0", "webpack": ">=5.92.0" }, "optionalPeers": ["@rsbuild/core", "@tanstack/react-router", "vite", "vite-plugin-solid", "webpack"] }, "sha512-vAR5WXJh/ErseEWQftDhsJcr2c++ucRQ6FbqN3ygMO44+ZxxRfW3sIpZmddHROVSmBk8jc6MrwjTPNjVhd62Vw=="], - "@tanstack/router-utils": ["@tanstack/router-utils@1.162.2", "", { "dependencies": { "@babel/generator": "^7.28.5", "@babel/parser": "^7.28.5", "@babel/types": "^7.28.5", "ansis": "^4.1.0", "babel-dead-code-elimination": "^1.0.12", "diff": "^8.0.2", "pathe": "^2.0.3", "tinyglobby": "^0.2.15" } }, "sha512-hTWqJtqIFFdvuCl8WXNyrodp2L9zo2G37xKRrcVmVRWpAB2h+U1LuRAfS4tsFTiWOIoE/B+WDVFB8JpoEdw6jQ=="], + "@tanstack/router-utils": ["@tanstack/router-utils@1.162.3", "", { "dependencies": { "@babel/generator": "^7.29.8", "@babel/parser": "^7.29.8", "@babel/types": "^7.29.8", "ansis": "^4.3.1", "babel-dead-code-elimination": "^1.0.12", "diff": "^8.0.4", "pathe": "^2.0.3", "tinyglobby": "^0.2.17" } }, "sha512-Icb0xGuG1+54IV0WMLRcc3ErTx2HeJWyPG661FkQ8UT6guoBq1FJjFRqlG/JS0xi4mFFkBhvwO7tbLa32f3yxA=="], - "@tanstack/store": ["@tanstack/store@0.9.3", "", {}, "sha512-8reSzl/qGWGGVKhBoxXPMWzATSbZLZFWhwBAFO9NAyp0TxzfBP0mIrGb8CP8KrQTmvzXlR/vFPPUrHTLBGyFyw=="], + "@tanstack/store": ["@tanstack/store@0.11.2", "", {}, "sha512-sJ4mjol8uQsHV0gOJzzjwXfh2Fwm+Sz0+8deqiTm4jGbMdjzNSW+xZCFm0kUa870uhd8yi+DpKnZb5Kc4apa0Q=="], "@tanstack/virtual-file-routes": ["@tanstack/virtual-file-routes@1.162.0", "", {}, "sha512-uhOeFyxLcU41HzvrxsGpiWdcMbScY1EDgbZ5K7DVRMYInbLYWAC0EA/kx9wXAoSM8q82bUG2hRl8+EAjE6XAbA=="], @@ -197,11 +197,11 @@ "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], - "@types/node": ["@types/node@26.4.1", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA=="], + "@types/node": ["@types/node@26.6.3", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-dsqMQQoeTLqu9wynDD00q573mNzso3IdQOAfHRJqLCcmCFPoGo9A1bDpUcv/9tnKpErQWv9uKeGfl37EIS02Yg=="], - "@types/react": ["@types/react@19.2.18", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w=="], + "@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="], - "@types/react-dom": ["@types/react-dom@19.2.5", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-fMPwH9v7r/pp43yUd2/Mbiex5KouJwwR3dzHkhLREUC6764VyDsqxhAxv6OFEYR1RhjOyD1naqba8ECDBe7ZQg=="], + "@types/react-dom": ["@types/react-dom@19.3.0", "", { "peerDependencies": { "@types/react": "^19.3.0" } }, "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q=="], "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], @@ -209,7 +209,7 @@ "@types/whatwg-mimetype": ["@types/whatwg-mimetype@3.0.2", "", {}, "sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA=="], - "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], + "@types/ws": ["@types/ws@8.18.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-67MQl+fpWKVTT1NYdnmo3U4sc/xPo/zQBncVnI74qmQa0z/b+1g6iYqNmGCPbxO+zz2aklb08a0oHfegiVd0/w=="], "@typescript/typescript-aix-ppc64": ["@typescript/typescript-aix-ppc64@7.0.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="], @@ -253,29 +253,13 @@ "@ungap/structured-clone": ["@ungap/structured-clone@1.4.0", "", {}, "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ=="], - "@vitejs/plugin-react": ["@vitejs/plugin-react@6.1.0", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1" }, "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", "babel-plugin-react-compiler": "^1.0.0", "oxc-transform-react": "^0.145.0", "vite": "^8.0.0" }, "optionalPeers": ["@rolldown/plugin-babel", "babel-plugin-react-compiler", "oxc-transform-react"] }, "sha512-qd2BzUBehkov86WFhg0JkEFEYyCLG9uPCe6qWTY/kRlss9OvJrOF2UbIWT7p+8IzZHkEu0DNGHc4HSv+JdDLsw=="], - - "@vitest/expect": ["@vitest/expect@4.1.11", "", { "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", "@vitest/spy": "4.1.11", "@vitest/utils": "4.1.11", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" } }, "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw=="], - - "@vitest/mocker": ["@vitest/mocker@4.1.11", "", { "dependencies": { "@vitest/spy": "4.1.11", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["msw", "vite"] }, "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ=="], - - "@vitest/pretty-format": ["@vitest/pretty-format@4.1.11", "", { "dependencies": { "tinyrainbow": "^3.1.0" } }, "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw=="], - - "@vitest/runner": ["@vitest/runner@4.1.11", "", { "dependencies": { "@vitest/utils": "4.1.11", "pathe": "^2.0.3" } }, "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw=="], + "@vitejs/plugin-react": ["@vitejs/plugin-react@6.1.1", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1" }, "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", "babel-plugin-react-compiler": "^1.0.0", "oxc-transform-react": "^0.145.0", "vite": "^8.0.0" }, "optionalPeers": ["@rolldown/plugin-babel", "babel-plugin-react-compiler", "oxc-transform-react"] }, "sha512-yxLaQV9gkhS8ezJqCM6+ndU7mDY6gqAg75NQ+0IjwEI8IYOmQCgkRwHKVSfWXW076DsqMo0Dk+0FK1U+M5RgFw=="], - "@vitest/snapshot": ["@vitest/snapshot@4.1.11", "", { "dependencies": { "@vitest/pretty-format": "4.1.11", "@vitest/utils": "4.1.11", "magic-string": "^0.30.21", "pathe": "^2.0.3" } }, "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog=="], + "@vitest/mocker": ["@vitest/mocker@5.0.3", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.31", "@vitest/spy": "5.0.3", "estree-walker": "^3.0.3", "magic-string": "^1.2.3" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["msw", "vite"] }, "sha512-T8sWAIbkSyAjkwTcaEc3Iu0o9A27X1/kdXrizhZkGuSKScRQtRzclfAMpOTcGdXCsqxeWlpGy3XjqaW8CpLORg=="], - "@vitest/spy": ["@vitest/spy@4.1.11", "", {}, "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA=="], + "@vitest/spy": ["@vitest/spy@5.0.3", "", {}, "sha512-XhFysQTB8AZ+P4gMi+Lpo99vg2AZi0qKpaB9yXQl37+CaMEAPO3iH/wGVnSyL5MPERiLezpqTVtrR6UZH5GCXg=="], - "@vitest/utils": ["@vitest/utils@4.1.11", "", { "dependencies": { "@vitest/pretty-format": "4.1.11", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" } }, "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ=="], - - "accepts": ["accepts@2.0.0", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="], - - "ajv": ["ajv@8.20.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA=="], - - "ajv-formats": ["ajv-formats@3.0.1", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="], - - "ansis": ["ansis@4.3.1", "", {}, "sha512-BJ8/l4R5LRE7hW9WdSuGYrLSHi2ynxeFpDFbH0K/CgNeY/tyhk+vO6TYxXC5r5CpUhNVX310xzPsN/H9lCdfOA=="], + "ansis": ["ansis@4.4.0", "", {}, "sha512-9k3v7xcHwgdO/DruxGIg4HtjvlAZlcnsX/mzqUb1t3NkYnl9kK2UJ+Gq0io+vQf7iT//BD/HB/NBkUR1LWxoeA=="], "assertion-error": ["assertion-error@2.0.1", "", {}, "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA=="], @@ -283,25 +267,17 @@ "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], - "baseline-browser-mapping": ["baseline-browser-mapping@2.11.20", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-H0ulySigv6icDJ1F7SjtdCD6PrhTpdYCmP0CactWy1+ekh0AFd0o1Wn5T8b+hnTmdBx19u9yhL6wvCylXMY7zw=="], - - "body-parser": ["body-parser@2.3.0", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^2.0.0", "debug": "^4.4.3", "http-errors": "^2.0.1", "iconv-lite": "^0.7.2", "on-finished": "^2.4.1", "qs": "^6.15.2", "raw-body": "^3.0.2", "type-is": "^2.1.0" } }, "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw=="], + "baseline-browser-mapping": ["baseline-browser-mapping@2.11.26", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-GLQdD3y6UF8iVuMJl5fHgE4jdn/ua7n+toKfLgNlg3BqQtOZjpy68T8Tup8/wGWZCDlm7KMg7tPb4MPn7oN0TQ=="], - "browserslist": ["browserslist@4.28.8", "", { "dependencies": { "baseline-browser-mapping": "^2.11.12", "caniuse-lite": "^1.0.30001809", "electron-to-chromium": "^1.5.402", "node-releases": "^2.0.53", "update-browserslist-db": "^1.3.0" }, "bin": { "browserslist": "cli.js" } }, "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA=="], + "browserslist": ["browserslist@4.29.3", "", { "dependencies": { "baseline-browser-mapping": "^2.11.26", "caniuse-lite": "^1.0.30001813", "electron-to-chromium": "^1.5.439", "node-releases": "^2.0.57", "update-browserslist-db": "^1.3.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-1R4kiYKXGViqEN0CnoDrXc1StD9niAwu+j2dukWzrD4bJgsD4lDmEp0CRbc6E/vYJIfTHwPmwyaKtVSudICdPA=="], "buffer-image-size": ["buffer-image-size@0.6.4", "", { "dependencies": { "@types/node": "*" } }, "sha512-nEh+kZOPY1w+gcCMobZ6ETUp9WfibndnosbpwB1iJk/8Gt5ZF2bhS6+B6bPYz424KtwsR6Rflc3tCz1/ghX2dQ=="], - "bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], - - "call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="], - - "call-bound": ["call-bound@1.0.4", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="], - - "caniuse-lite": ["caniuse-lite@1.0.30001810", "", {}, "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg=="], + "caniuse-lite": ["caniuse-lite@1.0.30001814", "", {}, "sha512-/Uaf1lAzr59XcMpW0o96WoEfr+VXK2OX4U9AgFoiSHsVJ4HppnIFUjtYzsyDH2+tgANaQb2/oxYGwCPapN1FpA=="], "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], - "chai": ["chai@6.2.2", "", {}, "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg=="], + "chai": ["chai@6.3.0", "", {}, "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg=="], "character-entities": ["character-entities@2.0.2", "", {}, "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="], @@ -319,20 +295,10 @@ "compare-versions": ["compare-versions@6.1.1", "", {}, "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg=="], - "content-disposition": ["content-disposition@1.1.0", "", {}, "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g=="], - - "content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="], - "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], - "cookie": ["cookie@0.7.2", "", {}, "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="], - "cookie-es": ["cookie-es@3.1.1", "", {}, "sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg=="], - "cookie-signature": ["cookie-signature@1.2.2", "", {}, "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg=="], - - "cors": ["cors@2.8.6", "", { "dependencies": { "object-assign": "^4", "vary": "^1" } }, "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw=="], - "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], @@ -341,8 +307,6 @@ "decode-named-character-reference": ["decode-named-character-reference@1.3.0", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q=="], - "depd": ["depd@2.0.0", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="], - "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], @@ -353,106 +317,52 @@ "diff": ["diff@8.0.4", "", {}, "sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw=="], - "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], - "echarts": ["echarts@6.1.0", "", { "dependencies": { "tslib": "2.3.0", "zrender": "6.1.0" } }, "sha512-q0yaFPggC9FUdsWH4blavRWFmxdrIodbkoKNAjJudAI6CA9gNPxHtV2RcZNEepZVlk4yvBYkOkbk6HIVpIyHZA=="], - "ee-first": ["ee-first@1.1.1", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="], - - "electron-to-chromium": ["electron-to-chromium@1.5.420", "", {}, "sha512-2yD6XreGusOfNV+dUcvipJEXc3n/n7fgr7996aszTG+YY5E4mqM4tOq/3uhP129cazL9YHbVWSpc79ePotWtPA=="], - - "encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="], + "electron-to-chromium": ["electron-to-chromium@1.5.443", "", {}, "sha512-TDJG36L9A3CWWwZ97HKaE+Iz1sW80pNp6sAU0owzCIV3Zc9eVyRqZK8Vz6NKuMIU8WjP0pIkoqCa0VRf/yFD0Q=="], "entities": ["entities@7.0.1", "", {}, "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA=="], - "es-define-property": ["es-define-property@1.0.1", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="], - - "es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="], - "es-module-lexer": ["es-module-lexer@2.3.2", "", {}, "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw=="], - "es-object-atoms": ["es-object-atoms@1.1.2", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw=="], - "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], - "escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="], - "escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="], "estree-util-is-identifier-name": ["estree-util-is-identifier-name@3.0.0", "", {}, "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg=="], "estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], - "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], - "eventsource": ["eventsource@3.0.7", "", { "dependencies": { "eventsource-parser": "^3.0.1" } }, "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA=="], "eventsource-parser": ["eventsource-parser@3.1.1", "", {}, "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ=="], "expect-type": ["expect-type@1.4.0", "", {}, "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA=="], - "express": ["express@5.2.1", "", { "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", "depd": "^2.0.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "finalhandler": "^2.1.0", "fresh": "^2.0.0", "http-errors": "^2.0.0", "merge-descriptors": "^2.0.0", "mime-types": "^3.0.0", "on-finished": "^2.4.1", "once": "^1.4.0", "parseurl": "^1.3.3", "proxy-addr": "^2.0.7", "qs": "^6.14.0", "range-parser": "^1.2.1", "router": "^2.2.0", "send": "^1.1.0", "serve-static": "^2.2.0", "statuses": "^2.0.1", "type-is": "^2.0.1", "vary": "^1.1.2" } }, "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw=="], - - "express-rate-limit": ["express-rate-limit@8.7.0", "", { "dependencies": { "debug": "^4.4.3", "ip-address": "^10.2.0" }, "peerDependencies": { "express": ">= 4.11" } }, "sha512-hOwV7WOxXfjRpAM1DSJWZDXx3GhplwD8IfwuwvogD8i1Qnkgosw/H45s4ZnFAUHDAhPjlY9hLBvJhKmGMyY26g=="], - "extend": ["extend@3.0.2", "", {}, "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="], - "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], - "fast-equals": ["fast-equals@4.0.3", "", {}, "sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg=="], "fast-json-patch": ["fast-json-patch@3.1.1", "", {}, "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ=="], - "fast-uri": ["fast-uri@3.1.8", "", {}, "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg=="], - "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], - "finalhandler": ["finalhandler@2.1.1", "", { "dependencies": { "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "on-finished": "^2.4.1", "parseurl": "^1.3.3", "statuses": "^2.0.1" } }, "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA=="], - - "forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="], - - "fresh": ["fresh@2.0.0", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="], - "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], - "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], - "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], - "get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="], - "get-nonce": ["get-nonce@1.0.1", "", {}, "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q=="], - "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="], - - "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="], - - "happy-dom": ["happy-dom@20.11.12", "", { "dependencies": { "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", "@types/ws": "^8.18.1", "buffer-image-size": "^0.6.4", "entities": "^7.0.1", "whatwg-mimetype": "^3.0.0", "ws": "^8.21.0" } }, "sha512-7+mrTTD+6fOG3dx0URrDLrCX8QDTE+YujSOQD4VPZcYze/yJ0vVhRKaIBTjqlk+R4NetxVz21odnevHYIjIJ+g=="], - - "has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="], - - "hasown": ["hasown@2.0.4", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A=="], + "happy-dom": ["happy-dom@20.14.5", "", { "dependencies": { "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", "@types/ws": "^8.18.1", "buffer-image-size": "^0.6.4", "entities": "^7.0.1", "whatwg-mimetype": "^3.0.0", "ws": "^8.21.0" } }, "sha512-x/RzkpWO40bTjIoT30iQtt64FLLmH/iRcUCN2X//bLx7H3ifkdfPXyqsro/OYtqzIAhiLMMA7mmiOR9C3NOKjQ=="], "hast-util-to-jsx-runtime": ["hast-util-to-jsx-runtime@2.3.6", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "vfile-message": "^4.0.0" } }, "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg=="], "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], - "hono": ["hono@4.13.7", "", {}, "sha512-c8/gF9ac8Y78/agExVocyLevgR+JlpNB444Py0FSX8pJoPdYUfUzRcXtYEYGwt6l19qIlVZPN5Mfsw9jFShmQQ=="], - "html-url-attributes": ["html-url-attributes@3.0.1", "", {}, "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ=="], - "http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], - - "iconv-lite": ["iconv-lite@0.7.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ=="], - - "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], - "inline-style-parser": ["inline-style-parser@0.2.7", "", {}, "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA=="], - "ip-address": ["ip-address@10.7.1", "", {}, "sha512-4OUAqU9Z1i3vCnS05hzGiFnEMDpQ+62pAD/MVQOp83fYyNC8GleCqaS0QikQBmcWCrKFiUs/B8ztRRiYOAXuCA=="], - - "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], - "is-alphabetical": ["is-alphabetical@2.0.1", "", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="], "is-alphanumerical": ["is-alphanumerical@2.0.1", "", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="], @@ -463,24 +373,18 @@ "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="], - "is-promise": ["is-promise@4.0.0", "", {}, "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="], - "isbot": ["isbot@5.2.2", "", {}, "sha512-iQcBXcd+Rv/pkubRyGh2utW2j1oPG5hZY6TUhVPpqK4G+o3IbxpJNx04hgksjc/N7GK5pEorUxDeg31cFgEk/w=="], "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], "jiti": ["jiti@2.7.0", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ=="], - "jose": ["jose@6.2.10", "", {}, "sha512-iiW7J9qRFlGxvCOIBDBDxFePQSn7ZMAnrYGhrrOo6siO/MIqwfyilLR27pkfDgUk+raLuzADS8A3S/KLBisc0g=="], + "jose": ["jose@6.2.12", "", {}, "sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw=="], "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], - "json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], - - "json-schema-typed": ["json-schema-typed@8.0.2", "", {}, "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA=="], - "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], "lightningcss": ["lightningcss@1.33.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="], @@ -513,12 +417,10 @@ "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], - "magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="], + "magic-string": ["magic-string@1.4.2", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-vG+rjFRj1PqdIBozIxAGMjPlOhaVe+GXpbttY/iSK7rGcJRMlwNJO7dcUwmUqkymsFLJiNGI06t4D7Fr7yRC9g=="], "markdown-table": ["markdown-table@3.0.4", "", {}, "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw=="], - "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], - "mdast-util-find-and-replace": ["mdast-util-find-and-replace@3.0.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "escape-string-regexp": "^5.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg=="], "mdast-util-from-markdown": ["mdast-util-from-markdown@2.0.3", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "mdast-util-to-string": "^4.0.0", "micromark": "^4.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q=="], @@ -529,7 +431,7 @@ "mdast-util-gfm-footnote": ["mdast-util-gfm-footnote@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0" } }, "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ=="], - "mdast-util-gfm-strikethrough": ["mdast-util-gfm-strikethrough@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg=="], + "mdast-util-gfm-strikethrough": ["mdast-util-gfm-strikethrough@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-OuJHqvr455pwu2OaOrir7dbzqs4jlWKOtlu9L6GjcIjjQwNyw02VntQsr/Ek6/A13vgnXfUhBekWRUP1OkNivw=="], "mdast-util-gfm-table": ["mdast-util-gfm-table@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "markdown-table": "^3.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg=="], @@ -545,17 +447,13 @@ "mdast-util-to-hast": ["mdast-util-to-hast@13.2.1", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA=="], - "mdast-util-to-markdown": ["mdast-util-to-markdown@2.1.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "longest-streak": "^3.0.0", "mdast-util-phrasing": "^4.0.0", "mdast-util-to-string": "^4.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "unist-util-visit": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA=="], + "mdast-util-to-markdown": ["mdast-util-to-markdown@2.1.3", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "longest-streak": "^3.0.0", "mdast-util-phrasing": "^4.0.0", "mdast-util-to-string": "^4.0.0", "micromark-util-character": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-html-tag-name": "^2.0.0", "unist-util-visit": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-wgyJtgUkUcdU7zci7uuwc/tzoAhm0TswWhaXuvnWolqug+8jY7bgNkBBL0dYBnHgc/tHL7lCzRdPsdUxUKKBqw=="], "mdast-util-to-string": ["mdast-util-to-string@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0" } }, "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg=="], - "media-typer": ["media-typer@1.1.1", "", {}, "sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ=="], - - "merge-descriptors": ["merge-descriptors@2.0.0", "", {}, "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="], - - "micromark": ["micromark@4.0.2", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA=="], + "micromark": ["micromark@4.0.3", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-edit-map": "^1.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw=="], - "micromark-core-commonmark": ["micromark-core-commonmark@2.0.3", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg=="], + "micromark-core-commonmark": ["micromark-core-commonmark@2.0.4", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", "micromark-factory-space": "^2.1.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-edit-map": "^1.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.3" } }, "sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w=="], "micromark-extension-gfm": ["micromark-extension-gfm@3.0.0", "", { "dependencies": { "micromark-extension-gfm-autolink-literal": "^2.0.0", "micromark-extension-gfm-footnote": "^2.0.0", "micromark-extension-gfm-strikethrough": "^2.0.0", "micromark-extension-gfm-table": "^2.0.0", "micromark-extension-gfm-tagfilter": "^2.0.0", "micromark-extension-gfm-task-list-item": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w=="], @@ -565,7 +463,7 @@ "micromark-extension-gfm-strikethrough": ["micromark-extension-gfm-strikethrough@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw=="], - "micromark-extension-gfm-table": ["micromark-extension-gfm-table@2.1.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg=="], + "micromark-extension-gfm-table": ["micromark-extension-gfm-table@2.1.2", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA=="], "micromark-extension-gfm-tagfilter": ["micromark-extension-gfm-tagfilter@2.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg=="], @@ -575,7 +473,7 @@ "micromark-factory-label": ["micromark-factory-label@2.0.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg=="], - "micromark-factory-space": ["micromark-factory-space@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg=="], + "micromark-factory-space": ["micromark-factory-space@2.1.0", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-fS8hnLIjnjvdQIj39Geug8wWsR0HrYZ43KShKxNfwT7t2LOHo/LbWZEzEaSOjwtjdCsjoE6syHhonEzW0zv0+Q=="], "micromark-factory-title": ["micromark-factory-title@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw=="], @@ -593,6 +491,8 @@ "micromark-util-decode-string": ["micromark-util-decode-string@2.0.1", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ=="], + "micromark-util-edit-map": ["micromark-util-edit-map@1.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q=="], + "micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="], "micromark-util-html-tag-name": ["micromark-util-html-tag-name@2.0.1", "", {}, "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA=="], @@ -607,38 +507,22 @@ "micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="], - "micromark-util-types": ["micromark-util-types@2.0.2", "", {}, "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA=="], - - "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="], - - "mime-types": ["mime-types@3.0.2", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A=="], + "micromark-util-types": ["micromark-util-types@2.0.3", "", {}, "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg=="], "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], "nanoid": ["nanoid@3.3.18", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w=="], - "negotiator": ["negotiator@1.1.0", "", { "dependencies": { "content-type": "^2.1.0" } }, "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg=="], - - "node-releases": ["node-releases@2.0.54", "", {}, "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ=="], + "node-releases": ["node-releases@2.0.57", "", {}, "sha512-kQK9LGGFiHtrWiNhZtA7Qbw17AQz+dmsEKODRIVTXA9+e5MS/2gZEBhYJt13GrAz5/IOZKddH/0Z3TP/Zgo+yw=="], "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], - "object-inspect": ["object-inspect@1.13.4", "", {}, "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="], - - "obug": ["obug@2.1.4", "", {}, "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA=="], - - "on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="], - - "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], + "obug": ["obug@2.2.1", "", {}, "sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q=="], "parse-entities": ["parse-entities@4.0.2", "", { "dependencies": { "@types/unist": "^2.0.0", "character-entities-legacy": "^3.0.0", "character-reference-invalid": "^2.0.0", "decode-named-character-reference": "^1.0.0", "is-alphanumerical": "^2.0.0", "is-decimal": "^2.0.0", "is-hexadecimal": "^2.0.0" } }, "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw=="], - "parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="], - "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], - "path-to-regexp": ["path-to-regexp@8.4.2", "", {}, "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA=="], - "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], @@ -649,25 +533,17 @@ "postcss": ["postcss@8.5.28", "", { "dependencies": { "nanoid": "^3.3.18", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A=="], - "prettier": ["prettier@3.9.6", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g=="], + "prettier": ["prettier@3.9.9", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-Z/CJHIkdujO/OtN7nXUii0Rf3VT5SRuhjBA82Xvu2XhBUgX3nhP67T0LHceBdQLex7OOFGTox+Q5Yg8Jk2Qivg=="], "prop-types": ["prop-types@15.8.1", "", { "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" } }, "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg=="], "property-information": ["property-information@7.2.0", "", {}, "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg=="], - "proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="], - - "qs": ["qs@6.16.0", "", { "dependencies": { "es-define-property": "^1.0.1", "side-channel": "^1.1.1" } }, "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA=="], - - "range-parser": ["range-parser@1.3.0", "", {}, "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw=="], - - "raw-body": ["raw-body@3.0.2", "", { "dependencies": { "bytes": "~3.1.2", "http-errors": "~2.0.1", "iconv-lite": "~0.7.0", "unpipe": "~1.0.0" } }, "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA=="], - - "react": ["react@19.2.8", "", {}, "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw=="], + "react": ["react@19.3.0", "", {}, "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog=="], - "react-dom": ["react-dom@19.2.8", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.8" } }, "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ=="], + "react-dom": ["react-dom@19.3.0", "", { "dependencies": { "scheduler": "^0.28.0" }, "peerDependencies": { "react": "^19.3.0" } }, "sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q=="], - "react-draggable": ["react-draggable@4.7.1", "", { "dependencies": { "clsx": "^2.1.1", "prop-types": "^15.8.1" }, "peerDependencies": { "react": ">= 16.3.0", "react-dom": ">= 16.3.0" } }, "sha512-wa3tzfFnYt3yaZLuyU58fl1TNunfWfBekDgWhZA1+gb2jnp42wZ0ymuopR6M5kqDYmm4hKmzGlcKWjZf3Zb6RQ=="], + "react-draggable": ["react-draggable@4.7.2", "", { "dependencies": { "clsx": "^2.1.1", "prop-types": "^15.8.1" }, "peerDependencies": { "react": ">= 16.3.0", "react-dom": ">= 16.3.0" } }, "sha512-pmqDx72EqhMGoJe/x42ZO2wJ9TIz7qJ5OPnFu6lVWWznEuJumlSjR+J0V4tNyDFhUo6dVvv56FeiTqN+arTgnw=="], "react-grid-layout": ["react-grid-layout@2.2.4", "", { "dependencies": { "clsx": "^2.1.1", "fast-equals": "^4.0.3", "prop-types": "^15.8.1", "react-draggable": "^4.4.6", "react-resizable": "^3.1.3", "resize-observer-polyfill": "^1.5.1" }, "peerDependencies": { "react": ">= 16.3.0", "react-dom": ">= 16.3.0" } }, "sha512-Eb57FsgOMYOfsUGrMI1ku/FFR+dPNPrE8qo+3hwZubpqVSy4GO9v52DeX50Tl3JDYAlCypP4rmw7Vrqk/zOIvA=="], @@ -695,55 +571,29 @@ "remark-stringify": ["remark-stringify@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-to-markdown": "^2.0.0", "unified": "^11.0.0" } }, "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw=="], - "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], - "resize-observer-polyfill": ["resize-observer-polyfill@1.5.1", "", {}, "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="], - "rolldown": ["rolldown@1.2.7", "", { "dependencies": { "@oxc-project/types": "=0.148.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.7", "@rolldown/binding-android-arm64": "1.2.7", "@rolldown/binding-darwin-arm64": "1.2.7", "@rolldown/binding-darwin-x64": "1.2.7", "@rolldown/binding-freebsd-x64": "1.2.7", "@rolldown/binding-linux-arm-gnueabihf": "1.2.7", "@rolldown/binding-linux-arm64-gnu": "1.2.7", "@rolldown/binding-linux-arm64-musl": "1.2.7", "@rolldown/binding-linux-ppc64-gnu": "1.2.7", "@rolldown/binding-linux-s390x-gnu": "1.2.7", "@rolldown/binding-linux-x64-gnu": "1.2.7", "@rolldown/binding-linux-x64-musl": "1.2.7", "@rolldown/binding-openharmony-arm64": "1.2.7", "@rolldown/binding-win32-arm64-msvc": "1.2.7", "@rolldown/binding-win32-x64-msvc": "1.2.7" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-g0EtLvBjTUB7jhyV0S/TCup3v/XSVl45vUIGbOGU4QPiyjTenCe4mKuFvW9fEgYmS2Fo42AUssRmNuMziXdrig=="], - - "router": ["router@2.2.0", "", { "dependencies": { "debug": "^4.4.0", "depd": "^2.0.0", "is-promise": "^4.0.0", "parseurl": "^1.3.3", "path-to-regexp": "^8.0.0" } }, "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ=="], + "rolldown": ["rolldown@1.2.12", "", { "dependencies": { "@oxc-project/types": "=0.152.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.12", "@rolldown/binding-android-arm64": "1.2.12", "@rolldown/binding-darwin-arm64": "1.2.12", "@rolldown/binding-darwin-x64": "1.2.12", "@rolldown/binding-freebsd-x64": "1.2.12", "@rolldown/binding-linux-arm-gnueabihf": "1.2.12", "@rolldown/binding-linux-arm64-gnu": "1.2.12", "@rolldown/binding-linux-arm64-musl": "1.2.12", "@rolldown/binding-linux-ppc64-gnu": "1.2.12", "@rolldown/binding-linux-s390x-gnu": "1.2.12", "@rolldown/binding-linux-x64-gnu": "1.2.12", "@rolldown/binding-linux-x64-musl": "1.2.12", "@rolldown/binding-openharmony-arm64": "1.2.12", "@rolldown/binding-win32-arm64-msvc": "1.2.12", "@rolldown/binding-win32-x64-msvc": "1.2.12" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-8wafseiaG80xmXSfqidUNqZcylTlhmPZZt+za2m+js2sFZ8dTNlhIOV2WcbIPx2hgwPBJpEUGFAMZ9bgBBLTSQ=="], "rxjs": ["rxjs@7.8.1", "", { "dependencies": { "tslib": "^2.1.0" } }, "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg=="], - "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], - - "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + "scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="], "semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "send": ["send@1.2.1", "", { "dependencies": { "debug": "^4.4.3", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", "http-errors": "^2.0.1", "mime-types": "^3.0.2", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "statuses": "^2.0.2" } }, "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ=="], - - "seroval": ["seroval@1.6.4", "", {}, "sha512-LErWMNS2RRFdu2RMA5u/PA59/IWs0XsikyEXGQ2/36iEWFrdG0ABmg17E17cikrv76891kOAMq3TkTFXpwAHXw=="], - - "seroval-plugins": ["seroval-plugins@1.6.4", "", { "peerDependencies": { "seroval": "^1.0" } }, "sha512-R0f1U9hmn38+dFMz6b6ab8lwucmw4AtiY7St+JPWudy1dm+Bs3g884nyrsH9Cy6rKpZKLYayXuMda9GZ/fl8JQ=="], - - "serve-static": ["serve-static@2.2.1", "", { "dependencies": { "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "parseurl": "^1.3.3", "send": "^1.2.0" } }, "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw=="], + "seroval": ["seroval@1.6.8", "", {}, "sha512-HlSgSAkTk4EqHcje1ptJjfZi1YDv5KbhVJ/d3P7T/nAXua2VmDu+AKDX5VTdFfZf48nDkWB2TKYt0DrCSa+3wg=="], - "setprototypeof": ["setprototypeof@1.2.0", "", {}, "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="], + "seroval-plugins": ["seroval-plugins@1.6.8", "", { "peerDependencies": { "seroval": "^1.0" } }, "sha512-N7mWAMydj89EnYTHtRpS3LBrAz3J9O6oVrqpuXuvlAHfAUG8WEKqtbAd7SBiJNY5NfCAFhSdyAh7wI4Shjqy4g=="], "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], - "side-channel": ["side-channel@1.1.1", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.4", "side-channel-list": "^1.0.1", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" } }, "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ=="], - - "side-channel-list": ["side-channel-list@1.0.1", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.4" } }, "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w=="], - - "side-channel-map": ["side-channel-map@1.0.1", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3" } }, "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA=="], - - "side-channel-weakmap": ["side-channel-weakmap@1.0.2", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="], - - "siginfo": ["siginfo@2.0.0", "", {}, "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g=="], - - "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], + "source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="], "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], - "stackback": ["stackback@0.0.2", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="], - - "statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], - - "std-env": ["std-env@4.2.0", "", {}, "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw=="], + "std-env": ["std-env@4.3.0", "", {}, "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag=="], "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], @@ -755,29 +605,23 @@ "tagged-tag": ["tagged-tag@1.0.0", "", {}, "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng=="], - "tinybench": ["tinybench@2.9.0", "", {}, "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg=="], + "tinybench": ["tinybench@6.2.0", "", {}, "sha512-78U2TlB2CnVenajOFzf3BKSm0J6oz5L0NV7g32LCPccvYc0lbWvys4d3uUUCS2B1N8PAf2+aekR8i1KbC3HO7Q=="], "tinyexec": ["tinyexec@1.3.1", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="], "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], - "tinyrainbow": ["tinyrainbow@3.1.1", "", {}, "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw=="], - - "toidentifier": ["toidentifier@1.0.1", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="], - "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], "trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="], "tslib": ["tslib@2.3.0", "", {}, "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="], - "type-fest": ["type-fest@5.9.0", "", { "dependencies": { "tagged-tag": "^1.0.0" } }, "sha512-yANm3Jr3GiJ1qgJlxGAVxTOIcEOk1rhQHamlXtnrCK7EHP4HeM9OGxtMg/W7HFdrVzw/ZWJKGVIJusVH85sLtw=="], - - "type-is": ["type-is@2.1.0", "", { "dependencies": { "content-type": "^2.0.0", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA=="], + "type-fest": ["type-fest@5.10.0", "", { "dependencies": { "tagged-tag": "^1.0.0" } }, "sha512-NoSdpq/WEiAg5sjmBkmV/hfxv6HJH4NqPNrqjtSO5CwRmpsDfaf4begxW34KdJykH/l1yHtwBWQkCRdoXO8mPA=="], "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="], - "undici-types": ["undici-types@8.3.0", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="], + "undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="], "unified": ["unified@11.0.5", "", { "dependencies": { "@types/unist": "^3.0.0", "bail": "^2.0.0", "devlop": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", "vfile": "^6.0.0" } }, "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA=="], @@ -791,31 +635,27 @@ "unist-util-visit-parents": ["unist-util-visit-parents@6.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ=="], - "unpipe": ["unpipe@1.0.0", "", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="], - - "unplugin": ["unplugin@3.3.0", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "picomatch": "^4.0.4", "webpack-virtual-modules": "^0.6.2" }, "peerDependencies": { "@farmfe/core": "*", "@rspack/core": "*", "bun-types-no-globals": "*", "esbuild": "*", "rolldown": "*", "rollup": "*", "unloader": "*", "vite": "*", "webpack": "*" }, "optionalPeers": ["@farmfe/core", "@rspack/core", "bun-types-no-globals", "esbuild", "rolldown", "rollup", "unloader", "vite", "webpack"] }, "sha512-qa66K+crbfyE6JK10GjvbJeRrOsuC/JpbnHctfyp/i4oBTxWOzJfRZyDiOk1PtErMFRu8JhsU/wPvOdBNWe5Rg=="], + "unplugin": ["unplugin@3.4.0", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "picomatch": "^4.0.7", "webpack-virtual-modules": "^0.6.2" }, "peerDependencies": { "@farmfe/core": "*", "@rsbuild/core": "*", "@rspack/core": "*", "bun-types-no-globals": "*", "esbuild": "*", "rolldown": "*", "rollup": "*", "unloader": "*", "vite": "*", "webpack": "*" }, "optionalPeers": ["@farmfe/core", "@rsbuild/core", "@rspack/core", "bun-types-no-globals", "esbuild", "rolldown", "rollup", "unloader", "vite", "webpack"] }, "sha512-9skdIFlCsPdFV7wUfZxNsFInlW+7nJmGu2gkTu0OUhF56aXGsHab9x52/QhdJ4lC7ZDPWTxbiC4ANqVlsuaW3w=="], "untruncate-json": ["untruncate-json@0.0.1", "", {}, "sha512-4W9enDK4X1y1s2S/Rz7ysw6kDuMS3VmRjMFg7GZrNO+98OSe+x5Lh7PKYoVjy3lW/1wmhs6HW0lusnQRHgMarA=="], - "update-browserslist-db": ["update-browserslist-db@1.3.2", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw=="], + "update-browserslist-db": ["update-browserslist-db@1.3.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-pJ2sYawQS0R/WI928Gj5GlPhTGzbMelq0+4INtSYNDV9ErKJcX6xjGWkoG/VnB3dpUm00zALaqkrUD77pO5TDQ=="], "use-callback-ref": ["use-callback-ref@1.3.3", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="], "use-sidecar": ["use-sidecar@1.1.3", "", { "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ=="], - "use-sync-external-store": ["use-sync-external-store@1.6.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w=="], + "use-sync-external-store": ["use-sync-external-store@1.7.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A=="], "uuid": ["uuid@14.0.2", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-xZe/16rV4aa+HGSOCiY2YeLT1OybRLrrkL/Rqaq7p7GMVXjFh+6wN4oMYgjFmnSnhY8t6Xpdl2l9qmnHYuMHwQ=="], - "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], - "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], "vfile-message": ["vfile-message@4.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw=="], - "vite": ["vite@8.2.2", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.5", "postcss": "^8.5.26", "rolldown": "~1.2.4", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.4.0 || ^0.5.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q=="], + "vite": ["vite@8.3.1", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.28", "rolldown": "~1.2.9", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.7.1", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-/bvH9E9tmCXRGp2uXY3WbOldqpTwFkbha/8ANaEQ6VkxhH60KyqLwgZq6lG2y+4uT55x9+9eUHMpQ7uGnOCKjA=="], - "vitest": ["vitest@4.1.11", "", { "dependencies": { "@vitest/expect": "4.1.11", "@vitest/mocker": "4.1.11", "@vitest/pretty-format": "4.1.11", "@vitest/runner": "4.1.11", "@vitest/snapshot": "4.1.11", "@vitest/spy": "4.1.11", "@vitest/utils": "4.1.11", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", "obug": "^2.1.1", "pathe": "^2.0.3", "picomatch": "^4.0.3", "std-env": "^4.0.0-rc.1", "tinybench": "^2.9.0", "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", "tinyrainbow": "^3.1.0", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", "@vitest/browser-playwright": "4.1.11", "@vitest/browser-preview": "4.1.11", "@vitest/browser-webdriverio": "4.1.11", "@vitest/coverage-istanbul": "4.1.11", "@vitest/coverage-v8": "4.1.11", "@vitest/ui": "4.1.11", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@opentelemetry/api", "@types/node", "@vitest/browser-playwright", "@vitest/browser-preview", "@vitest/browser-webdriverio", "@vitest/coverage-istanbul", "@vitest/coverage-v8", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "./vitest.mjs" } }, "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw=="], + "vitest": ["vitest@5.0.3", "", { "dependencies": { "@types/chai": "^5.2.2", "@vitest/mocker": "5.0.3", "chai": "^6.2.2", "es-module-lexer": "^2.3.2", "expect-type": "^1.4.0", "magic-string": "^1.2.3", "obug": "^2.1.4", "picomatch": "^4.0.7", "std-env": "^4.2.0", "tinybench": "^6.1.4", "tinyexec": "^1.3.0", "tinyglobby": "^0.2.17", "why-is-node-running": "3.2.1" }, "peerDependencies": { "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^22.0.0 || >=24.0.0", "@vitest/browser-playwright": "5.0.3", "@vitest/browser-preview": "5.0.3", "@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0", "@vitest/coverage-istanbul": "5.0.3", "@vitest/coverage-v8": "5.0.3", "@vitest/ui": "5.0.3", "happy-dom": "*", "jsdom": "*", "vite": "^6.4.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["@edge-runtime/vm", "@opentelemetry/api", "@types/node", "@vitest/browser-playwright", "@vitest/browser-preview", "@vitest/browser-webdriverio", "@vitest/coverage-istanbul", "@vitest/coverage-v8", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "./vitest.mjs" } }, "sha512-xMw97S3rjdtj5dkVat7jCsqWBpvchs3RlpQctUqwJD0KkERk40vz2fJ77lDwW/Vzh/pk18eItYAzkodhSes3jQ=="], "webpack-virtual-modules": ["webpack-virtual-modules@0.6.2", "", {}, "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ=="], @@ -823,17 +663,13 @@ "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], - "why-is-node-running": ["why-is-node-running@2.3.0", "", { "dependencies": { "siginfo": "^2.0.0", "stackback": "0.0.2" }, "bin": { "why-is-node-running": "cli.js" } }, "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w=="], - - "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], + "why-is-node-running": ["why-is-node-running@3.2.1", "", { "bin": { "why-is-node-running": "cli.js" } }, "sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ=="], - "ws": ["ws@8.21.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw=="], + "ws": ["ws@8.22.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg=="], "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], - "zod": ["zod@4.5.4", "", {}, "sha512-sC95tT5iHHH9gtpj6A81kh+NEaRAUFN+qlUPDUbRfOMvNf5QCBqsb3WgvnpVtK5Y+4UfA6KqufotuTvMGiTlsA=="], - - "zod-to-json-schema": ["zod-to-json-schema@3.25.2", "", { "peerDependencies": { "zod": "^3.25.28 || ^4" } }, "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA=="], + "zod": ["zod@4.6.5", "", {}, "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q=="], "zrender": ["zrender@6.1.0", "", { "dependencies": { "tslib": "2.3.0" } }, "sha512-oEGMDB6pOP2S6OwRR4PdVv610zrjnA3Bh+JnSG12fYJlBKjtNAoEb5fSUoCOOINlH96I2fU38/A2UpRKs67xYQ=="], @@ -843,11 +679,9 @@ "@ag-ui/client/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], - "@ag-ui/core/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], + "@ag-ui/proto/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], - "body-parser/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], - - "negotiator/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], + "@tanstack/router-generator/magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="], "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], @@ -859,8 +693,6 @@ "rxjs/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "type-is/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], - "use-callback-ref/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], "use-sidecar/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], diff --git a/ui/host/package.json b/ui/host/package.json index 837b4220..990f5c2e 100644 --- a/ui/host/package.json +++ b/ui/host/package.json @@ -5,40 +5,40 @@ "type": "module", "scripts": { "dev": "vite --host 0.0.0.0 --port 5173", - "build": "tsc --noEmit && vite build", - "build:watch": "vite build --watch", + "build": "tsc --noEmit && bun --bun vite build", + "build:watch": "bun --bun vite build --watch", "preview": "vite preview --host 0.0.0.0 --port 5173", "lint": "tsc --noEmit", "test": "vitest run" }, "dependencies": { - "@ag-ui/client": "0.0.59", + "@ag-ui/client": "1.0.1", "@fontsource-variable/geist": "5.3.0", "@fontsource-variable/geist-mono": "5.3.0", - "@mantine/core": "9.5.2", - "@mantine/hooks": "9.5.2", - "@modelcontextprotocol/ext-apps": "1.7.5", - "@modelcontextprotocol/sdk": "1.30.0", + "@mantine/core": "9.6.3", + "@mantine/hooks": "9.6.3", + "@modelcontextprotocol/client": "2.2.0", + "@modelcontextprotocol/ext-apps": "2.0.3", "@phosphor-icons/react": "2.1.10", - "@tanstack/react-query": "5.102.8", - "@tanstack/react-router": "1.170.32", + "@tanstack/react-query": "5.104.0", + "@tanstack/react-router": "1.170.41", "echarts": "6.1.0", - "react": "19.2.8", - "react-dom": "19.2.8", + "react": "19.3.0", + "react-dom": "19.3.0", "react-grid-layout": "2.2.4", - "react-markdown": "^10.1.0", - "remark-gfm": "^4.0.1", + "react-markdown": "10.1.0", + "remark-gfm": "4.0.1", "uuid": "14.0.2" }, "devDependencies": { - "@tanstack/router-plugin": "1.168.35", - "@types/react": "19.2.18", - "@types/react-dom": "19.2.5", - "@vitejs/plugin-react": "6.1.0", - "happy-dom": "20.11.12", + "@tanstack/router-plugin": "1.168.42", + "@types/react": "19.3.0", + "@types/react-dom": "19.3.0", + "@vitejs/plugin-react": "6.1.1", + "happy-dom": "20.14.5", "typescript": "7.0.2", - "vite": "8.2.2", - "vitest": "^4.1.11" + "vite": "8.3.1", + "vitest": "5.0.3" }, "overrides": { "@hono/node-server": "1.19.15", diff --git a/ui/host/src/mcp-app-frame.test.tsx b/ui/host/src/mcp-app-frame.test.tsx index eb0ac1be..37695a22 100644 --- a/ui/host/src/mcp-app-frame.test.tsx +++ b/ui/host/src/mcp-app-frame.test.tsx @@ -11,7 +11,7 @@ const mcp = vi.hoisted(() => ({ text: "
", _meta: { ui: { csp: {} } }, }] })), - request: vi.fn().mockResolvedValue({ content: [] }), + callTool: vi.fn().mockResolvedValue({ content: [] }), closeClient: vi.fn().mockResolvedValue(undefined), closeTransport: vi.fn().mockResolvedValue(undefined), clients: [] as Array<{ onclose?: () => void; onerror?: (error: Error) => void }>, @@ -20,7 +20,7 @@ const mcp = vi.hoisted(() => ({ bridges: [] as Array<{ onsizechange?: (size: { height?: number }) => void }>, })); -vi.mock("@modelcontextprotocol/sdk/client/index.js", () => ({ +vi.mock("@modelcontextprotocol/client", () => ({ Client: class { onclose?: () => void; onerror?: (error: Error) => void; @@ -30,12 +30,9 @@ vi.mock("@modelcontextprotocol/sdk/client/index.js", () => ({ } connect = mcp.connect; readResource = mcp.readResource; - request = mcp.request; + callTool = mcp.callTool; close = mcp.closeClient; }, -})); - -vi.mock("@modelcontextprotocol/sdk/client/streamableHttp.js", () => ({ StreamableHTTPClientTransport: class { close = mcp.closeTransport; }, @@ -44,7 +41,7 @@ vi.mock("@modelcontextprotocol/sdk/client/streamableHttp.js", () => ({ vi.mock("@modelcontextprotocol/ext-apps/app-bridge", () => ({ AppBridge: class { oninitialized?: () => Promise; - oncalltool?: (params: unknown, extra: { signal: AbortSignal }) => Promise; + oncalltool?: (params: unknown, extra: { mcpReq: { signal: AbortSignal } }) => Promise; onsizechange?: (size: { height?: number }) => void; constructor(client: unknown) { mcp.bridgeClients.push(client); mcp.bridges.push(this); } async connect() { await this.oninitialized?.(); } diff --git a/ui/host/src/mcp-app-frame.tsx b/ui/host/src/mcp-app-frame.tsx index 50cb97b8..5c69b3cd 100644 --- a/ui/host/src/mcp-app-frame.tsx +++ b/ui/host/src/mcp-app-frame.tsx @@ -1,7 +1,5 @@ import { AppBridge, PostMessageTransport } from "@modelcontextprotocol/ext-apps/app-bridge"; -import { Client } from "@modelcontextprotocol/sdk/client/index.js"; -import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"; -import { CallToolResultSchema } from "@modelcontextprotocol/sdk/types.js"; +import { Client, StreamableHTTPClientTransport } from "@modelcontextprotocol/client"; import { Alert, Box, Center, Loader, Text, useComputedColorScheme } from "@mantine/core"; import { useEffect, useRef, useState } from "react"; import { authorizedFetch } from "./auth"; @@ -265,11 +263,7 @@ export default function MCPAppFrame({ content, onMessage }: { content: MCPAppCon { openLinks: {}, serverTools: {}, logging: {} }, { hostContext: { theme: colorSchemeRef.current, displayMode: "inline" } }, ); - bridge.oncalltool = (params, extra) => mcpClient.request( - { method: "tools/call", params }, - CallToolResultSchema, - { signal: extra.signal }, - ); + bridge.oncalltool = (params, extra) => mcpClient.callTool(params, { signal: extra.mcpReq.signal }); bridgeRef.current = bridge; bridge.onsizechange = ({ height: requested }) => { if (requested) setHeight(Math.min(maxAppHeight, Math.max(minimumHeight, Math.ceil(requested) + 32)));