Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.
Update mthds-ui via npm and add NodeSpec metadata (#896)
Louis Choquel90118beda69e
diff --git a/.claude/skills/update-graph-ui/SKILL.md b/.claude/skills/update-graph-ui/SKILL.mdindex 7d1223baa..dca5cf333 100644--- a/.claude/skills/update-graph-ui/SKILL.md+++ b/.claude/skills/update-graph-ui/SKILL.md@@ -1,112 +1,112 @@---name: update-graph-uidescription: >- Update the mthds-ui graph viewer assets in pipelex to a new version.- Bumps the version tag in package.json, runs make sync-graph-ui to rebuild- and copy the standalone JS/CSS assets, verifies the sync and runs tests.- Use when user says "update graph ui", "bump mthds-ui", "sync graph viewer",- "update graph viewer", "new version of mthds-ui", or any variation of- updating the vendored graph viewer assets.+ Bump the pinned `@pipelex/mthds-ui` (and `elkjs`) version that the generated+ ReactFlow HTML loads from jsDelivr. Re-fetches the bundle, recomputes SRI+ hashes, and updates the Python constants in `standalone_assets.py`.+ Use when user says "update graph ui", "bump mthds-ui", "update graph viewer",+ "new version of mthds-ui", or any variation of updating the CDN-pinned graph+ viewer assets.user_invocable: true----# Update Graph UI Assets+# Update Graph UI Assets (CDN + SRI)-Update the vendored mthds-ui graph viewer assets in pipelex to a new version.+Bump the pinned `@pipelex/mthds-ui` version that the generated ReactFlow HTML+loads from `cdn.jsdelivr.net`, refresh the Subresource Integrity hashes, and+verify everything still renders.++There is no vendored bundle anymore. Assets are loaded from jsDelivr at view+time; the only things stored in this repo are the version strings and the+matching `sha384` SRI hashes in+`pipelex/graph/reactflow/standalone_assets.py`.## Prerequisites-- `node` and `npm` must be on PATH-- Git access to `github.com/Pipelex/mthds-ui`+- `curl`, `openssl`, and `npm` on PATH (used by the refresh command, npm+ version lookup, and the sanity checks below).+- The target `@pipelex/mthds-ui` version must already be published on npm+ **with `dist/standalone/graph-viewer.{js,css}` in the tarball**. If it+ isn't, jsDelivr will 404 — fix the publish in the `mthds-ui` repo first.## Workflow-### 1. Check current state+### 1. Check current pin```bash-grep '@pipelex/mthds-ui' package.json-cat pipelex/graph/reactflow/assets/.graph-ui-version+grep -E 'MTHDS_UI_VERSION|ELKJS_VERSION' pipelex/graph/reactflow/standalone_assets.py```-Report the currently pinned version and the currently synced version.+Report the currently pinned versions.-### 2. Determine target version+### 2. Pick the target version-Ask the user which version to update to, or check the latest tag:+Latest published version on npm:```bash-git ls-remote --tags https://github.com/Pipelex/mthds-ui.git | grep -o 'refs/tags/v[0-9.]*' | sed 's|refs/tags/v||' | sort -V | tail -1+npm view @pipelex/mthds-ui version```-Show the user the latest available version and ask for confirmation.--### 3. Update package.json+Confirm with the user.-Edit `package.json` to change the version tag and update the pinned SHA:+### 3. Verify the target is reachable on jsDelivr```bash-git ls-remote https://github.com/Pipelex/mthds-ui.git refs/tags/v<NEW_VERSION> refs/tags/v<NEW_VERSION>^{}+curl -fsI https://cdn.jsdelivr.net/npm/@pipelex/mthds-ui@<NEW_VERSION>/dist/standalone/graph-viewer.js+curl -fsI https://cdn.jsdelivr.net/npm/@pipelex/mthds-ui@<NEW_VERSION>/dist/standalone/graph-viewer.css```-If two lines appear (annotated tag), use the `^{}` dereferenced SHA (the commit).-If one line appears (lightweight tag), use that SHA directly.-Update both fields:--```json-"dependencies": {- "@pipelex/mthds-ui": "github:Pipelex/mthds-ui#v<NEW_VERSION>"-},-"//dependencies": {- "@pipelex/mthds-ui": "v<NEW_VERSION> = <COMMIT_SHA>"-}-```+Both must return `HTTP/2 200`. If either 404s, the npm publish for that+version did not include the standalone bundle — stop and ask the maintainer+to re-publish properly before proceeding.-### 4. Sync assets+### 4. Refresh the SRI hashes```bash-make sync-graph-ui+.venv/bin/pipelex-dev refresh-graph-ui-sri --mthds-ui-version <NEW_VERSION>```-This clones mthds-ui at the pinned tag, builds the standalone JS/CSS bundles,-and copies them to `pipelex/graph/reactflow/assets/`.+This re-fetches each URL, computes `sha384`, and rewrites the constants in+`pipelex/graph/reactflow/standalone_assets.py`.-If this fails, stop and report the error. Common issues:-- Tag doesn't exist on the remote (check available tags)-- npm install failure (network issue)-- Build failure (mthds-ui build broken at that tag)+To rotate `elkjs` at the same time, pass `--elkjs-version <NEW_ELKJS_VERSION>`.-### 5. Verify sync+### 5. Run graph tests```bash-make check-graph-ui-sync+.venv/bin/pytest tests/unit/pipelex/graph/reactflow tests/unit/pipelex/graph/test_reactflow_html.py -q```-Must print "up-to-date". If not, something went wrong in step 4.+All tests must pass. These verify:++- CDN constants are well-formed (`sha384-…` decoding to 48 bytes, URLs pinned to declared versions).+- Generated HTML references `cdn.jsdelivr.net` with the new integrity hashes.+- HTML structure (DOCTYPE, root div, embedded JSON data scripts) is intact.-### 6. Run graph tests+### 6. Run full quality checks```bash-.venv/bin/pytest tests/unit/pipelex/graph/test_reactflow_html.py -v --no-header+make agent-check```-All tests must pass. These verify:-- HTML generation with embedded GraphSpec-- Bundled JS/CSS is present-- Config JSON embedding-- HTML structure validity+### 7. Smoke test the rendered HTML (recommended)-### 7. Run full quality checks+Generate one graph and open it in a browser:```bash-make agent-check+make serve-graph```-Ensures the new assets don't break lint, type checking, or any other checks.+In DevTools → Network, confirm three external requests to `cdn.jsdelivr.net`+succeed with no `Failed to find a valid digest in the 'integrity' attribute`+errors in the console.### 8. ReportTell the user:-- Previous version and new version-- Asset sizes (JS + CSS)-- Test results-- Remind to commit: `package.json`, `graph-viewer.js`, `graph-viewer.css`, `.graph-ui-version`++- Previous and new versions for `mthds-ui` (and `elkjs` if bumped).+- New SRI hashes.+- Test results.+- Remind to commit `pipelex/graph/reactflow/standalone_assets.py` and any+ CHANGELOG entry.diff --git a/.github/workflows/graph-ui-check.yml b/.github/workflows/graph-ui-check.ymldeleted file mode 100644index 558a238c0..000000000--- a/.github/workflows/graph-ui-check.yml+++ /dev/null@@ -1,29 +0,0 @@-name: Graph UI asset sync check--on:- pull_request:- branches:- - main- - dev--jobs:- graph-ui-sync:- name: Graph UI sync- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v4-- - name: Check graph UI assets are in sync- run: |- PINNED_VERSION=$(grep -o '"github:Pipelex/mthds-ui#[^"]*"' package.json | sed 's/.*#//;s/"//')- if [ -z "$PINNED_VERSION" ]; then- echo "::error::Could not parse pinned mthds-ui version from package.json (regex did not match)."- exit 1- fi- SYNCED_VERSION=$(cat pipelex/graph/reactflow/assets/.graph-ui-version 2>/dev/null | tr -d '[:space:]')- SYNCED_VERSION="${SYNCED_VERSION:-NONE}"- if [ "$PINNED_VERSION" != "$SYNCED_VERSION" ]; then- echo "::error::Graph UI assets are out of date! Pinned: $PINNED_VERSION, Synced: $SYNCED_VERSION. Run 'make sync-graph-ui' to update."- exit 1- fi- echo "Graph UI assets are up-to-date ($SYNCED_VERSION)"diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8f2e2100f..21150151c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,10 @@## [Unreleased]+### Changed++- **Breaking (rendering): graph viewer assets are no longer bundled into generated HTML.** The ReactFlow HTML output now references `@pipelex/mthds-ui` (the standalone IIFE bundle + its CSS) and `elkjs` from `cdn.jsdelivr.net` with pinned versions and `sha384` Subresource Integrity hashes. Three external requests now load from jsDelivr at view time; the HTML itself is still generated offline by Pipelex — only viewing the rendered graph requires network access. The previous `make sync-graph-ui` / `make check-graph-ui-sync` workflow and the committed `pipelex/graph/reactflow/assets/graph-viewer.{js,css}` files have been removed; the manifest-style `package.json` and the `Graph UI sync check` GitHub Actions workflow are gone. A single Python module (`pipelex/graph/reactflow/standalone_assets.py`) is the source of truth for pinned versions and integrity hashes — the template reads them via Jinja2, so a bump touches one file plus the regenerated SRI constants. The new `pipelex-dev refresh-graph-ui-sri` command re-fetches the URLs, recomputes `sha384`, and rewrites the constants module; the `update-graph-ui` skill drives that flow. Previously, the "self-contained HTML" was already not offline (elkjs loaded from `unpkg.com` without integrity), and bumping the vendored bundle meant committing ~2 MB of regenerated JS+CSS on every mthds-ui release — SRI hashes give the same tamper-evidence with none of the diff churn.+### Fixed- **Project `.pipelex/telemetry.toml` created by `pipelex init` no longer silently disables globally-enabled telemetry.** The kit previously shipped one `telemetry.toml` template carrying explicit `enabled = false` / `mode = "off"` defaults, and `pipelex init telemetry` copied it into both `~/.pipelex/` and the project's `.pipelex/`. Because the layered loader appends the project base file after `~/.pipelex/telemetry_override.toml`, a user who enabled Langfuse/PostHog globally in their override still had it turned off in every initialized project. The kit now ships a separate `telemetry.project.toml` template with every setting commented out, used only by project-level init. The global init still copies the active `telemetry.toml`. As a safety net, `telemetry_allowed_modes` defaults (`ci=False`, `cli=True`, `docker=True`, `fastapi=True`, `mcp=True`, `n8n=True`, `pytest=False`, `python=False`) now live in the `TelemetryConfig` Pydantic model rather than the TOML template, so a project file that omits the section can't disable custom telemetry for everyone.diff --git a/CLAUDE.md b/CLAUDE.mdindex 4578e4eeb..239e231f1 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -129,6 +129,14 @@.venv/bin/pipelex-dev generate-mthds-schema```+ - **`refresh-graph-ui-sri`**: Refetch the pinned graph viewer assets from jsDelivr (`@pipelex/mthds-ui` standalone JS+CSS, `elkjs`) and rewrite `pipelex/graph/reactflow/standalone_assets.py` with new `sha384` Subresource Integrity hashes. Use when bumping the pinned mthds-ui or elkjs version.++ ```bash+ .venv/bin/pipelex-dev refresh-graph-ui-sri --mthds-ui-version 0.6.3+ # or rotate elkjs alongside:+ .venv/bin/pipelex-dev refresh-graph-ui-sri --mthds-ui-version 0.6.3 --elkjs-version 0.11.1+ ```+## Coding Standards & Best Practices for Python CodeThis document outlines the core coding standards, best practices, and quality control procedures for the codebase.diff --git a/Makefile b/Makefileindex 5736f59f5..8733fcaee 100644--- a/Makefile+++ b/Makefile@@ -137,11 +137,6 @@ make docs-deploy-specific-version - Deploy docs for the current versionmake docs-deploy-root - Deploy root assets (404.html, robots.txt, index.html) to gh-pagesmake docs-delete VERSION=x.y.z - Delete a deployed documentation version-make sync-graph-ui - Sync graph viewer assets from mthds-ui (requires node/npm)-make sgui - Shorthand -> sync-graph-ui-make check-graph-ui-sync - Check graph viewer assets match pinned version-make cguis - Shorthand -> check-graph-ui-sync-make serve-graph - Start HTTP server to view ReactFlow graphs (PORT=8765, DIR=temp/test_outputs)make stop-graph-server - Stop the graph viewer HTTP servermake view-graph - Start server and open ReactFlow graph in browser@@ -194,7 +189,6 @@ export HELPupdate-gateway-models update-gateway-models-quiet ugm check-gateway-models cgm up \test-count check-test-badge \serve-graph serve-graph-bg stop-graph-server view-graph sg vg \- sync-graph-ui sgui check-graph-ui-sync cguis \temporal-server ts temporal-stop tstop temporal-worker tw temporal-worker-router twr temporal-worker-runner twn \temporal-run trun temporal-run-dry trund \docs-deploy-root@@ -1068,51 +1062,6 @@ trund: temporal-run-dry### GRAPH UI ASSET SYNC (from mthds-ui)##########################################################################################-GRAPH_UI_ASSETS_DIR := pipelex/graph/reactflow/assets-GRAPH_UI_VERSION_FILE := $(GRAPH_UI_ASSETS_DIR)/.graph-ui-version--sync-graph-ui:- $(call PRINT_TITLE,"Syncing graph UI assets from mthds-ui")- @PINNED_VERSION=$$(grep -o '"github:Pipelex/mthds-ui#[^"]*"' package.json | sed 's/.*#//;s/"//') && \- if [ -z "$$PINNED_VERSION" ]; then \- echo "ERROR: Could not find @pipelex/mthds-ui version in package.json"; \- exit 1; \- fi && \- echo "Pinned version: $$PINNED_VERSION" && \- TMPDIR=$$(mktemp -d) && \- trap "rm -rf $$TMPDIR" EXIT && \- echo "Cloning mthds-ui@$$PINNED_VERSION..." && \- git clone --depth 1 --branch "$$PINNED_VERSION" https://github.com/Pipelex/mthds-ui.git "$$TMPDIR/mthds-ui" && \- echo "Installing dependencies..." && \- cd "$$TMPDIR/mthds-ui" && npm install --ignore-scripts && \- echo "Building standalone assets..." && \- npm run build:standalone && \- echo "Copying assets..." && \- cp dist/standalone/graph-viewer.js "$(CURDIR)/$(GRAPH_UI_ASSETS_DIR)/graph-viewer.js" && \- cp dist/standalone/graph-viewer.css "$(CURDIR)/$(GRAPH_UI_ASSETS_DIR)/graph-viewer.css" && \- echo "$$PINNED_VERSION" > "$(CURDIR)/$(GRAPH_UI_VERSION_FILE)" && \- echo "Synced graph-viewer assets from mthds-ui@$$PINNED_VERSION"--sgui: sync-graph-ui- @echo "> done: sgui = sync-graph-ui"--check-graph-ui-sync:- $(call PRINT_TITLE,"Checking graph UI assets are up-to-date")- @PINNED_VERSION=$$(grep -o '"github:Pipelex/mthds-ui#[^"]*"' package.json | sed 's/.*#//;s/"//') && \- SYNCED_VERSION=$$(cat $(GRAPH_UI_VERSION_FILE) 2>/dev/null | tr -d '[:space:]' || echo "NONE") && \- if [ "$$PINNED_VERSION" != "$$SYNCED_VERSION" ]; then \- echo "Graph UI assets are out of date!"; \- echo " Pinned version: $$PINNED_VERSION"; \- echo " Synced version: $$SYNCED_VERSION"; \- echo " Run 'make sync-graph-ui' to update."; \- exit 1; \- else \- echo "Graph UI assets are up-to-date ($$SYNCED_VERSION)"; \- fi--cguis: check-graph-ui-sync- @echo "> done: cguis = check-graph-ui-sync"-############################################################################################# SHORTHANDS##########################################################################################diff --git a/package.json b/package.jsondeleted file mode 100644index 4a9cb6f7e..000000000--- a/package.json+++ /dev/null@@ -1,10 +0,0 @@-{- "private": true,- "description": "Version manifest for vendored JS dependencies (not a Node.js project)",- "dependencies": {- "@pipelex/mthds-ui": "github:Pipelex/mthds-ui#v0.3.4"- },- "//dependencies": {- "@pipelex/mthds-ui": "v0.3.4 = 838c0a3e57c3e19cf9d9b5fea806ca915cb820d3"- }-}diff --git a/pipelex/cli/dev_cli/_dev_cli.py b/pipelex/cli/dev_cli/_dev_cli.pyindex f36ff2eb8..4b2be46a0 100644--- a/pipelex/cli/dev_cli/_dev_cli.py+++ b/pipelex/cli/dev_cli/_dev_cli.py@@ -18,6 +18,7 @@ from pipelex.cli.dev_cli.commands.check_urls_cmd import DEFAULT_TIMEOUT, check_ufrom pipelex.cli.dev_cli.commands.generate_mthds_schema_cmd import generate_mthds_schema_cmdfrom pipelex.cli.dev_cli.commands.kit_cmd import kit_appfrom pipelex.cli.dev_cli.commands.preprocess_test_models_cmd import preprocess_test_models_cmd+from pipelex.cli.dev_cli.commands.refresh_graph_ui_sri_cmd import refresh_graph_ui_sri_cmdfrom pipelex.cli.dev_cli.commands.sync_main_config_cmd import SyncTarget, sync_main_config_cmdfrom pipelex.cli.dev_cli.commands.update_gateway_models_cmd import update_gateway_models_cmdfrom pipelex.hub import get_console@@ -39,6 +40,7 @@ class PipelexDevCLI(TyperGroup):"generate-mthds-schema","kit","preprocess-test-models",+ "refresh-graph-ui-sri","sync-main-config","update-gateway-models",]@@ -235,6 +237,37 @@ def preprocess_test_models_command(sys.exit(1)+ name="refresh-graph-ui-sri",+ help="Refetch the pinned graph viewer assets from jsDelivr and rewrite SRI hashes in standalone_assets.py",+)+def refresh_graph_ui_sri_command(+ mthds_ui_version: Annotated[+ str | None,+ typer.Option("--mthds-ui-version", help="Target @pipelex/mthds-ui version (default: currently pinned)"),+ ] = None,+ elkjs_version: Annotated[+ str | None,+ typer.Option("--elkjs-version", help="Target elkjs version (default: currently pinned)"),+ ] = None,+ quiet: Annotated[bool, typer.Option("--quiet", "-q", help="Output only a single status line")] = False,+) -> None:+ """Refetch the pinned graph viewer assets and rewrite `standalone_assets.py`."""+ try:+ refresh_graph_ui_sri_cmd(+ mthds_ui_version=mthds_ui_version,+ elkjs_version=elkjs_version,+ quiet=quiet,+ )+ except Exception:+ console = get_console()+ console.print()+ console.print("[bold red]Unexpected error occurred[/bold red]")+ console.print()+ console.print(Traceback())+ sys.exit(1)++@app.command(name="update-gateway-models", help="Update the gateway models reference file")def update_gateway_models_command(quiet: Annotated[bool, typer.Option("--quiet", "-q", help="Output only a single validation line")] = False,diff --git a/pipelex/cli/dev_cli/commands/refresh_graph_ui_sri_cmd.py b/pipelex/cli/dev_cli/commands/refresh_graph_ui_sri_cmd.pynew file mode 100644index 000000000..5d495bb06--- /dev/null+++ b/pipelex/cli/dev_cli/commands/refresh_graph_ui_sri_cmd.py@@ -0,0 +1,209 @@+"""Command to refresh CDN-pinned graph viewer SRI hashes.++Fetches `@pipelex/mthds-ui` (the standalone IIFE bundle + its CSS) and `elkjs`+from `cdn.jsdelivr.net`, computes `sha384` Subresource Integrity hashes, and+rewrites `pipelex/graph/reactflow/standalone_assets.py` to pin the new+versions.+"""++from __future__ import annotations++import base64+import hashlib+import json+import re+from pathlib import Path+from urllib.request import urlopen++from pipelex.cli.exceptions import PipelexCLIError+from pipelex.graph.reactflow import standalone_assets as current_pins+from pipelex.hub import get_console++_DEFAULT_OUTPUT_PATH = Path(current_pins.__file__)++# Accepts SemVer-ish version strings: 1.2.3, 1.2.3-rc.1, 1.2.3+build.5, 1.2.3-beta+exp.sha.5114f85.+# Anchored, no slashes, no whitespace — eliminates URL traversal and Python-literal-injection vectors.+_VERSION_PATTERN = re.compile(r"^[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$")++_MTHDS_UI_JS_URL_TEMPLATE = "https://cdn.jsdelivr.net/npm/@pipelex/mthds-ui@{version}/dist/standalone/graph-viewer.js"+_MTHDS_UI_CSS_URL_TEMPLATE = "https://cdn.jsdelivr.net/npm/@pipelex/mthds-ui@{version}/dist/standalone/graph-viewer.css"+_ELKJS_URL_TEMPLATE = "https://cdn.jsdelivr.net/npm/elkjs@{version}/lib/elk.bundled.js"++# URL templates we are willing to fetch from. Split into (prefix, suffix) around the `{version}`+# placeholder so the runtime check can match a candidate URL against the same shape we built it from.+_ALLOWED_URL_SHAPES: tuple[tuple[str, str], ...] = tuple(+ tuple(template.split("{version}", maxsplit=1)) # type: ignore[misc]+ for template in (_MTHDS_UI_JS_URL_TEMPLATE, _MTHDS_UI_CSS_URL_TEMPLATE, _ELKJS_URL_TEMPLATE)+)++_MODULE_TEMPLATE = '''\+"""CDN-pinned GraphViewer asset references.++Generated HTML loads `@pipelex/mthds-ui` (the GraphViewer IIFE bundle + its+CSS) and `elkjs` from `cdn.jsdelivr.net` with Subresource Integrity (SRI)+hashes. Versions and `sha384` integrities are pinned here so the template+can read them through a single source of truth.++To bump a version, run `pipelex-dev refresh-graph-ui-sri`, which re-fetches+the URLs, recomputes the hashes, and rewrites this file.+"""++from typing import Literal++from pydantic import BaseModel, ConfigDict+++class CDNAsset(BaseModel):+ """A pinned CDN asset with its Subresource Integrity hash."""++ model_config = ConfigDict(frozen=True, extra="forbid")++ url: str+ integrity: str+ crossorigin: Literal["anonymous", "use-credentials"] = "anonymous"+++MTHDS_UI_VERSION = {mthds_ui_version_literal}+ELKJS_VERSION = {elkjs_version_literal}++MTHDS_UI_JS = CDNAsset(+ url=f"https://cdn.jsdelivr.net/npm/@pipelex/mthds-ui@{{MTHDS_UI_VERSION}}/dist/standalone/graph-viewer.js",+ integrity={mthds_ui_js_integrity_literal},+)++MTHDS_UI_CSS = CDNAsset(+ url=f"https://cdn.jsdelivr.net/npm/@pipelex/mthds-ui@{{MTHDS_UI_VERSION}}/dist/standalone/graph-viewer.css",+ integrity={mthds_ui_css_integrity_literal},+)++ELKJS = CDNAsset(+ url=f"https://cdn.jsdelivr.net/npm/elkjs@{{ELKJS_VERSION}}/lib/elk.bundled.js",+ integrity={elkjs_integrity_literal},+)+'''+++def _validate_version(name: str, value: str) -> str:+ if not _VERSION_PATTERN.fullmatch(value):+ msg = f"Invalid {name} version {value!r}: expected a SemVer string like 1.2.3 or 1.2.3-rc.1"+ raise PipelexCLIError(msg)+ return value+++def _validate_sri(value: str) -> str:+ """Re-validate the computed SRI string before it goes into the regenerated module.++ sha384 always produces a 48-byte digest, which base64-encodes to exactly 64 chars+ with no `=` padding — so the literal must match that exact shape, not a looser+ alphabet+padding pattern.+ """+ if not re.fullmatch(r"sha384-[A-Za-z0-9+/]{64}", value):+ msg = f"Refusing to write malformed SRI literal {value!r}"+ raise PipelexCLIError(msg)+ return value+++def _fetch(url: str, timeout: float = 30.0) -> bytes:+ """Fetch the full body at `url`. Raises if the URL is not on the allowlist or the request fails."""+ if not any(url.startswith(prefix) and url.endswith(suffix) for prefix, suffix in _ALLOWED_URL_SHAPES):+ msg = f"Refusing to fetch {url}: only the jsDelivr graph viewer URLs are allowed"+ raise PipelexCLIError(msg)+ with urlopen(url, timeout=timeout) as response: # noqa: S310 # URL is a known-good https jsDelivr origin (checked above)+ body: bytes = response.read()+ return body+++def _sha384_sri(payload: bytes) -> str:+ """Return the SRI integrity string `sha384-<base64>` for the given bytes."""+ digest = hashlib.sha384(payload).digest()+ return "sha384-" + base64.b64encode(digest).decode("ascii")+++def _python_string_literal(value: str) -> str:+ """Encode `value` as a double-quoted Python string literal (matches the codebase's ruff format).++ `json.dumps` is suitable because every value we encode (SemVer versions, sha384 base64) only+ contains ASCII characters that have identical Python and JSON string-literal forms.+ """+ return json.dumps(value, ensure_ascii=True)+++def _render_module_source(+ *,+ mthds_ui_version: str,+ elkjs_version: str,+ mthds_ui_js_integrity: str,+ mthds_ui_css_integrity: str,+ elkjs_integrity: str,+) -> str:+ return _MODULE_TEMPLATE.format(+ mthds_ui_version_literal=_python_string_literal(mthds_ui_version),+ elkjs_version_literal=_python_string_literal(elkjs_version),+ mthds_ui_js_integrity_literal=_python_string_literal(mthds_ui_js_integrity),+ mthds_ui_css_integrity_literal=_python_string_literal(mthds_ui_css_integrity),+ elkjs_integrity_literal=_python_string_literal(elkjs_integrity),+ )+++def refresh_graph_ui_sri_cmd(+ mthds_ui_version: str | None = None,+ elkjs_version: str | None = None,+ output_path: Path | None = None,+ quiet: bool = False,+) -> None:+ """Refetch the pinned graph viewer assets and rewrite `standalone_assets.py`.++ Args:+ mthds_ui_version: Target `@pipelex/mthds-ui` version. Defaults to the currently pinned version.+ elkjs_version: Target `elkjs` version. Defaults to the currently pinned version.+ output_path: Override the module path to rewrite (used by tests).+ quiet: Suppress all output except a single status line.+ """+ # `is None` (not falsy) so an explicit empty-string argument fails validation rather than silently falling back to the default.+ target_mthds_ui_version = _validate_version(+ "mthds-ui",+ current_pins.MTHDS_UI_VERSION if mthds_ui_version is None else mthds_ui_version,+ )+ target_elkjs_version = _validate_version(+ "elkjs",+ current_pins.ELKJS_VERSION if elkjs_version is None else elkjs_version,+ )+ target_path = output_path or _DEFAULT_OUTPUT_PATH++ console = get_console()++ urls = {+ "mthds-ui js": _MTHDS_UI_JS_URL_TEMPLATE.format(version=target_mthds_ui_version),+ "mthds-ui css": _MTHDS_UI_CSS_URL_TEMPLATE.format(version=target_mthds_ui_version),+ "elkjs": _ELKJS_URL_TEMPLATE.format(version=target_elkjs_version),+ }++ if not quiet:+ console.print()+ console.print("[bold]Refreshing graph viewer CDN pins...[/bold]")+ for label, url in urls.items():+ console.print(f" {label}: {url}")+ console.print()++ js_bytes = _fetch(urls["mthds-ui js"])+ css_bytes = _fetch(urls["mthds-ui css"])+ elk_bytes = _fetch(urls["elkjs"])++ source = _render_module_source(+ mthds_ui_version=target_mthds_ui_version,+ elkjs_version=target_elkjs_version,+ mthds_ui_js_integrity=_validate_sri(_sha384_sri(js_bytes)),+ mthds_ui_css_integrity=_validate_sri(_sha384_sri(css_bytes)),+ elkjs_integrity=_validate_sri(_sha384_sri(elk_bytes)),+ )++ target_path.parent.mkdir(parents=True, exist_ok=True)+ target_path.write_text(source, encoding="utf-8")++ if quiet:+ console.print(f"[green]✓ graph viewer SRI refreshed:[/green] mthds-ui={target_mthds_ui_version}, elkjs={target_elkjs_version}")+ else:+ console.print(f"[green]✓ wrote {target_path}[/green]")+ console.print(f" MTHDS_UI_VERSION = {target_mthds_ui_version}")+ console.print(f" ELKJS_VERSION = {target_elkjs_version}")+ console.print()diff --git a/pipelex/core/pipes/pipe_abstract.py b/pipelex/core/pipes/pipe_abstract.pyindex 3912b949a..4d9928541 100644--- a/pipelex/core/pipes/pipe_abstract.py+++ b/pipelex/core/pipes/pipe_abstract.py@@ -460,6 +460,8 @@ class PipeAbstract(ABC, BaseModel):input_specs=input_specs or None,pipe_data=pipe_data,concept_data=concept_data,+ description=self.description,+ domain_code=self.domain_code,)# Update job metadata with child graph context for nested pipesif child_graph_context is not None:diff --git a/pipelex/graph/graph_tracer.py b/pipelex/graph/graph_tracer.pyindex 7471f59e7..0f74f8ef0 100644--- a/pipelex/graph/graph_tracer.py+++ b/pipelex/graph/graph_tracer.py@@ -48,6 +48,8 @@ class _MutableNodeData:started_at: datetime,parent_node_id: str | None,input_specs: list[IOSpec] | None = None,+ description: str | None = None,+ domain_code: str | None = None,) -> None:self.node_id = node_idself.pipe_code = pipe_code@@ -55,6 +57,8 @@ class _MutableNodeData:self.node_kind = node_kindself.started_at = started_atself.parent_node_id = parent_node_id+ self.description = description+ self.domain_code = domain_codeself.ended_at: datetime | None = Noneself.status: NodeStatus = NodeStatus.RUNNINGself.output_preview: str | None = None@@ -86,6 +90,8 @@ class _MutableNodeData:kind=self.node_kind,pipe_code=self.pipe_code,pipe_type=self.pipe_type,+ description=self.description,+ domain_code=self.domain_code,status=self.status,timing=timing,node_io=node_io,@@ -571,6 +577,8 @@ class GraphTracer(GraphTracerProtocol):input_specs: list[IOSpec] | None = None,pipe_data: dict[str, Any] | None = None,concept_data: list[dict[str, Any]] | None = None,+ description: str | None = None,+ domain_code: str | None = None,) -> tuple[str, GraphContext]:"""Record the start of a pipe execution."""if not self._is_active:@@ -591,6 +599,8 @@ class GraphTracer(GraphTracerProtocol):started_at=started_at,parent_node_id=graph_context.parent_node_id,input_specs=input_specs,+ description=description,+ domain_code=domain_code,)self._nodes[node_id] = node_data@@ -620,6 +630,8 @@ class GraphTracer(GraphTracerProtocol):pipe_code=pipe_code,pipe_type=pipe_type,node_kind=node_kind,+ description=description,+ domain_code=domain_code,input_specs=input_specs or [],pipe_data=pipe_data or {},concept_data=concept_data or [],diff --git a/pipelex/graph/graph_tracer_manager.py b/pipelex/graph/graph_tracer_manager.pyindex 4ea17e76b..10e0f30d1 100644--- a/pipelex/graph/graph_tracer_manager.py+++ b/pipelex/graph/graph_tracer_manager.py@@ -198,6 +198,8 @@ class GraphTracerManager(metaclass=ABCSingletonMeta):input_specs: list[IOSpec] | None = None,pipe_data: dict[str, Any] | None = None,concept_data: list[dict[str, Any]] | None = None,+ description: str | None = None,+ domain_code: str | None = None,) -> tuple[str | None, GraphContext | None]:"""Record the start of a pipe execution.@@ -210,6 +212,8 @@ class GraphTracerManager(metaclass=ABCSingletonMeta):input_specs: Optional list of IOSpec describing the inputs consumed.pipe_data: Optional serialized pipe instance for the pipe registry.concept_data: Optional list of serialized concept dicts for the concept registry.+ description: Optional human-readable pipe description (mirrored onto NodeSpec).+ domain_code: Optional domain code of the pipe (mirrored onto NodeSpec).Returns:Tuple of (node_id, child_graph_context) if tracing is active, (None, None) otherwise.@@ -227,6 +231,8 @@ class GraphTracerManager(metaclass=ABCSingletonMeta):input_specs=input_specs,pipe_data=pipe_data,concept_data=concept_data,+ description=description,+ domain_code=domain_code,)def on_pipe_end_success(diff --git a/pipelex/graph/graph_tracer_protocol.py b/pipelex/graph/graph_tracer_protocol.pyindex 215e17262..4eb69fc90 100644--- a/pipelex/graph/graph_tracer_protocol.py+++ b/pipelex/graph/graph_tracer_protocol.py@@ -60,6 +60,8 @@ class GraphTracerProtocol(Protocol):input_specs: list[IOSpec] | None = None,pipe_data: dict[str, Any] | None = None,concept_data: list[dict[str, Any]] | None = None,+ description: str | None = None,+ domain_code: str | None = None,) -> tuple[str, GraphContext]:"""Record the start of a pipe execution.@@ -72,6 +74,8 @@ class GraphTracerProtocol(Protocol):input_specs: Optional list of IOSpec describing the inputs consumed.pipe_data: Optional serialized pipe instance for the pipe registry.concept_data: Optional list of serialized concept dicts for the concept registry.+ description: Optional human-readable pipe description (mirrored onto NodeSpec).+ domain_code: Optional domain code of the pipe (mirrored onto NodeSpec).Returns:Tuple of (node_id for this pipe, updated GraphContext for children).@@ -261,6 +265,8 @@ class GraphTracerNoOp(GraphTracerProtocol):input_specs: list[IOSpec] | None = None,pipe_data: dict[str, Any] | None = None,concept_data: list[dict[str, Any]] | None = None,+ description: str | None = None,+ domain_code: str | None = None,) -> tuple[str, GraphContext]:node_id = graph_context.make_node_id()child_context = graph_context.copy_for_child(node_id, graph_context.node_sequence + 1)diff --git a/pipelex/graph/graphspec.py b/pipelex/graph/graphspec.pyindex 3cbb02cdc..1980fc06c 100644--- a/pipelex/graph/graphspec.py+++ b/pipelex/graph/graphspec.py@@ -238,6 +238,8 @@ class NodeSpec(BaseModel):kind: NodeKind = Field(strict=False)pipe_code: str | None = Nonepipe_type: str | None = None+ description: str | None = None+ domain_code: str | None = Nonestatus: NodeStatus = Field(strict=False)timing: TimingSpec | None = Nonenode_io: NodeIOSpec = Field(diff --git a/pipelex/graph/reactflow/assets/.graph-ui-version b/pipelex/graph/reactflow/assets/.graph-ui-versiondeleted file mode 100644index f54b24304..000000000--- a/pipelex/graph/reactflow/assets/.graph-ui-version+++ /dev/null@@ -1 +0,0 @@-v0.3.4diff --git a/pipelex/graph/reactflow/assets/__init__.py b/pipelex/graph/reactflow/assets/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/pipelex/graph/reactflow/assets/graph-viewer.css b/pipelex/graph/reactflow/assets/graph-viewer.cssdeleted file mode 100644index 816749487..000000000--- a/pipelex/graph/reactflow/assets/graph-viewer.css+++ /dev/null@@ -1,2055 +0,0 @@-/* this gets exported as style.css and can be used for the default theming */-/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */-.react-flow {- direction: ltr;-- --xy-edge-stroke-default: #b1b1b7;- --xy-edge-stroke-width-default: 1;- --xy-edge-stroke-selected-default: #555;-- --xy-connectionline-stroke-default: #b1b1b7;- --xy-connectionline-stroke-width-default: 1;-- --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);-- --xy-minimap-background-color-default: #fff;- --xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);- --xy-minimap-mask-stroke-color-default: transparent;- --xy-minimap-mask-stroke-width-default: 1;- --xy-minimap-node-background-color-default: #e2e2e2;- --xy-minimap-node-stroke-color-default: transparent;- --xy-minimap-node-stroke-width-default: 2;-- --xy-background-color-default: transparent;- --xy-background-pattern-dots-color-default: #91919a;- --xy-background-pattern-lines-color-default: #eee;- --xy-background-pattern-cross-color-default: #e2e2e2;- background-color: var(--xy-background-color, var(--xy-background-color-default));- --xy-node-color-default: inherit;- --xy-node-border-default: 1px solid #1a192b;- --xy-node-background-color-default: #fff;- --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);- --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);- --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;- --xy-node-border-radius-default: 3px;-- --xy-handle-background-color-default: #1a192b;- --xy-handle-border-color-default: #fff;-- --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);- --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);-- --xy-controls-button-background-color-default: #fefefe;- --xy-controls-button-background-color-hover-default: #f4f4f4;- --xy-controls-button-color-default: inherit;- --xy-controls-button-color-hover-default: inherit;- --xy-controls-button-border-color-default: #eee;- --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);-- --xy-edge-label-background-color-default: #ffffff;- --xy-edge-label-color-default: inherit;- --xy-resize-background-color-default: #3367d9;-}-.react-flow.dark {- --xy-edge-stroke-default: #3e3e3e;- --xy-edge-stroke-width-default: 1;- --xy-edge-stroke-selected-default: #727272;-- --xy-connectionline-stroke-default: #b1b1b7;- --xy-connectionline-stroke-width-default: 1;-- --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);-- --xy-minimap-background-color-default: #141414;- --xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);- --xy-minimap-mask-stroke-color-default: transparent;- --xy-minimap-mask-stroke-width-default: 1;- --xy-minimap-node-background-color-default: #2b2b2b;- --xy-minimap-node-stroke-color-default: transparent;- --xy-minimap-node-stroke-width-default: 2;-- --xy-background-color-default: #141414;- --xy-background-pattern-dots-color-default: #777;- --xy-background-pattern-lines-color-default: #777;- --xy-background-pattern-cross-color-default: #777;- --xy-node-color-default: #f8f8f8;- --xy-node-border-default: 1px solid #3c3c3c;- --xy-node-background-color-default: #1e1e1e;- --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);- --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);- --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;-- --xy-handle-background-color-default: #bebebe;- --xy-handle-border-color-default: #1e1e1e;-- --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);- --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);-- --xy-controls-button-background-color-default: #2b2b2b;- --xy-controls-button-background-color-hover-default: #3e3e3e;- --xy-controls-button-color-default: #f8f8f8;- --xy-controls-button-color-hover-default: #fff;- --xy-controls-button-border-color-default: #5b5b5b;- --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);-- --xy-edge-label-background-color-default: #141414;- --xy-edge-label-color-default: #f8f8f8;-}-.react-flow__background {- background-color: var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));- pointer-events: none;- z-index: -1;-}-.react-flow__container {- position: absolute;- width: 100%;- height: 100%;- top: 0;- left: 0;-}-.react-flow__pane {- z-index: 1;-}-.react-flow__pane.draggable {- cursor: grab;- }-.react-flow__pane.dragging {- cursor: grabbing;- }-.react-flow__pane.selection {- cursor: pointer;- }-.react-flow__viewport {- transform-origin: 0 0;- z-index: 2;- pointer-events: none;-}-.react-flow__renderer {- z-index: 4;-}-.react-flow__selection {- z-index: 6;-}-.react-flow__nodesselection-rect:focus,-.react-flow__nodesselection-rect:focus-visible {- outline: none;-}-.react-flow__edge-path {- stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));- stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));- fill: none;-}-.react-flow__connection-path {- stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));- stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));- fill: none;-}-.react-flow .react-flow__edges {- position: absolute;-}-.react-flow .react-flow__edges svg {- overflow: visible;- position: absolute;- pointer-events: none;- }-.react-flow__edge {- pointer-events: visibleStroke;-}-.react-flow__edge.selectable {- cursor: pointer;- }-.react-flow__edge.animated path {- stroke-dasharray: 5;- animation: dashdraw 0.5s linear infinite;- }-.react-flow__edge.animated path.react-flow__edge-interaction {- stroke-dasharray: none;- animation: none;- }-.react-flow__edge.inactive {- pointer-events: none;- }-.react-flow__edge.selected,- .react-flow__edge:focus,- .react-flow__edge:focus-visible {- outline: none;- }-.react-flow__edge.selected .react-flow__edge-path,- .react-flow__edge.selectable:focus .react-flow__edge-path,- .react-flow__edge.selectable:focus-visible .react-flow__edge-path {- stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));- }-.react-flow__edge-textwrapper {- pointer-events: all;- }-.react-flow__edge .react-flow__edge-text {- pointer-events: none;- -webkit-user-select: none;- -moz-user-select: none;- user-select: none;- }-/* Arrowhead marker styles - use CSS custom properties as default */-.react-flow__arrowhead polyline {- stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));-}-.react-flow__arrowhead polyline.arrowclosed {- fill: var(--xy-edge-stroke, var(--xy-edge-stroke-default));-}-.react-flow__connection {- pointer-events: none;-}-.react-flow__connection .animated {- stroke-dasharray: 5;- animation: dashdraw 0.5s linear infinite;- }-svg.react-flow__connectionline {- z-index: 1001;- overflow: visible;- position: absolute;-}-.react-flow__nodes {- pointer-events: none;- transform-origin: 0 0;-}-.react-flow__node {- position: absolute;- -webkit-user-select: none;- -moz-user-select: none;- user-select: none;- pointer-events: all;- transform-origin: 0 0;- box-sizing: border-box;- cursor: default;-}-.react-flow__node.selectable {- cursor: pointer;- }-.react-flow__node.draggable {- cursor: grab;- pointer-events: all;- }-.react-flow__node.draggable.dragging {- cursor: grabbing;- }-.react-flow__nodesselection {- z-index: 3;- transform-origin: left top;- pointer-events: none;-}-.react-flow__nodesselection-rect {- position: absolute;- pointer-events: all;- cursor: grab;- }-.react-flow__handle {- position: absolute;- pointer-events: none;- min-width: 5px;- min-height: 5px;- width: 6px;- height: 6px;- background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));- border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));- border-radius: 100%;-}-.react-flow__handle.connectingfrom {- pointer-events: all;- }-.react-flow__handle.connectionindicator {- pointer-events: all;- cursor: crosshair;- }-.react-flow__handle-bottom {- top: auto;- left: 50%;- bottom: 0;- transform: translate(-50%, 50%);- }-.react-flow__handle-top {- top: 0;- left: 50%;- transform: translate(-50%, -50%);- }-.react-flow__handle-left {- top: 50%;- left: 0;- transform: translate(-50%, -50%);- }-.react-flow__handle-right {- top: 50%;- right: 0;- transform: translate(50%, -50%);- }-.react-flow__edgeupdater {- cursor: move;- pointer-events: all;-}-.react-flow__pane.selection .react-flow__panel {- pointer-events: none;-}-.react-flow__panel {- position: absolute;- z-index: 5;- margin: 15px;-}-.react-flow__panel.top {- top: 0;- }-.react-flow__panel.bottom {- bottom: 0;- }-.react-flow__panel.top.center, .react-flow__panel.bottom.center {- left: 50%;- transform: translateX(-15px) translateX(-50%);- }-.react-flow__panel.left {- left: 0;- }-.react-flow__panel.right {- right: 0;- }-.react-flow__panel.left.center, .react-flow__panel.right.center {- top: 50%;- transform: translateY(-15px) translateY(-50%);- }-.react-flow__attribution {- font-size: 10px;- background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));- padding: 2px 3px;- margin: 0;-}-.react-flow__attribution a {- text-decoration: none;- color: #999;- }-@keyframes dashdraw {- from {- stroke-dashoffset: 10;- }-}-.react-flow__edgelabel-renderer {- position: absolute;- width: 100%;- height: 100%;- pointer-events: none;- -webkit-user-select: none;- -moz-user-select: none;- user-select: none;- left: 0;- top: 0;-}-.react-flow__viewport-portal {- position: absolute;- width: 100%;- height: 100%;- left: 0;- top: 0;- -webkit-user-select: none;- -moz-user-select: none;- user-select: none;-}-.react-flow__minimap {- background: var(- --xy-minimap-background-color-props,- var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))- );-}-.react-flow__minimap-svg {- display: block;- }-.react-flow__minimap-mask {- fill: var(- --xy-minimap-mask-background-color-props,- var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))- );- stroke: var(- --xy-minimap-mask-stroke-color-props,- var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))- );- stroke-width: var(- --xy-minimap-mask-stroke-width-props,- var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))- );- }-.react-flow__minimap-node {- fill: var(- --xy-minimap-node-background-color-props,- var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))- );- stroke: var(- --xy-minimap-node-stroke-color-props,- var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))- );- stroke-width: var(- --xy-minimap-node-stroke-width-props,- var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))- );- }-.react-flow__background-pattern.dots {- fill: var(- --xy-background-pattern-color-props,- var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))- );- }-.react-flow__background-pattern.lines {- stroke: var(- --xy-background-pattern-color-props,- var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))- );- }-.react-flow__background-pattern.cross {- stroke: var(- --xy-background-pattern-color-props,- var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))- );- }-.react-flow__controls {- display: flex;- flex-direction: column;- box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));-}-.react-flow__controls.horizontal {- flex-direction: row;- }-.react-flow__controls-button {- display: flex;- justify-content: center;- align-items: center;- height: 26px;- width: 26px;- padding: 4px;- border: none;- background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));- border-bottom: 1px solid- var(- --xy-controls-button-border-color-props,- var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))- );- color: var(- --xy-controls-button-color-props,- var(--xy-controls-button-color, var(--xy-controls-button-color-default))- );- cursor: pointer;- -webkit-user-select: none;- -moz-user-select: none;- user-select: none;- }-.react-flow__controls-button svg {- width: 100%;- max-width: 12px;- max-height: 12px;- fill: currentColor;- }-.react-flow__edge.updating .react-flow__edge-path {- stroke: #777;- }-.react-flow__edge-text {- font-size: 10px;- }-.react-flow__node.selectable:focus,- .react-flow__node.selectable:focus-visible {- outline: none;- }-.react-flow__node-input,-.react-flow__node-default,-.react-flow__node-output,-.react-flow__node-group {- padding: 10px;- border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));- width: 150px;- font-size: 12px;- color: var(--xy-node-color, var(--xy-node-color-default));- text-align: center;- border: var(--xy-node-border, var(--xy-node-border-default));- background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));-}-.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {- box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));- }-.react-flow__node-input.selectable.selected,- .react-flow__node-input.selectable:focus,- .react-flow__node-input.selectable:focus-visible,- .react-flow__node-default.selectable.selected,- .react-flow__node-default.selectable:focus,- .react-flow__node-default.selectable:focus-visible,- .react-flow__node-output.selectable.selected,- .react-flow__node-output.selectable:focus,- .react-flow__node-output.selectable:focus-visible,- .react-flow__node-group.selectable.selected,- .react-flow__node-group.selectable:focus,- .react-flow__node-group.selectable:focus-visible {- box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));- }-.react-flow__node-group {- background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));-}-.react-flow__nodesselection-rect,-.react-flow__selection {- background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));- border: var(--xy-selection-border, var(--xy-selection-border-default));-}-.react-flow__nodesselection-rect:focus,- .react-flow__nodesselection-rect:focus-visible,- .react-flow__selection:focus,- .react-flow__selection:focus-visible {- outline: none;- }-.react-flow__controls-button:hover {- background: var(- --xy-controls-button-background-color-hover-props,- var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))- );- color: var(- --xy-controls-button-color-hover-props,- var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))- );- }-.react-flow__controls-button:disabled {- pointer-events: none;- }-.react-flow__controls-button:disabled svg {- fill-opacity: 0.4;- }-.react-flow__controls-button:last-child {- border-bottom: none;- }-.react-flow__controls.horizontal .react-flow__controls-button {- border-bottom: none;- border-right: 1px solid- var(- --xy-controls-button-border-color-props,- var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))- );- }-.react-flow__controls.horizontal .react-flow__controls-button:last-child {- border-right: none;- }-.react-flow__resize-control {- position: absolute;-}-.react-flow__resize-control.left,-.react-flow__resize-control.right {- cursor: ew-resize;-}-.react-flow__resize-control.top,-.react-flow__resize-control.bottom {- cursor: ns-resize;-}-.react-flow__resize-control.top.left,-.react-flow__resize-control.bottom.right {- cursor: nwse-resize;-}-.react-flow__resize-control.bottom.left,-.react-flow__resize-control.top.right {- cursor: nesw-resize;-}-/* handle styles */-.react-flow__resize-control.handle {- width: 5px;- height: 5px;- border: 1px solid #fff;- border-radius: 1px;- background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));- translate: -50% -50%;-}-.react-flow__resize-control.handle.left {- left: 0;- top: 50%;-}-.react-flow__resize-control.handle.right {- left: 100%;- top: 50%;-}-.react-flow__resize-control.handle.top {- left: 50%;- top: 0;-}-.react-flow__resize-control.handle.bottom {- left: 50%;- top: 100%;-}-.react-flow__resize-control.handle.top.left {- left: 0;-}-.react-flow__resize-control.handle.bottom.left {- left: 0;-}-.react-flow__resize-control.handle.top.right {- left: 100%;-}-.react-flow__resize-control.handle.bottom.right {- left: 100%;-}-/* line styles */-.react-flow__resize-control.line {- border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));- border-width: 0;- border-style: solid;-}-.react-flow__resize-control.line.left,-.react-flow__resize-control.line.right {- width: 1px;- transform: translate(-50%, 0);- top: 0;- height: 100%;-}-.react-flow__resize-control.line.left {- left: 0;- border-left-width: 1px;-}-.react-flow__resize-control.line.right {- left: 100%;- border-right-width: 1px;-}-.react-flow__resize-control.line.top,-.react-flow__resize-control.line.bottom {- height: 1px;- transform: translate(0, -50%);- left: 0;- width: 100%;-}-.react-flow__resize-control.line.top {- top: 0;- border-top-width: 1px;-}-.react-flow__resize-control.line.bottom {- border-bottom-width: 1px;- top: 100%;-}-.react-flow__edge-textbg {- fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));-}-.react-flow__edge-text {- fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));-}--/* ReactFlow base styles — resolved by the consumer's bundler */-/* Default theme — consumers can override any var on an ancestor element */-.react-flow-container {- --color-bg: #0a0a0a;- --color-bg-dots: rgba(255, 255, 255, 0.35);- --color-text-muted: #94a3b8;- --color-controller-text: #94a3b8;- --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;- --font-mono: "JetBrains Mono", "Monaco", "Menlo", monospace;- --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);-}-.react-flow-container {- position: absolute;- inset: 0;- background: var(--color-bg);-}-.react-flow__node {- font-family: var(--font-sans);- cursor: pointer;-}-.react-flow__background {- background: var(--color-bg) !important;-}-.react-flow__edge-path {- stroke-width: 2;-}-.react-flow__edge-text {- font-size: 11px;- fill: var(--color-text-muted);-}-.react-flow__edge-textbg {- fill: var(--color-bg);-}-/* Selected node highlight */-.react-flow__node.selected {- box-shadow:- 0 0 0 3px var(--color-accent),- var(--shadow-lg) !important;- z-index: 1000 !important;-}-/* Pipe cards handle their own selection styling — suppress the wrapper outline */-.react-flow__node-pipeCard {- background: transparent !important;- border: none !important;- box-shadow: none !important;- outline: none !important;- padding: 0 !important;-}-.react-flow__node-pipeCard.selected {- box-shadow: none !important;- outline: none !important;-}-.react-flow__node-pipeCard.selected .pipe-card {- box-shadow:- 0 0 0 2px var(--color-accent, #3b82f6),- 0 4px 16px rgba(0, 0, 0, 0.6);-}-.react-flow__node-controllerGroup.selected {- box-shadow:- 0 0 0 2px var(--color-accent),- var(--shadow-lg) !important;-}-.react-flow__node-controllerGroup {- cursor: default !important;-}-/* ─── Controller Group Node ──────────────────────────────────────────── */-.controller-group-node {- --controller-border: 2px dashed rgba(148, 163, 184, 0.3);- --controller-bg: rgba(148, 163, 184, 0.04);- --controller-header-color: #64748b;-- width: 100%;- height: 100%;- position: relative;- border: var(--controller-border);- border-radius: 12px;- background: var(--controller-bg);-}-.controller-group-header {- position: absolute;- top: 0;- left: 0;- right: 0;- display: flex;- align-items: center;- gap: 6px;- padding: 6px 12px;- pointer-events: none;- user-select: none;-}-.controller-group-icon {- font-size: 13px;- color: var(--controller-header-color);- line-height: 1;-}-.controller-group-badge {- font-size: 9px;- font-weight: 700;- text-transform: uppercase;- letter-spacing: 0.06em;- color: var(--controller-header-color);- font-family: var(--font-mono, "JetBrains Mono", monospace);-}-.controller-group-label {- font-size: 11px;- font-family: var(--font-mono, "JetBrains Mono", monospace);- font-weight: 500;- color: var(--color-controller-text, #94a3b8);- white-space: nowrap;- margin-left: auto;-}--/* Collapse / expand toggle for parallel & batch controllers */-.controller-group-collapse {- all: unset;- position: absolute;- bottom: 4px;- right: 8px;- font-size: 10px;- font-family: var(--font-mono, "JetBrains Mono", monospace);- color: var(--controller-header-color, #94a3b8);- cursor: pointer;- padding: 2px 8px;- border-radius: 4px;- border: 1px dashed rgba(255, 255, 255, 0.15);- pointer-events: auto;- z-index: 10;- white-space: nowrap;-}-.controller-group-collapse:hover {- color: #e2e8f0;- border-color: rgba(255, 255, 255, 0.35);- background: rgba(255, 255, 255, 0.05);-}--/* Sequence — solid thin border, calm flow */-.controller-group--sequence {- --controller-border: 1.5px solid rgba(148, 163, 184, 0.25);- --controller-bg: rgba(148, 163, 184, 0.03);- --controller-header-color: #94a3b8;-}--/* Parallel — double border, forking lanes */-.controller-group--parallel {- --controller-border: 3px double rgba(139, 233, 253, 0.35);- --controller-bg: rgba(139, 233, 253, 0.03);- --controller-header-color: #8be9fd;-}--/* Condition — dashed with diamond accent */-.controller-group--condition {- --controller-border: 2px dashed rgba(251, 191, 36, 0.35);- --controller-bg: rgba(251, 191, 36, 0.03);- --controller-header-color: #fbbf24;-}--/* Batch — dotted border, loop/repeat */-.controller-group--batch {- --controller-border: 2px dotted rgba(167, 139, 250, 0.35);- --controller-bg: rgba(167, 139, 250, 0.03);- --controller-header-color: #a78bfa;-}--/* ─── Pipe Card Node ─────────────────────────────────────────────────── */-/* All tokens overridable via CSS custom properties on an ancestor. */-.pipe-card {- --pipe-card-accent: #ff6b6b;- --pipe-card-bg: rgba(148, 163, 184, 0.08);- --pipe-card-text: #e2e8f0;- --pipe-card-text-bright: #f8fafc;- --pipe-card-text-muted: #94a3b8;- --pipe-card-text-dim: #64748b;- --pipe-card-pill-bg: rgba(255, 255, 255, 0.06);- --pipe-card-pill-border: rgba(255, 255, 255, 0.08);- --pipe-card-pill-text: #cbd5e1;- --pipe-card-radius: 8px;-- border-left: 4px solid var(--pipe-card-accent);- border-radius: var(--pipe-card-radius);- padding: 12px 14px;- background: var(--pipe-card-bg);- font-family: var(--font-sans, "Inter", -apple-system, sans-serif);- color: var(--pipe-card-text);- display: flex;- flex-direction: column;- gap: 8px;- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);- transition: box-shadow 0.2s;- /* Fill the ReactFlow wrapper whose size is locked to ELK's layout dimensions */- width: 100%;- height: 100%;- box-sizing: border-box;- overflow: hidden;-}-.pipe-card:hover {- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);-}--/* Direction-aware sizing: LR = narrow + tall, TB = wide + short */-.pipe-card--lr {- min-width: 180px;- max-width: 240px;-}-.pipe-card--tb {- min-width: 280px;- max-width: 400px;-}--/* Header: badge + code + status */-.pipe-card-header {- display: flex;- align-items: center;- gap: 8px;-}-.pipe-card-badge {- font-size: 10px;- font-weight: 700;- text-transform: uppercase;- letter-spacing: 0.04em;- padding: 2px 7px;- border-radius: 4px;- white-space: nowrap;- line-height: 1.4;- background: var(--pipe-card-accent);- color: #0e0e0e;-}-.pipe-card-code {- font-family: var(--font-mono, "JetBrains Mono", monospace);- font-size: 13px;- font-weight: 600;- color: var(--pipe-card-accent);- flex: 1;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}-.pipe-card-status {- display: flex;- align-items: center;- margin-left: auto;- flex-shrink: 0;-}-.pipe-card-status-dot {- width: 8px;- height: 8px;- border-radius: 50%;- display: inline-block;-}-.pipe-card-status-dot--pulse {- animation: pipe-card-pulse 1.5s ease-in-out infinite;-}-@keyframes pipe-card-pulse {- 0%,- 100% {- opacity: 1;- transform: scale(1);- }- 50% {- opacity: 0.5;- transform: scale(1.3);- }-}--/* Description — per-direction clamping. LR gets up to 3 lines (tall/narrow card),- TB gets 1 line (wide card, horizontal layout). Both truncate with ellipsis. */-.pipe-card-description {- font-size: 11.5px;- color: var(--pipe-card-text-muted);- line-height: 1.4;- overflow: hidden;- text-overflow: ellipsis;- min-width: 0;-}-.pipe-card--lr .pipe-card-description {- display: -webkit-box;- -webkit-line-clamp: 3;- -webkit-box-orient: vertical;-}-.pipe-card--tb .pipe-card-description {- white-space: nowrap;-}--/* I/O section — base (appearance only, layout set per-direction below) */-.pipe-card-io-label {- font-size: 9px;- font-weight: 700;- text-transform: uppercase;- letter-spacing: 0.06em;- color: var(--pipe-card-text-dim);- flex-shrink: 0;-}-.pipe-card-io-pills {- display: flex;- gap: 4px;- min-width: 0;-}-.pipe-card-io-pill {- display: inline-flex;- align-items: center;- gap: 3px;- font-size: 10px;- background: var(--pipe-card-pill-bg);- border: 1px solid var(--pipe-card-pill-border);- border-radius: 4px;- padding: 1px 5px;- line-height: 1.4;- min-width: 0;-}-.pipe-card-io-pill-name {- font-family: var(--font-mono, "JetBrains Mono", monospace);- color: var(--pipe-card-pill-text);- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}-.pipe-card-io-pill-concept {- color: var(--pipe-card-text-dim);- font-size: 9px;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}-.pipe-card-io-more {- all: unset;- font-size: 10px;- font-family: var(--font-mono, "JetBrains Mono", monospace);- color: var(--pipe-card-text-muted);- cursor: pointer;- padding: 2px 6px;- border-radius: 4px;- border: 1px dashed rgba(255, 255, 255, 0.12);- white-space: nowrap;- line-height: 1.4;-}-.pipe-card-io-more:hover {- color: var(--pipe-card-text);- border-color: rgba(255, 255, 255, 0.25);-}--/* ─── LR: label on top, pills stacked vertically, hard-truncated ─────── */-/* Truncation priority: concept shrinks first → name truncates last. */-.pipe-card--lr .pipe-card-io {- display: flex;- flex-direction: column;- gap: 4px;-}-.pipe-card--lr .pipe-card-io-pills {- flex-direction: column;- align-items: flex-start; /* pills size to content, not stretch */- gap: 4px;-}-.pipe-card--lr .pipe-card-io-pill {- max-width: 100%;- overflow: hidden;-}-.pipe-card--lr .pipe-card-io-pill-name {- flex: 0 1 auto; /* natural width, shrinks only after concept is gone */- min-width: 30px;-}-.pipe-card--lr .pipe-card-io-pill-concept {- flex: 0 100 auto; /* natural width, shrinks 100x faster than name */- min-width: 0; /* allow shrinking to zero */-}-.pipe-card--lr .pipe-card-io-more {- align-self: flex-start;-}--/* ─── TB: label on the left, pills wrap horizontally to the right ────── */-.pipe-card--tb .pipe-card-io {- display: flex;- flex-direction: row;- align-items: flex-start;- gap: 6px;-}-.pipe-card--tb .pipe-card-io-label {- padding-top: 4px;- min-width: 52px;-}-.pipe-card--tb .pipe-card-io-pills {- flex: 1 1 0;- flex-wrap: wrap;- min-width: 0;-}-.pipe-card--tb .pipe-card-io-pill {- max-width: 100%;-}-.pipe-card--tb .pipe-card-io-pill-name {- max-width: 140px;-}-.pipe-card--tb .pipe-card-io-pill-concept {- max-width: 100px;-}--/* ─── StuffViewer component styles ────────────────────────────────────────── */-/* Uses CSS custom properties for consumer theming. Defaults match graph-core.css. */--.stuff-viewer {- --sv-bg: var(--color-bg, #0a0a0a);- --sv-surface: var(--color-surface, #16213e);- --sv-surface-hover: var(--color-surface-hover, #1f2b47);- --sv-border: var(--color-border, #2a3a5a);- --sv-text: var(--color-text, #e2e8f0);- --sv-text-muted: var(--color-text-muted, #94a3b8);- --sv-accent: var(--color-accent, #3b82f6);- --sv-success: #10b981;- --sv-success-bg: rgba(16, 185, 129, 0.2);- --sv-radius: 4px;- --sv-font-sans: var(- --font-sans,- "Inter",- -apple-system,- BlinkMacSystemFont,- "Segoe UI",- sans-serif- );- --sv-font-mono: var(--font-mono, "JetBrains Mono", "Monaco", "Menlo", monospace);-- font-family: var(--sv-font-sans);- color: var(--sv-text);- display: flex;- flex-direction: column;- height: 100%;-}--/* ─── Header ─────────────────────────────────────────────────────────────── */--.stuff-viewer-header {- display: flex;- flex-direction: column;- gap: 2px;- padding: 12px 16px 8px;- border-bottom: 1px solid var(--sv-border);- flex-shrink: 0;-}--.stuff-viewer-title {- font-size: 14px;- font-weight: 600;- color: var(--sv-text);- margin: 0;-}--.stuff-viewer-subtitle {- font-size: 12px;- color: var(--sv-text-muted);- margin: 0;-}--/* ─── Toolbar: tabs + action buttons ─────────────────────────────────────── */--.stuff-viewer-toolbar {- display: flex;- justify-content: space-between;- align-items: center;- padding: 8px 16px;- gap: 8px;- flex-shrink: 0;-}--.stuff-viewer-tabs {- display: flex;- gap: 4px;-}--.stuff-viewer-tab {- padding: 5px 10px;- border-radius: var(--sv-radius);- cursor: pointer;- font-size: 12px;- font-weight: 500;- background: var(--sv-surface-hover);- color: var(--sv-text-muted);- border: none;- transition:- background 0.15s,- color 0.15s;-}--.stuff-viewer-tab:hover {- background: var(--sv-border);- color: var(--sv-text);-}--.stuff-viewer-tab--active {- background: var(--sv-accent);- color: #fff;-}--/* ─── Action buttons ─────────────────────────────────────────────────────── */--.stuff-viewer-actions {- display: flex;- gap: 4px;-}--.stuff-viewer-action-btn {- display: flex;- align-items: center;- justify-content: center;- width: 28px;- height: 28px;- border-radius: var(--sv-radius);- cursor: pointer;- background: var(--sv-surface-hover);- color: var(--sv-text-muted);- border: none;- transition:- background 0.15s,- color 0.15s;-}--.stuff-viewer-action-btn:hover {- background: var(--sv-border);- color: var(--sv-text);-}--.stuff-viewer-action-btn--copied {- background: var(--sv-success-bg);- color: var(--sv-success);-}--.stuff-viewer-action-btn svg {- width: 14px;- height: 14px;- fill: currentColor;-}--/* ─── Content area ───────────────────────────────────────────────────────── */--.stuff-viewer-content {- flex: 1;- overflow: auto;- padding: 12px 16px 16px;- min-height: 0;-}--/* Pre-formatted text (JSON and Pretty tabs) */-.stuff-viewer-pre {- font-family: var(--sv-font-mono);- font-size: 11px;- line-height: 1.5;- white-space: pre-wrap;- word-wrap: break-word;- margin: 0;- color: var(--sv-text-muted);-}--.stuff-viewer-pre--nowrap {- white-space: pre;- word-wrap: normal;- line-height: 1;- overflow-x: auto;- padding-right: 20px;-}--/* HTML content */-.stuff-viewer-html {- font-family: var(--sv-font-sans);- font-size: 11px;- color: var(--sv-text-muted);- line-height: 1.5;-}--.stuff-viewer-html table {- border-collapse: collapse;- width: 100%;-}--.stuff-viewer-html th,-.stuff-viewer-html td {- border: 1px solid var(--sv-border);- padding: 8px 12px;- text-align: left;-}--.stuff-viewer-html th {- background: var(--sv-surface-hover);- color: var(--sv-text);- font-weight: 600;-}--.stuff-viewer-html tr:hover {- background: var(--sv-surface-hover);-}--.stuff-viewer-html a {- color: var(--sv-accent);- text-decoration: none;-}--.stuff-viewer-html a:hover {- text-decoration: underline;-}--.stuff-viewer-html ul {- list-style: none;- padding-left: 0;- margin: 0;-}--/* PDF embed */-.stuff-viewer-pdf {- min-height: 400px;- height: 100%;-}--.stuff-viewer-pdf embed {- width: 100%;- height: 100%;- min-height: 500px;- border: none;-}--/* Image content */-.stuff-viewer-image {- display: flex;- justify-content: center;- align-items: center;- min-height: 200px;-}--.stuff-viewer-image img {- max-width: 100%;- max-height: 70vh;- object-fit: contain;-}--/* Local file fallback (file:// URLs that can't render inline) */-.stuff-viewer-local-file {- display: flex;- align-items: center;- gap: 12px;- padding: 16px;- border-radius: 6px;- background: var(--sv-surface);- border: 1px solid var(--sv-border);-}--.stuff-viewer-local-file-icon {- flex-shrink: 0;- width: 32px;- height: 32px;- color: var(--sv-text-muted);-}--.stuff-viewer-local-file-icon svg {- width: 100%;- height: 100%;- fill: currentColor;-}--.stuff-viewer-local-file-info {- flex: 1;- min-width: 0;-}--.stuff-viewer-local-file-name {- font-family: var(--sv-font-mono);- font-size: 12px;- color: var(--sv-text);- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}--.stuff-viewer-local-file-hint {- font-size: 11px;- color: var(--sv-text-muted);- margin-top: 2px;-}--/* Placeholder for missing data */-.stuff-viewer-placeholder {- color: var(--sv-text-muted);- font-style: italic;- font-size: 13px;-}--/* ─── Detail Panel — sliding side panel for node inspection ─────────────── */--.detail-panel {- position: absolute;- top: 0;- right: 0;- width: 380px;- height: 100%;- background: #111118;- border-left: 1px solid rgba(255, 255, 255, 0.1);- z-index: 10;- display: flex;- flex-direction: column;- font-family: "Inter", -apple-system, sans-serif;- color: #e2e8f0;- overflow: hidden;- transition: transform 0.2s ease;-}--.detail-panel--closed {- transform: translateX(100%);- pointer-events: none;-}--/* ─── Resize handle — left edge drag target ────────────────────────────── */--.detail-panel-resize-handle {- position: absolute;- top: 0;- left: -6px;- width: 12px;- height: 100%;- cursor: col-resize;- z-index: 2;- background: transparent;-}--/* Visible bar — narrower than the hit area */-.detail-panel-resize-handle::before {- content: "";- position: absolute;- top: 0;- left: 5px;- width: 2px;- height: 100%;- background: transparent;- transition: background 0.15s;-}--.detail-panel-resize-handle:hover::before,-.detail-panel--dragging .detail-panel-resize-handle::before {- background: rgba(59, 130, 246, 0.5);-}--/* Grip indicator — visible on hover */-.detail-panel-resize-handle::after {- content: "";- position: absolute;- top: 50%;- left: 50%;- transform: translate(-50%, -50%);- width: 2px;- height: 24px;- border-radius: 1px;- background: transparent;- transition: background 0.15s;-}--.detail-panel-resize-handle:hover::after,-.detail-panel--dragging .detail-panel-resize-handle::after {- background: rgba(59, 130, 246, 0.8);-}--/* Disable transition during drag for smooth resizing */-.detail-panel--dragging {- transition: none;-}--.detail-panel--dragging .detail-panel-content {- pointer-events: none;-}--.detail-panel-close {- all: unset;- cursor: pointer;- position: absolute;- top: 12px;- right: 12px;- width: 24px;- height: 24px;- display: flex;- align-items: center;- justify-content: center;- border-radius: 4px;- color: #64748b;- font-size: 18px;- line-height: 1;- z-index: 3;-}--.detail-panel-close:hover {- color: #94a3b8;- background: rgba(255, 255, 255, 0.06);-}--.detail-panel-content {- flex: 1;- overflow-y: auto;- padding: 20px 16px;- display: flex;- flex-direction: column;- gap: 16px;-}--/* ─── Sticky header (pipe info + IO stays pinned at top) ───────────────── */--.detail-sticky-header {- position: sticky;- top: -20px;- z-index: 1;- background: #111118;- padding-top: 20px;- margin-top: -20px;- display: flex;- flex-direction: column;- gap: 16px;-}--/* ─── Shared detail components ──────────────────────────────────────────── */--.detail-section-label {- font-size: 9px;- font-weight: 700;- text-transform: uppercase;- letter-spacing: 0.06em;- color: #64748b;- margin-bottom: 6px;-}--.detail-header {- display: flex;- align-items: center;- gap: 8px;-}--.detail-badge {- font-size: 10px;- font-weight: 700;- text-transform: uppercase;- letter-spacing: 0.04em;- padding: 2px 7px;- border-radius: 4px;- white-space: nowrap;-}--.detail-badge--operator {- background: #ff6b6b;- color: #0e0e0e;-}--.detail-badge--controller {- background: #bd93f9;- color: #0e0e0e;-}--.detail-pipe-code {- font-family: "JetBrains Mono", "Monaco", monospace;- font-size: 14px;- font-weight: 600;- color: #ff6b6b;-}--.detail-pipe-code--controller {- color: #bd93f9;-}--.detail-status {- display: flex;- align-items: center;- gap: 8px;-}--.detail-status-dot {- width: 8px;- height: 8px;- border-radius: 50%;- display: inline-block;-}--.detail-status-label {- font-size: 12px;- font-weight: 600;- text-transform: capitalize;-}--.detail-duration {- font-size: 11px;- color: #64748b;- font-family: "JetBrains Mono", "Monaco", monospace;-}--.detail-description {- font-size: 12px;- color: #94a3b8;- line-height: 1.5;-}--/* ─── IO Pills ──────────────────────────────────────────────────────────── */--.detail-io-pill {- display: flex;- align-items: center;- gap: 6px;- font-size: 11px;- padding: 3px 8px;- border-radius: 4px;- background: rgba(255, 255, 255, 0.04);- border: 1px solid rgba(255, 255, 255, 0.06);-}--.detail-io-name {- font-family: "JetBrains Mono", "Monaco", monospace;- color: #e2e8f0;-}--.detail-io-concept {- color: #64748b;- font-size: 10px;-}--.detail-io-list {- display: flex;- flex-direction: column;- gap: 4px;-}--/* ─── Blueprint-specific sections ───────────────────────────────────────── */--.detail-prompt-block {- font-family: "JetBrains Mono", "Monaco", monospace;- font-size: 11px;- color: #94a3b8;- background: rgba(255, 255, 255, 0.03);- border: 1px solid rgba(255, 255, 255, 0.06);- border-radius: 6px;- padding: 10px 12px;- white-space: pre-wrap;- word-break: break-word;- overflow-y: auto;- line-height: 1.5;-}--.detail-prompt-block--collapsed {- max-height: 300px;-}--.detail-prompt-block--expanded {- max-height: none;- overflow-y: visible;-}--.detail-prompt-expand-btn {- all: unset;- cursor: pointer;- display: flex;- align-items: center;- gap: 4px;- font-size: 9px;- color: #64748b;- padding: 2px 6px;- border-radius: 3px;- background: rgba(255, 255, 255, 0.04);- border: 1px solid rgba(255, 255, 255, 0.06);- transition: color 0.15s;-}--.detail-prompt-expand-btn:hover {- color: #94a3b8;-}--.detail-kv-row {- display: flex;- justify-content: space-between;- align-items: flex-start; /* top-align so the label stays next to the first line of a wrapped value */- gap: 12px;- font-size: 11px;- padding: 3px 0;-}--.detail-kv-key {- color: #64748b;- flex-shrink: 0; /* label stays at its natural width */-}--.detail-kv-value {- font-family: "JetBrains Mono", "Monaco", monospace;- color: #e2e8f0;- flex: 1 1 0;- min-width: 0;- text-align: right;- word-break: break-word;- overflow-wrap: anywhere;-}--/* ─── Field block: labeled multi-line text (for long resolved values) ─── */--.detail-field-block {- display: flex;- flex-direction: column;- gap: 4px;-}--.detail-field-block-label {- font-family: "JetBrains Mono", "Monaco", monospace;- font-size: 10px;- color: #64748b;-}--.detail-field-block-value {- font-family: "JetBrains Mono", "Monaco", monospace;- font-size: 11px;- color: #e2e8f0;- background: rgba(255, 255, 255, 0.03);- border: 1px solid rgba(255, 255, 255, 0.06);- border-radius: 6px;- padding: 8px 10px;- white-space: pre-wrap;- word-break: break-word;- overflow-wrap: anywhere;- line-height: 1.5;- max-height: 240px;- overflow-y: auto;-}--/* ─── Nested construct sub-section header ───────────────────────────────── */-/* Rendered before each nested sub-construct's recursive contents. The left- * border + indent provides a visual "branch" cue so the tree structure is- * obvious without needing collapse state. */--.detail-nested-header {- display: flex;- align-items: baseline;- justify-content: space-between;- gap: 8px;- margin-top: 6px;- margin-bottom: 4px;- padding: 4px 0 4px 8px;- border-left: 2px solid rgba(80, 250, 123, 0.35);-}--.detail-nested-header-name {- font-family: "JetBrains Mono", "Monaco", monospace;- font-size: 11px;- font-weight: 600;- color: #e2e8f0;-}--.detail-nested-header-meta {- font-family: "JetBrains Mono", "Monaco", monospace;- font-size: 9px;- color: #64748b;- text-transform: uppercase;- letter-spacing: 0.04em;-}--/* ─── Concept schema table ──────────────────────────────────────────────── */--.detail-schema-table {- width: 100%;- font-size: 11px;- border-collapse: collapse;-}--.detail-schema-table th {- text-align: left;- font-weight: 700;- color: #64748b;- font-size: 9px;- text-transform: uppercase;- letter-spacing: 0.06em;- padding: 4px 6px;- border-bottom: 1px solid rgba(255, 255, 255, 0.08);-}--.detail-schema-table td {- padding: 4px 6px;- border-bottom: 1px solid rgba(255, 255, 255, 0.04);- color: #94a3b8;-}--.detail-schema-field {- font-family: "JetBrains Mono", "Monaco", monospace;- color: #e2e8f0;-}--.detail-schema-type {- color: #8be9fd;-}--.detail-schema-required {- color: #ff6b6b;- font-size: 9px;-}--/* ─── Error section ─────────────────────────────────────────────────────── */--.detail-error {- background: rgba(255, 85, 85, 0.08);- border: 1px solid rgba(255, 85, 85, 0.2);- border-radius: 6px;- padding: 10px 12px;-}--.detail-error-type {- font-size: 12px;- font-weight: 600;- color: #ff5555;- margin-bottom: 4px;-}--.detail-error-message {- font-size: 11px;- color: #94a3b8;- line-height: 1.5;-}--.detail-error-stack {- font-family: "JetBrains Mono", "Monaco", monospace;- font-size: 10px;- color: #64748b;- margin-top: 8px;- max-height: 150px;- overflow-y: auto;- white-space: pre-wrap;- word-break: break-word;-}--/* ─── Steps list (PipeSequence, PipeCondition outcomes) ─────────────────── */--.detail-steps-list {- display: flex;- flex-direction: column;- gap: 4px;-}--.detail-step-item {- display: flex;- align-items: center;- gap: 8px;- font-size: 11px;- padding: 4px 8px;- border-radius: 4px;- background: rgba(255, 255, 255, 0.03);- border: 1px solid rgba(255, 255, 255, 0.06);-}--.detail-step-index {- color: #64748b;- font-size: 10px;- font-weight: 700;- min-width: 16px;-}--.detail-step-code {- font-family: "JetBrains Mono", "Monaco", monospace;- color: #e2e8f0;-}--/* ─── Tags/Metrics ──────────────────────────────────────────────────────── */--.detail-tags {- display: flex;- flex-wrap: wrap;- gap: 4px;-}--.detail-tag {- font-size: 10px;- padding: 2px 6px;- border-radius: 3px;- background: rgba(255, 255, 255, 0.04);- border: 1px solid rgba(255, 255, 255, 0.06);-}--.detail-tag-key {- color: #64748b;-}--.detail-tag-value {- color: #e2e8f0;- font-family: "JetBrains Mono", "Monaco", monospace;-}--/* ─── Concept panel header ──────────────────────────────────────────────── */--.detail-concept-code {- font-family: "JetBrains Mono", "Monaco", monospace;- font-size: 14px;- font-weight: 600;- color: #50fa7b;-}--.detail-concept-domain {- font-size: 11px;- color: #64748b;-}--.detail-refines {- font-size: 11px;- color: #94a3b8;-}--.detail-refines-code {- font-family: "JetBrains Mono", "Monaco", monospace;- color: #8be9fd;-}--/* ─── Not available fallback ────────────────────────────────────────────── */--.detail-not-available {- font-size: 12px;- color: #64748b;- font-style: italic;- padding: 8px 0;-}--/* ─── Standalone GraphViewer chrome (toolbar, theme, layout) ─────────── */--* { box-sizing: border-box; margin: 0; padding: 0; }--html, body {- height: 100%;- overflow: hidden;- font-family: "Inter", -apple-system, sans-serif;-}--/* ─── Theme system ──────────────────────────────────────────────────── */--body[data-theme="dark"], body:not([data-theme]) {- --chrome-bg: #0d1117;- --chrome-surface: #161b22;- --chrome-border: rgba(255,255,255,0.08);- --chrome-text: #e2e8f0;- --chrome-text-muted: #8b949e;- background: #0a0a0f;- color: #e2e8f0;-}--body[data-theme="light"] {- --chrome-bg: #ffffff;- --chrome-surface: #f6f8fa;- --chrome-border: rgba(0,0,0,0.1);- --chrome-text: #1f2328;- --chrome-text-muted: #656d76;- background: #ffffff;- color: #1f2328;-}--@media (prefers-color-scheme: light) {- body[data-theme="system"] {- --chrome-bg: #ffffff;- --chrome-surface: #f6f8fa;- --chrome-border: rgba(0,0,0,0.1);- --chrome-text: #1f2328;- --chrome-text-muted: #656d76;- background: #ffffff;- color: #1f2328;- }-}--@media (prefers-color-scheme: dark) {- body[data-theme="system"] {- --chrome-bg: #0d1117;- --chrome-surface: #161b22;- --chrome-border: rgba(255,255,255,0.08);- --chrome-text: #e2e8f0;- --chrome-text-muted: #8b949e;- background: #0a0a0f;- color: #e2e8f0;- }-}--/* ─── Layout ────────────────────────────────────────────────────────── */--#app-container {- display: flex;- flex-direction: column;- height: 100vh;-}--#root {- flex: 1;- position: relative;- min-height: 0;-}--/* ─── Toolbar ───────────────────────────────────────────────────────── */--.toolbar {- display: flex;- align-items: center;- gap: 8px;- padding: 6px 12px;- background: var(--chrome-surface);- border-bottom: 1px solid var(--chrome-border);- flex-shrink: 0;- z-index: 20;-}--.toolbar-spacer { flex: 1; }--.toolbar-btn {- all: unset;- cursor: pointer;- display: flex;- align-items: center;- justify-content: center;- width: 28px;- height: 28px;- border-radius: 4px;- color: var(--chrome-text-muted);- transition: background 0.15s, color 0.15s;-}--.toolbar-btn:hover {- background: var(--chrome-border);- color: var(--chrome-text);-}--.toolbar-zoom {- display: flex;- gap: 2px;-}--/* Direction toggle */-.direction-icon { display: none; }-.direction-icon.active { display: inline-flex; }--/* Controllers toggle */-.toggle-switch {- display: flex;- align-items: center;- gap: 6px;- cursor: pointer;- font-size: 11px;- color: var(--chrome-text-muted);- user-select: none;-}--.toggle-switch input { display: none; }--.toggle-track {- width: 28px;- height: 16px;- border-radius: 8px;- background: var(--chrome-border);- position: relative;- transition: background 0.15s;-}--.toggle-switch input:checked + .toggle-track {- background: #50FA7B44;-}--.toggle-knob {- position: absolute;- top: 2px;- left: 2px;- width: 12px;- height: 12px;- border-radius: 50%;- background: var(--chrome-text-muted);- transition: left 0.15s, background 0.15s;-}--.toggle-switch input:checked + .toggle-track .toggle-knob {- left: 14px;- background: #50FA7B;-}--.toggle-label {- font-size: 11px;-}--/* Theme toggle */-.theme-btn {- all: unset;- cursor: pointer;- display: flex;- align-items: center;- gap: 4px;- font-size: 10px;- color: var(--chrome-text-muted);- padding: 4px 8px;- border-radius: 4px;- transition: background 0.15s;-}--.theme-btn:hover {- background: var(--chrome-border);-}--.theme-label {- text-transform: capitalize;-}--/* ─── Header branding ───────────────────────────────────────────────── */--.header-brand {- display: flex;- align-items: center;- gap: 8px;-}--.header-logo {- height: 18px;- opacity: 0.7;-}--body[data-theme="dark"] .header-logo.light-logo,-body:not([data-theme]) .header-logo.light-logo {- display: none;-}--body[data-theme="light"] .header-logo.dark-logo {- display: none;-}--body[data-theme="light"] .header-logo.light-logo {- display: inline;-}--@media (prefers-color-scheme: light) {- body[data-theme="system"] .header-logo.dark-logo {- display: none;- }- body[data-theme="system"] .header-logo.light-logo {- display: inline;- }-}--@media (prefers-color-scheme: dark) {- body[data-theme="system"] .header-logo.light-logo {- display: none;- }-}--.header-title {- font-size: 12px;- font-weight: 600;- color: var(--chrome-text-muted);-}diff --git a/pipelex/graph/reactflow/assets/graph-viewer.js b/pipelex/graph/reactflow/assets/graph-viewer.jsdeleted file mode 100644index eb784b535..000000000--- a/pipelex/graph/reactflow/assets/graph-viewer.js+++ /dev/null@@ -1,99 +0,0 @@-"use strict";(()=>{var sT=Object.create;var ng=Object.defineProperty;var cT=Object.getOwnPropertyDescriptor;var fT=Object.getOwnPropertyNames;var dT=Object.getPrototypeOf,pT=Object.prototype.hasOwnProperty;var Bt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var mT=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fT(t))!pT.call(e,i)&&i!==n&&ng(e,i,{get:()=>t[i],enumerable:!(o=cT(t,i))||o.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?sT(dT(e)):{},mT(t||!e||!e.__esModule?ng(n,"default",{value:e,enumerable:!0}):n,e));var pg=Bt(ue=>{"use strict";var zf=Symbol.for("react.transitional.element"),hT=Symbol.for("react.portal"),gT=Symbol.for("react.fragment"),yT=Symbol.for("react.strict_mode"),vT=Symbol.for("react.profiler"),bT=Symbol.for("react.consumer"),ST=Symbol.for("react.context"),xT=Symbol.for("react.forward_ref"),_T=Symbol.for("react.suspense"),ET=Symbol.for("react.memo"),rg=Symbol.for("react.lazy"),TT=Symbol.for("react.activity"),og=Symbol.iterator;function NT(e){return e===null||typeof e!="object"?null:(e=og&&e[og]||e["@@iterator"],typeof e=="function"?e:null)}var ug={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sg=Object.assign,cg={};function ca(e,t,n){this.props=e,this.context=t,this.refs=cg,this.updater=n||ug}ca.prototype.isReactComponent={};ca.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")};ca.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fg(){}fg.prototype=ca.prototype;function Lf(e,t,n){this.props=e,this.context=t,this.refs=cg,this.updater=n||ug}var Bf=Lf.prototype=new fg;Bf.constructor=Lf;sg(Bf,ca.prototype);Bf.isPureReactComponent=!0;var ig=Array.isArray;function Rf(){}var Le={H:null,A:null,T:null,S:null},dg=Object.prototype.hasOwnProperty;function Hf(e,t,n){var o=n.ref;return{$$typeof:zf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function CT(e,t){return Hf(e.type,t,e.props)}function kf(e){return typeof e=="object"&&e!==null&&e.$$typeof===zf}function wT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ag=/\/+/g;function Of(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wT(""+e.key):t.toString(36)}function AT(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Rf,Rf):(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 sa(e,t,n,o,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(a){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case zf:case hT:l=!0;break;case rg:return l=e._init,sa(l(e._payload),t,n,o,i)}}if(l)return i=i(e),l=o===""?"."+Of(e,0):o,ig(i)?(n="",l!=null&&(n=l.replace(ag,"$&/")+"/"),sa(i,t,n,"",function(s){return s})):i!=null&&(kf(i)&&(i=CT(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(ag,"$&/")+"/")+l)),t.push(i)),1;l=0;var r=o===""?".":o+":";if(ig(e))for(var u=0;u<e.length;u++)o=e[u],a=r+Of(o,u),l+=sa(o,t,n,a,i);else if(u=NT(e),typeof u=="function")for(e=u.call(e),u=0;!(o=e.next()).done;)o=o.value,a=r+Of(o,u++),l+=sa(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return sa(AT(e),t,n,o,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function Du(e,t,n){if(e==null)return e;var o=[],i=0;return sa(e,o,"","",function(a){return t.call(n,a,i++)}),o}function DT(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var lg=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},MT={map:Du,forEach:function(e,t,n){Du(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Du(e,function(){t++}),t},toArray:function(e){return Du(e,function(t){return t})||[]},only:function(e){if(!kf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ue.Activity=TT;ue.Children=MT;ue.Component=ca;ue.Fragment=gT;ue.Profiler=vT;ue.PureComponent=Lf;ue.StrictMode=yT;ue.Suspense=_T;ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Le;ue.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Le.H.useMemoCache(e)}};ue.cache=function(e){return function(){return e.apply(null,arguments)}};ue.cacheSignal=function(){return null};ue.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=sg({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!dg.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(o[a]=t[a]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),r=0;r<a;r++)l[r]=arguments[r+2];o.children=l}return Hf(e.type,i,o)};ue.createContext=function(e){return e={$$typeof:ST,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:bT,_context:e},e};ue.createElement=function(e,t,n){var o,i={},a=null;if(t!=null)for(o in t.key!==void 0&&(a=""+t.key),t)dg.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=t[o]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var r=Array(l),u=0;u<l;u++)r[u]=arguments[u+2];i.children=r}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return Hf(e,a,i)};ue.createRef=function(){return{current:null}};ue.forwardRef=function(e){return{$$typeof:xT,render:e}};ue.isValidElement=kf;ue.lazy=function(e){return{$$typeof:rg,_payload:{_status:-1,_result:e},_init:DT}};ue.memo=function(e,t){return{$$typeof:ET,type:e,compare:t===void 0?null:t}};ue.startTransition=function(e){var t=Le.T,n={};Le.T=n;try{var o=e(),i=Le.S;i!==null&&i(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Rf,lg)}catch(a){lg(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Le.T=t}};ue.unstable_useCacheRefresh=function(){return Le.H.useCacheRefresh()};ue.use=function(e){return Le.H.use(e)};ue.useActionState=function(e,t,n){return Le.H.useActionState(e,t,n)};ue.useCallback=function(e,t){return Le.H.useCallback(e,t)};ue.useContext=function(e){return Le.H.useContext(e)};ue.useDebugValue=function(){};ue.useDeferredValue=function(e,t){return Le.H.useDeferredValue(e,t)};ue.useEffect=function(e,t){return Le.H.useEffect(e,t)};ue.useEffectEvent=function(e){return Le.H.useEffectEvent(e)};ue.useId=function(){return Le.H.useId()};ue.useImperativeHandle=function(e,t,n){return Le.H.useImperativeHandle(e,t,n)};ue.useInsertionEffect=function(e,t){return Le.H.useInsertionEffect(e,t)};ue.useLayoutEffect=function(e,t){return Le.H.useLayoutEffect(e,t)};ue.useMemo=function(e,t){return Le.H.useMemo(e,t)};ue.useOptimistic=function(e,t){return Le.H.useOptimistic(e,t)};ue.useReducer=function(e,t,n){return Le.H.useReducer(e,t,n)};ue.useRef=function(e){return Le.H.useRef(e)};ue.useState=function(e){return Le.H.useState(e)};ue.useSyncExternalStore=function(e,t,n){return Le.H.useSyncExternalStore(e,t,n)};ue.useTransition=function(){return Le.H.useTransition()};ue.version="19.2.4"});var Nt=Bt((mz,mg)=>{"use strict";mg.exports=pg()});var Tg=Bt(Ge=>{"use strict";function If(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,i=e[o];if(0<Mu(i,t))e[o]=t,e[n]=i,n=o;else break e}}function Bn(e){return e.length===0?null:e[0]}function Ru(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,i=e.length,a=i>>>1;o<a;){var l=2*(o+1)-1,r=e[l],u=l+1,s=e[u];if(0>Mu(r,n))u<i&&0>Mu(s,r)?(e[o]=s,e[u]=n,o=u):(e[o]=r,e[l]=n,o=l);else if(u<i&&0>Mu(s,n))e[o]=s,e[u]=n,o=u;else break e}}return t}function Mu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Ge.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(hg=performance,Ge.unstable_now=function(){return hg.now()}):(Uf=Date,gg=Uf.now(),Ge.unstable_now=function(){return Uf.now()-gg});var hg,Uf,gg,Qn=[],Mo=[],OT=1,cn=null,Et=3,Vf=!1,Ol=!1,Rl=!1,Yf=!1,bg=typeof setTimeout=="function"?setTimeout:null,Sg=typeof clearTimeout=="function"?clearTimeout:null,yg=typeof setImmediate<"u"?setImmediate:null;function Ou(e){for(var t=Bn(Mo);t!==null;){if(t.callback===null)Ru(Mo);else if(t.startTime<=e)Ru(Mo),t.sortIndex=t.expirationTime,If(Qn,t);else break;t=Bn(Mo)}}function Xf(e){if(Rl=!1,Ou(e),!Ol)if(Bn(Qn)!==null)Ol=!0,da||(da=!0,fa());else{var t=Bn(Mo);t!==null&&qf(Xf,t.startTime-e)}}var da=!1,zl=-1,xg=5,_g=-1;function Eg(){return Yf?!0:!(Ge.unstable_now()-_g<xg)}function Gf(){if(Yf=!1,da){var e=Ge.unstable_now();_g=e;var t=!0;try{e:{Ol=!1,Rl&&(Rl=!1,Sg(zl),zl=-1),Vf=!0;var n=Et;try{t:{for(Ou(e),cn=Bn(Qn);cn!==null&&!(cn.expirationTime>e&&Eg());){var o=cn.callback;if(typeof o=="function"){cn.callback=null,Et=cn.priorityLevel;var i=o(cn.expirationTime<=e);if(e=Ge.unstable_now(),typeof i=="function"){cn.callback=i,Ou(e),t=!0;break t}cn===Bn(Qn)&&Ru(Qn),Ou(e)}else Ru(Qn);cn=Bn(Qn)}if(cn!==null)t=!0;else{var a=Bn(Mo);a!==null&&qf(Xf,a.startTime-e),t=!1}}break e}finally{cn=null,Et=n,Vf=!1}t=void 0}}finally{t?fa():da=!1}}}var fa;typeof yg=="function"?fa=function(){yg(Gf)}:typeof MessageChannel<"u"?(Pf=new MessageChannel,vg=Pf.port2,Pf.port1.onmessage=Gf,fa=function(){vg.postMessage(null)}):fa=function(){bg(Gf,0)};var Pf,vg;function qf(e,t){zl=bg(function(){e(Ge.unstable_now())},t)}Ge.unstable_IdlePriority=5;Ge.unstable_ImmediatePriority=1;Ge.unstable_LowPriority=4;Ge.unstable_NormalPriority=3;Ge.unstable_Profiling=null;Ge.unstable_UserBlockingPriority=2;Ge.unstable_cancelCallback=function(e){e.callback=null};Ge.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xg=0<e?Math.floor(1e3/e):5};Ge.unstable_getCurrentPriorityLevel=function(){return Et};Ge.unstable_next=function(e){switch(Et){case 1:case 2:case 3:var t=3;break;default:t=Et}var n=Et;Et=t;try{return e()}finally{Et=n}};Ge.unstable_requestPaint=function(){Yf=!0};Ge.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Et;Et=e;try{return t()}finally{Et=n}};Ge.unstable_scheduleCallback=function(e,t,n){var o=Ge.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?o+n:o):n=o,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:OT++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,If(Mo,e),Bn(Qn)===null&&e===Bn(Mo)&&(Rl?(Sg(zl),zl=-1):Rl=!0,qf(Xf,n-o))):(e.sortIndex=i,If(Qn,e),Ol||Vf||(Ol=!0,da||(da=!0,fa()))),e};Ge.unstable_shouldYield=Eg;Ge.unstable_wrapCallback=function(e){var t=Et;return function(){var n=Et;Et=t;try{return e.apply(this,arguments)}finally{Et=n}}}});var Cg=Bt((gz,Ng)=>{"use strict";Ng.exports=Tg()});var Ag=Bt(wt=>{"use strict";var RT=Nt();function wg(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Oo(){}var Ct={d:{f:Oo,r:function(){throw Error(wg(522))},D:Oo,C:Oo,L:Oo,m:Oo,X:Oo,S:Oo,M:Oo},p:0,findDOMNode:null},zT=Symbol.for("react.portal");function LT(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zT,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var Ll=RT.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function zu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ct;wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(wg(299));return LT(e,t,null,n)};wt.flushSync=function(e){var t=Ll.T,n=Ct.p;try{if(Ll.T=null,Ct.p=2,e)return e()}finally{Ll.T=t,Ct.p=n,Ct.d.f()}};wt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Ct.d.C(e,t))};wt.prefetchDNS=function(e){typeof e=="string"&&Ct.d.D(e)};wt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=zu(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Ct.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&Ct.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};wt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=zu(t.as,t.crossOrigin);Ct.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Ct.d.M(e)};wt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=zu(n,t.crossOrigin);Ct.d.L(e,n,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};wt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=zu(t.as,t.crossOrigin);Ct.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Ct.d.m(e)};wt.requestFormReset=function(e){Ct.d.r(e)};wt.unstable_batchedUpdates=function(e,t){return e(t)};wt.useFormState=function(e,t,n){return Ll.H.useFormState(e,t,n)};wt.useFormStatus=function(){return Ll.H.useHostTransitionStatus()};wt.version="19.2.4"});var Zf=Bt((vz,Mg)=>{"use strict";function Dg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dg)}catch(e){console.error(e)}}Dg(),Mg.exports=Ag()});var Vb=Bt(ic=>{"use strict";var lt=Cg(),ny=Nt(),BT=Zf();function G(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function oy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Sr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function iy(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ay(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Og(e){if(Sr(e)!==e)throw Error(G(188))}function HT(e){var t=e.alternate;if(!t){if(t=Sr(e),t===null)throw Error(G(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(o=i.return,o!==null){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Og(i),e;if(a===o)return Og(i),t;a=a.sibling}throw Error(G(188))}if(n.return!==o.return)n=i,o=a;else{for(var l=!1,r=i.child;r;){if(r===n){l=!0,n=i,o=a;break}if(r===o){l=!0,o=i,n=a;break}r=r.sibling}if(!l){for(r=a.child;r;){if(r===n){l=!0,n=a,o=i;break}if(r===o){l=!0,o=a,n=i;break}r=r.sibling}if(!l)throw Error(G(189))}}if(n.alternate!==o)throw Error(G(190))}if(n.tag!==3)throw Error(G(188));return n.stateNode.current===n?e:t}function ly(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=ly(e),t!==null)return t;e=e.sibling}return null}var ke=Object.assign,kT=Symbol.for("react.element"),Lu=Symbol.for("react.transitional.element"),Vl=Symbol.for("react.portal"),va=Symbol.for("react.fragment"),ry=Symbol.for("react.strict_mode"),Cd=Symbol.for("react.profiler"),uy=Symbol.for("react.consumer"),no=Symbol.for("react.context"),xp=Symbol.for("react.forward_ref"),wd=Symbol.for("react.suspense"),Ad=Symbol.for("react.suspense_list"),_p=Symbol.for("react.memo"),Ro=Symbol.for("react.lazy"),Dd=Symbol.for("react.activity"),UT=Symbol.for("react.memo_cache_sentinel"),Rg=Symbol.iterator;function Bl(e){return e===null||typeof e!="object"?null:(e=Rg&&e[Rg]||e["@@iterator"],typeof e=="function"?e:null)}var GT=Symbol.for("react.client.reference");function Md(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===GT?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case va:return"Fragment";case Cd:return"Profiler";case ry:return"StrictMode";case wd:return"Suspense";case Ad:return"SuspenseList";case Dd:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Vl:return"Portal";case no:return e.displayName||"Context";case uy:return(e._context.displayName||"Context")+".Consumer";case xp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _p:return t=e.displayName||null,t!==null?t:Md(e.type)||"Memo";case Ro:t=e._payload,e=e._init;try{return Md(e(t))}catch{}}return null}var Yl=Array.isArray,le=ny.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=BT.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ei={pending:!1,data:null,method:null,action:null},Od=[],ba=-1;function Pn(e){return{current:e}}function ft(e){0>ba||(e.current=Od[ba],Od[ba]=null,ba--)}function Re(e,t){ba++,Od[ba]=e.current,e.current=t}var Gn=Pn(null),lr=Pn(null),Yo=Pn(null),ps=Pn(null);function ms(e,t){switch(Re(Yo,t),Re(lr,e),Re(Gn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?G0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=G0(t),e=Ab(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ft(Gn),Re(Gn,e)}function ka(){ft(Gn),ft(lr),ft(Yo)}function Rd(e){e.memoizedState!==null&&Re(ps,e);var t=Gn.current,n=Ab(t,e.type);t!==n&&(Re(lr,e),Re(Gn,n))}function hs(e){lr.current===e&&(ft(Gn),ft(lr)),ps.current===e&&(ft(ps),yr._currentValue=Ei)}var jf,zg;function bi(e){if(jf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);jf=t&&t[1]||"",zg=-1<n.stack.indexOf(`- at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`-`+jf+e+zg}var Qf=!1;function Kf(e,t){if(!e||Qf)return"";Qf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(m){var f=m}Reflect.construct(e,[],d)}else{try{d.call()}catch(m){f=m}e.call(d.prototype)}}else{try{throw Error()}catch(m){f=m}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(m){if(m&&f&&typeof m.stack=="string")return[m.stack,f.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=o.DetermineComponentFrameRoot(),l=a[0],r=a[1];if(l&&r){var u=l.split(`-`),s=r.split(`-`);for(i=o=0;o<u.length&&!u[o].includes("DetermineComponentFrameRoot");)o++;for(;i<s.length&&!s[i].includes("DetermineComponentFrameRoot");)i++;if(o===u.length||i===s.length)for(o=u.length-1,i=s.length-1;1<=o&&0<=i&&u[o]!==s[i];)i--;for(;1<=o&&0<=i;o--,i--)if(u[o]!==s[i]){if(o!==1||i!==1)do if(o--,i--,0>i||u[o]!==s[i]){var c=`-`+u[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=i);break}}}finally{Qf=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?bi(n):""}function PT(e,t){switch(e.tag){case 26:case 27:case 5:return bi(e.type);case 16:return bi("Lazy");case 13:return e.child!==t&&t!==null?bi("Suspense Fallback"):bi("Suspense");case 19:return bi("SuspenseList");case 0:case 15:return Kf(e.type,!1);case 11:return Kf(e.type.render,!1);case 1:return Kf(e.type,!0);case 31:return bi("Activity");default:return""}}function Lg(e){try{var t="",n=null;do t+=PT(e,n),n=e,e=e.return;while(e);return t}catch(o){return`-Error generating stack: `+o.message+`-`+o.stack}}var zd=Object.prototype.hasOwnProperty,Ep=lt.unstable_scheduleCallback,$f=lt.unstable_cancelCallback,IT=lt.unstable_shouldYield,VT=lt.unstable_requestPaint,Wt=lt.unstable_now,YT=lt.unstable_getCurrentPriorityLevel,sy=lt.unstable_ImmediatePriority,cy=lt.unstable_UserBlockingPriority,gs=lt.unstable_NormalPriority,XT=lt.unstable_LowPriority,fy=lt.unstable_IdlePriority,qT=lt.log,ZT=lt.unstable_setDisableYieldValue,xr=null,en=null;function Uo(e){if(typeof qT=="function"&&ZT(e),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(xr,e)}catch{}}var tn=Math.clz32?Math.clz32:KT,jT=Math.log,QT=Math.LN2;function KT(e){return e>>>=0,e===0?32:31-(jT(e)/QT|0)|0}var Bu=256,Hu=262144,ku=4194304;function Si(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 Vs(e,t,n){var o=e.pendingLanes;if(o===0)return 0;var i=0,a=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var r=o&134217727;return r!==0?(o=r&~a,o!==0?i=Si(o):(l&=r,l!==0?i=Si(l):n||(n=r&~e,n!==0&&(i=Si(n))))):(r=o&~a,r!==0?i=Si(r):l!==0?i=Si(l):n||(n=o&~e,n!==0&&(i=Si(n)))),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:i}function _r(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $T(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 dy(){var e=ku;return ku<<=1,(ku&62914560)===0&&(ku=4194304),e}function Ff(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Er(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function FT(e,t,n,o,i,a){var l=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 r=e.entanglements,u=e.expirationTimes,s=e.hiddenUpdates;for(n=l&~n;0<n;){var c=31-tn(n),d=1<<c;r[c]=0,u[c]=-1;var f=s[c];if(f!==null)for(s[c]=null,c=0;c<f.length;c++){var m=f[c];m!==null&&(m.lane&=-536870913)}n&=~d}o!==0&&py(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(l&~t))}function py(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-tn(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function my(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-tn(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function hy(e,t){var n=t&-t;return n=(n&42)!==0?1:Tp(n),(n&(e.suspendedLanes|t))!==0?0:n}function Tp(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Np(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function gy(){var e=Ee.p;return e!==0?e:(e=window.event,e===void 0?32:Gb(e.type))}function Bg(e,t){var n=Ee.p;try{return Ee.p=e,t()}finally{Ee.p=n}}var ni=Math.random().toString(36).slice(2),ht="__reactFiber$"+ni,It="__reactProps$"+ni,Qa="__reactContainer$"+ni,Ld="__reactEvents$"+ni,JT="__reactListeners$"+ni,WT="__reactHandles$"+ni,Hg="__reactResources$"+ni,Tr="__reactMarker$"+ni;function Cp(e){delete e[ht],delete e[It],delete e[Ld],delete e[JT],delete e[WT]}function Sa(e){var t=e[ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qa]||n[ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=X0(e);e!==null;){if(n=e[ht])return n;e=X0(e)}return t}e=n,n=e.parentNode}return null}function Ka(e){if(e=e[ht]||e[Qa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Xl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(G(33))}function Ma(e){var t=e[Hg];return t||(t=e[Hg]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[Tr]=!0}var yy=new Set,vy={};function zi(e,t){Ua(e,t),Ua(e+"Capture",t)}function Ua(e,t){for(vy[e]=t,e=0;e<t.length;e++)yy.add(t[e])}var eN=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),kg={},Ug={};function tN(e){return zd.call(Ug,e)?!0:zd.call(kg,e)?!1:eN.test(e)?Ug[e]=!0:(kg[e]=!0,!1)}function Ju(e,t,n){if(tN(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Uu(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Kn(e,t,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+o)}}function dn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function by(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nN(e,t,n){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var i=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){n=""+l,a.call(this,l)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bd(e){if(!e._valueTracker){var t=by(e)?"checked":"value";e._valueTracker=nN(e,t,""+e[t])}}function Sy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=by(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function ys(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var oN=/[\n"\\]/g;function hn(e){return e.replace(oN,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Hd(e,t,n,o,i,a,l,r){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+dn(t)):e.value!==""+dn(t)&&(e.value=""+dn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?kd(e,l,dn(t)):n!=null?kd(e,l,dn(n)):o!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+dn(r):e.removeAttribute("name")}function xy(e,t,n,o,i,a,l,r){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Bd(e);return}n=n!=null?""+dn(n):"",t=t!=null?""+dn(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}o=o??i,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=r?e.checked:!!o,e.defaultChecked=!!o,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Bd(e)}function kd(e,t,n){t==="number"&&ys(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Oa(e,t,n,o){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&o&&(e[n].defaultSelected=!0)}else{for(n=""+dn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function _y(e,t,n){if(t!=null&&(t=""+dn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+dn(n):""}function Ey(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(G(92));if(Yl(o)){if(1<o.length)throw Error(G(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=dn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),Bd(e)}function Ga(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var iN=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Gg(e,t,n){var o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n!="number"||n===0||iN.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ty(e,t,n){if(t!=null&&typeof t!="object")throw Error(G(62));if(e=e.style,n!=null){for(var o in n)!n.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&Gg(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&Gg(e,a,t[a])}function wp(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var aN=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),lN=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Wu(e){return lN.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function oo(){}var Ud=null;function Ap(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xa=null,Ra=null;function Pg(e){var t=Ka(e);if(t&&(e=t.stateNode)){var n=e[It]||null;e:switch(e=t.stateNode,t.type){case"input":if(Hd(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+hn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[It]||null;if(!i)throw Error(G(90));Hd(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)o=n[t],o.form===e.form&&Sy(o)}break e;case"textarea":_y(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Oa(e,!!n.multiple,t,!1)}}}var Jf=!1;function Ny(e,t,n){if(Jf)return e(t,n);Jf=!0;try{var o=e(t);return o}finally{if(Jf=!1,(xa!==null||Ra!==null)&&(ec(),xa&&(t=xa,e=Ra,Ra=xa=null,Pg(t),e)))for(t=0;t<e.length;t++)Pg(e[t])}}function rr(e,t){var n=e.stateNode;if(n===null)return null;var o=n[It]||null;if(o===null)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(G(231,t,typeof n));return n}var uo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gd=!1;if(uo)try{pa={},Object.defineProperty(pa,"passive",{get:function(){Gd=!0}}),window.addEventListener("test",pa,pa),window.removeEventListener("test",pa,pa)}catch{Gd=!1}var pa,Go=null,Dp=null,es=null;function Cy(){if(es)return es;var e,t=Dp,n=t.length,o,i="value"in Go?Go.value:Go.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(o=1;o<=l&&t[n-o]===i[a-o];o++);return es=i.slice(e,1<o?1-o:void 0)}function ts(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Gu(){return!0}function Ig(){return!1}function Vt(e){function t(n,o,i,a,l){this._reactName=n,this._targetInst=i,this.type=o,this.nativeEvent=a,this.target=l,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(a):a[r]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Gu:Ig,this.isPropagationStopped=Ig,this}return ke(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Gu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gu)},persist:function(){},isPersistent:Gu}),t}var Li={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ys=Vt(Li),Nr=ke({},Li,{view:0,detail:0}),rN=Vt(Nr),Wf,ed,Hl,Xs=ke({},Nr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Hl&&(Hl&&e.type==="mousemove"?(Wf=e.screenX-Hl.screenX,ed=e.screenY-Hl.screenY):ed=Wf=0,Hl=e),Wf)},movementY:function(e){return"movementY"in e?e.movementY:ed}}),Vg=Vt(Xs),uN=ke({},Xs,{dataTransfer:0}),sN=Vt(uN),cN=ke({},Nr,{relatedTarget:0}),td=Vt(cN),fN=ke({},Li,{animationName:0,elapsedTime:0,pseudoElement:0}),dN=Vt(fN),pN=ke({},Li,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mN=Vt(pN),hN=ke({},Li,{data:0}),Yg=Vt(hN),gN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yN={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},vN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vN[e])?!!t[e]:!1}function Mp(){return bN}var SN=ke({},Nr,{key:function(e){if(e.key){var t=gN[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ts(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mp,charCode:function(e){return e.type==="keypress"?ts(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ts(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xN=Vt(SN),_N=ke({},Xs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xg=Vt(_N),EN=ke({},Nr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mp}),TN=Vt(EN),NN=ke({},Li,{propertyName:0,elapsedTime:0,pseudoElement:0}),CN=Vt(NN),wN=ke({},Xs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),AN=Vt(wN),DN=ke({},Li,{newState:0,oldState:0}),MN=Vt(DN),ON=[9,13,27,32],Op=uo&&"CompositionEvent"in window,jl=null;uo&&"documentMode"in document&&(jl=document.documentMode);var RN=uo&&"TextEvent"in window&&!jl,wy=uo&&(!Op||jl&&8<jl&&11>=jl),qg=" ",Zg=!1;function Ay(e,t){switch(e){case"keyup":return ON.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _a=!1;function zN(e,t){switch(e){case"compositionend":return Dy(t);case"keypress":return t.which!==32?null:(Zg=!0,qg);case"textInput":return e=t.data,e===qg&&Zg?null:e;default:return null}}function LN(e,t){if(_a)return e==="compositionend"||!Op&&Ay(e,t)?(e=Cy(),es=Dp=Go=null,_a=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return wy&&t.locale!=="ko"?null:t.data;default:return null}}var BN={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function jg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!BN[e.type]:t==="textarea"}function My(e,t,n,o){xa?Ra?Ra.push(o):Ra=[o]:xa=o,t=Bs(t,"onChange"),0<t.length&&(n=new Ys("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Ql=null,ur=null;function HN(e){Nb(e,0)}function qs(e){var t=Xl(e);if(Sy(t))return e}function Qg(e,t){if(e==="change")return t}var Oy=!1;uo&&(uo?(Iu="oninput"in document,Iu||(nd=document.createElement("div"),nd.setAttribute("oninput","return;"),Iu=typeof nd.oninput=="function"),Pu=Iu):Pu=!1,Oy=Pu&&(!document.documentMode||9<document.documentMode));var Pu,Iu,nd;function Kg(){Ql&&(Ql.detachEvent("onpropertychange",Ry),ur=Ql=null)}function Ry(e){if(e.propertyName==="value"&&qs(ur)){var t=[];My(t,ur,e,Ap(e)),Ny(HN,t)}}function kN(e,t,n){e==="focusin"?(Kg(),Ql=t,ur=n,Ql.attachEvent("onpropertychange",Ry)):e==="focusout"&&Kg()}function UN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qs(ur)}function GN(e,t){if(e==="click")return qs(t)}function PN(e,t){if(e==="input"||e==="change")return qs(t)}function IN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var on=typeof Object.is=="function"?Object.is:IN;function sr(e,t){if(on(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var i=n[o];if(!zd.call(t,i)||!on(e[i],t[i]))return!1}return!0}function $g(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fg(e,t){var n=$g(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$g(n)}}function zy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ly(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ys(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=ys(e.document)}return t}function Rp(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 VN=uo&&"documentMode"in document&&11>=document.documentMode,Ea=null,Pd=null,Kl=null,Id=!1;function Jg(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Id||Ea==null||Ea!==ys(o)||(o=Ea,"selectionStart"in o&&Rp(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Kl&&sr(Kl,o)||(Kl=o,o=Bs(Pd,"onSelect"),0<o.length&&(t=new Ys("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=Ea)))}function vi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ta={animationend:vi("Animation","AnimationEnd"),animationiteration:vi("Animation","AnimationIteration"),animationstart:vi("Animation","AnimationStart"),transitionrun:vi("Transition","TransitionRun"),transitionstart:vi("Transition","TransitionStart"),transitioncancel:vi("Transition","TransitionCancel"),transitionend:vi("Transition","TransitionEnd")},od={},By={};uo&&(By=document.createElement("div").style,"AnimationEvent"in window||(delete Ta.animationend.animation,delete Ta.animationiteration.animation,delete Ta.animationstart.animation),"TransitionEvent"in window||delete Ta.transitionend.transition);function Bi(e){if(od[e])return od[e];if(!Ta[e])return e;var t=Ta[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in By)return od[e]=t[n];return e}var Hy=Bi("animationend"),ky=Bi("animationiteration"),Uy=Bi("animationstart"),YN=Bi("transitionrun"),XN=Bi("transitionstart"),qN=Bi("transitioncancel"),Gy=Bi("transitionend"),Py=new Map,Vd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Vd.push("scrollEnd");function Dn(e,t){Py.set(e,t),zi(t,[e])}var vs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},fn=[],Na=0,zp=0;function Zs(){for(var e=Na,t=zp=Na=0;t<e;){var n=fn[t];fn[t++]=null;var o=fn[t];fn[t++]=null;var i=fn[t];fn[t++]=null;var a=fn[t];if(fn[t++]=null,o!==null&&i!==null){var l=o.pending;l===null?i.next=i:(i.next=l.next,l.next=i),o.pending=i}a!==0&&Iy(n,i,a)}}function js(e,t,n,o){fn[Na++]=e,fn[Na++]=t,fn[Na++]=n,fn[Na++]=o,zp|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Lp(e,t,n,o){return js(e,t,n,o),bs(e)}function Hi(e,t){return js(e,null,null,t),bs(e)}function Iy(e,t,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,o=a.alternate,o!==null&&(o.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-tn(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function bs(e){if(50<ir)throw ir=0,sp=null,Error(G(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ca={};function ZN(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,t,n,o){return new ZN(e,t,n,o)}function Bp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ao(e,t){var n=e.alternate;return n===null?(n=Ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Vy(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ns(e,t,n,o,i,a){var l=0;if(o=e,typeof e=="function")Bp(e)&&(l=1);else if(typeof e=="string")l=KC(e,n,Gn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Dd:return e=Ft(31,n,t,i),e.elementType=Dd,e.lanes=a,e;case va:return Ti(n.children,i,a,t);case ry:l=8,i|=24;break;case Cd:return e=Ft(12,n,t,i|2),e.elementType=Cd,e.lanes=a,e;case wd:return e=Ft(13,n,t,i),e.elementType=wd,e.lanes=a,e;case Ad:return e=Ft(19,n,t,i),e.elementType=Ad,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case no:l=10;break e;case uy:l=9;break e;case xp:l=11;break e;case _p:l=14;break e;case Ro:l=16,o=null;break e}l=29,n=Error(G(130,e===null?"null":typeof e,"")),o=null}return t=Ft(l,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function Ti(e,t,n,o){return e=Ft(7,e,o,t),e.lanes=n,e}function id(e,t,n){return e=Ft(6,e,null,t),e.lanes=n,e}function Yy(e){var t=Ft(18,null,null,0);return t.stateNode=e,t}function ad(e,t,n){return t=Ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wg=new WeakMap;function gn(e,t){if(typeof e=="object"&&e!==null){var n=Wg.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Lg(t)},Wg.set(e,t),t)}return{value:e,source:t,stack:Lg(t)}}var wa=[],Aa=0,Ss=null,cr=0,pn=[],mn=0,Jo=null,Hn=1,kn="";function eo(e,t){wa[Aa++]=cr,wa[Aa++]=Ss,Ss=e,cr=t}function Xy(e,t,n){pn[mn++]=Hn,pn[mn++]=kn,pn[mn++]=Jo,Jo=e;var o=Hn;e=kn;var i=32-tn(o)-1;o&=~(1<<i),n+=1;var a=32-tn(t)+i;if(30<a){var l=i-i%5;a=(o&(1<<l)-1).toString(32),o>>=l,i-=l,Hn=1<<32-tn(t)+i|n<<i|o,kn=a+e}else Hn=1<<a|n<<i|o,kn=e}function Hp(e){e.return!==null&&(eo(e,1),Xy(e,1,0))}function kp(e){for(;e===Ss;)Ss=wa[--Aa],wa[Aa]=null,cr=wa[--Aa],wa[Aa]=null;for(;e===Jo;)Jo=pn[--mn],pn[mn]=null,kn=pn[--mn],pn[mn]=null,Hn=pn[--mn],pn[mn]=null}function qy(e,t){pn[mn++]=Hn,pn[mn++]=kn,pn[mn++]=Jo,Hn=t.id,kn=t.overflow,Jo=e}var gt=null,He=null,be=!1,Xo=null,yn=!1,Yd=Error(G(519));function Wo(e){var t=Error(G(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fr(gn(t,e)),Yd}function e0(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[ht]=e,t[It]=o,n){case"dialog":ge("cancel",t),ge("close",t);break;case"iframe":case"object":case"embed":ge("load",t);break;case"video":case"audio":for(n=0;n<hr.length;n++)ge(hr[n],t);break;case"source":ge("error",t);break;case"img":case"image":case"link":ge("error",t),ge("load",t);break;case"details":ge("toggle",t);break;case"input":ge("invalid",t),xy(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":ge("invalid",t);break;case"textarea":ge("invalid",t),Ey(t,o.value,o.defaultValue,o.children)}n=o.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||o.suppressHydrationWarning===!0||wb(t.textContent,n)?(o.popover!=null&&(ge("beforetoggle",t),ge("toggle",t)),o.onScroll!=null&&ge("scroll",t),o.onScrollEnd!=null&&ge("scrollend",t),o.onClick!=null&&(t.onclick=oo),t=!0):t=!1,t||Wo(e,!0)}function t0(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:gt=gt.return}}function ma(e){if(e!==gt)return!1;if(!be)return t0(e),be=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||mp(e.type,e.memoizedProps)),n=!n),n&&He&&Wo(e),t0(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));He=Y0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));He=Y0(e)}else t===27?(t=He,oi(e.type)?(e=vp,vp=null,He=e):He=t):He=gt?bn(e.stateNode.nextSibling):null;return!0}function Ai(){He=gt=null,be=!1}function ld(){var e=Xo;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),Xo=null),e}function fr(e){Xo===null?Xo=[e]:Xo.push(e)}var Xd=Pn(null),ki=null,io=null;function Lo(e,t,n){Re(Xd,t._currentValue),t._currentValue=n}function lo(e){e._currentValue=Xd.current,ft(Xd)}function qd(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function Zd(e,t,n,o){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var l=i.child;a=a.firstContext;e:for(;a!==null;){var r=a;a=i;for(var u=0;u<t.length;u++)if(r.context===t[u]){a.lanes|=n,r=a.alternate,r!==null&&(r.lanes|=n),qd(a.return,n,e),o||(l=null);break e}a=r.next}}else if(i.tag===18){if(l=i.return,l===null)throw Error(G(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),qd(l,n,e),l=null}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===e){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}}function $a(e,t,n,o){e=null;for(var i=t,a=!1;i!==null;){if(!a){if((i.flags&524288)!==0)a=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var l=i.alternate;if(l===null)throw Error(G(387));if(l=l.memoizedProps,l!==null){var r=i.type;on(i.pendingProps.value,l.value)||(e!==null?e.push(r):e=[r])}}else if(i===ps.current){if(l=i.alternate,l===null)throw Error(G(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(yr):e=[yr])}i=i.return}e!==null&&Zd(t,e,n,o),t.flags|=262144}function xs(e){for(e=e.firstContext;e!==null;){if(!on(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Di(e){ki=e,io=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function yt(e){return Zy(ki,e)}function Vu(e,t){return ki===null&&Di(e),Zy(e,t)}function Zy(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},io===null){if(e===null)throw Error(G(308));io=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else io=io.next=t;return n}var jN=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},QN=lt.unstable_scheduleCallback,KN=lt.unstable_NormalPriority,tt={$$typeof:no,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Up(){return{controller:new jN,data:new Map,refCount:0}}function Cr(e){e.refCount--,e.refCount===0&&QN(KN,function(){e.controller.abort()})}var $l=null,jd=0,Pa=0,za=null;function $N(e,t){if($l===null){var n=$l=[];jd=0,Pa=sm(),za={status:"pending",value:void 0,then:function(o){n.push(o)}}}return jd++,t.then(n0,n0),t}function n0(){if(--jd===0&&$l!==null){za!==null&&(za.status="fulfilled");var e=$l;$l=null,Pa=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function FN(e,t){var n=[],o={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(o.status="rejected",o.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),o}var o0=le.S;le.S=function(e,t){lb=Wt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&$N(e,t),o0!==null&&o0(e,t)};var Ni=Pn(null);function Gp(){var e=Ni.current;return e!==null?e:Oe.pooledCache}function os(e,t){t===null?Re(Ni,Ni.current):Re(Ni,t.pool)}function jy(){var e=Gp();return e===null?null:{parent:tt._currentValue,pool:e}}var Fa=Error(G(460)),Pp=Error(G(474)),Qs=Error(G(542)),_s={then:function(){}};function i0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qy(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(oo,oo),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,l0(e),e;default:if(typeof t.status=="string")t.then(oo,oo);else{if(e=Oe,e!==null&&100<e.shellSuspendCounter)throw Error(G(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=o}},function(o){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,l0(e),e}throw Ci=t,Fa}}function xi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ci=n,Fa):n}}var Ci=null;function a0(){if(Ci===null)throw Error(G(459));var e=Ci;return Ci=null,e}function l0(e){if(e===Fa||e===Qs)throw Error(G(483))}var La=null,dr=0;function Yu(e){var t=dr;return dr+=1,La===null&&(La=[]),Qy(La,e,t)}function kl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xu(e,t){throw t.$$typeof===kT?Error(G(525)):(e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ky(e){function t(h,y){if(e){var p=h.deletions;p===null?(h.deletions=[y],h.flags|=16):p.push(y)}}function n(h,y){if(!e)return null;for(;y!==null;)t(h,y),y=y.sibling;return null}function o(h){for(var y=new Map;h!==null;)h.key!==null?y.set(h.key,h):y.set(h.index,h),h=h.sibling;return y}function i(h,y){return h=ao(h,y),h.index=0,h.sibling=null,h}function a(h,y,p){return h.index=p,e?(p=h.alternate,p!==null?(p=p.index,p<y?(h.flags|=67108866,y):p):(h.flags|=67108866,y)):(h.flags|=1048576,y)}function l(h){return e&&h.alternate===null&&(h.flags|=67108866),h}function r(h,y,p,v){return y===null||y.tag!==6?(y=id(p,h.mode,v),y.return=h,y):(y=i(y,p),y.return=h,y)}function u(h,y,p,v){var x=p.type;return x===va?c(h,y,p.props.children,v,p.key):y!==null&&(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ro&&xi(x)===y.type)?(y=i(y,p.props),kl(y,p),y.return=h,y):(y=ns(p.type,p.key,p.props,null,h.mode,v),kl(y,p),y.return=h,y)}function s(h,y,p,v){return y===null||y.tag!==4||y.stateNode.containerInfo!==p.containerInfo||y.stateNode.implementation!==p.implementation?(y=ad(p,h.mode,v),y.return=h,y):(y=i(y,p.children||[]),y.return=h,y)}function c(h,y,p,v,x){return y===null||y.tag!==7?(y=Ti(p,h.mode,v,x),y.return=h,y):(y=i(y,p),y.return=h,y)}function d(h,y,p){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=id(""+y,h.mode,p),y.return=h,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Lu:return p=ns(y.type,y.key,y.props,null,h.mode,p),kl(p,y),p.return=h,p;case Vl:return y=ad(y,h.mode,p),y.return=h,y;case Ro:return y=xi(y),d(h,y,p)}if(Yl(y)||Bl(y))return y=Ti(y,h.mode,p,null),y.return=h,y;if(typeof y.then=="function")return d(h,Yu(y),p);if(y.$$typeof===no)return d(h,Vu(h,y),p);Xu(h,y)}return null}function f(h,y,p,v){var x=y!==null?y.key:null;if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return x!==null?null:r(h,y,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Lu:return p.key===x?u(h,y,p,v):null;case Vl:return p.key===x?s(h,y,p,v):null;case Ro:return p=xi(p),f(h,y,p,v)}if(Yl(p)||Bl(p))return x!==null?null:c(h,y,p,v,null);if(typeof p.then=="function")return f(h,y,Yu(p),v);if(p.$$typeof===no)return f(h,y,Vu(h,p),v);Xu(h,p)}return null}function m(h,y,p,v,x){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return h=h.get(p)||null,r(y,h,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Lu:return h=h.get(v.key===null?p:v.key)||null,u(y,h,v,x);case Vl:return h=h.get(v.key===null?p:v.key)||null,s(y,h,v,x);case Ro:return v=xi(v),m(h,y,p,v,x)}if(Yl(v)||Bl(v))return h=h.get(p)||null,c(y,h,v,x,null);if(typeof v.then=="function")return m(h,y,p,Yu(v),x);if(v.$$typeof===no)return m(h,y,p,Vu(y,v),x);Xu(y,v)}return null}function g(h,y,p,v){for(var x=null,T=null,E=y,N=y=0,w=null;E!==null&&N<p.length;N++){E.index>N?(w=E,E=null):w=E.sibling;var k=f(h,E,p[N],v);if(k===null){E===null&&(E=w);break}e&&E&&k.alternate===null&&t(h,E),y=a(k,y,N),T===null?x=k:T.sibling=k,T=k,E=w}if(N===p.length)return n(h,E),be&&eo(h,N),x;if(E===null){for(;N<p.length;N++)E=d(h,p[N],v),E!==null&&(y=a(E,y,N),T===null?x=E:T.sibling=E,T=E);return be&&eo(h,N),x}for(E=o(E);N<p.length;N++)w=m(E,h,N,p[N],v),w!==null&&(e&&w.alternate!==null&&E.delete(w.key===null?N:w.key),y=a(w,y,N),T===null?x=w:T.sibling=w,T=w);return e&&E.forEach(function(A){return t(h,A)}),be&&eo(h,N),x}function b(h,y,p,v){if(p==null)throw Error(G(151));for(var x=null,T=null,E=y,N=y=0,w=null,k=p.next();E!==null&&!k.done;N++,k=p.next()){E.index>N?(w=E,E=null):w=E.sibling;var A=f(h,E,k.value,v);if(A===null){E===null&&(E=w);break}e&&E&&A.alternate===null&&t(h,E),y=a(A,y,N),T===null?x=A:T.sibling=A,T=A,E=w}if(k.done)return n(h,E),be&&eo(h,N),x;if(E===null){for(;!k.done;N++,k=p.next())k=d(h,k.value,v),k!==null&&(y=a(k,y,N),T===null?x=k:T.sibling=k,T=k);return be&&eo(h,N),x}for(E=o(E);!k.done;N++,k=p.next())k=m(E,h,N,k.value,v),k!==null&&(e&&k.alternate!==null&&E.delete(k.key===null?N:k.key),y=a(k,y,N),T===null?x=k:T.sibling=k,T=k);return e&&E.forEach(function(z){return t(h,z)}),be&&eo(h,N),x}function S(h,y,p,v){if(typeof p=="object"&&p!==null&&p.type===va&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Lu:e:{for(var x=p.key;y!==null;){if(y.key===x){if(x=p.type,x===va){if(y.tag===7){n(h,y.sibling),v=i(y,p.props.children),v.return=h,h=v;break e}}else if(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ro&&xi(x)===y.type){n(h,y.sibling),v=i(y,p.props),kl(v,p),v.return=h,h=v;break e}n(h,y);break}else t(h,y);y=y.sibling}p.type===va?(v=Ti(p.props.children,h.mode,v,p.key),v.return=h,h=v):(v=ns(p.type,p.key,p.props,null,h.mode,v),kl(v,p),v.return=h,h=v)}return l(h);case Vl:e:{for(x=p.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===p.containerInfo&&y.stateNode.implementation===p.implementation){n(h,y.sibling),v=i(y,p.children||[]),v.return=h,h=v;break e}else{n(h,y);break}else t(h,y);y=y.sibling}v=ad(p,h.mode,v),v.return=h,h=v}return l(h);case Ro:return p=xi(p),S(h,y,p,v)}if(Yl(p))return g(h,y,p,v);if(Bl(p)){if(x=Bl(p),typeof x!="function")throw Error(G(150));return p=x.call(p),b(h,y,p,v)}if(typeof p.then=="function")return S(h,y,Yu(p),v);if(p.$$typeof===no)return S(h,y,Vu(h,p),v);Xu(h,p)}return typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint"?(p=""+p,y!==null&&y.tag===6?(n(h,y.sibling),v=i(y,p),v.return=h,h=v):(n(h,y),v=id(p,h.mode,v),v.return=h,h=v),l(h)):n(h,y)}return function(h,y,p,v){try{dr=0;var x=S(h,y,p,v);return La=null,x}catch(E){if(E===Fa||E===Qs)throw E;var T=Ft(29,E,null,h.mode);return T.lanes=v,T.return=h,T}}}var Mi=Ky(!0),$y=Ky(!1),zo=!1;function Ip(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qd(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 qo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Zo(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(_e&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=bs(e),Iy(e,null,n),t}return js(e,o,t,n),bs(e)}function Fl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,my(e,n)}}function rd(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=l:a=a.next=l,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:o.shared,callbacks:o.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Kd=!1;function Jl(){if(Kd){var e=za;if(e!==null)throw e}}function Wl(e,t,n,o){Kd=!1;var i=e.updateQueue;zo=!1;var a=i.firstBaseUpdate,l=i.lastBaseUpdate,r=i.shared.pending;if(r!==null){i.shared.pending=null;var u=r,s=u.next;u.next=null,l===null?a=s:l.next=s,l=u;var c=e.alternate;c!==null&&(c=c.updateQueue,r=c.lastBaseUpdate,r!==l&&(r===null?c.firstBaseUpdate=s:r.next=s,c.lastBaseUpdate=u))}if(a!==null){var d=i.baseState;l=0,c=s=u=null,r=a;do{var f=r.lane&-536870913,m=f!==r.lane;if(m?(ve&f)===f:(o&f)===f){f!==0&&f===Pa&&(Kd=!0),c!==null&&(c=c.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var g=e,b=r;f=t;var S=n;switch(b.tag){case 1:if(g=b.payload,typeof g=="function"){d=g.call(S,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,f=typeof g=="function"?g.call(S,d,f):g,f==null)break e;d=ke({},d,f);break e;case 2:zo=!0}}f=r.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:r.tag,payload:r.payload,callback:r.callback,next:null},c===null?(s=c=m,u=d):c=c.next=m,l|=f;if(r=r.next,r===null){if(r=i.shared.pending,r===null)break;m=r,r=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);c===null&&(u=d),i.baseState=u,i.firstBaseUpdate=s,i.lastBaseUpdate=c,a===null&&(i.shared.lanes=0),ti|=l,e.lanes=l,e.memoizedState=d}}function Fy(e,t){if(typeof e!="function")throw Error(G(191,e));e.call(t)}function Jy(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Fy(n[e],t)}var Ia=Pn(null),Es=Pn(0);function r0(e,t){e=po,Re(Es,e),Re(Ia,t),po=e|t.baseLanes}function $d(){Re(Es,po),Re(Ia,Ia.current)}function Vp(){po=Es.current,ft(Ia),ft(Es)}var an=Pn(null),vn=null;function Bo(e){var t=e.alternate;Re(Fe,Fe.current&1),Re(an,e),vn===null&&(t===null||Ia.current!==null||t.memoizedState!==null)&&(vn=e)}function Fd(e){Re(Fe,Fe.current),Re(an,e),vn===null&&(vn=e)}function Wy(e){e.tag===22?(Re(Fe,Fe.current),Re(an,e),vn===null&&(vn=e)):Ho(e)}function Ho(){Re(Fe,Fe.current),Re(an,an.current)}function $t(e){ft(an),vn===e&&(vn=null),ft(Fe)}var Fe=Pn(0);function Ts(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||gp(n)||yp(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var so=0,fe=null,Ae=null,We=null,Ns=!1,Ba=!1,Oi=!1,Cs=0,pr=0,Ha=null,JN=0;function Xe(){throw Error(G(321))}function Yp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!on(e[n],t[n]))return!1;return!0}function Xp(e,t,n,o,i,a){return so=a,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,le.H=e===null||e.memoizedState===null?Mv:tm,Oi=!1,a=n(o,i),Oi=!1,Ba&&(a=tv(t,n,o,i)),ev(e),a}function ev(e){le.H=mr;var t=Ae!==null&&Ae.next!==null;if(so=0,We=Ae=fe=null,Ns=!1,pr=0,Ha=null,t)throw Error(G(300));e===null||nt||(e=e.dependencies,e!==null&&xs(e)&&(nt=!0))}function tv(e,t,n,o){fe=e;var i=0;do{if(Ba&&(Ha=null),pr=0,Ba=!1,25<=i)throw Error(G(301));if(i+=1,We=Ae=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}le.H=Ov,a=t(n,o)}while(Ba);return a}function WN(){var e=le.H,t=e.useState()[0];return t=typeof t.then=="function"?wr(t):t,e=e.useState()[0],(Ae!==null?Ae.memoizedState:null)!==e&&(fe.flags|=1024),t}function qp(){var e=Cs!==0;return Cs=0,e}function Zp(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function jp(e){if(Ns){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ns=!1}so=0,We=Ae=fe=null,Ba=!1,pr=Cs=0,Ha=null}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?fe.memoizedState=We=e:We=We.next=e,We}function Je(){if(Ae===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=We===null?fe.memoizedState:We.next;if(t!==null)We=t,Ae=e;else{if(e===null)throw fe.alternate===null?Error(G(467)):Error(G(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},We===null?fe.memoizedState=We=e:We=We.next=e}return We}function Ks(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wr(e){var t=pr;return pr+=1,Ha===null&&(Ha=[]),e=Qy(Ha,e,t),t=fe,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,le.H=t===null||t.memoizedState===null?Mv:tm),e}function $s(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return wr(e);if(e.$$typeof===no)return yt(e)}throw Error(G(438,String(e)))}function Qp(e){var t=null,n=fe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=fe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ks(),fe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),o=0;o<e;o++)n[o]=UT;return t.index++,n}function co(e,t){return typeof t=="function"?t(e):t}function is(e){var t=Je();return Kp(t,Ae,e)}function Kp(e,t,n){var o=e.queue;if(o===null)throw Error(G(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(a!==null){if(i!==null){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var r=l=null,u=null,s=t,c=!1;do{var d=s.lane&-536870913;if(d!==s.lane?(ve&d)===d:(so&d)===d){var f=s.revertLane;if(f===0)u!==null&&(u=u.next={lane:0,revertLane:0,gesture:null,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null}),d===Pa&&(c=!0);else if((so&f)===f){s=s.next,f===Pa&&(c=!0);continue}else d={lane:0,revertLane:s.revertLane,gesture:null,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null},u===null?(r=u=d,l=a):u=u.next=d,fe.lanes|=f,ti|=f;d=s.action,Oi&&n(a,d),a=s.hasEagerState?s.eagerState:n(a,d)}else f={lane:d,revertLane:s.revertLane,gesture:s.gesture,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null},u===null?(r=u=f,l=a):u=u.next=f,fe.lanes|=d,ti|=d;s=s.next}while(s!==null&&s!==t);if(u===null?l=a:u.next=r,!on(a,e.memoizedState)&&(nt=!0,c&&(n=za,n!==null)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=u,o.lastRenderedState=a}return i===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function ud(e){var t=Je(),n=t.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do a=e(a,l.action),l=l.next;while(l!==i);on(a,t.memoizedState)||(nt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function nv(e,t,n){var o=fe,i=Je(),a=be;if(a){if(n===void 0)throw Error(G(407));n=n()}else n=t();var l=!on((Ae||i).memoizedState,n);if(l&&(i.memoizedState=n,nt=!0),i=i.queue,$p(av.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||We!==null&&We.memoizedState.tag&1){if(o.flags|=2048,Va(9,{destroy:void 0},iv.bind(null,o,i,n,t),null),Oe===null)throw Error(G(349));a||(so&127)!==0||ov(o,t,n)}return n}function ov(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fe.updateQueue,t===null?(t=Ks(),fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function iv(e,t,n,o){t.value=n,t.getSnapshot=o,lv(t)&&rv(e)}function av(e,t,n){return n(function(){lv(t)&&rv(e)})}function lv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!on(e,n)}catch{return!0}}function rv(e){var t=Hi(e,2);t!==null&&Pt(t,e,2)}function Jd(e){var t=At();if(typeof e=="function"){var n=e;if(e=n(),Oi){Uo(!0);try{n()}finally{Uo(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:e},t}function uv(e,t,n,o){return e.baseState=n,Kp(e,Ae,typeof o=="function"?o:co)}function eC(e,t,n,o,i){if(Js(e))throw Error(G(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){a.listeners.push(l)}};le.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,sv(t,a)):(a.next=n.next,t.pending=n.next=a)}}function sv(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=le.T,l={};le.T=l;try{var r=n(i,o),u=le.S;u!==null&&u(l,r),u0(e,t,r)}catch(s){Wd(e,t,s)}finally{a!==null&&l.types!==null&&(a.types=l.types),le.T=a}}else try{a=n(i,o),u0(e,t,a)}catch(s){Wd(e,t,s)}}function u0(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){s0(e,t,o)},function(o){return Wd(e,t,o)}):s0(e,t,n)}function s0(e,t,n){t.status="fulfilled",t.value=n,cv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,sv(e,n)))}function Wd(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,cv(t),t=t.next;while(t!==o)}e.action=null}function cv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function fv(e,t){return t}function c0(e,t){if(be){var n=Oe.formState;if(n!==null){e:{var o=fe;if(be){if(He){t:{for(var i=He,a=yn;i.nodeType!==8;){if(!a){i=null;break t}if(i=bn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){He=bn(i.nextSibling),o=i.data==="F!";break e}}Wo(o)}o=!1}o&&(t=n[0])}}return n=At(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fv,lastRenderedState:t},n.queue=o,n=wv.bind(null,fe,o),o.dispatch=n,o=Jd(!1),a=em.bind(null,fe,!1,o.queue),o=At(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=eC.bind(null,fe,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function f0(e){var t=Je();return dv(t,Ae,e)}function dv(e,t,n){if(t=Kp(e,t,fv)[0],e=is(co)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=wr(t)}catch(l){throw l===Fa?Qs:l}else o=t;t=Je();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(fe.flags|=2048,Va(9,{destroy:void 0},tC.bind(null,i,n),null)),[o,a,e]}function tC(e,t){e.action=t}function d0(e){var t=Je(),n=Ae;if(n!==null)return dv(t,n,e);Je(),t=t.memoizedState,n=Je();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function Va(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=fe.updateQueue,t===null&&(t=Ks(),fe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function pv(){return Je().memoizedState}function as(e,t,n,o){var i=At();fe.flags|=e,i.memoizedState=Va(1|t,{destroy:void 0},n,o===void 0?null:o)}function Fs(e,t,n,o){var i=Je();o=o===void 0?null:o;var a=i.memoizedState.inst;Ae!==null&&o!==null&&Yp(o,Ae.memoizedState.deps)?i.memoizedState=Va(t,a,n,o):(fe.flags|=e,i.memoizedState=Va(1|t,a,n,o))}function p0(e,t){as(8390656,8,e,t)}function $p(e,t){Fs(2048,8,e,t)}function nC(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=Ks(),fe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function mv(e){var t=Je().memoizedState;return nC({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(G(440));return t.impl.apply(void 0,arguments)}}function hv(e,t){return Fs(4,2,e,t)}function gv(e,t){return Fs(4,4,e,t)}function yv(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vv(e,t,n){n=n!=null?n.concat([e]):null,Fs(4,4,yv.bind(null,t,e),n)}function Fp(){}function bv(e,t){var n=Je();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&Yp(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Sv(e,t){var n=Je();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&Yp(t,o[1]))return o[0];if(o=e(),Oi){Uo(!0);try{e()}finally{Uo(!1)}}return n.memoizedState=[o,t],o}function Jp(e,t,n){return n===void 0||(so&1073741824)!==0&&(ve&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=ub(),fe.lanes|=e,ti|=e,n)}function xv(e,t,n,o){return on(n,t)?n:Ia.current!==null?(e=Jp(e,n,o),on(e,t)||(nt=!0),e):(so&42)===0||(so&1073741824)!==0&&(ve&261930)===0?(nt=!0,e.memoizedState=n):(e=ub(),fe.lanes|=e,ti|=e,t)}function _v(e,t,n,o,i){var a=Ee.p;Ee.p=a!==0&&8>a?a:8;var l=le.T,r={};le.T=r,em(e,!1,t,n);try{var u=i(),s=le.S;if(s!==null&&s(r,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=FN(u,o);er(e,t,c,nn(e))}else er(e,t,o,nn(e))}catch(d){er(e,t,{then:function(){},status:"rejected",reason:d},nn())}finally{Ee.p=a,l!==null&&r.types!==null&&(l.types=r.types),le.T=l}}function oC(){}function ep(e,t,n,o){if(e.tag!==5)throw Error(G(476));var i=Ev(e).queue;_v(e,i,t,Ei,n===null?oC:function(){return Tv(e),n(o)})}function Ev(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ei,baseState:Ei,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:Ei},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Tv(e){var t=Ev(e);t.next===null&&(t=e.alternate.memoizedState),er(e,t.next.queue,{},nn())}function Wp(){return yt(yr)}function Nv(){return Je().memoizedState}function Cv(){return Je().memoizedState}function iC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=nn();e=qo(n);var o=Zo(t,e,n);o!==null&&(Pt(o,t,n),Fl(o,t,n)),t={cache:Up()},e.payload=t;return}t=t.return}}function aC(e,t,n){var o=nn();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Js(e)?Av(t,n):(n=Lp(e,t,n,o),n!==null&&(Pt(n,e,o),Dv(n,t,o)))}function wv(e,t,n){var o=nn();er(e,t,n,o)}function er(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Js(e))Av(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var l=t.lastRenderedState,r=a(l,n);if(i.hasEagerState=!0,i.eagerState=r,on(r,l))return js(e,t,i,0),Oe===null&&Zs(),!1}catch{}if(n=Lp(e,t,i,o),n!==null)return Pt(n,e,o),Dv(n,t,o),!0}return!1}function em(e,t,n,o){if(o={lane:2,revertLane:sm(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Js(e)){if(t)throw Error(G(479))}else t=Lp(e,n,o,2),t!==null&&Pt(t,e,2)}function Js(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function Av(e,t){Ba=Ns=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Dv(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,my(e,n)}}var mr={readContext:yt,use:$s,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};mr.useEffectEvent=Xe;var Mv={readContext:yt,use:$s,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:p0,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,as(4194308,4,yv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=At();t=t===void 0?null:t;var o=e();if(Oi){Uo(!0);try{e()}finally{Uo(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=At();if(n!==void 0){var i=n(t);if(Oi){Uo(!0);try{n(t)}finally{Uo(!1)}}}else i=t;return o.memoizedState=o.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},o.queue=e,e=e.dispatch=aC.bind(null,fe,e),[o.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:function(e){e=Jd(e);var t=e.queue,n=wv.bind(null,fe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Fp,useDeferredValue:function(e,t){var n=At();return Jp(n,e,t)},useTransition:function(){var e=Jd(!1);return e=_v.bind(null,fe,e.queue,!0,!1),At().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=fe,i=At();if(be){if(n===void 0)throw Error(G(407));n=n()}else{if(n=t(),Oe===null)throw Error(G(349));(ve&127)!==0||ov(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,p0(av.bind(null,o,a,e),[e]),o.flags|=2048,Va(9,{destroy:void 0},iv.bind(null,o,a,n,t),null),n},useId:function(){var e=At(),t=Oe.identifierPrefix;if(be){var n=kn,o=Hn;n=(o&~(1<<32-tn(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Cs++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=JN++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Wp,useFormState:c0,useActionState:c0,useOptimistic:function(e){var t=At();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=em.bind(null,fe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Qp,useCacheRefresh:function(){return At().memoizedState=iC.bind(null,fe)},useEffectEvent:function(e){var t=At(),n={impl:e};return t.memoizedState=n,function(){if((_e&2)!==0)throw Error(G(440));return n.impl.apply(void 0,arguments)}}},tm={readContext:yt,use:$s,useCallback:bv,useContext:yt,useEffect:$p,useImperativeHandle:vv,useInsertionEffect:hv,useLayoutEffect:gv,useMemo:Sv,useReducer:is,useRef:pv,useState:function(){return is(co)},useDebugValue:Fp,useDeferredValue:function(e,t){var n=Je();return xv(n,Ae.memoizedState,e,t)},useTransition:function(){var e=is(co)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:wr(e),t]},useSyncExternalStore:nv,useId:Nv,useHostTransitionStatus:Wp,useFormState:f0,useActionState:f0,useOptimistic:function(e,t){var n=Je();return uv(n,Ae,e,t)},useMemoCache:Qp,useCacheRefresh:Cv};tm.useEffectEvent=mv;var Ov={readContext:yt,use:$s,useCallback:bv,useContext:yt,useEffect:$p,useImperativeHandle:vv,useInsertionEffect:hv,useLayoutEffect:gv,useMemo:Sv,useReducer:ud,useRef:pv,useState:function(){return ud(co)},useDebugValue:Fp,useDeferredValue:function(e,t){var n=Je();return Ae===null?Jp(n,e,t):xv(n,Ae.memoizedState,e,t)},useTransition:function(){var e=ud(co)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:wr(e),t]},useSyncExternalStore:nv,useId:Nv,useHostTransitionStatus:Wp,useFormState:d0,useActionState:d0,useOptimistic:function(e,t){var n=Je();return Ae!==null?uv(n,Ae,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Qp,useCacheRefresh:Cv};Ov.useEffectEvent=mv;function sd(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var tp={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=nn(),i=qo(o);i.payload=t,n!=null&&(i.callback=n),t=Zo(e,i,o),t!==null&&(Pt(t,e,o),Fl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=nn(),i=qo(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Zo(e,i,o),t!==null&&(Pt(t,e,o),Fl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nn(),o=qo(n);o.tag=2,t!=null&&(o.callback=t),t=Zo(e,o,n),t!==null&&(Pt(t,e,n),Fl(t,e,n))}};function m0(e,t,n,o,i,a,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,l):t.prototype&&t.prototype.isPureReactComponent?!sr(n,o)||!sr(i,a):!0}function h0(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&tp.enqueueReplaceState(t,t.state,null)}function Ri(e,t){var n=t;if("ref"in t){n={};for(var o in t)o!=="ref"&&(n[o]=t[o])}if(e=e.defaultProps){n===t&&(n=ke({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Rv(e){vs(e)}function zv(e){console.error(e)}function Lv(e){vs(e)}function ws(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function g0(e,t,n){try{var o=e.onCaughtError;o(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function np(e,t,n){return n=qo(n),n.tag=3,n.payload={element:null},n.callback=function(){ws(e,t)},n}function Bv(e){return e=qo(e),e.tag=3,e}function Hv(e,t,n,o){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=o.value;e.payload=function(){return i(a)},e.callback=function(){g0(t,n,o)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){g0(t,n,o),typeof i!="function"&&(jo===null?jo=new Set([this]):jo.add(this));var r=o.stack;this.componentDidCatch(o.value,{componentStack:r!==null?r:""})})}function lC(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&$a(t,n,i,!0),n=an.current,n!==null){switch(n.tag){case 31:case 13:return vn===null?Rs():n.alternate===null&&qe===0&&(qe=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===_s?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),Sd(e,o,i)),!1;case 22:return n.flags|=65536,o===_s?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([o]):n.add(o)),Sd(e,o,i)),!1}throw Error(G(435,n.tag))}return Sd(e,o,i),Rs(),!1}if(be)return t=an.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==Yd&&(e=Error(G(422),{cause:o}),fr(gn(e,n)))):(o!==Yd&&(t=Error(G(423),{cause:o}),fr(gn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=gn(o,n),i=np(e.stateNode,o,i),rd(e,i),qe!==4&&(qe=2)),!1;var a=Error(G(520),{cause:o});if(a=gn(a,n),or===null?or=[a]:or.push(a),qe!==4&&(qe=2),t===null)return!0;o=gn(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=np(n.stateNode,o,e),rd(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(jo===null||!jo.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Bv(i),Hv(i,e,n,o),rd(n,i),!1}n=n.return}while(n!==null);return!1}var nm=Error(G(461)),nt=!1;function mt(e,t,n,o){t.child=e===null?$y(t,null,n,o):Mi(t,e.child,n,o)}function y0(e,t,n,o,i){n=n.render;var a=t.ref;if("ref"in o){var l={};for(var r in o)r!=="ref"&&(l[r]=o[r])}else l=o;return Di(t),o=Xp(e,t,n,l,a,i),r=qp(),e!==null&&!nt?(Zp(e,t,i),fo(e,t,i)):(be&&r&&Hp(t),t.flags|=1,mt(e,t,o,i),t.child)}function v0(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!Bp(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,kv(e,t,a,o,i)):(e=ns(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!om(e,i)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:sr,n(l,o)&&e.ref===t.ref)return fo(e,t,i)}return t.flags|=1,e=ao(a,o),e.ref=t.ref,e.return=t,t.child=e}function kv(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(sr(a,o)&&e.ref===t.ref)if(nt=!1,t.pendingProps=o=a,om(e,i))(e.flags&131072)!==0&&(nt=!0);else return t.lanes=e.lanes,fo(e,t,i)}return op(e,t,n,o,i)}function Uv(e,t,n,o){var i=o.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|n:n,e!==null){for(o=t.child=e.child,i=0;o!==null;)i=i|o.lanes|o.childLanes,o=o.sibling;o=i&~a}else o=0,t.child=null;return b0(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&os(t,a!==null?a.cachePool:null),a!==null?r0(t,a):$d(),Wy(t);else return o=t.lanes=536870912,b0(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(os(t,a.cachePool),r0(t,a),Ho(t),t.memoizedState=null):(e!==null&&os(t,null),$d(),Ho(t));return mt(e,t,i,n),t.child}function ql(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function b0(e,t,n,o,i){var a=Gp();return a=a===null?null:{parent:tt._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&os(t,null),$d(),Wy(t),e!==null&&$a(e,t,o,!0),t.childLanes=i,null}function ls(e,t){return t=As({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function S0(e,t,n){return Mi(t,e.child,null,n),e=ls(t,t.pendingProps),e.flags|=2,$t(t),t.memoizedState=null,e}function rC(e,t,n){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(be){if(o.mode==="hidden")return e=ls(t,o),t.lanes=536870912,ql(null,e);if(Fd(t),(e=He)?(e=Mb(e,yn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Jo!==null?{id:Hn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},n=Yy(e),n.return=t,t.child=n,gt=t,He=null)):e=null,e===null)throw Wo(t);return t.lanes=536870912,null}return ls(t,o)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(Fd(t),i)if(t.flags&256)t.flags&=-257,t=S0(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(G(558));else if(nt||$a(e,t,n,!1),i=(n&e.childLanes)!==0,nt||i){if(o=Oe,o!==null&&(l=hy(o,n),l!==0&&l!==a.retryLane))throw a.retryLane=l,Hi(e,l),Pt(o,e,l),nm;Rs(),t=S0(e,t,n)}else e=a.treeContext,He=bn(l.nextSibling),gt=t,be=!0,Xo=null,yn=!1,e!==null&&qy(t,e),t=ls(t,o),t.flags|=4096;return t}return e=ao(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function rs(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(G(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function op(e,t,n,o,i){return Di(t),n=Xp(e,t,n,o,void 0,i),o=qp(),e!==null&&!nt?(Zp(e,t,i),fo(e,t,i)):(be&&o&&Hp(t),t.flags|=1,mt(e,t,n,i),t.child)}function x0(e,t,n,o,i,a){return Di(t),t.updateQueue=null,n=tv(t,o,n,i),ev(e),o=qp(),e!==null&&!nt?(Zp(e,t,a),fo(e,t,a)):(be&&o&&Hp(t),t.flags|=1,mt(e,t,n,a),t.child)}function _0(e,t,n,o,i){if(Di(t),t.stateNode===null){var a=Ca,l=n.contextType;typeof l=="object"&&l!==null&&(a=yt(l)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=tp,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},Ip(t),l=n.contextType,a.context=typeof l=="object"&&l!==null?yt(l):Ca,a.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(sd(t,n,l,o),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(l=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),l!==a.state&&tp.enqueueReplaceState(a,a.state,null),Wl(t,o,a,i),Jl(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){a=t.stateNode;var r=t.memoizedProps,u=Ri(n,r);a.props=u;var s=a.context,c=n.contextType;l=Ca,typeof c=="object"&&c!==null&&(l=yt(c));var d=n.getDerivedStateFromProps;c=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(r||s!==l)&&h0(t,a,o,l),zo=!1;var f=t.memoizedState;a.state=f,Wl(t,o,a,i),Jl(),s=t.memoizedState,r||f!==s||zo?(typeof d=="function"&&(sd(t,n,d,o),s=t.memoizedState),(u=zo||m0(t,n,u,o,f,s,l))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=s),a.props=o,a.state=s,a.context=l,o=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{a=t.stateNode,Qd(e,t),l=t.memoizedProps,c=Ri(n,l),a.props=c,d=t.pendingProps,f=a.context,s=n.contextType,u=Ca,typeof s=="object"&&s!==null&&(u=yt(s)),r=n.getDerivedStateFromProps,(s=typeof r=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||f!==u)&&h0(t,a,o,u),zo=!1,f=t.memoizedState,a.state=f,Wl(t,o,a,i),Jl();var m=t.memoizedState;l!==d||f!==m||zo||e!==null&&e.dependencies!==null&&xs(e.dependencies)?(typeof r=="function"&&(sd(t,n,r,o),m=t.memoizedState),(c=zo||m0(t,n,c,o,f,m,u)||e!==null&&e.dependencies!==null&&xs(e.dependencies))?(s||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,m,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,m,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=m),a.props=o,a.state=m,a.context=u,o=c):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return a=o,rs(e,t),o=(t.flags&128)!==0,a||o?(a=t.stateNode,n=o&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&o?(t.child=Mi(t,e.child,null,i),t.child=Mi(t,null,n,i)):mt(e,t,n,i),t.memoizedState=a.state,e=t.child):e=fo(e,t,i),e}function E0(e,t,n,o){return Ai(),t.flags|=256,mt(e,t,n,o),t.child}var cd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fd(e){return{baseLanes:e,cachePool:jy()}}function dd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Jt),e}function Gv(e,t,n){var o=t.pendingProps,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(be){if(i?Bo(t):Ho(t),(e=He)?(e=Mb(e,yn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Jo!==null?{id:Hn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},n=Yy(e),n.return=t,t.child=n,gt=t,He=null)):e=null,e===null)throw Wo(t);return yp(e)?t.lanes=32:t.lanes=536870912,null}var r=o.children;return o=o.fallback,i?(Ho(t),i=t.mode,r=As({mode:"hidden",children:r},i),o=Ti(o,i,n,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=fd(n),o.childLanes=dd(e,l,n),t.memoizedState=cd,ql(null,o)):(Bo(t),ip(t,r))}var u=e.memoizedState;if(u!==null&&(r=u.dehydrated,r!==null)){if(a)t.flags&256?(Bo(t),t.flags&=-257,t=pd(e,t,n)):t.memoizedState!==null?(Ho(t),t.child=e.child,t.flags|=128,t=null):(Ho(t),r=o.fallback,i=t.mode,o=As({mode:"visible",children:o.children},i),r=Ti(r,i,n,null),r.flags|=2,o.return=t,r.return=t,o.sibling=r,t.child=o,Mi(t,e.child,null,n),o=t.child,o.memoizedState=fd(n),o.childLanes=dd(e,l,n),t.memoizedState=cd,t=ql(null,o));else if(Bo(t),yp(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var s=l.dgst;l=s,o=Error(G(419)),o.stack="",o.digest=l,fr({value:o,source:null,stack:null}),t=pd(e,t,n)}else if(nt||$a(e,t,n,!1),l=(n&e.childLanes)!==0,nt||l){if(l=Oe,l!==null&&(o=hy(l,n),o!==0&&o!==u.retryLane))throw u.retryLane=o,Hi(e,o),Pt(l,e,o),nm;gp(r)||Rs(),t=pd(e,t,n)}else gp(r)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,He=bn(r.nextSibling),gt=t,be=!0,Xo=null,yn=!1,e!==null&&qy(t,e),t=ip(t,o.children),t.flags|=4096);return t}return i?(Ho(t),r=o.fallback,i=t.mode,u=e.child,s=u.sibling,o=ao(u,{mode:"hidden",children:o.children}),o.subtreeFlags=u.subtreeFlags&65011712,s!==null?r=ao(s,r):(r=Ti(r,i,n,null),r.flags|=2),r.return=t,o.return=t,o.sibling=r,t.child=o,ql(null,o),o=t.child,r=e.child.memoizedState,r===null?r=fd(n):(i=r.cachePool,i!==null?(u=tt._currentValue,i=i.parent!==u?{parent:u,pool:u}:i):i=jy(),r={baseLanes:r.baseLanes|n,cachePool:i}),o.memoizedState=r,o.childLanes=dd(e,l,n),t.memoizedState=cd,ql(e.child,o)):(Bo(t),n=e.child,e=n.sibling,n=ao(n,{mode:"visible",children:o.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function ip(e,t){return t=As({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function As(e,t){return e=Ft(22,e,null,t),e.lanes=0,e}function pd(e,t,n){return Mi(t,e.child,null,n),e=ip(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function T0(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),qd(e.return,t,n)}function md(e,t,n,o,i,a){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:i,treeForkCount:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=o,l.tail=n,l.tailMode=i,l.treeForkCount=a)}function Pv(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var l=Fe.current,r=(l&2)!==0;if(r?(l=l&1|2,t.flags|=128):l&=1,Re(Fe,l),mt(e,t,o,n),o=be?cr:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&T0(e,n,t);else if(e.tag===19)T0(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ts(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),md(t,!1,i,n,a,o);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ts(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}md(t,!0,n,null,a,o);break;case"together":md(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function fo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ti|=t.lanes,(n&t.childLanes)===0)if(e!==null){if($a(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,n=ao(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ao(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function om(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&xs(e)))}function uC(e,t,n){switch(t.tag){case 3:ms(t,t.stateNode.containerInfo),Lo(t,tt,e.memoizedState.cache),Ai();break;case 27:case 5:Rd(t);break;case 4:ms(t,t.stateNode.containerInfo);break;case 10:Lo(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Fd(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(Bo(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Gv(e,t,n):(Bo(t),e=fo(e,t,n),e!==null?e.sibling:null);Bo(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||($a(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return Pv(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Re(Fe,Fe.current),o)break;return null;case 22:return t.lanes=0,Uv(e,t,n,t.pendingProps);case 24:Lo(t,tt,e.memoizedState.cache)}return fo(e,t,n)}function Iv(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)nt=!0;else{if(!om(e,n)&&(t.flags&128)===0)return nt=!1,uC(e,t,n);nt=(e.flags&131072)!==0}else nt=!1,be&&(t.flags&1048576)!==0&&Xy(t,cr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=xi(t.elementType),t.type=e,typeof e=="function")Bp(e)?(o=Ri(e,o),t.tag=1,t=_0(null,t,e,o,n)):(t.tag=0,t=op(null,t,e,o,n));else{if(e!=null){var i=e.$$typeof;if(i===xp){t.tag=11,t=y0(null,t,e,o,n);break e}else if(i===_p){t.tag=14,t=v0(null,t,e,o,n);break e}}throw t=Md(e)||e,Error(G(306,t,""))}}return t;case 0:return op(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=Ri(o,t.pendingProps),_0(e,t,o,i,n);case 3:e:{if(ms(t,t.stateNode.containerInfo),e===null)throw Error(G(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,Qd(e,t),Wl(t,o,null,n);var l=t.memoizedState;if(o=l.cache,Lo(t,tt,o),o!==a.cache&&Zd(t,[tt],n,!0),Jl(),o=l.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=E0(e,t,o,n);break e}else if(o!==i){i=gn(Error(G(424)),t),fr(i),t=E0(e,t,o,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,He=bn(e.firstChild),gt=t,be=!0,Xo=null,yn=!0,n=$y(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ai(),o===i){t=fo(e,t,n);break e}mt(e,t,o,n)}t=t.child}return t;case 26:return rs(e,t),e===null?(n=Z0(t.type,null,t.pendingProps,null))?t.memoizedState=n:be||(n=t.type,e=t.pendingProps,o=Hs(Yo.current).createElement(n),o[ht]=t,o[It]=e,vt(o,n,e),ct(o),t.stateNode=o):t.memoizedState=Z0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Rd(t),e===null&&be&&(o=t.stateNode=Ob(t.type,t.pendingProps,Yo.current),gt=t,yn=!0,i=He,oi(t.type)?(vp=i,He=bn(o.firstChild)):He=i),mt(e,t,t.pendingProps.children,n),rs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&be&&((i=o=He)&&(o=HC(o,t.type,t.pendingProps,yn),o!==null?(t.stateNode=o,gt=t,He=bn(o.firstChild),yn=!1,i=!0):i=!1),i||Wo(t)),Rd(t),i=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,o=a.children,mp(i,a)?o=null:l!==null&&mp(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=Xp(e,t,WN,null,null,n),yr._currentValue=i),rs(e,t),mt(e,t,o,n),t.child;case 6:return e===null&&be&&((e=n=He)&&(n=kC(n,t.pendingProps,yn),n!==null?(t.stateNode=n,gt=t,He=null,e=!0):e=!1),e||Wo(t)),null;case 13:return Gv(e,t,n);case 4:return ms(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Mi(t,null,o,n):mt(e,t,o,n),t.child;case 11:return y0(e,t,t.type,t.pendingProps,n);case 7:return mt(e,t,t.pendingProps,n),t.child;case 8:return mt(e,t,t.pendingProps.children,n),t.child;case 12:return mt(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,Lo(t,t.type,o.value),mt(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,Di(t),i=yt(i),o=o(i),t.flags|=1,mt(e,t,o,n),t.child;case 14:return v0(e,t,t.type,t.pendingProps,n);case 15:return kv(e,t,t.type,t.pendingProps,n);case 19:return Pv(e,t,n);case 31:return rC(e,t,n);case 22:return Uv(e,t,n,t.pendingProps);case 24:return Di(t),o=yt(tt),e===null?(i=Gp(),i===null&&(i=Oe,a=Up(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},Ip(t),Lo(t,tt,i)):((e.lanes&n)!==0&&(Qd(e,t),Wl(t,null,null,n),Jl()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Lo(t,tt,o)):(o=a.cache,Lo(t,tt,o),o!==i.cache&&Zd(t,[tt],n,!0))),mt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(G(156,t.tag))}function $n(e){e.flags|=4}function hd(e,t,n,o,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(fb())e.flags|=8192;else throw Ci=_s,Pp}else e.flags&=-16777217}function N0(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Lb(t))if(fb())e.flags|=8192;else throw Ci=_s,Pp}function qu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?dy():536870912,e.lanes|=t,Ya|=t)}function Ul(e,t){if(!be)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags&65011712,o|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function sC(e,t,n){var o=t.pendingProps;switch(kp(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return Be(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),lo(tt),ka(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ma(t)?$n(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ld())),Be(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?($n(t),a!==null?(Be(t),N0(t,a)):(Be(t),hd(t,i,null,o,n))):a?a!==e.memoizedState?($n(t),Be(t),N0(t,a)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&$n(t),Be(t),hd(t,i,e,o,n)),null;case 27:if(hs(t),n=Yo.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&$n(t);else{if(!o){if(t.stateNode===null)throw Error(G(166));return Be(t),null}e=Gn.current,ma(t)?e0(t,e):(e=Ob(i,o,n),t.stateNode=e,$n(t))}return Be(t),null;case 5:if(hs(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&$n(t);else{if(!o){if(t.stateNode===null)throw Error(G(166));return Be(t),null}if(a=Gn.current,ma(t))e0(t,a);else{var l=Hs(Yo.current);switch(a){case 1:a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":a=l.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof o.is=="string"?l.createElement("select",{is:o.is}):l.createElement("select"),o.multiple?a.multiple=!0:o.size&&(a.size=o.size);break;default:a=typeof o.is=="string"?l.createElement(i,{is:o.is}):l.createElement(i)}}a[ht]=t,a[It]=o;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)a.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=a;e:switch(vt(a,i,o),i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&$n(t)}}return Be(t),hd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&$n(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(G(166));if(e=Yo.current,ma(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=gt,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[ht]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||wb(e.nodeValue,n)),e||Wo(t,!0)}else e=Hs(e).createTextNode(o),e[ht]=t,t.stateNode=e}return Be(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=ma(t),n!==null){if(e===null){if(!o)throw Error(G(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(557));e[ht]=t}else Ai(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else n=ld(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?($t(t),t):($t(t),null);if((t.flags&128)!==0)throw Error(G(558))}return Be(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ma(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(G(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(G(317));i[ht]=t}else Ai(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),i=!1}else i=ld(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?($t(t),t):($t(t),null)}return $t(t),(t.flags&128)!==0?(t.lanes=n,t):(n=o!==null,e=e!==null&&e.memoizedState!==null,n&&(o=t.child,i=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(i=o.alternate.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),qu(t,t.updateQueue),Be(t),null);case 4:return ka(),e===null&&cm(t.stateNode.containerInfo),Be(t),null;case 10:return lo(t.type),Be(t),null;case 19:if(ft(Fe),o=t.memoizedState,o===null)return Be(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)Ul(o,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Ts(e),a!==null){for(t.flags|=128,Ul(o,!1),e=a.updateQueue,t.updateQueue=e,qu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Vy(n,e),n=n.sibling;return Re(Fe,Fe.current&1|2),be&&eo(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&Wt()>Ms&&(t.flags|=128,i=!0,Ul(o,!1),t.lanes=4194304)}else{if(!i)if(e=Ts(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,qu(t,e),Ul(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!be)return Be(t),null}else 2*Wt()-o.renderingStartTime>Ms&&n!==536870912&&(t.flags|=128,i=!0,Ul(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(e=o.last,e!==null?e.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Wt(),e.sibling=null,n=Fe.current,Re(Fe,i?n&1|2:n&1),be&&eo(t,o.treeForkCount),e):(Be(t),null);case 22:case 23:return $t(t),Vp(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(n&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),n=t.updateQueue,n!==null&&qu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),e!==null&&ft(Ni),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),lo(tt),Be(t),null;case 25:return null;case 30:return null}throw Error(G(156,t.tag))}function cC(e,t){switch(kp(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return lo(tt),ka(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return hs(t),null;case 31:if(t.memoizedState!==null){if($t(t),t.alternate===null)throw Error(G(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if($t(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ft(Fe),null;case 4:return ka(),null;case 10:return lo(t.type),null;case 22:case 23:return $t(t),Vp(),e!==null&&ft(Ni),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return lo(tt),null;case 25:return null;default:return null}}function Vv(e,t){switch(kp(t),t.tag){case 3:lo(tt),ka();break;case 26:case 27:case 5:hs(t);break;case 4:ka();break;case 31:t.memoizedState!==null&&$t(t);break;case 13:$t(t);break;case 19:ft(Fe);break;case 10:lo(t.type);break;case 22:case 23:$t(t),Vp(),e!==null&&ft(Ni);break;case 24:lo(tt)}}function Ar(e,t){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var i=o.next;n=i;do{if((n.tag&e)===e){o=void 0;var a=n.create,l=n.inst;o=a(),l.destroy=o}n=n.next}while(n!==i)}}catch(r){Ne(t,t.return,r)}}function ei(e,t,n){try{var o=t.updateQueue,i=o!==null?o.lastEffect:null;if(i!==null){var a=i.next;o=a;do{if((o.tag&e)===e){var l=o.inst,r=l.destroy;if(r!==void 0){l.destroy=void 0,i=t;var u=n,s=r;try{s()}catch(c){Ne(i,u,c)}}}o=o.next}while(o!==a)}}catch(c){Ne(t,t.return,c)}}function Yv(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Jy(t,n)}catch(o){Ne(e,e.return,o)}}}function Xv(e,t,n){n.props=Ri(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){Ne(e,t,o)}}function tr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof n=="function"?e.refCleanup=n(o):n.current=o}}catch(i){Ne(e,t,i)}}function Un(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){Ne(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Ne(e,t,i)}else n.current=null}function qv(e){var t=e.type,n=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&o.focus();break e;case"img":n.src?o.src=n.src:n.srcSet&&(o.srcset=n.srcSet)}}catch(i){Ne(e,e.return,i)}}function gd(e,t,n){try{var o=e.stateNode;MC(o,e.type,n,t),o[It]=t}catch(i){Ne(e,e.return,i)}}function Zv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&oi(e.type)||e.tag===4}function yd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zv(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&&oi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ap(e,t,n){var o=e.tag;if(o===5||o===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=oo));else if(o!==4&&(o===27&&oi(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(ap(e,t,n),e=e.sibling;e!==null;)ap(e,t,n),e=e.sibling}function Ds(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(o===27&&oi(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ds(e,t,n),e=e.sibling;e!==null;)Ds(e,t,n),e=e.sibling}function jv(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);vt(t,o,n),t[ht]=e,t[It]=n}catch(a){Ne(e,e.return,a)}}var to=!1,et=!1,vd=!1,C0=typeof WeakSet=="function"?WeakSet:Set,st=null;function fC(e,t){if(e=e.containerInfo,dp=Ps,e=Ly(e),Rp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var l=0,r=-1,u=-1,s=0,c=0,d=e,f=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(r=l+i),d!==a||o!==0&&d.nodeType!==3||(u=l+o),d.nodeType===3&&(l+=d.nodeValue.length),(m=d.firstChild)!==null;)f=d,d=m;for(;;){if(d===e)break t;if(f===n&&++s===i&&(r=l),f===a&&++c===o&&(u=l),(m=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=m}n=r===-1||u===-1?null:{start:r,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(pp={focusedElem:e,selectionRange:n},Ps=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){switch(t=st,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var g=Ri(n.type,i);e=o.getSnapshotBeforeUpdate(g,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){Ne(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)hp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(G(163))}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}}function Qv(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Jn(e,n),o&4&&Ar(5,n);break;case 1:if(Jn(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Ne(n,n.return,l)}else{var i=Ri(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Ne(n,n.return,l)}}o&64&&Yv(n),o&512&&tr(n,n.return);break;case 3:if(Jn(e,n),o&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Jy(e,t)}catch(l){Ne(n,n.return,l)}}break;case 27:t===null&&o&4&&jv(n);case 26:case 5:Jn(e,n),t===null&&o&4&&qv(n),o&512&&tr(n,n.return);break;case 12:Jn(e,n);break;case 31:Jn(e,n),o&4&&Fv(e,n);break;case 13:Jn(e,n),o&4&&Jv(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=SC.bind(null,n),UC(e,n))));break;case 22:if(o=n.memoizedState!==null||to,!o){t=t!==null&&t.memoizedState!==null||et,i=to;var a=et;to=o,(et=t)&&!a?Wn(e,n,(n.subtreeFlags&8772)!==0):Jn(e,n),to=i,et=a}break;case 30:break;default:Jn(e,n)}}function Kv(e){var t=e.alternate;t!==null&&(e.alternate=null,Kv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Cp(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Pe=null,Ut=!1;function Fn(e,t,n){for(n=n.child;n!==null;)$v(e,t,n),n=n.sibling}function $v(e,t,n){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount(xr,n)}catch{}switch(n.tag){case 26:et||Un(n,t),Fn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:et||Un(n,t);var o=Pe,i=Ut;oi(n.type)&&(Pe=n.stateNode,Ut=!1),Fn(e,t,n),ar(n.stateNode),Pe=o,Ut=i;break;case 5:et||Un(n,t);case 6:if(o=Pe,i=Ut,Pe=null,Fn(e,t,n),Pe=o,Ut=i,Pe!==null)if(Ut)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(n.stateNode)}catch(a){Ne(n,t,a)}else try{Pe.removeChild(n.stateNode)}catch(a){Ne(n,t,a)}break;case 18:Pe!==null&&(Ut?(e=Pe,I0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ja(e)):I0(Pe,n.stateNode));break;case 4:o=Pe,i=Ut,Pe=n.stateNode.containerInfo,Ut=!0,Fn(e,t,n),Pe=o,Ut=i;break;case 0:case 11:case 14:case 15:ei(2,n,t),et||ei(4,n,t),Fn(e,t,n);break;case 1:et||(Un(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&Xv(n,t,o)),Fn(e,t,n);break;case 21:Fn(e,t,n);break;case 22:et=(o=et)||n.memoizedState!==null,Fn(e,t,n),et=o;break;default:Fn(e,t,n)}}function Fv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ja(e)}catch(n){Ne(t,t.return,n)}}}function Jv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ja(e)}catch(n){Ne(t,t.return,n)}}function dC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new C0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new C0),t;default:throw Error(G(435,e.tag))}}function Zu(e,t){var n=dC(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=xC.bind(null,e,o);o.then(i,i)}})}function Ht(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var i=n[o],a=e,l=t,r=l;e:for(;r!==null;){switch(r.tag){case 27:if(oi(r.type)){Pe=r.stateNode,Ut=!1;break e}break;case 5:Pe=r.stateNode,Ut=!1;break e;case 3:case 4:Pe=r.stateNode.containerInfo,Ut=!0;break e}r=r.return}if(Pe===null)throw Error(G(160));$v(a,l,i),Pe=null,Ut=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Wv(t,e),t=t.sibling}var An=null;function Wv(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),kt(e),o&4&&(ei(3,e,e.return),Ar(3,e),ei(5,e,e.return));break;case 1:Ht(t,e),kt(e),o&512&&(et||n===null||Un(n,n.return)),o&64&&to&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?o:n.concat(o))));break;case 26:var i=An;if(Ht(t,e),kt(e),o&512&&(et||n===null||Un(n,n.return)),o&4){var a=n!==null?n.memoizedState:null;if(o=e.memoizedState,n===null)if(o===null)if(e.stateNode===null){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":a=i.getElementsByTagName("title")[0],(!a||a[Tr]||a[ht]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),vt(a,o,n),a[ht]=e,ct(a),o=a;break e;case"link":var l=Q0("link","href",i).get(o+(n.href||""));if(l){for(var r=0;r<l.length;r++)if(a=l[r],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(r,1);break t}}a=i.createElement(o),vt(a,o,n),i.head.appendChild(a);break;case"meta":if(l=Q0("meta","content",i).get(o+(n.content||""))){for(r=0;r<l.length;r++)if(a=l[r],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(r,1);break t}}a=i.createElement(o),vt(a,o,n),i.head.appendChild(a);break;default:throw Error(G(468,o))}a[ht]=e,ct(a),o=a}e.stateNode=o}else K0(i,e.type,e.stateNode);else e.stateNode=j0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?K0(i,e.type,e.stateNode):j0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&gd(e,e.memoizedProps,n.memoizedProps)}break;case 27:Ht(t,e),kt(e),o&512&&(et||n===null||Un(n,n.return)),n!==null&&o&4&&gd(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Ht(t,e),kt(e),o&512&&(et||n===null||Un(n,n.return)),e.flags&32){i=e.stateNode;try{Ga(i,"")}catch(g){Ne(e,e.return,g)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,gd(e,i,n!==null?n.memoizedProps:i)),o&1024&&(vd=!0);break;case 6:if(Ht(t,e),kt(e),o&4){if(e.stateNode===null)throw Error(G(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(g){Ne(e,e.return,g)}}break;case 3:if(cs=null,i=An,An=ks(t.containerInfo),Ht(t,e),An=i,kt(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{ja(t.containerInfo)}catch(g){Ne(e,e.return,g)}vd&&(vd=!1,eb(e));break;case 4:o=An,An=ks(e.stateNode.containerInfo),Ht(t,e),kt(e),An=o;break;case 12:Ht(t,e),kt(e);break;case 31:Ht(t,e),kt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Zu(e,o)));break;case 13:Ht(t,e),kt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ws=Wt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Zu(e,o)));break;case 22:i=e.memoizedState!==null;var u=n!==null&&n.memoizedState!==null,s=to,c=et;if(to=s||i,et=c||u,Ht(t,e),et=c,to=s,kt(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||u||to||et||_i(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){u=n=t;try{if(a=u.stateNode,i)l=a.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{r=u.stateNode;var d=u.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;r.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(g){Ne(u,u.return,g)}}}else if(t.tag===6){if(n===null){u=t;try{u.stateNode.nodeValue=i?"":u.memoizedProps}catch(g){Ne(u,u.return,g)}}}else if(t.tag===18){if(n===null){u=t;try{var m=u.stateNode;i?V0(m,!0):V0(u.stateNode,!1)}catch(g){Ne(u,u.return,g)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(n=o.retryQueue,n!==null&&(o.retryQueue=null,Zu(e,n))));break;case 19:Ht(t,e),kt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Zu(e,o)));break;case 30:break;case 21:break;default:Ht(t,e),kt(e)}}function kt(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(Zv(o)){n=o;break}o=o.return}if(n==null)throw Error(G(160));switch(n.tag){case 27:var i=n.stateNode,a=yd(e);Ds(e,a,i);break;case 5:var l=n.stateNode;n.flags&32&&(Ga(l,""),n.flags&=-33);var r=yd(e);Ds(e,r,l);break;case 3:case 4:var u=n.stateNode.containerInfo,s=yd(e);ap(e,s,u);break;default:throw Error(G(161))}}catch(c){Ne(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function eb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;eb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Jn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Qv(e,t.alternate,t),t=t.sibling}function _i(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ei(4,t,t.return),_i(t);break;case 1:Un(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Xv(t,t.return,n),_i(t);break;case 27:ar(t.stateNode);case 26:case 5:Un(t,t.return),_i(t);break;case 22:t.memoizedState===null&&_i(t);break;case 30:_i(t);break;default:_i(t)}e=e.sibling}}function Wn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,i=e,a=t,l=a.flags;switch(a.tag){case 0:case 11:case 15:Wn(i,a,n),Ar(4,a);break;case 1:if(Wn(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(s){Ne(o,o.return,s)}if(o=a,i=o.updateQueue,i!==null){var r=o.stateNode;try{var u=i.shared.hiddenCallbacks;if(u!==null)for(i.shared.hiddenCallbacks=null,i=0;i<u.length;i++)Fy(u[i],r)}catch(s){Ne(o,o.return,s)}}n&&l&64&&Yv(a),tr(a,a.return);break;case 27:jv(a);case 26:case 5:Wn(i,a,n),n&&o===null&&l&4&&qv(a),tr(a,a.return);break;case 12:Wn(i,a,n);break;case 31:Wn(i,a,n),n&&l&4&&Fv(i,a);break;case 13:Wn(i,a,n),n&&l&4&&Jv(i,a);break;case 22:a.memoizedState===null&&Wn(i,a,n),tr(a,a.return);break;case 30:break;default:Wn(i,a,n)}t=t.sibling}}function im(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Cr(n))}function am(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cr(e))}function wn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)tb(e,t,n,o),t=t.sibling}function tb(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:wn(e,t,n,o),i&2048&&Ar(9,t);break;case 1:wn(e,t,n,o);break;case 3:wn(e,t,n,o),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cr(e)));break;case 12:if(i&2048){wn(e,t,n,o),e=t.stateNode;try{var a=t.memoizedProps,l=a.id,r=a.onPostCommit;typeof r=="function"&&r(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(u){Ne(t,t.return,u)}}else wn(e,t,n,o);break;case 31:wn(e,t,n,o);break;case 13:wn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?a._visibility&2?wn(e,t,n,o):nr(e,t):a._visibility&2?wn(e,t,n,o):(a._visibility|=2,ga(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&im(l,t);break;case 24:wn(e,t,n,o),i&2048&&am(t.alternate,t);break;default:wn(e,t,n,o)}}function ga(e,t,n,o,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,l=t,r=n,u=o,s=l.flags;switch(l.tag){case 0:case 11:case 15:ga(a,l,r,u,i),Ar(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?ga(a,l,r,u,i):nr(a,l):(c._visibility|=2,ga(a,l,r,u,i)),i&&s&2048&&im(l.alternate,l);break;case 24:ga(a,l,r,u,i),i&&s&2048&&am(l.alternate,l);break;default:ga(a,l,r,u,i)}t=t.sibling}}function nr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,o=t,i=o.flags;switch(o.tag){case 22:nr(n,o),i&2048&&im(o.alternate,o);break;case 24:nr(n,o),i&2048&&am(o.alternate,o);break;default:nr(n,o)}t=t.sibling}}var Zl=8192;function ha(e,t,n){if(e.subtreeFlags&Zl)for(e=e.child;e!==null;)nb(e,t,n),e=e.sibling}function nb(e,t,n){switch(e.tag){case 26:ha(e,t,n),e.flags&Zl&&e.memoizedState!==null&&$C(n,An,e.memoizedState,e.memoizedProps);break;case 5:ha(e,t,n);break;case 3:case 4:var o=An;An=ks(e.stateNode.containerInfo),ha(e,t,n),An=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Zl,Zl=16777216,ha(e,t,n),Zl=o):ha(e,t,n));break;default:ha(e,t,n)}}function ob(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Gl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];st=o,ab(o,e)}ob(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ib(e),e=e.sibling}function ib(e){switch(e.tag){case 0:case 11:case 15:Gl(e),e.flags&2048&&ei(9,e,e.return);break;case 3:Gl(e);break;case 12:Gl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,us(e)):Gl(e);break;default:Gl(e)}}function us(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];st=o,ab(o,e)}ob(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ei(8,t,t.return),us(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,us(t));break;default:us(t)}e=e.sibling}}function ab(e,t){for(;st!==null;){var n=st;switch(n.tag){case 0:case 11:case 15:ei(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var o=n.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Cr(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,st=o;else e:for(n=e;st!==null;){o=st;var i=o.sibling,a=o.return;if(Kv(o),o===n){st=null;break e}if(i!==null){i.return=a,st=i;break e}st=a}}}var pC={getCacheForType:function(e){var t=yt(tt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return yt(tt).controller.signal}},mC=typeof WeakMap=="function"?WeakMap:Map,_e=0,Oe=null,ye=null,ve=0,Te=0,Kt=null,Po=!1,Ja=!1,lm=!1,po=0,qe=0,ti=0,wi=0,rm=0,Jt=0,Ya=0,or=null,Gt=null,lp=!1,Ws=0,lb=0,Ms=1/0,Os=null,jo=null,at=0,Qo=null,Xa=null,ro=0,rp=0,up=null,rb=null,ir=0,sp=null;function nn(){return(_e&2)!==0&&ve!==0?ve&-ve:le.T!==null?sm():gy()}function ub(){if(Jt===0)if((ve&536870912)===0||be){var e=Hu;Hu<<=1,(Hu&3932160)===0&&(Hu=262144),Jt=e}else Jt=536870912;return e=an.current,e!==null&&(e.flags|=32),Jt}function Pt(e,t,n){(e===Oe&&(Te===2||Te===9)||e.cancelPendingCommit!==null)&&(qa(e,0),Io(e,ve,Jt,!1)),Er(e,n),((_e&2)===0||e!==Oe)&&(e===Oe&&((_e&2)===0&&(wi|=n),qe===4&&Io(e,ve,Jt,!1)),In(e))}function sb(e,t,n){if((_e&6)!==0)throw Error(G(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||_r(e,t),i=o?yC(e,t):bd(e,t,!0),a=o;do{if(i===0){Ja&&!o&&Io(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!hC(n)){i=bd(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var r=e;i=or;var u=r.current.memoizedState.isDehydrated;if(u&&(qa(r,l).flags|=256),l=bd(r,l,!1),l!==2){if(lm&&!u){r.errorRecoveryDisabledLanes|=a,wi|=a,i=4;break e}a=Gt,Gt=i,a!==null&&(Gt===null?Gt=a:Gt.push.apply(Gt,a))}i=l}if(a=!1,i!==2)continue}}if(i===1){qa(e,0),Io(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(G(345));case 4:if((t&4194048)!==t)break;case 6:Io(o,t,Jt,!Po);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(G(329))}if((t&62914560)===t&&(i=Ws+300-Wt(),10<i)){if(Io(o,t,Jt,!Po),Vs(o,0,!0)!==0)break e;ro=t,o.timeoutHandle=Db(w0.bind(null,o,n,Gt,Os,lp,t,Jt,wi,Ya,Po,a,"Throttled",-0,0),i);break e}w0(o,n,Gt,Os,lp,t,Jt,wi,Ya,Po,a,null,-0,0)}}break}while(!0);In(e)}function w0(e,t,n,o,i,a,l,r,u,s,c,d,f,m){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:oo},nb(t,a,d);var g=(a&62914560)===a?Ws-Wt():(a&4194048)===a?lb-Wt():0;if(g=FC(d,g),g!==null){ro=a,e.cancelPendingCommit=g(D0.bind(null,e,t,a,n,o,i,l,r,u,c,d,null,f,m)),Io(e,a,l,!s);return}}D0(e,t,a,n,o,i,l,r,u)}function hC(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var o=0;o<n.length;o++){var i=n[o],a=i.getSnapshot;i=i.value;try{if(!on(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Io(e,t,n,o){t&=~rm,t&=~wi,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-tn(i),l=1<<a;o[a]=-1,i&=~l}n!==0&&py(e,n,t)}function ec(){return(_e&6)===0?(Dr(0,!1),!1):!0}function um(){if(ye!==null){if(Te===0)var e=ye.return;else e=ye,io=ki=null,jp(e),La=null,dr=0,e=ye;for(;e!==null;)Vv(e.alternate,e),e=e.return;ye=null}}function qa(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,zC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ro=0,um(),Oe=e,ye=n=ao(e.current,null),ve=t,Te=0,Kt=null,Po=!1,Ja=_r(e,t),lm=!1,Ya=Jt=rm=wi=ti=qe=0,Gt=or=null,lp=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var i=31-tn(o),a=1<<i;t|=e[i],o&=~a}return po=t,Zs(),n}function cb(e,t){fe=null,le.H=mr,t===Fa||t===Qs?(t=a0(),Te=3):t===Pp?(t=a0(),Te=4):Te=t===nm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Kt=t,ye===null&&(qe=1,ws(e,gn(t,e.current)))}function fb(){var e=an.current;return e===null?!0:(ve&4194048)===ve?vn===null:(ve&62914560)===ve||(ve&536870912)!==0?e===vn:!1}function db(){var e=le.H;return le.H=mr,e===null?mr:e}function pb(){var e=le.A;return le.A=pC,e}function Rs(){qe=4,Po||(ve&4194048)!==ve&&an.current!==null||(Ja=!0),(ti&134217727)===0&&(wi&134217727)===0||Oe===null||Io(Oe,ve,Jt,!1)}function bd(e,t,n){var o=_e;_e|=2;var i=db(),a=pb();(Oe!==e||ve!==t)&&(Os=null,qa(e,t)),t=!1;var l=qe;e:do try{if(Te!==0&&ye!==null){var r=ye,u=Kt;switch(Te){case 8:um(),l=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(t=!0);var s=Te;if(Te=0,Kt=null,Da(e,r,u,s),n&&Ja){l=0;break e}break;default:s=Te,Te=0,Kt=null,Da(e,r,u,s)}}gC(),l=qe;break}catch(c){cb(e,c)}while(!0);return t&&e.shellSuspendCounter++,io=ki=null,_e=o,le.H=i,le.A=a,ye===null&&(Oe=null,ve=0,Zs()),l}function gC(){for(;ye!==null;)mb(ye)}function yC(e,t){var n=_e;_e|=2;var o=db(),i=pb();Oe!==e||ve!==t?(Os=null,Ms=Wt()+500,qa(e,t)):Ja=_r(e,t);e:do try{if(Te!==0&&ye!==null){t=ye;var a=Kt;t:switch(Te){case 1:Te=0,Kt=null,Da(e,t,a,1);break;case 2:case 9:if(i0(a)){Te=0,Kt=null,A0(t);break}t=function(){Te!==2&&Te!==9||Oe!==e||(Te=7),In(e)},a.then(t,t);break e;case 3:Te=7;break e;case 4:Te=5;break e;case 7:i0(a)?(Te=0,Kt=null,A0(t)):(Te=0,Kt=null,Da(e,t,a,7));break;case 5:var l=null;switch(ye.tag){case 26:l=ye.memoizedState;case 5:case 27:var r=ye;if(l?Lb(l):r.stateNode.complete){Te=0,Kt=null;var u=r.sibling;if(u!==null)ye=u;else{var s=r.return;s!==null?(ye=s,tc(s)):ye=null}break t}}Te=0,Kt=null,Da(e,t,a,5);break;case 6:Te=0,Kt=null,Da(e,t,a,6);break;case 8:um(),qe=6;break e;default:throw Error(G(462))}}vC();break}catch(c){cb(e,c)}while(!0);return io=ki=null,le.H=o,le.A=i,_e=n,ye!==null?0:(Oe=null,ve=0,Zs(),qe)}function vC(){for(;ye!==null&&!IT();)mb(ye)}function mb(e){var t=Iv(e.alternate,e,po);e.memoizedProps=e.pendingProps,t===null?tc(e):ye=t}function A0(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=x0(n,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=x0(n,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:jp(t);default:Vv(n,t),t=ye=Vy(t,po),t=Iv(n,t,po)}e.memoizedProps=e.pendingProps,t===null?tc(e):ye=t}function Da(e,t,n,o){io=ki=null,jp(t),La=null,dr=0;var i=t.return;try{if(lC(e,i,t,n,ve)){qe=1,ws(e,gn(n,e.current)),ye=null;return}}catch(a){if(i!==null)throw ye=i,a;qe=1,ws(e,gn(n,e.current)),ye=null;return}t.flags&32768?(be||o===1?e=!0:Ja||(ve&536870912)!==0?e=!1:(Po=e=!0,(o===2||o===9||o===3||o===6)&&(o=an.current,o!==null&&o.tag===13&&(o.flags|=16384))),hb(t,e)):tc(t)}function tc(e){var t=e;do{if((t.flags&32768)!==0){hb(t,Po);return}e=t.return;var n=sC(t.alternate,t,po);if(n!==null){ye=n;return}if(t=t.sibling,t!==null){ye=t;return}ye=t=e}while(t!==null);qe===0&&(qe=5)}function hb(e,t){do{var n=cC(e.alternate,e);if(n!==null){n.flags&=32767,ye=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ye=e;return}ye=e=n}while(e!==null);qe=6,ye=null}function D0(e,t,n,o,i,a,l,r,u){e.cancelPendingCommit=null;do nc();while(at!==0);if((_e&6)!==0)throw Error(G(327));if(t!==null){if(t===e.current)throw Error(G(177));if(a=t.lanes|t.childLanes,a|=zp,FT(e,n,a,l,r,u),e===Oe&&(ye=Oe=null,ve=0),Xa=t,Qo=e,ro=n,rp=a,up=i,rb=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_C(gs,function(){return Sb(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=le.T,le.T=null,i=Ee.p,Ee.p=2,l=_e,_e|=4;try{fC(e,t,n)}finally{_e=l,Ee.p=i,le.T=o}}at=1,gb(),yb(),vb()}}function gb(){if(at===1){at=0;var e=Qo,t=Xa,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=le.T,le.T=null;var o=Ee.p;Ee.p=2;var i=_e;_e|=4;try{Wv(t,e);var a=pp,l=Ly(e.containerInfo),r=a.focusedElem,u=a.selectionRange;if(l!==r&&r&&r.ownerDocument&&zy(r.ownerDocument.documentElement,r)){if(u!==null&&Rp(r)){var s=u.start,c=u.end;if(c===void 0&&(c=s),"selectionStart"in r)r.selectionStart=s,r.selectionEnd=Math.min(c,r.value.length);else{var d=r.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var m=f.getSelection(),g=r.textContent.length,b=Math.min(u.start,g),S=u.end===void 0?b:Math.min(u.end,g);!m.extend&&b>S&&(l=S,S=b,b=l);var h=Fg(r,b),y=Fg(r,S);if(h&&y&&(m.rangeCount!==1||m.anchorNode!==h.node||m.anchorOffset!==h.offset||m.focusNode!==y.node||m.focusOffset!==y.offset)){var p=d.createRange();p.setStart(h.node,h.offset),m.removeAllRanges(),b>S?(m.addRange(p),m.extend(y.node,y.offset)):(p.setEnd(y.node,y.offset),m.addRange(p))}}}}for(d=[],m=r;m=m.parentNode;)m.nodeType===1&&d.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<d.length;r++){var v=d[r];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}Ps=!!dp,pp=dp=null}finally{_e=i,Ee.p=o,le.T=n}}e.current=t,at=2}}function yb(){if(at===2){at=0;var e=Qo,t=Xa,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=le.T,le.T=null;var o=Ee.p;Ee.p=2;var i=_e;_e|=4;try{Qv(e,t.alternate,t)}finally{_e=i,Ee.p=o,le.T=n}}at=3}}function vb(){if(at===4||at===3){at=0,VT();var e=Qo,t=Xa,n=ro,o=rb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,Xa=Qo=null,bb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(jo=null),Np(n),t=t.stateNode,en&&typeof en.onCommitFiberRoot=="function")try{en.onCommitFiberRoot(xr,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=le.T,i=Ee.p,Ee.p=2,le.T=null;try{for(var a=e.onRecoverableError,l=0;l<o.length;l++){var r=o[l];a(r.value,{componentStack:r.stack})}}finally{le.T=t,Ee.p=i}}(ro&3)!==0&&nc(),In(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===sp?ir++:(ir=0,sp=e):ir=0,Dr(0,!1)}}function bb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Cr(t)))}function nc(){return gb(),yb(),vb(),Sb()}function Sb(){if(at!==5)return!1;var e=Qo,t=rp;rp=0;var n=Np(ro),o=le.T,i=Ee.p;try{Ee.p=32>n?32:n,le.T=null,n=up,up=null;var a=Qo,l=ro;if(at=0,Xa=Qo=null,ro=0,(_e&6)!==0)throw Error(G(331));var r=_e;if(_e|=4,ib(a.current),tb(a,a.current,l,n),_e=r,Dr(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(xr,a)}catch{}return!0}finally{Ee.p=i,le.T=o,bb(e,t)}}function M0(e,t,n){t=gn(n,t),t=np(e.stateNode,t,2),e=Zo(e,t,2),e!==null&&(Er(e,2),In(e))}function Ne(e,t,n){if(e.tag===3)M0(e,e,n);else for(;t!==null;){if(t.tag===3){M0(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(jo===null||!jo.has(o))){e=gn(n,e),n=Bv(2),o=Zo(t,n,2),o!==null&&(Hv(n,o,t,e),Er(o,2),In(o));break}}t=t.return}}function Sd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new mC;var i=new Set;o.set(t,i)}else i=o.get(t),i===void 0&&(i=new Set,o.set(t,i));i.has(n)||(lm=!0,i.add(n),e=bC.bind(null,e,t,n),t.then(e,e))}function bC(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Oe===e&&(ve&n)===n&&(qe===4||qe===3&&(ve&62914560)===ve&&300>Wt()-Ws?(_e&2)===0&&qa(e,0):rm|=n,Ya===ve&&(Ya=0)),In(e)}function xb(e,t){t===0&&(t=dy()),e=Hi(e,t),e!==null&&(Er(e,t),In(e))}function SC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xb(e,n)}function xC(e,t){var n=0;switch(e.tag){case 31:case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(G(314))}o!==null&&o.delete(t),xb(e,n)}function _C(e,t){return Ep(e,t)}var zs=null,ya=null,cp=!1,Ls=!1,xd=!1,Vo=0;function In(e){e!==ya&&e.next===null&&(ya===null?zs=ya=e:ya=ya.next=e),Ls=!0,cp||(cp=!0,TC())}function Dr(e,t){if(!xd&&Ls){xd=!0;do for(var n=!1,o=zs;o!==null;){if(!t)if(e!==0){var i=o.pendingLanes;if(i===0)var a=0;else{var l=o.suspendedLanes,r=o.pingedLanes;a=(1<<31-tn(42|e)+1)-1,a&=i&~(l&~r),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,O0(o,a))}else a=ve,a=Vs(o,o===Oe?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||_r(o,a)||(n=!0,O0(o,a));o=o.next}while(n);xd=!1}}function EC(){_b()}function _b(){Ls=cp=!1;var e=0;Vo!==0&&RC()&&(e=Vo);for(var t=Wt(),n=null,o=zs;o!==null;){var i=o.next,a=Eb(o,t);a===0?(o.next=null,n===null?zs=i:n.next=i,i===null&&(ya=n)):(n=o,(e!==0||(a&3)!==0)&&(Ls=!0)),o=i}at!==0&&at!==5||Dr(e,!1),Vo!==0&&(Vo=0)}function Eb(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var l=31-tn(a),r=1<<l,u=i[l];u===-1?((r&n)===0||(r&o)!==0)&&(i[l]=$T(r,t)):u<=t&&(e.expiredLanes|=r),a&=~r}if(t=Oe,n=ve,n=Vs(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Te===2||Te===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&$f(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||_r(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&$f(o),Np(n)){case 2:case 8:n=cy;break;case 32:n=gs;break;case 268435456:n=fy;break;default:n=gs}return o=Tb.bind(null,e),n=Ep(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&$f(o),e.callbackPriority=2,e.callbackNode=null,2}function Tb(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(nc()&&e.callbackNode!==n)return null;var o=ve;return o=Vs(e,e===Oe?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(sb(e,o,t),Eb(e,Wt()),e.callbackNode!=null&&e.callbackNode===n?Tb.bind(null,e):null)}function O0(e,t){if(nc())return null;sb(e,t,!0)}function TC(){LC(function(){(_e&6)!==0?Ep(sy,EC):_b()})}function sm(){if(Vo===0){var e=Pa;e===0&&(e=Bu,Bu<<=1,(Bu&261888)===0&&(Bu=256)),Vo=e}return Vo}function R0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Wu(""+e)}function z0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function NC(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=R0((i[It]||null).action),l=o.submitter;l&&(t=(t=l[It]||null)?R0(t.formAction):l.getAttribute("formAction"),t!==null&&(a=t,l=null));var r=new Ys("action","action",null,o,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Vo!==0){var u=l?z0(i,l):new FormData(i);ep(n,{pending:!0,data:u,method:i.method,action:a},null,u)}}else typeof a=="function"&&(r.preventDefault(),u=l?z0(i,l):new FormData(i),ep(n,{pending:!0,data:u,method:i.method,action:a},a,u))},currentTarget:i}]})}}for(ju=0;ju<Vd.length;ju++)Qu=Vd[ju],L0=Qu.toLowerCase(),B0=Qu[0].toUpperCase()+Qu.slice(1),Dn(L0,"on"+B0);var Qu,L0,B0,ju;Dn(Hy,"onAnimationEnd");Dn(ky,"onAnimationIteration");Dn(Uy,"onAnimationStart");Dn("dblclick","onDoubleClick");Dn("focusin","onFocus");Dn("focusout","onBlur");Dn(YN,"onTransitionRun");Dn(XN,"onTransitionStart");Dn(qN,"onTransitionCancel");Dn(Gy,"onTransitionEnd");Ua("onMouseEnter",["mouseout","mouseover"]);Ua("onMouseLeave",["mouseout","mouseover"]);Ua("onPointerEnter",["pointerout","pointerover"]);Ua("onPointerLeave",["pointerout","pointerover"]);zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));zi("onBeforeInput",["compositionend","keypress","textInput","paste"]);zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),CC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hr));function Nb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],i=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var l=o.length-1;0<=l;l--){var r=o[l],u=r.instance,s=r.currentTarget;if(r=r.listener,u!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=s;try{a(i)}catch(c){vs(c)}i.currentTarget=null,a=u}else for(l=0;l<o.length;l++){if(r=o[l],u=r.instance,s=r.currentTarget,r=r.listener,u!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=s;try{a(i)}catch(c){vs(c)}i.currentTarget=null,a=u}}}}function ge(e,t){var n=t[Ld];n===void 0&&(n=t[Ld]=new Set);var o=e+"__bubble";n.has(o)||(Cb(t,e,2,!1),n.add(o))}function _d(e,t,n){var o=0;t&&(o|=4),Cb(n,e,o,t)}var Ku="_reactListening"+Math.random().toString(36).slice(2);function cm(e){if(!e[Ku]){e[Ku]=!0,yy.forEach(function(n){n!=="selectionchange"&&(CC.has(n)||_d(n,!1,e),_d(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ku]||(t[Ku]=!0,_d("selectionchange",!1,t))}}function Cb(e,t,n,o){switch(Gb(t)){case 2:var i=ew;break;case 8:i=tw;break;default:i=mm}n=i.bind(null,t,n,e),i=void 0,!Gd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ed(e,t,n,o,i){var a=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var l=o.tag;if(l===3||l===4){var r=o.stateNode.containerInfo;if(r===i)break;if(l===4)for(l=o.return;l!==null;){var u=l.tag;if((u===3||u===4)&&l.stateNode.containerInfo===i)return;l=l.return}for(;r!==null;){if(l=Sa(r),l===null)return;if(u=l.tag,u===5||u===6||u===26||u===27){o=a=l;continue e}r=r.parentNode}}o=o.return}Ny(function(){var s=a,c=Ap(n),d=[];e:{var f=Py.get(e);if(f!==void 0){var m=Ys,g=e;switch(e){case"keypress":if(ts(n)===0)break e;case"keydown":case"keyup":m=xN;break;case"focusin":g="focus",m=td;break;case"focusout":g="blur",m=td;break;case"beforeblur":case"afterblur":m=td;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Vg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=sN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=TN;break;case Hy:case ky:case Uy:m=dN;break;case Gy:m=CN;break;case"scroll":case"scrollend":m=rN;break;case"wheel":m=AN;break;case"copy":case"cut":case"paste":m=mN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Xg;break;case"toggle":case"beforetoggle":m=MN}var b=(t&4)!==0,S=!b&&(e==="scroll"||e==="scrollend"),h=b?f!==null?f+"Capture":null:f;b=[];for(var y=s,p;y!==null;){var v=y;if(p=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||p===null||h===null||(v=rr(y,h),v!=null&&b.push(gr(y,v,p))),S)break;y=y.return}0<b.length&&(f=new m(f,g,null,n,c),d.push({event:f,listeners:b}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==Ud&&(g=n.relatedTarget||n.fromElement)&&(Sa(g)||g[Qa]))break e;if((m||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,m?(g=n.relatedTarget||n.toElement,m=s,g=g?Sa(g):null,g!==null&&(S=Sr(g),b=g.tag,g!==S||b!==5&&b!==27&&b!==6)&&(g=null)):(m=null,g=s),m!==g)){if(b=Vg,v="onMouseLeave",h="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(b=Xg,v="onPointerLeave",h="onPointerEnter",y="pointer"),S=m==null?f:Xl(m),p=g==null?f:Xl(g),f=new b(v,y+"leave",m,n,c),f.target=S,f.relatedTarget=p,v=null,Sa(c)===s&&(b=new b(h,y+"enter",g,n,c),b.target=p,b.relatedTarget=S,v=b),S=v,m&&g)t:{for(b=wC,h=m,y=g,p=0,v=h;v;v=b(v))p++;v=0;for(var x=y;x;x=b(x))v++;for(;0<p-v;)h=b(h),p--;for(;0<v-p;)y=b(y),v--;for(;p--;){if(h===y||y!==null&&h===y.alternate){b=h;break t}h=b(h),y=b(y)}b=null}else b=null;m!==null&&H0(d,f,m,b,!1),g!==null&&S!==null&&H0(d,S,g,b,!0)}}e:{if(f=s?Xl(s):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var T=Qg;else if(jg(f))if(Oy)T=PN;else{T=UN;var E=kN}else m=f.nodeName,!m||m.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?s&&wp(s.elementType)&&(T=Qg):T=GN;if(T&&(T=T(e,s))){My(d,T,n,c);break e}E&&E(e,f,s),e==="focusout"&&s&&f.type==="number"&&s.memoizedProps.value!=null&&kd(f,"number",f.value)}switch(E=s?Xl(s):window,e){case"focusin":(jg(E)||E.contentEditable==="true")&&(Ea=E,Pd=s,Kl=null);break;case"focusout":Kl=Pd=Ea=null;break;case"mousedown":Id=!0;break;case"contextmenu":case"mouseup":case"dragend":Id=!1,Jg(d,n,c);break;case"selectionchange":if(VN)break;case"keydown":case"keyup":Jg(d,n,c)}var N;if(Op)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else _a?Ay(e,n)&&(w="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(w="onCompositionStart");w&&(wy&&n.locale!=="ko"&&(_a||w!=="onCompositionStart"?w==="onCompositionEnd"&&_a&&(N=Cy()):(Go=c,Dp="value"in Go?Go.value:Go.textContent,_a=!0)),E=Bs(s,w),0<E.length&&(w=new Yg(w,e,null,n,c),d.push({event:w,listeners:E}),N?w.data=N:(N=Dy(n),N!==null&&(w.data=N)))),(N=RN?zN(e,n):LN(e,n))&&(w=Bs(s,"onBeforeInput"),0<w.length&&(E=new Yg("onBeforeInput","beforeinput",null,n,c),d.push({event:E,listeners:w}),E.data=N)),NC(d,e,s,n,c)}Nb(d,t)})}function gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Bs(e,t){for(var n=t+"Capture",o=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=rr(e,n),i!=null&&o.unshift(gr(e,i,a)),i=rr(e,t),i!=null&&o.push(gr(e,i,a))),e.tag===3)return o;e=e.return}return[]}function wC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function H0(e,t,n,o,i){for(var a=t._reactName,l=[];n!==null&&n!==o;){var r=n,u=r.alternate,s=r.stateNode;if(r=r.tag,u!==null&&u===o)break;r!==5&&r!==26&&r!==27||s===null||(u=s,i?(s=rr(n,a),s!=null&&l.unshift(gr(n,s,u))):i||(s=rr(n,a),s!=null&&l.push(gr(n,s,u)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var AC=/\r\n?/g,DC=/\u0000|\uFFFD/g;function k0(e){return(typeof e=="string"?e:""+e).replace(AC,`-`).replace(DC,"")}function wb(e,t){return t=k0(t),k0(e)===t}function we(e,t,n,o,i,a){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||Ga(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&Ga(e,""+o);break;case"className":Uu(e,"class",o);break;case"tabIndex":Uu(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Uu(e,n,o);break;case"style":Ty(e,o,a);break;case"data":if(t!=="object"){Uu(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Wu(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(n==="formAction"?(t!=="input"&&we(e,t,"name",i.name,i,null),we(e,t,"formEncType",i.formEncType,i,null),we(e,t,"formMethod",i.formMethod,i,null),we(e,t,"formTarget",i.formTarget,i,null)):(we(e,t,"encType",i.encType,i,null),we(e,t,"method",i.method,i,null),we(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Wu(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=oo);break;case"onScroll":o!=null&&ge("scroll",e);break;case"onScrollEnd":o!=null&&ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(G(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(G(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}n=Wu(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":o===!0?e.setAttribute(n,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":ge("beforetoggle",e),ge("toggle",e),Ju(e,"popover",o);break;case"xlinkActuate":Kn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Kn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Kn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Kn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Kn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Kn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Kn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Kn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Kn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Ju(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=aN.get(n)||n,Ju(e,n,o))}}function fp(e,t,n,o,i,a){switch(n){case"style":Ty(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(G(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(G(60));e.innerHTML=n}}break;case"children":typeof o=="string"?Ga(e,o):(typeof o=="number"||typeof o=="bigint")&&Ga(e,""+o);break;case"onScroll":o!=null&&ge("scroll",e);break;case"onScrollEnd":o!=null&&ge("scrollend",e);break;case"onClick":o!=null&&(e.onclick=oo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vy.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),a=e[It]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof o=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i);break e}n in e?e[n]=o:o===!0?e.setAttribute(n,""):Ju(e,n,o)}}}function vt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ge("error",e),ge("load",e);var o=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var l=n[a];if(l!=null)switch(a){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:we(e,t,a,l,n,null)}}i&&we(e,t,"srcSet",n.srcSet,n,null),o&&we(e,t,"src",n.src,n,null);return;case"input":ge("invalid",e);var r=a=l=i=null,u=null,s=null;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"name":i=c;break;case"type":l=c;break;case"checked":u=c;break;case"defaultChecked":s=c;break;case"value":a=c;break;case"defaultValue":r=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(G(137,t));break;default:we(e,t,o,c,n,null)}}xy(e,a,r,u,s,l,i,!1);return;case"select":ge("invalid",e),o=l=a=null;for(i in n)if(n.hasOwnProperty(i)&&(r=n[i],r!=null))switch(i){case"value":a=r;break;case"defaultValue":l=r;break;case"multiple":o=r;default:we(e,t,i,r,n,null)}t=a,n=l,e.multiple=!!o,t!=null?Oa(e,!!o,t,!1):n!=null&&Oa(e,!!o,n,!0);return;case"textarea":ge("invalid",e),a=i=o=null;for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"value":o=r;break;case"defaultValue":i=r;break;case"children":a=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(G(91));break;default:we(e,t,l,r,n,null)}Ey(e,o,i,a);return;case"option":for(u in n)n.hasOwnProperty(u)&&(o=n[u],o!=null)&&(u==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":we(e,t,u,o,n,null));return;case"dialog":ge("beforetoggle",e),ge("toggle",e),ge("cancel",e),ge("close",e);break;case"iframe":case"object":ge("load",e);break;case"video":case"audio":for(o=0;o<hr.length;o++)ge(hr[o],e);break;case"image":ge("error",e),ge("load",e);break;case"details":ge("toggle",e);break;case"embed":case"source":case"link":ge("error",e),ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case"children":case"dangerouslySetInnerHTML":throw Error(G(137,t));default:we(e,t,s,o,n,null)}return;default:if(wp(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&fp(e,t,c,o,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(o=n[r],o!=null&&we(e,t,r,o,n,null))}function MC(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,r=null,u=null,s=null,c=null;for(m in n){var d=n[m];if(n.hasOwnProperty(m)&&d!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":u=d;default:o.hasOwnProperty(m)||we(e,t,m,null,o,d)}}for(var f in o){var m=o[f];if(d=n[f],o.hasOwnProperty(f)&&(m!=null||d!=null))switch(f){case"type":a=m;break;case"name":i=m;break;case"checked":s=m;break;case"defaultChecked":c=m;break;case"value":l=m;break;case"defaultValue":r=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(G(137,t));break;default:m!==d&&we(e,t,f,m,o,d)}}Hd(e,l,r,u,s,c,a,i);return;case"select":m=l=r=f=null;for(a in n)if(u=n[a],n.hasOwnProperty(a)&&u!=null)switch(a){case"value":break;case"multiple":m=u;default:o.hasOwnProperty(a)||we(e,t,a,null,o,u)}for(i in o)if(a=o[i],u=n[i],o.hasOwnProperty(i)&&(a!=null||u!=null))switch(i){case"value":f=a;break;case"defaultValue":r=a;break;case"multiple":l=a;default:a!==u&&we(e,t,i,a,o,u)}t=r,n=l,o=m,f!=null?Oa(e,!!n,f,!1):!!o!=!!n&&(t!=null?Oa(e,!!n,t,!0):Oa(e,!!n,n?[]:"",!1));return;case"textarea":m=f=null;for(r in n)if(i=n[r],n.hasOwnProperty(r)&&i!=null&&!o.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:we(e,t,r,null,o,i)}for(l in o)if(i=o[l],a=n[l],o.hasOwnProperty(l)&&(i!=null||a!=null))switch(l){case"value":f=i;break;case"defaultValue":m=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(G(91));break;default:i!==a&&we(e,t,l,i,o,a)}_y(e,f,m);return;case"option":for(var g in n)f=n[g],n.hasOwnProperty(g)&&f!=null&&!o.hasOwnProperty(g)&&(g==="selected"?e.selected=!1:we(e,t,g,null,o,f));for(u in o)f=o[u],m=n[u],o.hasOwnProperty(u)&&f!==m&&(f!=null||m!=null)&&(u==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":we(e,t,u,f,o,m));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!o.hasOwnProperty(b)&&we(e,t,b,null,o,f);for(s in o)if(f=o[s],m=n[s],o.hasOwnProperty(s)&&f!==m&&(f!=null||m!=null))switch(s){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(G(137,t));break;default:we(e,t,s,f,o,m)}return;default:if(wp(t)){for(var S in n)f=n[S],n.hasOwnProperty(S)&&f!==void 0&&!o.hasOwnProperty(S)&&fp(e,t,S,void 0,o,f);for(c in o)f=o[c],m=n[c],!o.hasOwnProperty(c)||f===m||f===void 0&&m===void 0||fp(e,t,c,f,o,m);return}}for(var h in n)f=n[h],n.hasOwnProperty(h)&&f!=null&&!o.hasOwnProperty(h)&&we(e,t,h,null,o,f);for(d in o)f=o[d],m=n[d],!o.hasOwnProperty(d)||f===m||f==null&&m==null||we(e,t,d,f,o,m)}function U0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function OC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),o=0;o<n.length;o++){var i=n[o],a=i.transferSize,l=i.initiatorType,r=i.duration;if(a&&r&&U0(l)){for(l=0,r=i.responseEnd,o+=1;o<n.length;o++){var u=n[o],s=u.startTime;if(s>r)break;var c=u.transferSize,d=u.initiatorType;c&&U0(d)&&(u=u.responseEnd,l+=c*(u<r?1:(r-s)/(u-s)))}if(--o,t+=8*(a+l)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var dp=null,pp=null;function Hs(e){return e.nodeType===9?e:e.ownerDocument}function G0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ab(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function mp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Td=null;function RC(){var e=window.event;return e&&e.type==="popstate"?e===Td?!1:(Td=e,!0):(Td=null,!1)}var Db=typeof setTimeout=="function"?setTimeout:void 0,zC=typeof clearTimeout=="function"?clearTimeout:void 0,P0=typeof Promise=="function"?Promise:void 0,LC=typeof queueMicrotask=="function"?queueMicrotask:typeof P0<"u"?function(e){return P0.resolve(null).then(e).catch(BC)}:Db;function BC(e){setTimeout(function(){throw e})}function oi(e){return e==="head"}function I0(e,t){var n=t,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(o===0){e.removeChild(i),ja(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")ar(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ar(n);for(var a=n.firstChild;a;){var l=a.nextSibling,r=a.nodeName;a[Tr]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=l}}else n==="body"&&ar(e.ownerDocument.body);n=i}while(n);ja(t)}function V0(e,t){var n=e;e=0;do{var o=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=o}while(n)}function hp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":hp(n),Cp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function HC(e,t,n,o){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Tr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=bn(e.nextSibling),e===null)break}return null}function kC(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=bn(e.nextSibling),e===null))return null;return e}function Mb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=bn(e.nextSibling),e===null))return null;return e}function gp(e){return e.data==="$?"||e.data==="$~"}function yp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function UC(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var o=function(){t(),n.removeEventListener("DOMContentLoaded",o)};n.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function bn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var vp=null;function Y0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return bn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function X0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Ob(e,t,n){switch(t=Hs(n),e){case"html":if(e=t.documentElement,!e)throw Error(G(452));return e;case"head":if(e=t.head,!e)throw Error(G(453));return e;case"body":if(e=t.body,!e)throw Error(G(454));return e;default:throw Error(G(451))}}function ar(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Cp(e)}var Sn=new Map,q0=new Set;function ks(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var mo=Ee.d;Ee.d={f:GC,r:PC,D:IC,C:VC,L:YC,m:XC,X:ZC,S:qC,M:jC};function GC(){var e=mo.f(),t=ec();return e||t}function PC(e){var t=Ka(e);t!==null&&t.tag===5&&t.type==="form"?Tv(t):mo.r(e)}var Wa=typeof document>"u"?null:document;function Rb(e,t,n){var o=Wa;if(o&&typeof t=="string"&&t){var i=hn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),q0.has(i)||(q0.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),vt(t,"link",e),ct(t),o.head.appendChild(t)))}}function IC(e){mo.D(e),Rb("dns-prefetch",e,null)}function VC(e,t){mo.C(e,t),Rb("preconnect",e,t)}function YC(e,t,n){mo.L(e,t,n);var o=Wa;if(o&&e&&t){var i='link[rel="preload"][as="'+hn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+hn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+hn(n.imageSizes)+'"]')):i+='[href="'+hn(e)+'"]';var a=i;switch(t){case"style":a=Za(e);break;case"script":a=el(e)}Sn.has(a)||(e=ke({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Sn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(Mr(a))||t==="script"&&o.querySelector(Or(a))||(t=o.createElement("link"),vt(t,"link",e),ct(t),o.head.appendChild(t)))}}function XC(e,t){mo.m(e,t);var n=Wa;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+hn(o)+'"][href="'+hn(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=el(e)}if(!Sn.has(a)&&(e=ke({rel:"modulepreload",href:e},t),Sn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Or(a)))return}o=n.createElement("link"),vt(o,"link",e),ct(o),n.head.appendChild(o)}}}function qC(e,t,n){mo.S(e,t,n);var o=Wa;if(o&&e){var i=Ma(o).hoistableStyles,a=Za(e);t=t||"default";var l=i.get(a);if(!l){var r={loading:0,preload:null};if(l=o.querySelector(Mr(a)))r.loading=5;else{e=ke({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Sn.get(a))&&fm(e,n);var u=l=o.createElement("link");ct(u),vt(u,"link",e),u._p=new Promise(function(s,c){u.onload=s,u.onerror=c}),u.addEventListener("load",function(){r.loading|=1}),u.addEventListener("error",function(){r.loading|=2}),r.loading|=4,ss(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:r},i.set(a,l)}}}function ZC(e,t){mo.X(e,t);var n=Wa;if(n&&e){var o=Ma(n).hoistableScripts,i=el(e),a=o.get(i);a||(a=n.querySelector(Or(i)),a||(e=ke({src:e,async:!0},t),(t=Sn.get(i))&&dm(e,t),a=n.createElement("script"),ct(a),vt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function jC(e,t){mo.M(e,t);var n=Wa;if(n&&e){var o=Ma(n).hoistableScripts,i=el(e),a=o.get(i);a||(a=n.querySelector(Or(i)),a||(e=ke({src:e,async:!0,type:"module"},t),(t=Sn.get(i))&&dm(e,t),a=n.createElement("script"),ct(a),vt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function Z0(e,t,n,o){var i=(i=Yo.current)?ks(i):null;if(!i)throw Error(G(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Za(n.href),n=Ma(i).hoistableStyles,o=n.get(t),o||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Za(n.href);var a=Ma(i).hoistableStyles,l=a.get(e);if(l||(i=i.ownerDocument||i,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,l),(a=i.querySelector(Mr(e)))&&!a._p&&(l.instance=a,l.state.loading=5),Sn.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},Sn.set(e,n),a||QC(i,e,n,l.state))),t&&o===null)throw Error(G(528,""));return l}if(t&&o!==null)throw Error(G(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=el(n),n=Ma(i).hoistableScripts,o=n.get(t),o||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(G(444,e))}}function Za(e){return'href="'+hn(e)+'"'}function Mr(e){return'link[rel="stylesheet"]['+e+"]"}function zb(e){return ke({},e,{"data-precedence":e.precedence,precedence:null})}function QC(e,t,n,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),vt(t,"link",n),ct(t),e.head.appendChild(t))}function el(e){return'[src="'+hn(e)+'"]'}function Or(e){return"script[async]"+e}function j0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+hn(n.href)+'"]');if(o)return t.instance=o,ct(o),o;var i=ke({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),ct(o),vt(o,"style",i),ss(o,n.precedence,e),t.instance=o;case"stylesheet":i=Za(n.href);var a=e.querySelector(Mr(i));if(a)return t.state.loading|=4,t.instance=a,ct(a),a;o=zb(n),(i=Sn.get(i))&&fm(o,i),a=(e.ownerDocument||e).createElement("link"),ct(a);var l=a;return l._p=new Promise(function(r,u){l.onload=r,l.onerror=u}),vt(a,"link",o),t.state.loading|=4,ss(a,n.precedence,e),t.instance=a;case"script":return a=el(n.src),(i=e.querySelector(Or(a)))?(t.instance=i,ct(i),i):(o=n,(i=Sn.get(a))&&(o=ke({},n),dm(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),ct(i),vt(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(G(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,ss(o,n.precedence,e));return t.instance}function ss(e,t,n){for(var o=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=o.length?o[o.length-1]:null,a=i,l=0;l<o.length;l++){var r=o[l];if(r.dataset.precedence===t)a=r;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function fm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function dm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var cs=null;function Q0(e,t,n){if(cs===null){var o=new Map,i=cs=new Map;i.set(n,o)}else i=cs,o=i.get(n),o||(o=new Map,i.set(n,o));if(o.has(e))return o;for(o.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Tr]||a[ht]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var l=a.getAttribute(t)||"";l=e+l;var r=o.get(l);r?r.push(a):o.set(l,[a])}}return o}function K0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function KC(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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 Lb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $C(e,t,n,o){if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Za(o.href),a=t.querySelector(Mr(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Us.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ct(a);return}a=t.ownerDocument||t,o=zb(o),(i=Sn.get(i))&&fm(o,i),a=a.createElement("link"),ct(a);var l=a;l._p=new Promise(function(r,u){l.onload=r,l.onerror=u}),vt(a,"link",o),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Us.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Nd=0;function FC(e,t){return e.stylesheets&&e.count===0&&fs(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&fs(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Nd===0&&(Nd=62500*OC());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&fs(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Nd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function Us(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Gs=null;function fs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Gs=new Map,t.forEach(JC,e),Gs=null,Us.call(e))}function JC(e,t){if(!(t.state.loading&4)){var n=Gs.get(e);if(n)var o=n.get(null);else{n=new Map,Gs.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var l=i[a];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),o=l)}o&&n.set(null,o)}i=t.instance,l=i.getAttribute("data-precedence"),a=n.get(l)||o,a===o&&n.set(null,i),n.set(l,i),this.count++,o=Us.bind(this),i.addEventListener("load",o),i.addEventListener("error",o),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var yr={$$typeof:no,Provider:null,Consumer:null,_currentValue:Ei,_currentValue2:Ei,_threadCount:0};function WC(e,t,n,o,i,a,l,r,u){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ff(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ff(0),this.hiddenUpdates=Ff(null),this.identifierPrefix=o,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=u,this.incompleteTransitions=new Map}function Bb(e,t,n,o,i,a,l,r,u,s,c,d){return e=new WC(e,t,n,l,u,s,c,d,r),t=1,a===!0&&(t|=24),a=Ft(3,null,null,t),e.current=a,a.stateNode=e,t=Up(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},Ip(a),e}function Hb(e){return e?(e=Ca,e):Ca}function kb(e,t,n,o,i,a){i=Hb(i),o.context===null?o.context=i:o.pendingContext=i,o=qo(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=Zo(e,o,t),n!==null&&(Pt(n,e,t),Fl(n,e,t))}function $0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pm(e,t){$0(e,t),(e=e.alternate)&&$0(e,t)}function Ub(e){if(e.tag===13||e.tag===31){var t=Hi(e,67108864);t!==null&&Pt(t,e,67108864),pm(e,67108864)}}function F0(e){if(e.tag===13||e.tag===31){var t=nn();t=Tp(t);var n=Hi(e,t);n!==null&&Pt(n,e,t),pm(e,t)}}var Ps=!0;function ew(e,t,n,o){var i=le.T;le.T=null;var a=Ee.p;try{Ee.p=2,mm(e,t,n,o)}finally{Ee.p=a,le.T=i}}function tw(e,t,n,o){var i=le.T;le.T=null;var a=Ee.p;try{Ee.p=8,mm(e,t,n,o)}finally{Ee.p=a,le.T=i}}function mm(e,t,n,o){if(Ps){var i=bp(o);if(i===null)Ed(e,t,o,Is,n),J0(e,o);else if(ow(i,e,t,n,o))o.stopPropagation();else if(J0(e,o),t&4&&-1<nw.indexOf(e)){for(;i!==null;){var a=Ka(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var l=Si(a.pendingLanes);if(l!==0){var r=a;for(r.pendingLanes|=2,r.entangledLanes|=2;l;){var u=1<<31-tn(l);r.entanglements[1]|=u,l&=~u}In(a),(_e&6)===0&&(Ms=Wt()+500,Dr(0,!1))}}break;case 31:case 13:r=Hi(a,2),r!==null&&Pt(r,a,2),ec(),pm(a,2)}if(a=bp(o),a===null&&Ed(e,t,o,Is,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else Ed(e,t,o,null,n)}}function bp(e){return e=Ap(e),hm(e)}var Is=null;function hm(e){if(Is=null,e=Sa(e),e!==null){var t=Sr(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=iy(t),e!==null)return e;e=null}else if(n===31){if(e=ay(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Is=e,null}function Gb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(YT()){case sy:return 2;case cy:return 8;case gs:case XT:return 32;case fy:return 268435456;default:return 32}default:return 32}}var Sp=!1,Ko=null,$o=null,Fo=null,vr=new Map,br=new Map,ko=[],nw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function J0(e,t){switch(e){case"focusin":case"focusout":Ko=null;break;case"dragenter":case"dragleave":$o=null;break;case"mouseover":case"mouseout":Fo=null;break;case"pointerover":case"pointerout":vr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":br.delete(t.pointerId)}}function Pl(e,t,n,o,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ka(t),t!==null&&Ub(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ow(e,t,n,o,i){switch(t){case"focusin":return Ko=Pl(Ko,e,t,n,o,i),!0;case"dragenter":return $o=Pl($o,e,t,n,o,i),!0;case"mouseover":return Fo=Pl(Fo,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return vr.set(a,Pl(vr.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,br.set(a,Pl(br.get(a)||null,e,t,n,o,i)),!0}return!1}function Pb(e){var t=Sa(e.target);if(t!==null){var n=Sr(t);if(n!==null){if(t=n.tag,t===13){if(t=iy(n),t!==null){e.blockedOn=t,Bg(e.priority,function(){F0(n)});return}}else if(t===31){if(t=ay(n),t!==null){e.blockedOn=t,Bg(e.priority,function(){F0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ds(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);Ud=o,n.target.dispatchEvent(o),Ud=null}else return t=Ka(n),t!==null&&Ub(t),e.blockedOn=n,!1;t.shift()}return!0}function W0(e,t,n){ds(e)&&n.delete(t)}function iw(){Sp=!1,Ko!==null&&ds(Ko)&&(Ko=null),$o!==null&&ds($o)&&($o=null),Fo!==null&&ds(Fo)&&(Fo=null),vr.forEach(W0),br.forEach(W0)}function $u(e,t){e.blockedOn===t&&(e.blockedOn=null,Sp||(Sp=!0,lt.unstable_scheduleCallback(lt.unstable_NormalPriority,iw)))}var Fu=null;function ey(e){Fu!==e&&(Fu=e,lt.unstable_scheduleCallback(lt.unstable_NormalPriority,function(){Fu===e&&(Fu=null);for(var t=0;t<e.length;t+=3){var n=e[t],o=e[t+1],i=e[t+2];if(typeof o!="function"){if(hm(o||n)===null)continue;break}var a=Ka(n);a!==null&&(e.splice(t,3),t-=3,ep(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function ja(e){function t(u){return $u(u,e)}Ko!==null&&$u(Ko,e),$o!==null&&$u($o,e),Fo!==null&&$u(Fo,e),vr.forEach(t),br.forEach(t);for(var n=0;n<ko.length;n++){var o=ko[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<ko.length&&(n=ko[0],n.blockedOn===null);)Pb(n),n.blockedOn===null&&ko.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(o=0;o<n.length;o+=3){var i=n[o],a=n[o+1],l=i[It]||null;if(typeof a=="function")l||ey(n);else if(l){var r=null;if(a&&a.hasAttribute("formAction")){if(i=a,l=a[It]||null)r=l.formAction;else if(hm(i)!==null)continue}else r=l.action;typeof r=="function"?n[o+1]=r:(n.splice(o,3),o-=3),ey(n)}}}function Ib(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(l){return i=l})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),o||setTimeout(n,20)}function n(){if(!o&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function gm(e){this._internalRoot=e}oc.prototype.render=gm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));var n=t.current,o=nn();kb(n,o,e,t,null,null)};oc.prototype.unmount=gm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kb(e.current,2,null,e,null,null),ec(),t[Qa]=null}};function oc(e){this._internalRoot=e}oc.prototype.unstable_scheduleHydration=function(e){if(e){var t=gy();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ko.length&&t!==0&&t<ko[n].priority;n++);ko.splice(n,0,e),n===0&&Pb(e)}};var ty=ny.version;if(ty!=="19.2.4")throw Error(G(527,ty,"19.2.4"));Ee.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=HT(t),e=e!==null?ly(e):null,e=e===null?null:e.stateNode,e};var aw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:le,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Il=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Il.isDisabled&&Il.supportsFiber))try{xr=Il.inject(aw),en=Il}catch{}var Il;ic.createRoot=function(e,t){if(!oy(e))throw Error(G(299));var n=!1,o="",i=Rv,a=zv,l=Lv;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Bb(e,1,!1,null,null,n,o,null,i,a,l,Ib),e[Qa]=t.current,cm(e),new gm(t)};ic.hydrateRoot=function(e,t,n){if(!oy(e))throw Error(G(299));var o=!1,i="",a=Rv,l=zv,r=Lv,u=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=Bb(e,1,!0,t,n??null,o,i,u,a,l,r,Ib),t.context=Hb(null),n=t.current,o=nn(),o=Tp(o),i=qo(o),i.callback=null,Zo(n,i,o),n=o,t.current.lanes=n,Er(t,n),In(t),e[Qa]=t.current,cm(e),new oc(t)};ic.version="19.2.4"});var qb=Bt((Sz,Xb)=>{"use strict";function Yb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yb)}catch(e){console.error(e)}}Yb(),Xb.exports=Vb()});var jb=Bt(ac=>{"use strict";var lw=Symbol.for("react.transitional.element"),rw=Symbol.for("react.fragment");function Zb(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:lw,type:e,key:o,ref:t!==void 0?t:null,props:n}}ac.Fragment=rw;ac.jsx=Zb;ac.jsxs=Zb});var pe=Bt((_z,Qb)=>{"use strict";Qb.exports=jb()});var Ox=Bt(Mx=>{"use strict";var yl=Nt();function nD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oD=typeof Object.is=="function"?Object.is:nD,iD=yl.useState,aD=yl.useEffect,lD=yl.useLayoutEffect,rD=yl.useDebugValue;function uD(e,t){var n=t(),o=iD({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return lD(function(){i.value=n,i.getSnapshot=t,ah(i)&&a({inst:i})},[e,n,t]),aD(function(){return ah(i)&&a({inst:i}),e(function(){ah(i)&&a({inst:i})})},[e]),rD(n),n}function ah(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!oD(e,n)}catch{return!0}}function sD(e,t){return t()}var cD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?sD:uD;Mx.useSyncExternalStore=yl.useSyncExternalStore!==void 0?yl.useSyncExternalStore:cD});var zx=Bt((hH,Rx)=>{"use strict";Rx.exports=Ox()});var Bx=Bt(Lx=>{"use strict";var $c=Nt(),fD=zx();function dD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pD=typeof Object.is=="function"?Object.is:dD,mD=fD.useSyncExternalStore,hD=$c.useRef,gD=$c.useEffect,yD=$c.useMemo,vD=$c.useDebugValue;Lx.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=hD(null);if(a.current===null){var l={hasValue:!1,value:null};a.current=l}else l=a.current;a=yD(function(){function u(m){if(!s){if(s=!0,c=m,m=o(m),i!==void 0&&l.hasValue){var g=l.value;if(i(g,m))return d=g}return d=m}if(g=d,pD(c,m))return g;var b=o(m);return i!==void 0&&i(g,b)?(c=m,g):(c=m,d=b)}var s=!1,c,d,f=n===void 0?null:n;return[function(){return u(t())},f===null?void 0:function(){return u(f())}]},[t,n,o,i]);var r=mD(e,a[0],a[1]);return gD(function(){l.hasValue=!0,l.value=r},[r]),vD(r),r}});var kx=Bt((yH,Hx)=>{"use strict";Hx.exports=Bx()});var Jh=ie(Nt(),1),QE=ie(qb(),1);var De=ie(Nt(),1);var B=ie(pe()),H=ie(Nt());function Ze(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=Ze(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var uw={value:()=>{}};function $b(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new lc(n)}function lc(e){this._=e}function sw(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}lc.prototype=$b.prototype={constructor:lc,on:function(e,t){var n=this._,o=sw(e+"",n),i,a=-1,l=o.length;if(arguments.length<2){for(;++a<l;)if((i=(e=o[a]).type)&&(i=cw(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(i=(e=o[a]).type)n[i]=Kb(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Kb(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new lc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,a;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(t,n)}};function cw(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function Kb(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=uw,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ui=$b;var rc="http://www.w3.org/1999/xhtml",ym={svg:"http://www.w3.org/2000/svg",xhtml:rc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ho(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),ym.hasOwnProperty(t)?{space:ym[t],local:e}:e}function fw(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===rc&&t.documentElement.namespaceURI===rc?t.createElement(e):t.createElementNS(n,e)}}function dw(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function uc(e){var t=ho(e);return(t.local?dw:fw)(t)}function pw(){}function Gi(e){return e==null?pw:function(){return this.querySelector(e)}}function Fb(e){typeof e!="function"&&(e=Gi(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=new Array(l),u,s,c=0;c<l;++c)(u=a[c])&&(s=e.call(u,u.__data__,c,a))&&("__data__"in u&&(s.__data__=u.__data__),r[c]=s);return new je(o,this._parents)}function vm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function mw(){return[]}function Rr(e){return e==null?mw:function(){return this.querySelectorAll(e)}}function hw(e){return function(){return vm(e.apply(this,arguments))}}function Jb(e){typeof e=="function"?e=hw(e):e=Rr(e);for(var t=this._groups,n=t.length,o=[],i=[],a=0;a<n;++a)for(var l=t[a],r=l.length,u,s=0;s<r;++s)(u=l[s])&&(o.push(e.call(u,u.__data__,s,l)),i.push(u));return new je(o,i)}function zr(e){return function(){return this.matches(e)}}function sc(e){return function(t){return t.matches(e)}}var gw=Array.prototype.find;function yw(e){return function(){return gw.call(this.children,e)}}function vw(){return this.firstElementChild}function Wb(e){return this.select(e==null?vw:yw(typeof e=="function"?e:sc(e)))}var bw=Array.prototype.filter;function Sw(){return Array.from(this.children)}function xw(e){return function(){return bw.call(this.children,e)}}function e1(e){return this.selectAll(e==null?Sw:xw(typeof e=="function"?e:sc(e)))}function t1(e){typeof e!="function"&&(e=zr(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],u,s=0;s<l;++s)(u=a[s])&&e.call(u,u.__data__,s,a)&&r.push(u);return new je(o,this._parents)}function cc(e){return new Array(e.length)}function n1(){return new je(this._enter||this._groups.map(cc),this._parents)}function Lr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Lr.prototype={constructor:Lr,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function o1(e){return function(){return e}}function _w(e,t,n,o,i,a){for(var l=0,r,u=t.length,s=a.length;l<s;++l)(r=t[l])?(r.__data__=a[l],o[l]=r):n[l]=new Lr(e,a[l]);for(;l<u;++l)(r=t[l])&&(i[l]=r)}function Ew(e,t,n,o,i,a,l){var r,u,s=new Map,c=t.length,d=a.length,f=new Array(c),m;for(r=0;r<c;++r)(u=t[r])&&(f[r]=m=l.call(u,u.__data__,r,t)+"",s.has(m)?i[r]=u:s.set(m,u));for(r=0;r<d;++r)m=l.call(e,a[r],r,a)+"",(u=s.get(m))?(o[r]=u,u.__data__=a[r],s.delete(m)):n[r]=new Lr(e,a[r]);for(r=0;r<c;++r)(u=t[r])&&s.get(f[r])===u&&(i[r]=u)}function Tw(e){return e.__data__}function i1(e,t){if(!arguments.length)return Array.from(this,Tw);var n=t?Ew:_w,o=this._parents,i=this._groups;typeof e!="function"&&(e=o1(e));for(var a=i.length,l=new Array(a),r=new Array(a),u=new Array(a),s=0;s<a;++s){var c=o[s],d=i[s],f=d.length,m=Nw(e.call(c,c&&c.__data__,s,o)),g=m.length,b=r[s]=new Array(g),S=l[s]=new Array(g),h=u[s]=new Array(f);n(c,d,b,S,h,m,t);for(var y=0,p=0,v,x;y<g;++y)if(v=b[y]){for(y>=p&&(p=y+1);!(x=S[p])&&++p<g;);v._next=x||null}}return l=new je(l,o),l._enter=r,l._exit=u,l}function Nw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function a1(){return new je(this._exit||this._groups.map(cc),this._parents)}function l1(e,t,n){var o=this.enter(),i=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),o&&i?o.merge(i).order():i}function r1(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,a=o.length,l=Math.min(i,a),r=new Array(i),u=0;u<l;++u)for(var s=n[u],c=o[u],d=s.length,f=r[u]=new Array(d),m,g=0;g<d;++g)(m=s[g]||c[g])&&(f[g]=m);for(;u<i;++u)r[u]=n[u];return new je(r,this._parents)}function u1(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,a=o[i],l;--i>=0;)(l=o[i])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function s1(e){e||(e=Cw);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a){for(var l=n[a],r=l.length,u=i[a]=new Array(r),s,c=0;c<r;++c)(s=l[c])&&(u[c]=s);u.sort(t)}return new je(i,this._parents).order()}function Cw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function c1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function f1(){return Array.from(this)}function d1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length;i<a;++i){var l=o[i];if(l)return l}return null}function p1(){let e=0;for(let t of this)++e;return e}function m1(){return!this.node()}function h1(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],a=0,l=i.length,r;a<l;++a)(r=i[a])&&e.call(r,r.__data__,a,i);return this}function ww(e){return function(){this.removeAttribute(e)}}function Aw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Dw(e,t){return function(){this.setAttribute(e,t)}}function Mw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ow(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Rw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function g1(e,t){var n=ho(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Aw:ww:typeof t=="function"?n.local?Rw:Ow:n.local?Mw:Dw)(n,t))}function fc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function zw(e){return function(){this.style.removeProperty(e)}}function Lw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Bw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function y1(e,t,n){return arguments.length>1?this.each((t==null?zw:typeof t=="function"?Bw:Lw)(e,t,n??"")):ii(this.node(),e)}function ii(e,t){return e.style.getPropertyValue(t)||fc(e).getComputedStyle(e,null).getPropertyValue(t)}function Hw(e){return function(){delete this[e]}}function kw(e,t){return function(){this[e]=t}}function Uw(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function v1(e,t){return arguments.length>1?this.each((t==null?Hw:typeof t=="function"?Uw:kw)(e,t)):this.node()[e]}function b1(e){return e.trim().split(/^|\s+/)}function bm(e){return e.classList||new S1(e)}function S1(e){this._node=e,this._names=b1(e.getAttribute("class")||"")}S1.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function x1(e,t){for(var n=bm(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function _1(e,t){for(var n=bm(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Gw(e){return function(){x1(this,e)}}function Pw(e){return function(){_1(this,e)}}function Iw(e,t){return function(){(t.apply(this,arguments)?x1:_1)(this,e)}}function E1(e,t){var n=b1(e+"");if(arguments.length<2){for(var o=bm(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Iw:t?Gw:Pw)(n,t))}function Vw(){this.textContent=""}function Yw(e){return function(){this.textContent=e}}function Xw(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function T1(e){return arguments.length?this.each(e==null?Vw:(typeof e=="function"?Xw:Yw)(e)):this.node().textContent}function qw(){this.innerHTML=""}function Zw(e){return function(){this.innerHTML=e}}function jw(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function N1(e){return arguments.length?this.each(e==null?qw:(typeof e=="function"?jw:Zw)(e)):this.node().innerHTML}function Qw(){this.nextSibling&&this.parentNode.appendChild(this)}function C1(){return this.each(Qw)}function Kw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function w1(){return this.each(Kw)}function A1(e){var t=typeof e=="function"?e:uc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function $w(){return null}function D1(e,t){var n=typeof e=="function"?e:uc(e),o=t==null?$w:typeof t=="function"?t:Gi(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Fw(){var e=this.parentNode;e&&e.removeChild(this)}function M1(){return this.each(Fw)}function Jw(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ww(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function O1(e){return this.select(e?Ww:Jw)}function R1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function e2(e){return function(t){e.call(this,t,this.__data__)}}function t2(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function n2(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function o2(e,t,n){return function(){var o=this.__on,i,a=e2(t);if(o){for(var l=0,r=o.length;l<r;++l)if((i=o[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(i):this.__on=[i]}}function z1(e,t,n){var o=t2(e+""),i,a=o.length,l;if(arguments.length<2){var r=this.node().__on;if(r){for(var u=0,s=r.length,c;u<s;++u)for(i=0,c=r[u];i<a;++i)if((l=o[i]).type===c.type&&l.name===c.name)return c.value}return}for(r=t?o2:n2,i=0;i<a;++i)this.each(r(o[i],t,n));return this}function L1(e,t,n){var o=fc(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function i2(e,t){return function(){return L1(this,e,t)}}function a2(e,t){return function(){return L1(this,e,t.apply(this,arguments))}}function B1(e,t){return this.each((typeof t=="function"?a2:i2)(e,t))}function*H1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length,l;i<a;++i)(l=o[i])&&(yield l)}var Sm=[null];function je(e,t){this._groups=e,this._parents=t}function k1(){return new je([[document.documentElement]],Sm)}function l2(){return this}je.prototype=k1.prototype={constructor:je,select:Fb,selectAll:Jb,selectChild:Wb,selectChildren:e1,filter:t1,data:i1,enter:n1,exit:a1,join:l1,merge:r1,selection:l2,order:u1,sort:s1,call:c1,nodes:f1,node:d1,size:p1,empty:m1,each:h1,attr:g1,style:y1,property:v1,classed:E1,text:T1,html:N1,raise:C1,lower:w1,append:A1,insert:D1,remove:M1,clone:O1,datum:R1,on:z1,dispatch:B1,[Symbol.iterator]:H1};var go=k1;function dt(e){return typeof e=="string"?new je([[document.querySelector(e)]],[document.documentElement]):new je([[e]],Sm)}function U1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Dt(e,t){if(e=U1(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var G1={passive:!1},Pi={capture:!0,passive:!1};function dc(e){e.stopImmediatePropagation()}function ai(e){e.preventDefault(),e.stopImmediatePropagation()}function Br(e){var t=e.document.documentElement,n=dt(e).on("dragstart.drag",ai,Pi);"onselectstart"in t?n.on("selectstart.drag",ai,Pi):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Hr(e,t){var n=e.document.documentElement,o=dt(e).on("dragstart.drag",null);t&&(o.on("click.drag",ai,Pi),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var kr=e=>()=>e;function Ur(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:a,x:l,y:r,dx:u,dy:s,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:r,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:s,enumerable:!0,configurable:!0},_:{value:c}})}Ur.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function r2(e){return!e.ctrlKey&&!e.button}function u2(){return this.parentNode}function s2(e,t){return t??{x:e.x,y:e.y}}function c2(){return navigator.maxTouchPoints||"ontouchstart"in this}function pc(){var e=r2,t=u2,n=s2,o=c2,i={},a=Ui("start","drag","end"),l=0,r,u,s,c,d=0;function f(v){v.on("mousedown.drag",m).filter(o).on("touchstart.drag",S).on("touchmove.drag",h,G1).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(v,x){if(!(c||!e.call(this,v,x))){var T=p(this,t.call(this,v,x),v,x,"mouse");T&&(dt(v.view).on("mousemove.drag",g,Pi).on("mouseup.drag",b,Pi),Br(v.view),dc(v),s=!1,r=v.clientX,u=v.clientY,T("start",v))}}function g(v){if(ai(v),!s){var x=v.clientX-r,T=v.clientY-u;s=x*x+T*T>d}i.mouse("drag",v)}function b(v){dt(v.view).on("mousemove.drag mouseup.drag",null),Hr(v.view,s),ai(v),i.mouse("end",v)}function S(v,x){if(e.call(this,v,x)){var T=v.changedTouches,E=t.call(this,v,x),N=T.length,w,k;for(w=0;w<N;++w)(k=p(this,E,v,x,T[w].identifier,T[w]))&&(dc(v),k("start",v,T[w]))}}function h(v){var x=v.changedTouches,T=x.length,E,N;for(E=0;E<T;++E)(N=i[x[E].identifier])&&(ai(v),N("drag",v,x[E]))}function y(v){var x=v.changedTouches,T=x.length,E,N;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<T;++E)(N=i[x[E].identifier])&&(dc(v),N("end",v,x[E]))}function p(v,x,T,E,N,w){var k=a.copy(),A=Dt(w||T,x),z,P,_;if((_=n.call(v,new Ur("beforestart",{sourceEvent:T,target:f,identifier:N,active:l,x:A[0],y:A[1],dx:0,dy:0,dispatch:k}),E))!=null)return z=_.x-A[0]||0,P=_.y-A[1]||0,function M(D,R,O){var L=A,V;switch(D){case"start":i[N]=M,V=l++;break;case"end":delete i[N],--l;case"drag":A=Dt(O||R,x),V=l;break}k.call(D,v,new Ur(D,{sourceEvent:R,subject:_,target:f,identifier:N,active:V,x:A[0]+z,y:A[1]+P,dx:A[0]-L[0],dy:A[1]-L[1],dispatch:k}),E)}}return f.filter=function(v){return arguments.length?(e=typeof v=="function"?v:kr(!!v),f):e},f.container=function(v){return arguments.length?(t=typeof v=="function"?v:kr(v),f):t},f.subject=function(v){return arguments.length?(n=typeof v=="function"?v:kr(v),f):n},f.touchable=function(v){return arguments.length?(o=typeof v=="function"?v:kr(!!v),f):o},f.on=function(){var v=a.on.apply(a,arguments);return v===a?f:v},f.clickDistance=function(v){return arguments.length?(d=(v=+v)*v,f):Math.sqrt(d)},f}function mc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function xm(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Ir(){}var Gr=.7,yc=1/Gr,tl="\\s*([+-]?\\d+)\\s*",Pr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f2=/^#([0-9a-f]{3,8})$/,d2=new RegExp(`^rgb\\(${tl},${tl},${tl}\\)$`),p2=new RegExp(`^rgb\\(${Vn},${Vn},${Vn}\\)$`),m2=new RegExp(`^rgba\\(${tl},${tl},${tl},${Pr}\\)$`),h2=new RegExp(`^rgba\\(${Vn},${Vn},${Vn},${Pr}\\)$`),g2=new RegExp(`^hsl\\(${Pr},${Vn},${Vn}\\)$`),y2=new RegExp(`^hsla\\(${Pr},${Vn},${Vn},${Pr}\\)$`),P1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};mc(Ir,On,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:I1,formatHex:I1,formatHex8:v2,formatHsl:b2,formatRgb:V1,toString:V1});function I1(){return this.rgb().formatHex()}function v2(){return this.rgb().formatHex8()}function b2(){return Q1(this).formatHsl()}function V1(){return this.rgb().formatRgb()}function On(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=f2.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Y1(t):n===3?new Yt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?hc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?hc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=d2.exec(e))?new Yt(t[1],t[2],t[3],1):(t=p2.exec(e))?new Yt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=m2.exec(e))?hc(t[1],t[2],t[3],t[4]):(t=h2.exec(e))?hc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=g2.exec(e))?Z1(t[1],t[2]/100,t[3]/100,1):(t=y2.exec(e))?Z1(t[1],t[2]/100,t[3]/100,t[4]):P1.hasOwnProperty(e)?Y1(P1[e]):e==="transparent"?new Yt(NaN,NaN,NaN,0):null}function Y1(e){return new Yt(e>>16&255,e>>8&255,e&255,1)}function hc(e,t,n,o){return o<=0&&(e=t=n=NaN),new Yt(e,t,n,o)}function S2(e){return e instanceof Ir||(e=On(e)),e?(e=e.rgb(),new Yt(e.r,e.g,e.b,e.opacity)):new Yt}function nl(e,t,n,o){return arguments.length===1?S2(e):new Yt(e,t,n,o??1)}function Yt(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}mc(Yt,nl,xm(Ir,{brighter(e){return e=e==null?yc:Math.pow(yc,e),new Yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Gr:Math.pow(Gr,e),new Yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yt(Vi(this.r),Vi(this.g),Vi(this.b),vc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:X1,formatHex:X1,formatHex8:x2,formatRgb:q1,toString:q1}));function X1(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}`}function x2(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}${Ii((isNaN(this.opacity)?1:this.opacity)*255)}`}function q1(){let e=vc(this.opacity);return`${e===1?"rgb(":"rgba("}${Vi(this.r)}, ${Vi(this.g)}, ${Vi(this.b)}${e===1?")":`, ${e})`}`}function vc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ii(e){return e=Vi(e),(e<16?"0":"")+e.toString(16)}function Z1(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mn(e,t,n,o)}function Q1(e){if(e instanceof Mn)return new Mn(e.h,e.s,e.l,e.opacity);if(e instanceof Ir||(e=On(e)),!e)return new Mn;if(e instanceof Mn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),l=NaN,r=a-i,u=(a+i)/2;return r?(t===a?l=(n-o)/r+(n<o)*6:n===a?l=(o-t)/r+2:l=(t-n)/r+4,r/=u<.5?a+i:2-a-i,l*=60):r=u>0&&u<1?0:l,new Mn(l,r,u,e.opacity)}function K1(e,t,n,o){return arguments.length===1?Q1(e):new Mn(e,t,n,o??1)}function Mn(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}mc(Mn,K1,xm(Ir,{brighter(e){return e=e==null?yc:Math.pow(yc,e),new Mn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Gr:Math.pow(Gr,e),new Mn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new Yt(_m(e>=240?e-240:e+120,i,o),_m(e,i,o),_m(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Mn(j1(this.h),gc(this.s),gc(this.l),vc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=vc(this.opacity);return`${e===1?"hsl(":"hsla("}${j1(this.h)}, ${gc(this.s)*100}%, ${gc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function j1(e){return e=(e||0)%360,e<0?e+360:e}function gc(e){return Math.max(0,Math.min(1,e||0))}function _m(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Em(e,t,n,o,i){var a=e*e,l=a*e;return((1-3*e+3*a-l)*t+(4-6*a+3*l)*n+(1+3*e+3*a-3*l)*o+l*i)/6}function $1(e){var t=e.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[o],a=e[o+1],l=o>0?e[o-1]:2*i-a,r=o<t-1?e[o+2]:2*a-i;return Em((n-o/t)*t,l,i,a,r)}}function F1(e){var t=e.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*t),i=e[(o+t-1)%t],a=e[o%t],l=e[(o+1)%t],r=e[(o+2)%t];return Em((n-o/t)*t,i,a,l,r)}}var Vr=e=>()=>e;function _2(e,t){return function(n){return e+n*t}}function E2(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function J1(e){return(e=+e)==1?bc:function(t,n){return n-t?E2(t,n,e):Vr(isNaN(t)?n:t)}}function bc(e,t){var n=t-e;return n?_2(e,n):Vr(isNaN(e)?t:e)}var Yi=(function e(t){var n=J1(t);function o(i,a){var l=n((i=nl(i)).r,(a=nl(a)).r),r=n(i.g,a.g),u=n(i.b,a.b),s=bc(i.opacity,a.opacity);return function(c){return i.r=l(c),i.g=r(c),i.b=u(c),i.opacity=s(c),i+""}}return o.gamma=e,o})(1);function W1(e){return function(t){var n=t.length,o=new Array(n),i=new Array(n),a=new Array(n),l,r;for(l=0;l<n;++l)r=nl(t[l]),o[l]=r.r||0,i[l]=r.g||0,a[l]=r.b||0;return o=e(o),i=e(i),a=e(a),r.opacity=1,function(u){return r.r=o(u),r.g=i(u),r.b=a(u),r+""}}}var T2=W1($1),N2=W1(F1);function eS(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(a){for(i=0;i<n;++i)o[i]=e[i]*(1-a)+t[i]*a;return o}}function tS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function nS(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),a=new Array(n),l;for(l=0;l<o;++l)i[l]=yo(e[l],t[l]);for(;l<n;++l)a[l]=t[l];return function(r){for(l=0;l<o;++l)a[l]=i[l](r);return a}}function oS(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Mt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function iS(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=yo(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var Nm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Tm=new RegExp(Nm.source,"g");function C2(e){return function(){return e}}function w2(e){return function(t){return e(t)+""}}function Yr(e,t){var n=Nm.lastIndex=Tm.lastIndex=0,o,i,a,l=-1,r=[],u=[];for(e=e+"",t=t+"";(o=Nm.exec(e))&&(i=Tm.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),r[l]?r[l]+=a:r[++l]=a),(o=o[0])===(i=i[0])?r[l]?r[l]+=i:r[++l]=i:(r[++l]=null,u.push({i:l,x:Mt(o,i)})),n=Tm.lastIndex;return n<t.length&&(a=t.slice(n),r[l]?r[l]+=a:r[++l]=a),r.length<2?u[0]?w2(u[0].x):C2(t):(t=u.length,function(s){for(var c=0,d;c<t;++c)r[(d=u[c]).i]=d.x(s);return r.join("")})}function yo(e,t){var n=typeof t,o;return t==null||n==="boolean"?Vr(t):(n==="number"?Mt:n==="string"?(o=On(t))?(t=o,Yi):Yr:t instanceof On?Yi:t instanceof Date?oS:tS(t)?eS:Array.isArray(t)?nS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?iS:Mt)(e,t)}var aS=180/Math.PI,Sc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Cm(e,t,n,o,i,a){var l,r,u;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(u=e*n+t*o)&&(n-=e*u,o-=t*u),(r=Math.sqrt(n*n+o*o))&&(n/=r,o/=r,u/=r),e*o<t*n&&(e=-e,t=-t,u=-u,l=-l),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*aS,skewX:Math.atan(u)*aS,scaleX:l,scaleY:r}}var xc;function lS(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Sc:Cm(t.a,t.b,t.c,t.d,t.e,t.f)}function rS(e){return e==null?Sc:(xc||(xc=document.createElementNS("http://www.w3.org/2000/svg","g")),xc.setAttribute("transform",e),(e=xc.transform.baseVal.consolidate())?(e=e.matrix,Cm(e.a,e.b,e.c,e.d,e.e,e.f)):Sc)}function uS(e,t,n,o){function i(s){return s.length?s.pop()+" ":""}function a(s,c,d,f,m,g){if(s!==d||c!==f){var b=m.push("translate(",null,t,null,n);g.push({i:b-4,x:Mt(s,d)},{i:b-2,x:Mt(c,f)})}else(d||f)&&m.push("translate("+d+t+f+n)}function l(s,c,d,f){s!==c?(s-c>180?c+=360:c-s>180&&(s+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:Mt(s,c)})):c&&d.push(i(d)+"rotate("+c+o)}function r(s,c,d,f){s!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:Mt(s,c)}):c&&d.push(i(d)+"skewX("+c+o)}function u(s,c,d,f,m,g){if(s!==d||c!==f){var b=m.push(i(m)+"scale(",null,",",null,")");g.push({i:b-4,x:Mt(s,d)},{i:b-2,x:Mt(c,f)})}else(d!==1||f!==1)&&m.push(i(m)+"scale("+d+","+f+")")}return function(s,c){var d=[],f=[];return s=e(s),c=e(c),a(s.translateX,s.translateY,c.translateX,c.translateY,d,f),l(s.rotate,c.rotate,d,f),r(s.skewX,c.skewX,d,f),u(s.scaleX,s.scaleY,c.scaleX,c.scaleY,d,f),s=c=null,function(m){for(var g=-1,b=f.length,S;++g<b;)d[(S=f[g]).i]=S.x(m);return d.join("")}}}var wm=uS(lS,"px, ","px)","deg)"),Am=uS(rS,", ",")",")");var A2=1e-12;function sS(e){return((e=Math.exp(e))+1/e)/2}function D2(e){return((e=Math.exp(e))-1/e)/2}function M2(e){return((e=Math.exp(2*e))-1)/(e+1)}var Xi=(function e(t,n,o){function i(a,l){var r=a[0],u=a[1],s=a[2],c=l[0],d=l[1],f=l[2],m=c-r,g=d-u,b=m*m+g*g,S,h;if(b<A2)h=Math.log(f/s)/t,S=function(E){return[r+E*m,u+E*g,s*Math.exp(t*E*h)]};else{var y=Math.sqrt(b),p=(f*f-s*s+o*b)/(2*s*n*y),v=(f*f-s*s-o*b)/(2*f*n*y),x=Math.log(Math.sqrt(p*p+1)-p),T=Math.log(Math.sqrt(v*v+1)-v);h=(T-x)/t,S=function(E){var N=E*h,w=sS(x),k=s/(n*y)*(w*M2(t*N+x)-D2(x));return[r+k*m,u+k*g,s*w/sS(t*N+x)]}}return S.duration=h*1e3*t/Math.SQRT2,S}return i.rho=function(a){var l=Math.max(.001,+a),r=l*l,u=r*r;return e(l,r,u)},i})(Math.SQRT2,2,4);var ol=0,qr=0,Xr=0,fS=1e3,_c,Zr,Ec=0,qi=0,Tc=0,jr=typeof performance=="object"&&performance.now?performance:Date,dS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Kr(){return qi||(dS(O2),qi=jr.now()+Tc)}function O2(){qi=0}function Qr(){this._call=this._time=this._next=null}Qr.prototype=Nc.prototype={constructor:Qr,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Kr():+n)+(t==null?0:+t),!this._next&&Zr!==this&&(Zr?Zr._next=this:_c=this,Zr=this),this._call=e,this._time=n,Dm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Dm())}};function Nc(e,t,n){var o=new Qr;return o.restart(e,t,n),o}function pS(){Kr(),++ol;for(var e=_c,t;e;)(t=qi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ol}function cS(){qi=(Ec=jr.now())+Tc,ol=qr=0;try{pS()}finally{ol=0,z2(),qi=0}}function R2(){var e=jr.now(),t=e-Ec;t>fS&&(Tc-=t,Ec=e)}function z2(){for(var e,t=_c,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:_c=n);Zr=e,Dm(o)}function Dm(e){if(!ol){qr&&(qr=clearTimeout(qr));var t=e-qi;t>24?(e<1/0&&(qr=setTimeout(cS,e-jr.now()-Tc)),Xr&&(Xr=clearInterval(Xr))):(Xr||(Ec=jr.now(),Xr=setInterval(R2,fS)),ol=1,dS(cS))}}function Cc(e,t,n){var o=new Qr;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var L2=Ui("start","end","cancel","interrupt"),B2=[],gS=0,mS=1,Ac=2,wc=3,hS=4,Dc=5,$r=6;function li(e,t,n,o,i,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;H2(e,n,{name:t,index:o,group:i,on:L2,tween:B2,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:gS})}function Fr(e,t){var n=rt(e,t);if(n.state>gS)throw new Error("too late; already scheduled");return n}function bt(e,t){var n=rt(e,t);if(n.state>wc)throw new Error("too late; already running");return n}function rt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function H2(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Nc(a,0,n.time);function a(s){n.state=mS,n.timer.restart(l,n.delay,n.time),n.delay<=s&&l(s-n.delay)}function l(s){var c,d,f,m;if(n.state!==mS)return u();for(c in o)if(m=o[c],m.name===n.name){if(m.state===wc)return Cc(l);m.state===hS?(m.state=$r,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete o[c]):+c<t&&(m.state=$r,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete o[c])}if(Cc(function(){n.state===wc&&(n.state=hS,n.timer.restart(r,n.delay,n.time),r(s))}),n.state=Ac,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ac){for(n.state=wc,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(m=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=m);i.length=d+1}}function r(s){for(var c=s<n.duration?n.ease.call(null,s/n.duration):(n.timer.restart(u),n.state=Dc,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===Dc&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=$r,n.timer.stop(),delete o[t];for(var s in o)return;delete e.__transition}}function Zi(e,t){var n=e.__transition,o,i,a=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((o=n[l]).name!==t){a=!1;continue}i=o.state>Ac&&o.state<Dc,o.state=$r,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}a&&delete e.__transition}}function yS(e){return this.each(function(){Zi(this,e)})}function k2(e,t){var n,o;return function(){var i=bt(this,e),a=i.tween;if(a!==n){o=n=a;for(var l=0,r=o.length;l<r;++l)if(o[l].name===t){o=o.slice(),o.splice(l,1);break}}i.tween=o}}function U2(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=bt(this,e),l=a.tween;if(l!==o){i=(o=l).slice();for(var r={name:t,value:n},u=0,s=i.length;u<s;++u)if(i[u].name===t){i[u]=r;break}u===s&&i.push(r)}a.tween=i}}function vS(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=rt(this.node(),n).tween,i=0,a=o.length,l;i<a;++i)if((l=o[i]).name===e)return l.value;return null}return this.each((t==null?k2:U2)(n,e,t))}function il(e,t,n){var o=e._id;return e.each(function(){var i=bt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return rt(i,o).value[t]}}function Mc(e,t){var n;return(typeof t=="number"?Mt:t instanceof On?Yi:(n=On(t))?(t=n,Yi):Yr)(e,t)}function G2(e){return function(){this.removeAttribute(e)}}function P2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function I2(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttribute(e);return l===i?null:l===o?a:a=t(o=l,n)}}function V2(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===o?a:a=t(o=l,n)}}function Y2(e,t,n){var o,i,a;return function(){var l,r=n(this),u;return r==null?void this.removeAttribute(e):(l=this.getAttribute(e),u=r+"",l===u?null:l===o&&u===i?a:(i=u,a=t(o=l,r)))}}function X2(e,t,n){var o,i,a;return function(){var l,r=n(this),u;return r==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),u=r+"",l===u?null:l===o&&u===i?a:(i=u,a=t(o=l,r)))}}function bS(e,t){var n=ho(e),o=n==="transform"?Am:Mc;return this.attrTween(e,typeof t=="function"?(n.local?X2:Y2)(n,o,il(this,"attr."+e,t)):t==null?(n.local?P2:G2)(n):(n.local?V2:I2)(n,o,t))}function q2(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Z2(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function j2(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&Z2(e,a)),n}return i._value=t,i}function Q2(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&q2(e,a)),n}return i._value=t,i}function SS(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=ho(e);return this.tween(n,(o.local?j2:Q2)(o,t))}function K2(e,t){return function(){Fr(this,e).delay=+t.apply(this,arguments)}}function $2(e,t){return t=+t,function(){Fr(this,e).delay=t}}function xS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?K2:$2)(t,e)):rt(this.node(),t).delay}function F2(e,t){return function(){bt(this,e).duration=+t.apply(this,arguments)}}function J2(e,t){return t=+t,function(){bt(this,e).duration=t}}function _S(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?F2:J2)(t,e)):rt(this.node(),t).duration}function W2(e,t){if(typeof t!="function")throw new Error;return function(){bt(this,e).ease=t}}function ES(e){var t=this._id;return arguments.length?this.each(W2(t,e)):rt(this.node(),t).ease}function eA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;bt(this,e).ease=n}}function TS(e){if(typeof e!="function")throw new Error;return this.each(eA(this._id,e))}function NS(e){typeof e!="function"&&(e=zr(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],u,s=0;s<l;++s)(u=a[s])&&e.call(u,u.__data__,s,a)&&r.push(u);return new Ot(o,this._parents,this._name,this._id)}function CS(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,a=Math.min(o,i),l=new Array(o),r=0;r<a;++r)for(var u=t[r],s=n[r],c=u.length,d=l[r]=new Array(c),f,m=0;m<c;++m)(f=u[m]||s[m])&&(d[m]=f);for(;r<o;++r)l[r]=t[r];return new Ot(l,this._parents,this._name,this._id)}function tA(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function nA(e,t,n){var o,i,a=tA(t)?Fr:bt;return function(){var l=a(this,e),r=l.on;r!==o&&(i=(o=r).copy()).on(t,n),l.on=i}}function wS(e,t){var n=this._id;return arguments.length<2?rt(this.node(),n).on.on(e):this.each(nA(n,e,t))}function oA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function AS(){return this.on("end.remove",oA(this._id))}function DS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Gi(e));for(var o=this._groups,i=o.length,a=new Array(i),l=0;l<i;++l)for(var r=o[l],u=r.length,s=a[l]=new Array(u),c,d,f=0;f<u;++f)(c=r[f])&&(d=e.call(c,c.__data__,f,r))&&("__data__"in c&&(d.__data__=c.__data__),s[f]=d,li(s[f],t,n,f,s,rt(c,n)));return new Ot(a,this._parents,t,n)}function MS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Rr(e));for(var o=this._groups,i=o.length,a=[],l=[],r=0;r<i;++r)for(var u=o[r],s=u.length,c,d=0;d<s;++d)if(c=u[d]){for(var f=e.call(c,c.__data__,d,u),m,g=rt(c,n),b=0,S=f.length;b<S;++b)(m=f[b])&&li(m,t,n,b,f,g);a.push(f),l.push(c)}return new Ot(a,l,t,n)}var iA=go.prototype.constructor;function OS(){return new iA(this._groups,this._parents)}function aA(e,t){var n,o,i;return function(){var a=ii(this,e),l=(this.style.removeProperty(e),ii(this,e));return a===l?null:a===n&&l===o?i:i=t(n=a,o=l)}}function RS(e){return function(){this.style.removeProperty(e)}}function lA(e,t,n){var o,i=n+"",a;return function(){var l=ii(this,e);return l===i?null:l===o?a:a=t(o=l,n)}}function rA(e,t,n){var o,i,a;return function(){var l=ii(this,e),r=n(this),u=r+"";return r==null&&(u=r=(this.style.removeProperty(e),ii(this,e))),l===u?null:l===o&&u===i?a:(i=u,a=t(o=l,r))}}function uA(e,t){var n,o,i,a="style."+t,l="end."+a,r;return function(){var u=bt(this,e),s=u.on,c=u.value[a]==null?r||(r=RS(t)):void 0;(s!==n||i!==c)&&(o=(n=s).copy()).on(l,i=c),u.on=o}}function zS(e,t,n){var o=(e+="")=="transform"?wm:Mc;return t==null?this.styleTween(e,aA(e,o)).on("end.style."+e,RS(e)):typeof t=="function"?this.styleTween(e,rA(e,o,il(this,"style."+e,t))).each(uA(this._id,e)):this.styleTween(e,lA(e,o,t),n).on("end.style."+e,null)}function sA(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function cA(e,t,n){var o,i;function a(){var l=t.apply(this,arguments);return l!==i&&(o=(i=l)&&sA(e,l,n)),o}return a._value=t,a}function LS(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,cA(e,t,n??""))}function fA(e){return function(){this.textContent=e}}function dA(e){return function(){var t=e(this);this.textContent=t??""}}function BS(e){return this.tween("text",typeof e=="function"?dA(il(this,"text",e)):fA(e==null?"":e+""))}function pA(e){return function(t){this.textContent=e.call(this,t)}}function mA(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&pA(i)),t}return o._value=e,o}function HS(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,mA(e))}function kS(){for(var e=this._name,t=this._id,n=Oc(),o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,u,s=0;s<r;++s)if(u=l[s]){var c=rt(u,t);li(u,e,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ot(o,this._parents,e,n)}function US(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(a,l){var r={value:l},u={value:function(){--i===0&&a()}};n.each(function(){var s=bt(this,o),c=s.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(u)),s.on=t}),i===0&&a()})}var hA=0;function Ot(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function GS(e){return go().transition(e)}function Oc(){return++hA}var vo=go.prototype;Ot.prototype=GS.prototype={constructor:Ot,select:DS,selectAll:MS,selectChild:vo.selectChild,selectChildren:vo.selectChildren,filter:NS,merge:CS,selection:OS,transition:kS,call:vo.call,nodes:vo.nodes,node:vo.node,size:vo.size,empty:vo.empty,each:vo.each,on:wS,attr:bS,attrTween:SS,style:zS,styleTween:LS,text:BS,textTween:HS,remove:AS,tween:vS,delay:xS,duration:_S,ease:ES,easeVarying:TS,end:US,[Symbol.iterator]:vo[Symbol.iterator]};function Rc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var gA={time:null,delay:0,duration:250,ease:Rc};function yA(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function PS(e){var t,n;e instanceof Ot?(t=e._id,e=e._name):(t=Oc(),(n=gA).time=Kr(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,u,s=0;s<r;++s)(u=l[s])&&li(u,e,t,s,l,n||yA(u,t));return new Ot(o,this._parents,e,t)}go.prototype.interrupt=yS;go.prototype.transition=PS;var Jr=e=>()=>e;function Mm(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Rn(e,t,n){this.k=e,this.x=t,this.y=n}Rn.prototype={constructor:Rn,scale:function(e){return e===1?this:new Rn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Rn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ji=new Rn(1,0,0);Wr.prototype=Rn.prototype;function Wr(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ji;return e.__zoom}function zc(e){e.stopImmediatePropagation()}function al(e){e.preventDefault(),e.stopImmediatePropagation()}function vA(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function bA(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function IS(){return this.__zoom||ji}function SA(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function xA(){return navigator.maxTouchPoints||"ontouchstart"in this}function _A(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),l>a?(a+l)/2:Math.min(0,a)||Math.max(0,l))}function Lc(){var e=vA,t=bA,n=_A,o=SA,i=xA,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],r=250,u=Xi,s=Ui("start","zoom","end"),c,d,f,m=500,g=150,b=0,S=10;function h(_){_.property("__zoom",IS).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",k).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}h.transform=function(_,M,D,R){var O=_.selection?_.selection():_;O.property("__zoom",IS),_!==O?x(_,M,D,R):O.interrupt().each(function(){T(this,arguments).event(R).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},h.scaleBy=function(_,M,D,R){h.scaleTo(_,function(){var O=this.__zoom.k,L=typeof M=="function"?M.apply(this,arguments):M;return O*L},D,R)},h.scaleTo=function(_,M,D,R){h.transform(_,function(){var O=t.apply(this,arguments),L=this.__zoom,V=D==null?v(O):typeof D=="function"?D.apply(this,arguments):D,U=L.invert(V),I=typeof M=="function"?M.apply(this,arguments):M;return n(p(y(L,I),V,U),O,l)},D,R)},h.translateBy=function(_,M,D,R){h.transform(_,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),l)},null,R)},h.translateTo=function(_,M,D,R,O){h.transform(_,function(){var L=t.apply(this,arguments),V=this.__zoom,U=R==null?v(L):typeof R=="function"?R.apply(this,arguments):R;return n(ji.translate(U[0],U[1]).scale(V.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof D=="function"?-D.apply(this,arguments):-D),L,l)},R,O)};function y(_,M){return M=Math.max(a[0],Math.min(a[1],M)),M===_.k?_:new Rn(M,_.x,_.y)}function p(_,M,D){var R=M[0]-D[0]*_.k,O=M[1]-D[1]*_.k;return R===_.x&&O===_.y?_:new Rn(_.k,R,O)}function v(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function x(_,M,D,R){_.on("start.zoom",function(){T(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(R).end()}).tween("zoom",function(){var O=this,L=arguments,V=T(O,L).event(R),U=t.apply(O,L),I=D==null?v(U):typeof D=="function"?D.apply(O,L):D,Z=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),K=O.__zoom,Q=typeof M=="function"?M.apply(O,L):M,re=u(K.invert(I).concat(Z/K.k),Q.invert(I).concat(Z/Q.k));return function(te){if(te===1)te=Q;else{var X=re(te),W=Z/X[2];te=new Rn(W,I[0]-X[0]*W,I[1]-X[1]*W)}V.zoom(null,te)}})}function T(_,M,D){return!D&&_.__zooming||new E(_,M)}function E(_,M){this.that=_,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(_,M),this.taps=0}E.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,M){return this.mouse&&_!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var M=dt(this.that).datum();s.call(_,this.that,new Mm(_,{sourceEvent:this.sourceEvent,target:h,type:_,transform:this.that.__zoom,dispatch:s}),M)}};function N(_,...M){if(!e.apply(this,arguments))return;var D=T(this,M).event(_),R=this.__zoom,O=Math.max(a[0],Math.min(a[1],R.k*Math.pow(2,o.apply(this,arguments)))),L=Dt(_);if(D.wheel)(D.mouse[0][0]!==L[0]||D.mouse[0][1]!==L[1])&&(D.mouse[1]=R.invert(D.mouse[0]=L)),clearTimeout(D.wheel);else{if(R.k===O)return;D.mouse=[L,R.invert(L)],Zi(this),D.start()}al(_),D.wheel=setTimeout(V,g),D.zoom("mouse",n(p(y(R,O),D.mouse[0],D.mouse[1]),D.extent,l));function V(){D.wheel=null,D.end()}}function w(_,...M){if(f||!e.apply(this,arguments))return;var D=_.currentTarget,R=T(this,M,!0).event(_),O=dt(_.view).on("mousemove.zoom",I,!0).on("mouseup.zoom",Z,!0),L=Dt(_,D),V=_.clientX,U=_.clientY;Br(_.view),zc(_),R.mouse=[L,this.__zoom.invert(L)],Zi(this),R.start();function I(K){if(al(K),!R.moved){var Q=K.clientX-V,re=K.clientY-U;R.moved=Q*Q+re*re>b}R.event(K).zoom("mouse",n(p(R.that.__zoom,R.mouse[0]=Dt(K,D),R.mouse[1]),R.extent,l))}function Z(K){O.on("mousemove.zoom mouseup.zoom",null),Hr(K.view,R.moved),al(K),R.event(K).end()}}function k(_,...M){if(e.apply(this,arguments)){var D=this.__zoom,R=Dt(_.changedTouches?_.changedTouches[0]:_,this),O=D.invert(R),L=D.k*(_.shiftKey?.5:2),V=n(p(y(D,L),R,O),t.apply(this,M),l);al(_),r>0?dt(this).transition().duration(r).call(x,V,R,_):dt(this).call(h.transform,V,R,_)}}function A(_,...M){if(e.apply(this,arguments)){var D=_.touches,R=D.length,O=T(this,M,_.changedTouches.length===R).event(_),L,V,U,I;for(zc(_),V=0;V<R;++V)U=D[V],I=Dt(U,this),I=[I,this.__zoom.invert(I),U.identifier],O.touch0?!O.touch1&&O.touch0[2]!==I[2]&&(O.touch1=I,O.taps=0):(O.touch0=I,L=!0,O.taps=1+!!c);c&&(c=clearTimeout(c)),L&&(O.taps<2&&(d=I[0],c=setTimeout(function(){c=null},m)),Zi(this),O.start())}}function z(_,...M){if(this.__zooming){var D=T(this,M).event(_),R=_.changedTouches,O=R.length,L,V,U,I;for(al(_),L=0;L<O;++L)V=R[L],U=Dt(V,this),D.touch0&&D.touch0[2]===V.identifier?D.touch0[0]=U:D.touch1&&D.touch1[2]===V.identifier&&(D.touch1[0]=U);if(V=D.that.__zoom,D.touch1){var Z=D.touch0[0],K=D.touch0[1],Q=D.touch1[0],re=D.touch1[1],te=(te=Q[0]-Z[0])*te+(te=Q[1]-Z[1])*te,X=(X=re[0]-K[0])*X+(X=re[1]-K[1])*X;V=y(V,Math.sqrt(te/X)),U=[(Z[0]+Q[0])/2,(Z[1]+Q[1])/2],I=[(K[0]+re[0])/2,(K[1]+re[1])/2]}else if(D.touch0)U=D.touch0[0],I=D.touch0[1];else return;D.zoom("touch",n(p(V,U,I),D.extent,l))}}function P(_,...M){if(this.__zooming){var D=T(this,M).event(_),R=_.changedTouches,O=R.length,L,V;for(zc(_),f&&clearTimeout(f),f=setTimeout(function(){f=null},m),L=0;L<O;++L)V=R[L],D.touch0&&D.touch0[2]===V.identifier?delete D.touch0:D.touch1&&D.touch1[2]===V.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(V=Dt(V,this),Math.hypot(d[0]-V[0],d[1]-V[1])<S)){var U=dt(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return h.wheelDelta=function(_){return arguments.length?(o=typeof _=="function"?_:Jr(+_),h):o},h.filter=function(_){return arguments.length?(e=typeof _=="function"?_:Jr(!!_),h):e},h.touchable=function(_){return arguments.length?(i=typeof _=="function"?_:Jr(!!_),h):i},h.extent=function(_){return arguments.length?(t=typeof _=="function"?_:Jr([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),h):t},h.scaleExtent=function(_){return arguments.length?(a[0]=+_[0],a[1]=+_[1],h):[a[0],a[1]]},h.translateExtent=function(_){return arguments.length?(l[0][0]=+_[0][0],l[1][0]=+_[1][0],l[0][1]=+_[0][1],l[1][1]=+_[1][1],h):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},h.constrain=function(_){return arguments.length?(n=_,h):n},h.duration=function(_){return arguments.length?(r=+_,h):r},h.interpolate=function(_){return arguments.length?(u=_,h):u},h.on=function(){var _=s.on.apply(s,arguments);return _===s?h:_},h.clickDistance=function(_){return arguments.length?(b=(_=+_)*_,h):Math.sqrt(b)},h.tapDistance=function(_){return arguments.length?(S=+_,h):S},h}var ln={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},fl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Bm=["Enter"," ","Escape"],Hm={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},si;(function(e){e.Strict="strict",e.Loose="loose"})(si||(si={}));var bo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(bo||(bo={}));var Qi;(function(e){e.Partial="partial",e.Full="full"})(Qi||(Qi={}));var km={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},Yn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Yn||(Yn={}));var ul;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ul||(ul={}));var ee;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ee||(ee={}));var VS={[ee.Left]:ee.Right,[ee.Right]:ee.Left,[ee.Top]:ee.Bottom,[ee.Bottom]:ee.Top};function Um(e){return e===null?null:e?"valid":"invalid"}var Gm=e=>"id"in e&&"source"in e&&"target"in e,tx=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Pm=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var nu=(e,t=[0,0])=>{let{width:n,height:o}=Xn(e),i=e.origin??t,a=n*i[0],l=o*i[1];return{x:e.position.x-a,y:e.position.y-l}},Im=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((o,i)=>{let a=typeof i=="string",l=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(l=a?t.nodeLookup.get(i):Pm(i)?i:t.nodeLookup.get(i.id));let r=l?kc(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Gc(o,r)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Pc(n)},dl=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=Gc(n,kc(i)),o=!0)}),o?Pc(n):{x:0,y:0,width:0,height:0}},Uc=(e,t,[n,o,i]=[0,0,1],a=!1,l=!1)=>{let r={...hl(t,[n,o,i]),width:t.width/i,height:t.height/i},u=[];for(let s of e.values()){let{measured:c,selectable:d=!0,hidden:f=!1}=s;if(l&&!d||f)continue;let m=c.width??s.width??s.initialWidth??null,g=c.height??s.height??s.initialHeight??null,b=pl(r,$i(s)),S=(m??0)*(g??0),h=a&&b>0;(!s.internals.handleBounds||h||b>=S||s.dragging)&&u.push(s)}return u},nx=(e,t)=>{let n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function EA(e,t){let n=new Map,o=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&(t?.includeHiddenNodes||!i.hidden)&&(!o||o.has(i.id))&&n.set(i.id,i)}),n}async function ox({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},l){if(e.size===0)return Promise.resolve(!0);let r=EA(e,l),u=dl(r),s=ou(u,t,n,l?.minZoom??i,l?.maxZoom??a,l?.padding??.1);return await o.setViewport(s,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)}function Vm({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:i,onError:a}){let l=n.get(e),r=l.parentId?n.get(l.parentId):void 0,{x:u,y:s}=r?r.internals.positionAbsolute:{x:0,y:0},c=l.origin??o,d=l.extent||i;if(l.extent==="parent"&&!l.expandParent)if(!r)a?.("005",ln.error005());else{let m=r.measured.width,g=r.measured.height;m&&g&&(d=[[u,s],[u+m,s+g]])}else r&&cl(l.extent)&&(d=[[l.extent[0][0]+u,l.extent[0][1]+s],[l.extent[1][0]+u,l.extent[1][1]+s]]);let f=cl(d)?Ki(t,d,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&a?.("015",ln.error015()),{position:{x:f.x-u+(l.measured.width??0)*c[0],y:f.y-s+(l.measured.height??0)*c[1]},positionAbsolute:f}}async function ix({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:i}){let a=new Set(e.map(f=>f.id)),l=[];for(let f of n){if(f.deletable===!1)continue;let m=a.has(f.id),g=!m&&f.parentId&&l.find(b=>b.id===f.parentId);(m||g)&&l.push(f)}let r=new Set(t.map(f=>f.id)),u=o.filter(f=>f.deletable!==!1),c=nx(l,u);for(let f of u)r.has(f.id)&&!c.find(g=>g.id===f.id)&&c.push(f);if(!i)return{edges:c,nodes:l};let d=await i({nodes:l,edges:c});return typeof d=="boolean"?d?{edges:c,nodes:l}:{edges:[],nodes:[]}:d}var sl=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ki=(e={x:0,y:0},t,n)=>({x:sl(e.x,t[0][0],t[1][0]-(n?.width??0)),y:sl(e.y,t[0][1],t[1][1]-(n?.height??0))});function ax(e,t,n){let{width:o,height:i}=Xn(n),{x:a,y:l}=n.internals.positionAbsolute;return Ki(e,[[a,l],[a+o,l+i]],t)}var YS=(e,t,n)=>e<t?sl(Math.abs(e-t),1,t)/t:e>n?-sl(Math.abs(e-n),1,t)/t:0,lx=(e,t,n=15,o=40)=>{let i=YS(e.x,o,t.width-o)*n,a=YS(e.y,o,t.height-o)*n;return[i,a]},Gc=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Lm=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),Pc=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),$i=(e,t=[0,0])=>{let{x:n,y:o}=Pm(e)?e.internals.positionAbsolute:nu(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},kc=(e,t=[0,0])=>{let{x:n,y:o}=Pm(e)?e.internals.positionAbsolute:nu(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},Ym=(e,t)=>Pc(Gc(Lm(e),Lm(t))),pl=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},Xm=e=>xn(e.width)&&xn(e.height)&&xn(e.x)&&xn(e.y),xn=e=>!isNaN(e)&&isFinite(e),qm=(e,t)=>{},ml=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),hl=({x:e,y:t},[n,o,i],a=!1,l=[1,1])=>{let r={x:(e-n)/i,y:(t-o)/i};return a?ml(r,l):r},tu=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function ll(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function TA(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=ll(e,n),i=ll(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=ll(e.top??e.y??0,n),i=ll(e.bottom??e.y??0,n),a=ll(e.left??e.x??0,t),l=ll(e.right??e.x??0,t);return{top:o,right:l,bottom:i,left:a,x:a+l,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function NA(e,t,n,o,i,a){let{x:l,y:r}=tu(e,[t,n,o]),{x:u,y:s}=tu({x:e.x+e.width,y:e.y+e.height},[t,n,o]),c=i-u,d=a-s;return{left:Math.floor(l),top:Math.floor(r),right:Math.floor(c),bottom:Math.floor(d)}}var ou=(e,t,n,o,i,a)=>{let l=TA(a,t,n),r=(t-l.x)/e.width,u=(n-l.y)/e.height,s=Math.min(r,u),c=sl(s,o,i),d=e.x+e.width/2,f=e.y+e.height/2,m=t/2-d*c,g=n/2-f*c,b=NA(e,m,g,c,t,n),S={left:Math.min(b.left-l.left,0),top:Math.min(b.top-l.top,0),right:Math.min(b.right-l.right,0),bottom:Math.min(b.bottom-l.bottom,0)};return{x:m-S.left+S.right,y:g-S.top+S.bottom,zoom:c}},gl=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function cl(e){return e!=null&&e!=="parent"}function Xn(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Zm(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function jm(e,t={width:0,height:0},n,o,i){let a={...e},l=o.get(n);if(l){let r=l.origin||i;a.x+=l.internals.positionAbsolute.x-(t.width??0)*r[0],a.y+=l.internals.positionAbsolute.y-(t.height??0)*r[1]}return a}function Qm(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function rx(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function ux(e){return{...Hm,...e||{}}}function eu(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:l}=_n(e),r=hl({x:a-(i?.left??0),y:l-(i?.top??0)},o),{x:u,y:s}=n?ml(r,t):r;return{xSnapped:u,ySnapped:s,...r}}var Ic=e=>({width:e.offsetWidth,height:e.offsetHeight}),Km=e=>e?.getRootNode?.()||window?.document,CA=["INPUT","SELECT","TEXTAREA"];function $m(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:CA.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var Fm=e=>"clientX"in e,_n=(e,t)=>{let n=Fm(e),o=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:i-(t?.top??0)}},XS=(e,t,n,o,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(l=>{let r=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:i,position:l.getAttribute("data-handlepos"),x:(r.left-n.left)/o,y:(r.top-n.top)/o,...Ic(l)}})};function Vc({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:a,targetControlX:l,targetControlY:r}){let u=e*.125+i*.375+l*.375+n*.125,s=t*.125+a*.375+r*.375+o*.125,c=Math.abs(u-e),d=Math.abs(s-t);return[u,s,c,d]}function Bc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function qS({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case ee.Left:return[t-Bc(t-o,a),n];case ee.Right:return[t+Bc(o-t,a),n];case ee.Top:return[t,n-Bc(n-i,a)];case ee.Bottom:return[t,n+Bc(i-n,a)]}}function Yc({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:o,targetY:i,targetPosition:a=ee.Top,curvature:l=.25}){let[r,u]=qS({pos:n,x1:e,y1:t,x2:o,y2:i,c:l}),[s,c]=qS({pos:a,x1:o,y1:i,x2:e,y2:t,c:l}),[d,f,m,g]=Vc({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:r,sourceControlY:u,targetControlX:s,targetControlY:c});return[`M${e},${t} C${r},${u} ${s},${c} ${o},${i}`,d,f,m,g]}function Jm({sourceX:e,sourceY:t,targetX:n,targetY:o}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,l=Math.abs(o-t)/2,r=o<t?o+l:o-l;return[a,r,i,l]}function sx({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return o;let l=i&&n?o+1e3:o,r=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return l+r}function cx({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=Gc(kc(e),kc(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);let l={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:o/i[2]};return pl(l,Pc(a))>0}var wA=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,AA=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Wm=(e,t,n={})=>{if(!e.source||!e.target)return qm("006",ln.error006()),t;let o=n.getEdgeId||wA,i;return Gm(e)?i={...e}:i={...e,id:o(e)},AA(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Xc({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[i,a,l,r]=Jm({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,a,l,r]}var ZS={[ee.Left]:{x:-1,y:0},[ee.Right]:{x:1,y:0},[ee.Top]:{x:0,y:-1},[ee.Bottom]:{x:0,y:1}},DA=({source:e,sourcePosition:t=ee.Bottom,target:n})=>t===ee.Left||t===ee.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},jS=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function MA({source:e,sourcePosition:t=ee.Bottom,target:n,targetPosition:o=ee.Top,center:i,offset:a,stepPosition:l}){let r=ZS[t],u=ZS[o],s={x:e.x+r.x*a,y:e.y+r.y*a},c={x:n.x+u.x*a,y:n.y+u.y*a},d=DA({source:s,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",m=d[f],g=[],b,S,h={x:0,y:0},y={x:0,y:0},[,,p,v]=Jm({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(r[f]*u[f]===-1){f==="x"?(b=i.x??s.x+(c.x-s.x)*l,S=i.y??(s.y+c.y)/2):(b=i.x??(s.x+c.x)/2,S=i.y??s.y+(c.y-s.y)*l);let T=[{x:b,y:s.y},{x:b,y:c.y}],E=[{x:s.x,y:S},{x:c.x,y:S}];r[f]===m?g=f==="x"?T:E:g=f==="x"?E:T}else{let T=[{x:s.x,y:c.y}],E=[{x:c.x,y:s.y}];if(f==="x"?g=r.x===m?E:T:g=r.y===m?T:E,t===o){let z=Math.abs(e[f]-n[f]);if(z<=a){let P=Math.min(a-1,a-z);r[f]===m?h[f]=(s[f]>e[f]?-1:1)*P:y[f]=(c[f]>n[f]?-1:1)*P}}if(t!==o){let z=f==="x"?"y":"x",P=r[f]===u[z],_=s[z]>c[z],M=s[z]<c[z];(r[f]===1&&(!P&&_||P&&M)||r[f]!==1&&(!P&&M||P&&_))&&(g=f==="x"?T:E)}let N={x:s.x+h.x,y:s.y+h.y},w={x:c.x+y.x,y:c.y+y.y},k=Math.max(Math.abs(N.x-g[0].x),Math.abs(w.x-g[0].x)),A=Math.max(Math.abs(N.y-g[0].y),Math.abs(w.y-g[0].y));k>=A?(b=(N.x+w.x)/2,S=g[0].y):(b=g[0].x,S=(N.y+w.y)/2)}return[[e,{x:s.x+h.x,y:s.y+h.y},...g,{x:c.x+y.x,y:c.y+y.y},n],b,S,p,v]}function OA(e,t,n,o){let i=Math.min(jS(e,t)/2,jS(t,n)/2,o),{x:a,y:l}=t;if(e.x===a&&a===n.x||e.y===l&&l===n.y)return`L${a} ${l}`;if(e.y===l){let s=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${a+i*s},${l}Q ${a},${l} ${a},${l+i*c}`}let r=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${a},${l+i*u}Q ${a},${l} ${a+i*r},${l}`}function iu({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:o,targetY:i,targetPosition:a=ee.Top,borderRadius:l=5,centerX:r,centerY:u,offset:s=20,stepPosition:c=.5}){let[d,f,m,g,b]=MA({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:i},targetPosition:a,center:{x:r,y:u},offset:s,stepPosition:c});return[d.reduce((h,y,p)=>{let v="";return p>0&&p<d.length-1?v=OA(d[p-1],y,d[p+1],l):v=`${p===0?"M":"L"}${y.x} ${y.y}`,h+=v,h},""),f,m,g,b]}function QS(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function fx(e){let{sourceNode:t,targetNode:n}=e;if(!QS(t)||!QS(n))return null;let o=t.internals.handleBounds||KS(t.handles),i=n.internals.handleBounds||KS(n.handles),a=$S(o?.source??[],e.sourceHandle),l=$S(e.connectionMode===si.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!l)return e.onError?.("008",ln.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let r=a?.position||ee.Bottom,u=l?.position||ee.Top,s=ci(t,a,r),c=ci(n,l,u);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y,sourcePosition:r,targetPosition:u}}function KS(e){if(!e)return null;let t=[],n=[];for(let o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function ci(e,t,n=ee.Left,o=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:l,height:r}=t??Xn(e);if(o)return{x:i+l/2,y:a+r/2};switch(t?.position??n){case ee.Top:return{x:i+l/2,y:a};case ee.Right:return{x:i+l,y:a+r/2};case ee.Bottom:return{x:i+l/2,y:a+r};case ee.Left:return{x:i,y:a+r/2}}}function $S(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function qc(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function dx(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:i}){let a=new Set;return e.reduce((l,r)=>([r.markerStart||o,r.markerEnd||i].forEach(u=>{if(u&&typeof u=="object"){let s=qc(u,t);a.has(s)||(l.push({id:s,color:u.color||n,...u}),a.add(s))}}),l),[]).sort((l,r)=>l.id.localeCompare(r.id))}var px=1e3,RA=10,eh={nodeOrigin:[0,0],nodeExtent:fl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},zA={...eh,checkEquality:!0};function th(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function mx(e,t,n){let o=th(eh,n);for(let i of e.values())if(i.parentId)oh(i,e,t,o);else{let a=nu(i,o.nodeOrigin),l=cl(i.extent)?i.extent:o.nodeExtent,r=Ki(a,l,Xn(i));i.internals.positionAbsolute=r}}function LA(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],o=[];for(let i of e.handles){let a={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(a):i.type==="target"&&o.push(a)}return{source:n,target:o}}function nh(e){return e==="manual"}function Zc(e,t,n,o={}){let i=th(zA,o),a={i:0},l=new Map(t),r=i?.elevateNodesOnSelect&&!nh(i.zIndexMode)?px:0,u=e.length>0;t.clear(),n.clear();for(let s of e){let c=l.get(s.id);if(i.checkEquality&&s===c?.internals.userNode)t.set(s.id,c);else{let d=nu(s,i.nodeOrigin),f=cl(s.extent)?s.extent:i.nodeExtent,m=Ki(d,f,Xn(s));c={...i.defaults,...s,measured:{width:s.measured?.width,height:s.measured?.height},internals:{positionAbsolute:m,handleBounds:LA(s,c),z:hx(s,r,i.zIndexMode),userNode:s}},t.set(s.id,c)}(c.measured===void 0||c.measured.width===void 0||c.measured.height===void 0)&&!c.hidden&&(u=!1),s.parentId&&oh(c,t,n,o,a)}return u}function BA(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function oh(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:r,zIndexMode:u}=th(eh,o),s=e.parentId,c=t.get(s);if(!c){console.warn(`Parent node ${s} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}BA(e,n),i&&!c.parentId&&c.internals.rootParentIndex===void 0&&u==="auto"&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+i.i*RA),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!nh(u)?px:0,{x:f,y:m,z:g}=HA(e,c,l,r,d,u),{positionAbsolute:b}=e.internals,S=f!==b.x||m!==b.y;(S||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:f,y:m}:b,z:g}})}function hx(e,t,n){let o=xn(e.zIndex)?e.zIndex:0;return nh(n)?o:o+(e.selected?t:0)}function HA(e,t,n,o,i,a){let{x:l,y:r}=t.internals.positionAbsolute,u=Xn(e),s=nu(e,n),c=cl(e.extent)?Ki(s,e.extent,u):s,d=Ki({x:l+c.x,y:r+c.y},o,u);e.extent==="parent"&&(d=ax(d,u,t));let f=hx(e,i,a),m=t.internals.z??0;return{x:d.x,y:d.y,z:m>=f?m+1:f}}function jc(e,t,n,o=[0,0]){let i=[],a=new Map;for(let l of e){let r=t.get(l.parentId);if(!r)continue;let u=a.get(l.parentId)?.expandedRect??$i(r),s=Ym(u,l.rect);a.set(l.parentId,{expandedRect:s,parent:r})}return a.size>0&&a.forEach(({expandedRect:l,parent:r},u)=>{let s=r.internals.positionAbsolute,c=Xn(r),d=r.origin??o,f=l.x<s.x?Math.round(Math.abs(s.x-l.x)):0,m=l.y<s.y?Math.round(Math.abs(s.y-l.y)):0,g=Math.max(c.width,Math.round(l.width)),b=Math.max(c.height,Math.round(l.height)),S=(g-c.width)*d[0],h=(b-c.height)*d[1];(f>0||m>0||S||h)&&(i.push({id:u,type:"position",position:{x:r.position.x-f+S,y:r.position.y-m+h}}),n.get(u)?.forEach(y=>{e.some(p=>p.id===y.id)||i.push({id:y.id,type:"position",position:{x:y.position.x+f,y:y.position.y+m}})})),(c.width<l.width||c.height<l.height||f||m)&&i.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:g+(f?d[0]*f-S:0),height:b+(m?d[1]*m-h:0)}})}),i}function gx(e,t,n,o,i,a,l){let r=o?.querySelector(".xyflow__viewport"),u=!1;if(!r)return{changes:[],updatedInternals:u};let s=[],c=window.getComputedStyle(r),{m22:d}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let m of e.values()){let g=t.get(m.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),u=!0;continue}let b=Ic(m.nodeElement),S=g.measured.width!==b.width||g.measured.height!==b.height;if(!!(b.width&&b.height&&(S||!g.internals.handleBounds||m.force))){let y=m.nodeElement.getBoundingClientRect(),p=cl(g.extent)?g.extent:a,{positionAbsolute:v}=g.internals;g.parentId&&g.extent==="parent"?v=ax(v,b,t.get(g.parentId)):p&&(v=Ki(v,p,b));let x={...g,measured:b,internals:{...g.internals,positionAbsolute:v,handleBounds:{source:XS("source",m.nodeElement,y,d,g.id),target:XS("target",m.nodeElement,y,d,g.id)}}};t.set(g.id,x),g.parentId&&oh(x,t,n,{nodeOrigin:i,zIndexMode:l}),u=!0,S&&(s.push({id:g.id,type:"dimensions",dimensions:b}),g.expandParent&&g.parentId&&f.push({id:g.id,parentId:g.parentId,rect:$i(x,i)}))}}if(f.length>0){let m=jc(f,t,n,i);s.push(...m)}return{changes:s,updatedInternals:u}}async function yx({delta:e,panZoom:t,transform:n,translateExtent:o,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],o),r=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(r)}function FS(e,t,n,o,i,a){let l=i,r=o.get(l)||new Map;o.set(l,r.set(n,t)),l=`${i}-${e}`;let u=o.get(l)||new Map;if(o.set(l,u.set(n,t)),a){l=`${i}-${e}-${a}`;let s=o.get(l)||new Map;o.set(l,s.set(n,t))}}function ih(e,t,n){e.clear(),t.clear();for(let o of n){let{source:i,target:a,sourceHandle:l=null,targetHandle:r=null}=o,u={edgeId:o.id,source:i,target:a,sourceHandle:l,targetHandle:r},s=`${i}-${l}--${a}-${r}`,c=`${a}-${r}--${i}-${l}`;FS("source",u,c,e,i,l),FS("target",u,s,e,a,r),t.set(o.id,o)}}function vx(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:vx(n,t):!1}function JS(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function kA(e,t,n,o){let i=new Map;for(let[a,l]of e)if((l.selected||l.id===o)&&(!l.parentId||!vx(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){let r=e.get(a);r&&i.set(a,{id:a,position:r.position||{x:0,y:0},distance:{x:n.x-r.internals.positionAbsolute.x,y:n.y-r.internals.positionAbsolute.y},extent:r.extent,parentId:r.parentId,origin:r.origin,expandParent:r.expandParent,internals:{positionAbsolute:r.internals.positionAbsolute||{x:0,y:0}},measured:{width:r.measured.width??0,height:r.measured.height??0}})}return i}function Om({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){let i=[];for(let[l,r]of t){let u=n.get(l)?.internals.userNode;u&&i.push({...u,position:r.position,dragging:o})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:o}:i[0],i]}function UA({dragItems:e,snapGrid:t,x:n,y:o}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:o-i.distance.y},l=ml(a,t);return{x:l.x-a.x,y:l.y-a.y}}function bx({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:i}){let a={x:null,y:null},l=0,r=new Map,u=!1,s={x:0,y:0},c=null,d=!1,f=null,m=!1,g=!1,b=null;function S({noDragClassName:y,handleSelector:p,domNode:v,isSelectable:x,nodeId:T,nodeClickDistance:E=0}){f=dt(v);function N({x:z,y:P}){let{nodeLookup:_,nodeExtent:M,snapGrid:D,snapToGrid:R,nodeOrigin:O,onNodeDrag:L,onSelectionDrag:V,onError:U,updateNodePositions:I}=t();a={x:z,y:P};let Z=!1,K=r.size>1,Q=K&&M?Lm(dl(r)):null,re=K&&R?UA({dragItems:r,snapGrid:D,x:z,y:P}):null;for(let[te,X]of r){if(!_.has(te))continue;let W={x:z-X.distance.x,y:P-X.distance.y};R&&(W=re?{x:Math.round(W.x+re.x),y:Math.round(W.y+re.y)}:ml(W,D));let se=null;if(K&&M&&!X.extent&&Q){let{positionAbsolute:q}=X.internals,$=q.x-Q.x+M[0][0],ae=q.x+X.measured.width-Q.x2+M[1][0],me=q.y-Q.y+M[0][1],Ke=q.y+X.measured.height-Q.y2+M[1][1];se=[[$,me],[ae,Ke]]}let{position:ce,positionAbsolute:j}=Vm({nodeId:te,nextPosition:W,nodeLookup:_,nodeExtent:se||M,nodeOrigin:O,onError:U});Z=Z||X.position.x!==ce.x||X.position.y!==ce.y,X.position=ce,X.internals.positionAbsolute=j}if(g=g||Z,!!Z&&(I(r,!0),b&&(o||L||!T&&V))){let[te,X]=Om({nodeId:T,dragItems:r,nodeLookup:_});o?.(b,r,te,X),L?.(b,te,X),T||V?.(b,X)}}async function w(){if(!c)return;let{transform:z,panBy:P,autoPanSpeed:_,autoPanOnNodeDrag:M}=t();if(!M){u=!1,cancelAnimationFrame(l);return}let[D,R]=lx(s,c,_);(D!==0||R!==0)&&(a.x=(a.x??0)-D/z[2],a.y=(a.y??0)-R/z[2],await P({x:D,y:R})&&N(a)),l=requestAnimationFrame(w)}function k(z){let{nodeLookup:P,multiSelectionActive:_,nodesDraggable:M,transform:D,snapGrid:R,snapToGrid:O,selectNodesOnDrag:L,onNodeDragStart:V,onSelectionDragStart:U,unselectNodesAndEdges:I}=t();d=!0,(!L||!x)&&!_&&T&&(P.get(T)?.selected||I()),x&&L&&T&&e?.(T);let Z=eu(z.sourceEvent,{transform:D,snapGrid:R,snapToGrid:O,containerBounds:c});if(a=Z,r=kA(P,M,Z,T),r.size>0&&(n||V||!T&&U)){let[K,Q]=Om({nodeId:T,dragItems:r,nodeLookup:P});n?.(z.sourceEvent,r,K,Q),V?.(z.sourceEvent,K,Q),T||U?.(z.sourceEvent,Q)}}let A=pc().clickDistance(E).on("start",z=>{let{domNode:P,nodeDragThreshold:_,transform:M,snapGrid:D,snapToGrid:R}=t();c=P?.getBoundingClientRect()||null,m=!1,g=!1,b=z.sourceEvent,_===0&&k(z),a=eu(z.sourceEvent,{transform:M,snapGrid:D,snapToGrid:R,containerBounds:c}),s=_n(z.sourceEvent,c)}).on("drag",z=>{let{autoPanOnNodeDrag:P,transform:_,snapGrid:M,snapToGrid:D,nodeDragThreshold:R,nodeLookup:O}=t(),L=eu(z.sourceEvent,{transform:_,snapGrid:M,snapToGrid:D,containerBounds:c});if(b=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||T&&!O.has(T))&&(m=!0),!m){if(!u&&P&&d&&(u=!0,w()),!d){let V=_n(z.sourceEvent,c),U=V.x-s.x,I=V.y-s.y;Math.sqrt(U*U+I*I)>R&&k(z)}(a.x!==L.xSnapped||a.y!==L.ySnapped)&&r&&d&&(s=_n(z.sourceEvent,c),N(L))}}).on("end",z=>{if(!(!d||m)&&(u=!1,d=!1,cancelAnimationFrame(l),r.size>0)){let{nodeLookup:P,updateNodePositions:_,onNodeDragStop:M,onSelectionDragStop:D}=t();if(g&&(_(r,!1),g=!1),i||M||!T&&D){let[R,O]=Om({nodeId:T,dragItems:r,nodeLookup:P,dragging:!1});i?.(z.sourceEvent,r,R,O),M?.(z.sourceEvent,R,O),T||D?.(z.sourceEvent,O)}}}).filter(z=>{let P=z.target;return!z.button&&(!y||!JS(P,`.${y}`,v))&&(!p||JS(P,p,v))});f.call(A)}function h(){f?.on(".drag",null)}return{update:S,destroy:h}}function GA(e,t,n){let o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let a of t.values())pl(i,$i(a))>0&&o.push(a);return o}var PA=250;function IA(e,t,n,o){let i=[],a=1/0,l=GA(e,n,t+PA);for(let r of l){let u=[...r.internals.handleBounds?.source??[],...r.internals.handleBounds?.target??[]];for(let s of u){if(o.nodeId===s.nodeId&&o.type===s.type&&o.id===s.id)continue;let{x:c,y:d}=ci(r,s,s.position,!0),f=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(d-e.y,2));f>t||(f<a?(i=[{...s,x:c,y:d}],a=f):f===a&&i.push({...s,x:c,y:d}))}}if(!i.length)return null;if(i.length>1){let r=o.type==="source"?"target":"source";return i.find(u=>u.type===r)??i[0]}return i[0]}function Sx(e,t,n,o,i,a=!1){let l=o.get(e);if(!l)return null;let r=i==="strict"?l.internals.handleBounds?.[t]:[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]],u=(n?r?.find(s=>s.id===n):r?.[0])??null;return u&&a?{...u,...ci(l,u,u.position,!0)}:u}function xx(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function VA(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var _x=()=>!0;function YA(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:i,edgeUpdaterType:a,isTarget:l,domNode:r,nodeLookup:u,lib:s,autoPanOnConnect:c,flowId:d,panBy:f,cancelConnection:m,onConnectStart:g,onConnect:b,onConnectEnd:S,isValidConnection:h=_x,onReconnectEnd:y,updateConnection:p,getTransform:v,getFromHandle:x,autoPanSpeed:T,dragThreshold:E=1,handleDomNode:N}){let w=Km(e.target),k=0,A,{x:z,y:P}=_n(e),_=xx(a,N),M=r?.getBoundingClientRect(),D=!1;if(!M||!_)return;let R=Sx(i,_,o,u,t);if(!R)return;let O=_n(e,M),L=!1,V=null,U=!1,I=null;function Z(){if(!c||!M)return;let[ce,j]=lx(O,M,T);f({x:ce,y:j}),k=requestAnimationFrame(Z)}let K={...R,nodeId:i,type:_,position:R.position},Q=u.get(i),te={inProgress:!0,isValid:null,from:ci(Q,K,ee.Left,!0),fromHandle:K,fromPosition:K.position,fromNode:Q,to:O,toHandle:null,toPosition:VS[K.position],toNode:null,pointer:O};function X(){D=!0,p(te),g?.(e,{nodeId:i,handleId:o,handleType:_})}E===0&&X();function W(ce){if(!D){let{x:Ke,y:Ve}=_n(ce),pt=Ke-z,ot=Ve-P;if(!(pt*pt+ot*ot>E*E))return;X()}if(!x()||!K){se(ce);return}let j=v();O=_n(ce,M),A=IA(hl(O,j,!1,[1,1]),n,u,K),L||(Z(),L=!0);let q=Ex(ce,{handle:A,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:l?"target":"source",isValidConnection:h,doc:w,lib:s,flowId:d,nodeLookup:u});I=q.handleDomNode,V=q.connection,U=VA(!!A,q.isValid);let $=u.get(i),ae=$?ci($,K,ee.Left,!0):te.from,me={...te,from:ae,isValid:U,to:q.toHandle&&U?tu({x:q.toHandle.x,y:q.toHandle.y},j):O,toHandle:q.toHandle,toPosition:U&&q.toHandle?q.toHandle.position:VS[K.position],toNode:q.toHandle?u.get(q.toHandle.nodeId):null,pointer:O};p(me),te=me}function se(ce){if(!("touches"in ce&&ce.touches.length>0)){if(D){(A||I)&&V&&U&&b?.(V);let{inProgress:j,...q}=te,$={...q,toPosition:te.toHandle?te.toPosition:null};S?.(ce,$),a&&y?.(ce,$)}m(),cancelAnimationFrame(k),L=!1,U=!1,V=null,I=null,w.removeEventListener("mousemove",W),w.removeEventListener("mouseup",se),w.removeEventListener("touchmove",W),w.removeEventListener("touchend",se)}}w.addEventListener("mousemove",W),w.addEventListener("mouseup",se),w.addEventListener("touchmove",W),w.addEventListener("touchend",se)}function Ex(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:l,lib:r,flowId:u,isValidConnection:s=_x,nodeLookup:c}){let d=a==="target",f=t?l.querySelector(`.${r}-flow__handle[data-id="${u}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:m,y:g}=_n(e),b=l.elementFromPoint(m,g),S=b?.classList.contains(`${r}-flow__handle`)?b:f,h={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){let y=xx(void 0,S),p=S.getAttribute("data-nodeid"),v=S.getAttribute("data-handleid"),x=S.classList.contains("connectable"),T=S.classList.contains("connectableend");if(!p||!y)return h;let E={source:d?p:o,sourceHandle:d?v:i,target:d?o:p,targetHandle:d?i:v};h.connection=E;let w=x&&T&&(n===si.Strict?d&&y==="source"||!d&&y==="target":p!==o||v!==i);h.isValid=w&&s(E),h.toHandle=Sx(p,y,v,c,n,!0)}return h}var Qc={onPointerDown:YA,isValid:Ex};function Tx({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=dt(e);function a({translateExtent:r,width:u,height:s,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:m=!1}){let g=p=>{if(p.sourceEvent.type!=="wheel"||!t)return;let v=n(),x=p.sourceEvent.ctrlKey&&gl()?10:1,T=-p.sourceEvent.deltaY*(p.sourceEvent.deltaMode===1?.05:p.sourceEvent.deltaMode?1:.002)*c,E=v[2]*Math.pow(2,T*x);t.scaleTo(E)},b=[0,0],S=p=>{(p.sourceEvent.type==="mousedown"||p.sourceEvent.type==="touchstart")&&(b=[p.sourceEvent.clientX??p.sourceEvent.touches[0].clientX,p.sourceEvent.clientY??p.sourceEvent.touches[0].clientY])},h=p=>{let v=n();if(p.sourceEvent.type!=="mousemove"&&p.sourceEvent.type!=="touchmove"||!t)return;let x=[p.sourceEvent.clientX??p.sourceEvent.touches[0].clientX,p.sourceEvent.clientY??p.sourceEvent.touches[0].clientY],T=[x[0]-b[0],x[1]-b[1]];b=x;let E=o()*Math.max(v[2],Math.log(v[2]))*(m?-1:1),N={x:v[0]-T[0]*E,y:v[1]-T[1]*E},w=[[0,0],[u,s]];t.setViewportConstrained({x:N.x,y:N.y,zoom:v[2]},w,r)},y=Lc().on("start",S).on("zoom",d?h:null).on("zoom.wheel",f?g:null);i.call(y,{})}function l(){i.on("zoom",null)}return{update:a,destroy:l,pointer:Dt}}var Kc=e=>({x:e.x,y:e.y,zoom:e.k}),Rm=({x:e,y:t,zoom:n})=>ji.translate(e,t).scale(n),rl=(e,t)=>e.target.closest(`.${t}`),Nx=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),XA=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,zm=(e,t=0,n=XA,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},Cx=e=>{let t=e.ctrlKey&&gl()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function qA({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:r,onPanZoom:u,onPanZoomEnd:s}){return c=>{if(rl(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let d=n.property("__zoom").k||1;if(c.ctrlKey&&l){let S=Dt(c),h=Cx(c),y=d*Math.pow(2,h);o.scaleTo(n,y,S,c);return}let f=c.deltaMode===1?20:1,m=i===bo.Vertical?0:c.deltaX*f,g=i===bo.Horizontal?0:c.deltaY*f;!gl()&&c.shiftKey&&i!==bo.Vertical&&(m=c.deltaY*f,g=0),o.translateBy(n,-(m/d)*a,-(g/d)*a,{internal:!0});let b=Kc(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(u?.(c,b),e.panScrollTimeout=setTimeout(()=>{s?.(c,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,r?.(c,b))}}function ZA({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",l=!t&&a&&!o.ctrlKey,r=rl(o,e);if(o.ctrlKey&&a&&r&&o.preventDefault(),l||r)return null;o.preventDefault(),n.call(this,o,i)}}function jA({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=Kc(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,i)}}function QA({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&Nx(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Kc(a.transform))}}function KA({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&Nx(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let r=Kc(l.transform);e.prevViewport=r,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(l.sourceEvent,r)},n?150:0)}}}function $A({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:r,noPanClassName:u,lib:s,connectionInProgress:c}){return d=>{let f=e||t,m=n&&d.ctrlKey,g=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(rl(d,`${s}-flow__node`)||rl(d,`${s}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||l||c&&!g||rl(d,r)&&g||rl(d,u)&&(!g||i&&g&&!e)||!n&&d.ctrlKey&&g)return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!m&&g||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;let b=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||g)&&b}}function wx({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:i,onPanZoom:a,onPanZoomStart:l,onPanZoomEnd:r,onDraggingChange:u}){let s={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=Lc().scaleExtent([t,n]).translateExtent(o),f=dt(e).call(d);y({x:i.x,y:i.y,zoom:sl(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let m=f.on("wheel.zoom"),g=f.on("dblclick.zoom");d.wheelDelta(Cx);function b(A,z){return f?new Promise(P=>{d?.interpolate(z?.interpolate==="linear"?yo:Xi).transform(zm(f,z?.duration,z?.ease,()=>P(!0)),A)}):Promise.resolve(!1)}function S({noWheelClassName:A,noPanClassName:z,onPaneContextMenu:P,userSelectionActive:_,panOnScroll:M,panOnDrag:D,panOnScrollMode:R,panOnScrollSpeed:O,preventScrolling:L,zoomOnPinch:V,zoomOnScroll:U,zoomOnDoubleClick:I,zoomActivationKeyPressed:Z,lib:K,onTransformChange:Q,connectionInProgress:re,paneClickDistance:te,selectionOnDrag:X}){_&&!s.isZoomingOrPanning&&h();let W=M&&!Z&&!_;d.clickDistance(X?1/0:!xn(te)||te<0?0:te);let se=W?qA({zoomPanValues:s,noWheelClassName:A,d3Selection:f,d3Zoom:d,panOnScrollMode:R,panOnScrollSpeed:O,zoomOnPinch:V,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:r}):ZA({noWheelClassName:A,preventScrolling:L,d3ZoomHandler:m});if(f.on("wheel.zoom",se,{passive:!1}),!_){let j=jA({zoomPanValues:s,onDraggingChange:u,onPanZoomStart:l});d.on("start",j);let q=QA({zoomPanValues:s,panOnDrag:D,onPaneContextMenu:!!P,onPanZoom:a,onTransformChange:Q});d.on("zoom",q);let $=KA({zoomPanValues:s,panOnDrag:D,panOnScroll:M,onPaneContextMenu:P,onPanZoomEnd:r,onDraggingChange:u});d.on("end",$)}let ce=$A({zoomActivationKeyPressed:Z,panOnDrag:D,zoomOnScroll:U,panOnScroll:M,zoomOnDoubleClick:I,zoomOnPinch:V,userSelectionActive:_,noPanClassName:z,noWheelClassName:A,lib:K,connectionInProgress:re});d.filter(ce),I?f.on("dblclick.zoom",g):f.on("dblclick.zoom",null)}function h(){d.on("zoom",null)}async function y(A,z,P){let _=Rm(A),M=d?.constrain()(_,z,P);return M&&await b(M),new Promise(D=>D(M))}async function p(A,z){let P=Rm(A);return await b(P,z),new Promise(_=>_(P))}function v(A){if(f){let z=Rm(A),P=f.property("__zoom");(P.k!==A.zoom||P.x!==A.x||P.y!==A.y)&&d?.transform(f,z,null,{sync:!0})}}function x(){let A=f?Wr(f.node()):{x:0,y:0,k:1};return{x:A.x,y:A.y,zoom:A.k}}function T(A,z){return f?new Promise(P=>{d?.interpolate(z?.interpolate==="linear"?yo:Xi).scaleTo(zm(f,z?.duration,z?.ease,()=>P(!0)),A)}):Promise.resolve(!1)}function E(A,z){return f?new Promise(P=>{d?.interpolate(z?.interpolate==="linear"?yo:Xi).scaleBy(zm(f,z?.duration,z?.ease,()=>P(!0)),A)}):Promise.resolve(!1)}function N(A){d?.scaleExtent(A)}function w(A){d?.translateExtent(A)}function k(A){let z=!xn(A)||A<0?0:A;d?.clickDistance(z)}return{update:S,destroy:h,setViewport:p,setViewportConstrained:y,getViewport:x,scaleTo:T,scaleBy:E,setScaleExtent:N,setTranslateExtent:w,syncViewport:v,setClickDistance:k}}var fi;(function(e){e.Line="line",e.Handle="handle"})(fi||(fi={}));function FA({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:i,affectsY:a}){let l=e-t,r=n-o,u=[l>0?1:l<0?-1:0,r>0?1:r<0?-1:0];return l&&i&&(u[0]=u[0]*-1),r&&a&&(u[1]=u[1]*-1),u}function WS(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:i}}function ri(e,t){return Math.max(0,t-e)}function ui(e,t){return Math.max(0,e-t)}function Hc(e,t,n){return Math.max(0,t-e,e-n)}function ex(e,t){return e?!t:t}function JA(e,t,n,o,i,a,l,r){let{affectsX:u,affectsY:s}=t,{isHorizontal:c,isVertical:d}=t,f=c&&d,{xSnapped:m,ySnapped:g}=n,{minWidth:b,maxWidth:S,minHeight:h,maxHeight:y}=o,{x:p,y:v,width:x,height:T,aspectRatio:E}=e,N=Math.floor(c?m-e.pointerX:0),w=Math.floor(d?g-e.pointerY:0),k=x+(u?-N:N),A=T+(s?-w:w),z=-a[0]*x,P=-a[1]*T,_=Hc(k,b,S),M=Hc(A,h,y);if(l){let O=0,L=0;u&&N<0?O=ri(p+N+z,l[0][0]):!u&&N>0&&(O=ui(p+k+z,l[1][0])),s&&w<0?L=ri(v+w+P,l[0][1]):!s&&w>0&&(L=ui(v+A+P,l[1][1])),_=Math.max(_,O),M=Math.max(M,L)}if(r){let O=0,L=0;u&&N>0?O=ui(p+N,r[0][0]):!u&&N<0&&(O=ri(p+k,r[1][0])),s&&w>0?L=ui(v+w,r[0][1]):!s&&w<0&&(L=ri(v+A,r[1][1])),_=Math.max(_,O),M=Math.max(M,L)}if(i){if(c){let O=Hc(k/E,h,y)*E;if(_=Math.max(_,O),l){let L=0;!u&&!s||u&&!s&&f?L=ui(v+P+k/E,l[1][1])*E:L=ri(v+P+(u?N:-N)/E,l[0][1])*E,_=Math.max(_,L)}if(r){let L=0;!u&&!s||u&&!s&&f?L=ri(v+k/E,r[1][1])*E:L=ui(v+(u?N:-N)/E,r[0][1])*E,_=Math.max(_,L)}}if(d){let O=Hc(A*E,b,S)/E;if(M=Math.max(M,O),l){let L=0;!u&&!s||s&&!u&&f?L=ui(p+A*E+z,l[1][0])/E:L=ri(p+(s?w:-w)*E+z,l[0][0])/E,M=Math.max(M,L)}if(r){let L=0;!u&&!s||s&&!u&&f?L=ri(p+A*E,r[1][0])/E:L=ui(p+(s?w:-w)*E,r[0][0])/E,M=Math.max(M,L)}}}w=w+(w<0?M:-M),N=N+(N<0?_:-_),i&&(f?k>A*E?w=(ex(u,s)?-N:N)/E:N=(ex(u,s)?-w:w)*E:c?(w=N/E,s=u):(N=w*E,u=s));let D=u?p+N:p,R=s?v+w:v;return{width:x+(u?-N:N),height:T+(s?-w:w),x:a[0]*N*(u?-1:1)+D,y:a[1]*w*(s?-1:1)+R}}var Ax={width:0,height:0,x:0,y:0},WA={...Ax,pointerX:0,pointerY:0,aspectRatio:1};function eD(e){return[[0,0],[e.measured.width,e.measured.height]]}function tD(e,t,n){let o=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,l=e.measured.height??0,r=n[0]*a,u=n[1]*l;return[[o-r,i-u],[o+a-r,i+l-u]]}function Dx({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=dt(e),l={controlDirection:WS("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function r({controlPosition:s,boundaries:c,keepAspectRatio:d,resizeDirection:f,onResizeStart:m,onResize:g,onResizeEnd:b,shouldResize:S}){let h={...Ax},y={...WA};l={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:WS(s)};let p,v=null,x=[],T,E,N,w=!1,k=pc().on("start",A=>{let{nodeLookup:z,transform:P,snapGrid:_,snapToGrid:M,nodeOrigin:D,paneDomNode:R}=n();if(p=z.get(t),!p)return;v=R?.getBoundingClientRect()??null;let{xSnapped:O,ySnapped:L}=eu(A.sourceEvent,{transform:P,snapGrid:_,snapToGrid:M,containerBounds:v});h={width:p.measured.width??0,height:p.measured.height??0,x:p.position.x??0,y:p.position.y??0},y={...h,pointerX:O,pointerY:L,aspectRatio:h.width/h.height},T=void 0,p.parentId&&(p.extent==="parent"||p.expandParent)&&(T=z.get(p.parentId),E=T&&p.extent==="parent"?eD(T):void 0),x=[],N=void 0;for(let[V,U]of z)if(U.parentId===t&&(x.push({id:V,position:{...U.position},extent:U.extent}),U.extent==="parent"||U.expandParent)){let I=tD(U,p,U.origin??D);N?N=[[Math.min(I[0][0],N[0][0]),Math.min(I[0][1],N[0][1])],[Math.max(I[1][0],N[1][0]),Math.max(I[1][1],N[1][1])]]:N=I}m?.(A,{...h})}).on("drag",A=>{let{transform:z,snapGrid:P,snapToGrid:_,nodeOrigin:M}=n(),D=eu(A.sourceEvent,{transform:z,snapGrid:P,snapToGrid:_,containerBounds:v}),R=[];if(!p)return;let{x:O,y:L,width:V,height:U}=h,I={},Z=p.origin??M,{width:K,height:Q,x:re,y:te}=JA(y,l.controlDirection,D,l.boundaries,l.keepAspectRatio,Z,E,N),X=K!==V,W=Q!==U,se=re!==O&&X,ce=te!==L&&W;if(!se&&!ce&&!X&&!W)return;if((se||ce||Z[0]===1||Z[1]===1)&&(I.x=se?re:h.x,I.y=ce?te:h.y,h.x=I.x,h.y=I.y,x.length>0)){let ae=re-O,me=te-L;for(let Ke of x)Ke.position={x:Ke.position.x-ae+Z[0]*(K-V),y:Ke.position.y-me+Z[1]*(Q-U)},R.push(Ke)}if((X||W)&&(I.width=X&&(!l.resizeDirection||l.resizeDirection==="horizontal")?K:h.width,I.height=W&&(!l.resizeDirection||l.resizeDirection==="vertical")?Q:h.height,h.width=I.width,h.height=I.height),T&&p.expandParent){let ae=Z[0]*(I.width??0);I.x&&I.x<ae&&(h.x=ae,y.x=y.x-(I.x-ae));let me=Z[1]*(I.height??0);I.y&&I.y<me&&(h.y=me,y.y=y.y-(I.y-me))}let j=FA({width:h.width,prevWidth:V,height:h.height,prevHeight:U,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),q={...h,direction:j};S?.(A,q)!==!1&&(w=!0,g?.(A,q),o(I,R))}).on("end",A=>{w&&(b?.(A,{...h}),i?.({...h}),w=!1)});a.call(k)}function u(){a.on(".drag",null)}return{update:r,destroy:u}}var Vx=ie(Nt(),1),Yx=ie(kx(),1);var Gx={},Ux=e=>{let t,n=new Set,o=(c,d)=>{let f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){let m=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(g=>g(t,m))}},i=()=>t,u={setState:o,getState:i,getInitialState:()=>s,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(Gx.env?Gx.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(o,i,u);return u},Px=e=>e?Ux(e):Ux;var{useDebugValue:bD}=Vx.default,{useSyncExternalStoreWithSelector:SD}=Yx.default,xD=e=>e;function lh(e,t=xD,n){let o=SD(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return bD(o),o}var Ix=(e,t)=>{let n=Px(e),o=(i,a=t)=>lh(n,i,a);return Object.assign(o,n),o},Xx=(e,t)=>e?Ix(e,t):Ix;function Ue(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[o,i]of e)if(!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var _D=ie(Zf()),ef=(0,H.createContext)(null),ED=ef.Provider,m_=ln.error001();function Se(e,t){let n=(0,H.useContext)(ef);if(n===null)throw new Error(m_);return lh(n,e,t)}function Ie(){let e=(0,H.useContext)(ef);if(e===null)throw new Error(m_);return(0,H.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var qx={display:"none"},TD={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},h_="react-flow__node-desc",g_="react-flow__edge-desc",ND="react-flow__aria-live",CD=e=>e.ariaLiveMessage,wD=e=>e.ariaLabelConfig;function AD({rfId:e}){let t=Se(CD);return(0,B.jsx)("div",{id:`${ND}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:TD,children:t})}function DD({rfId:e,disableKeyboardA11y:t}){let n=Se(wD);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{id:`${h_}-${e}`,style:qx,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,B.jsx)("div",{id:`${g_}-${e}`,style:qx,children:n["edge.a11yDescription.default"]}),!t&&(0,B.jsx)(AD,{rfId:e})]})}var tf=(0,H.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...i},a)=>{let l=`${e}`.split("-");return(0,B.jsx)("div",{className:Ze(["react-flow__panel",n,...l]),style:o,ref:a,...i,children:t})});tf.displayName="Panel";function MD({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,B.jsx)(tf,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,B.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var OD=e=>{let t=[],n=[];for(let[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(let[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Fc=e=>e.id;function RD(e,t){return Ue(e.selectedNodes.map(Fc),t.selectedNodes.map(Fc))&&Ue(e.selectedEdges.map(Fc),t.selectedEdges.map(Fc))}function zD({onSelectionChange:e}){let t=Ie(),{selectedNodes:n,selectedEdges:o}=Se(OD,RD);return(0,H.useEffect)(()=>{let i={nodes:n,edges:o};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,o,e]),null}var LD=e=>!!e.onSelectionChangeHandlers;function BD({onSelectionChange:e}){let t=Se(LD);return e||t?(0,B.jsx)(zD,{onSelectionChange:e}):null}var y_=[0,0],HD={x:0,y:0,zoom:1},kD=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Zx=[...kD,"rfId"],UD=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),jx={translateExtent:fl,nodeOrigin:y_,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function GD(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:l,reset:r,setDefaultNodesAndEdges:u}=Se(UD,Ue),s=Ie();(0,H.useEffect)(()=>(u(e.defaultNodes,e.defaultEdges),()=>{c.current=jx,r()}),[]);let c=(0,H.useRef)(jx);return(0,H.useEffect)(()=>{for(let d of Zx){let f=e[d],m=c.current[d];f!==m&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?o(f):d==="maxZoom"?i(f):d==="translateExtent"?a(f):d==="nodeExtent"?l(f):d==="ariaLabelConfig"?s.setState({ariaLabelConfig:ux(f)}):d==="fitView"?s.setState({fitViewQueued:f}):d==="fitViewOptions"?s.setState({fitViewOptions:f}):s.setState({[d]:f})))}c.current=e},Zx.map(d=>e[d])),null}function Qx(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function PD(e){let[t,n]=(0,H.useState)(e==="system"?null:e);return(0,H.useEffect)(()=>{if(e!=="system"){n(e);return}let o=Qx(),i=()=>n(o?.matches?"dark":"light");return i(),o?.addEventListener("change",i),()=>{o?.removeEventListener("change",i)}},[e]),t!==null?t:Qx()?.matches?"dark":"light"}var Kx=typeof document<"u"?document:null;function au(e=null,t={target:Kx,actInsideInputWithModifier:!0}){let[n,o]=(0,H.useState)(!1),i=(0,H.useRef)(!1),a=(0,H.useRef)(new Set([])),[l,r]=(0,H.useMemo)(()=>{if(e!==null){let s=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`-`).replace(`--`,`-+`).split(`-`)),c=s.reduce((d,f)=>d.concat(...f),[]);return[s,c]}return[[],[]]},[e]);return(0,H.useEffect)(()=>{let u=t?.target??Kx,s=t?.actInsideInputWithModifier??!0;if(e!==null){let c=m=>{if(i.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!i.current||i.current&&!s)&&$m(m))return!1;let b=Fx(m.code,r);if(a.current.add(m[b]),$x(l,a.current,!1)){let S=m.composedPath?.()?.[0]||m.target,h=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(i.current||!h)&&m.preventDefault(),o(!0)}},d=m=>{let g=Fx(m.code,r);$x(l,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(m[g]),m.key==="Meta"&&a.current.clear(),i.current=!1},f=()=>{a.current.clear(),o(!1)};return u?.addEventListener("keydown",c),u?.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{u?.removeEventListener("keydown",c),u?.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,o]),n}function $x(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(i=>t.has(i)))}function Fx(e,t){return t.includes(e)?"code":"key"}var ID=()=>{let e=Ie();return(0,H.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[o,i,a],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??o,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{let{width:o,height:i,minZoom:a,maxZoom:l,panZoom:r}=e.getState(),u=ou(t,o,i,a,l,n?.padding??.1);return r?(await r.setViewport(u,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:o,snapGrid:i,snapToGrid:a,domNode:l}=e.getState();if(!l)return t;let{x:r,y:u}=l.getBoundingClientRect(),s={x:t.x-r,y:t.y-u},c=n.snapGrid??i,d=n.snapToGrid??a;return hl(s,o,d,c)},flowToScreenPosition:t=>{let{transform:n,domNode:o}=e.getState();if(!o)return t;let{x:i,y:a}=o.getBoundingClientRect(),l=tu(t,n);return{x:l.x+i,y:l.y+a}}}),[])};function v_(e,t){let n=[],o=new Map,i=[];for(let a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")o.set(a.id,[a]);else{let l=o.get(a.id);l?l.push(a):o.set(a.id,[a])}for(let a of t){let l=o.get(a.id);if(!l){n.push(a);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}let r={...a};for(let u of l)VD(u,r);n.push(r)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function VD(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function b_(e,t){return v_(e,t)}function S_(e,t){return v_(e,t)}function Fi(e,t){return{id:e,type:"select",selected:t}}function vl(e,t=new Set,n=!1){let o=[];for(let[i,a]of e){let l=t.has(i);!(a.selected===void 0&&!l)&&a.selected!==l&&(n&&(a.selected=l),o.push(Fi(a.id,l)))}return o}function Jx({items:e=[],lookup:t}){let n=[],o=new Map(e.map(i=>[i.id,i]));for(let[i,a]of e.entries()){let l=t.get(a.id),r=l?.internals?.userNode??l;r!==void 0&&r!==a&&n.push({id:a.id,item:a,type:"replace"}),r===void 0&&n.push({item:a,type:"add",index:i})}for(let[i]of t)o.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function Wx(e){return{id:e.id,type:"remove"}}var e_=e=>tx(e),YD=e=>Gm(e);function x_(e){return(0,H.forwardRef)(e)}var XD=typeof window<"u"?H.useLayoutEffect:H.useEffect;function t_(e){let[t,n]=(0,H.useState)(BigInt(0)),[o]=(0,H.useState)(()=>qD(()=>n(i=>i+BigInt(1))));return XD(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function qD(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var __=(0,H.createContext)(null);function ZD({children:e}){let t=Ie(),n=(0,H.useCallback)(r=>{let{nodes:u=[],setNodes:s,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:m,onNodesChangeMiddlewareMap:g}=t.getState(),b=u;for(let h of r)b=typeof h=="function"?h(b):h;let S=Jx({items:b,lookup:f});for(let h of g.values())S=h(S);c&&s(b),S.length>0?d?.(S):m&&window.requestAnimationFrame(()=>{let{fitViewQueued:h,nodes:y,setNodes:p}=t.getState();h&&p(y)})},[]),o=t_(n),i=(0,H.useCallback)(r=>{let{edges:u=[],setEdges:s,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState(),m=u;for(let g of r)m=typeof g=="function"?g(m):g;c?s(m):d&&d(Jx({items:m,lookup:f}))},[]),a=t_(i),l=(0,H.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,B.jsx)(__.Provider,{value:l,children:e})}function jD(){let e=(0,H.useContext)(__);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var QD=e=>!!e.panZoom;function ch(){let e=ID(),t=Ie(),n=jD(),o=Se(QD),i=(0,H.useMemo)(()=>{let a=d=>t.getState().nodeLookup.get(d),l=d=>{n.nodeQueue.push(d)},r=d=>{n.edgeQueue.push(d)},u=d=>{let{nodeLookup:f,nodeOrigin:m}=t.getState(),g=e_(d)?d:f.get(d.id),b=g.parentId?jm(g.position,g.measured,g.parentId,f,m):g.position,S={...g,position:b,width:g.measured?.width??g.width,height:g.measured?.height??g.height};return $i(S)},s=(d,f,m={replace:!1})=>{l(g=>g.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return m.replace&&e_(S)?S:{...b,...S}}return b}))},c=(d,f,m={replace:!1})=>{r(g=>g.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return m.replace&&YD(S)?S:{...b,...S}}return b}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>a(d)?.internals.userNode,getInternalNode:a,getEdges:()=>{let{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:l,setEdges:r,addNodes:d=>{let f=Array.isArray(d)?d:[d];n.nodeQueue.push(m=>[...m,...f])},addEdges:d=>{let f=Array.isArray(d)?d:[d];n.edgeQueue.push(m=>[...m,...f])},toObject:()=>{let{nodes:d=[],edges:f=[],transform:m}=t.getState(),[g,b,S]=m;return{nodes:d.map(h=>({...h})),edges:f.map(h=>({...h})),viewport:{x:g,y:b,zoom:S}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{let{nodes:m,edges:g,onNodesDelete:b,onEdgesDelete:S,triggerNodeChanges:h,triggerEdgeChanges:y,onDelete:p,onBeforeDelete:v}=t.getState(),{nodes:x,edges:T}=await ix({nodesToRemove:d,edgesToRemove:f,nodes:m,edges:g,onBeforeDelete:v}),E=T.length>0,N=x.length>0;if(E){let w=T.map(Wx);S?.(T),y(w)}if(N){let w=x.map(Wx);b?.(x),h(w)}return(N||E)&&p?.({nodes:x,edges:T}),{deletedNodes:x,deletedEdges:T}},getIntersectingNodes:(d,f=!0,m)=>{let g=Xm(d),b=g?d:u(d),S=m!==void 0;return b?(m||t.getState().nodes).filter(h=>{let y=t.getState().nodeLookup.get(h.id);if(y&&!g&&(h.id===d.id||!y.internals.positionAbsolute))return!1;let p=$i(S?h:y),v=pl(p,b);return f&&v>0||v>=p.width*p.height||v>=b.width*b.height}):[]},isNodeIntersecting:(d,f,m=!0)=>{let b=Xm(d)?d:u(d);if(!b)return!1;let S=pl(b,f);return m&&S>0||S>=f.width*f.height||S>=b.width*b.height},updateNode:s,updateNodeData:(d,f,m={replace:!1})=>{s(d,g=>{let b=typeof f=="function"?f(g):f;return m.replace?{...g,data:b}:{...g,data:{...g.data,...b}}},m)},updateEdge:c,updateEdgeData:(d,f,m={replace:!1})=>{c(d,g=>{let b=typeof f=="function"?f(g):f;return m.replace?{...g,data:b}:{...g,data:{...g.data,...b}}},m)},getNodesBounds:d=>{let{nodeLookup:f,nodeOrigin:m}=t.getState();return Im(d,{nodeLookup:f,nodeOrigin:m})},getHandleConnections:({type:d,id:f,nodeId:m})=>Array.from(t.getState().connectionLookup.get(`${m}-${d}${f?`-${f}`:""}`)?.values()??[]),getNodeConnections:({type:d,handleId:f,nodeId:m})=>Array.from(t.getState().connectionLookup.get(`${m}${d?f?`-${d}-${f}`:`-${d}`:""}`)?.values()??[]),fitView:async d=>{let f=t.getState().fitViewResolver??rx();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(m=>[...m]),f.promise}}},[]);return(0,H.useMemo)(()=>({...i,...e,viewportInitialized:o}),[o])}var n_=e=>e.selected,KD=typeof window<"u"?window:void 0;function $D({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=Ie(),{deleteElements:o}=ch(),i=au(e,{actInsideInputWithModifier:!1}),a=au(t,{target:KD});(0,H.useEffect)(()=>{if(i){let{edges:l,nodes:r}=n.getState();o({nodes:r.filter(n_),edges:l.filter(n_)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,H.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function FD(e){let t=Ie();(0,H.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=Ic(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",ln.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);let o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}var nf={position:"absolute",width:"100%",height:"100%",top:0,left:0},JD=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function WD({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=bo.Free,zoomOnDoubleClick:l=!0,panOnDrag:r=!0,defaultViewport:u,translateExtent:s,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:m=!0,children:g,noWheelClassName:b,noPanClassName:S,onViewportChange:h,isControlledViewport:y,paneClickDistance:p,selectionOnDrag:v}){let x=Ie(),T=(0,H.useRef)(null),{userSelectionActive:E,lib:N,connectionInProgress:w}=Se(JD,Ue),k=au(f),A=(0,H.useRef)();FD(T);let z=(0,H.useCallback)(P=>{h?.({x:P[0],y:P[1],zoom:P[2]}),y||x.setState({transform:P})},[h,y]);return(0,H.useEffect)(()=>{if(T.current){A.current=wx({domNode:T.current,minZoom:c,maxZoom:d,translateExtent:s,viewport:u,onDraggingChange:D=>x.setState(R=>R.paneDragging===D?R:{paneDragging:D}),onPanZoomStart:(D,R)=>{let{onViewportChangeStart:O,onMoveStart:L}=x.getState();L?.(D,R),O?.(R)},onPanZoom:(D,R)=>{let{onViewportChange:O,onMove:L}=x.getState();L?.(D,R),O?.(R)},onPanZoomEnd:(D,R)=>{let{onViewportChangeEnd:O,onMoveEnd:L}=x.getState();L?.(D,R),O?.(R)}});let{x:P,y:_,zoom:M}=A.current.getViewport();return x.setState({panZoom:A.current,transform:[P,_,M],domNode:T.current.closest(".react-flow")}),()=>{A.current?.destroy()}}},[]),(0,H.useEffect)(()=>{A.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:r,zoomActivationKeyPressed:k,preventScrolling:m,noPanClassName:S,userSelectionActive:E,noWheelClassName:b,lib:N,onTransformChange:z,connectionInProgress:w,selectionOnDrag:v,paneClickDistance:p})},[e,t,n,o,i,a,l,r,k,m,S,E,b,N,z,w,v,p]),(0,B.jsx)("div",{className:"react-flow__renderer",ref:T,style:nf,children:g})}var eM=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function tM(){let{userSelectionActive:e,userSelectionRect:t}=Se(eM,Ue);return e&&t?(0,B.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var rh=(e,t)=>n=>{n.target===t.current&&e?.(n)},nM=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function oM({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Qi.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:r,onPaneClick:u,onPaneContextMenu:s,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:m,children:g}){let b=Ie(),{userSelectionActive:S,elementsSelectable:h,dragging:y,connectionInProgress:p}=Se(nM,Ue),v=h&&(e||S),x=(0,H.useRef)(null),T=(0,H.useRef)(),E=(0,H.useRef)(new Set),N=(0,H.useRef)(new Set),w=(0,H.useRef)(!1),k=O=>{if(w.current||p){w.current=!1;return}u?.(O),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},A=O=>{if(Array.isArray(o)&&o?.includes(2)){O.preventDefault();return}s?.(O)},z=c?O=>c(O):void 0,P=O=>{w.current&&(O.stopPropagation(),w.current=!1)},_=O=>{let{domNode:L}=b.getState();if(T.current=L?.getBoundingClientRect(),!T.current)return;let V=O.target===x.current;if(!V&&!!O.target.closest(".nokey")||!e||!(a&&V||t)||O.button!==0||!O.isPrimary)return;O.target?.setPointerCapture?.(O.pointerId),w.current=!1;let{x:Z,y:K}=_n(O.nativeEvent,T.current);b.setState({userSelectionRect:{width:0,height:0,startX:Z,startY:K,x:Z,y:K}}),V||(O.stopPropagation(),O.preventDefault())},M=O=>{let{userSelectionRect:L,transform:V,nodeLookup:U,edgeLookup:I,connectionLookup:Z,triggerNodeChanges:K,triggerEdgeChanges:Q,defaultEdgeOptions:re,resetSelectedElements:te}=b.getState();if(!T.current||!L)return;let{x:X,y:W}=_n(O.nativeEvent,T.current),{startX:se,startY:ce}=L;if(!w.current){let me=t?0:i;if(Math.hypot(X-se,W-ce)<=me)return;te(),l?.(O)}w.current=!0;let j={startX:se,startY:ce,x:X<se?X:se,y:W<ce?W:ce,width:Math.abs(X-se),height:Math.abs(W-ce)},q=E.current,$=N.current;E.current=new Set(Uc(U,j,V,n===Qi.Partial,!0).map(me=>me.id)),N.current=new Set;let ae=re?.selectable??!0;for(let me of E.current){let Ke=Z.get(me);if(Ke)for(let{edgeId:Ve}of Ke.values()){let pt=I.get(Ve);pt&&(pt.selectable??ae)&&N.current.add(Ve)}}if(!Qm(q,E.current)){let me=vl(U,E.current,!0);K(me)}if(!Qm($,N.current)){let me=vl(I,N.current);Q(me)}b.setState({userSelectionRect:j,userSelectionActive:!0,nodesSelectionActive:!1})},D=O=>{O.button===0&&(O.target?.releasePointerCapture?.(O.pointerId),!S&&O.target===x.current&&b.getState().userSelectionRect&&k?.(O),b.setState({userSelectionActive:!1,userSelectionRect:null}),w.current&&(r?.(O),b.setState({nodesSelectionActive:E.current.size>0})))},R=o===!0||Array.isArray(o)&&o.includes(0);return(0,B.jsxs)("div",{className:Ze(["react-flow__pane",{draggable:R,dragging:y,selection:e}]),onClick:v?void 0:rh(k,x),onContextMenu:rh(A,x),onWheel:rh(z,x),onPointerEnter:v?void 0:d,onPointerMove:v?M:f,onPointerUp:v?D:void 0,onPointerDownCapture:v?_:void 0,onClickCapture:v?P:void 0,onPointerLeave:m,ref:x,style:nf,children:[g,(0,B.jsx)(tM,{})]})}function sh({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:l,nodeLookup:r,onError:u}=t.getState(),s=r.get(e);if(!s){u?.("012",ln.error012(e));return}t.setState({nodesSelectionActive:!1}),s.selected?(n||s.selected&&l)&&(a({nodes:[s],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function E_({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:l}){let r=Ie(),[u,s]=(0,H.useState)(!1),c=(0,H.useRef)();return(0,H.useEffect)(()=>{c.current=bx({getStoreItems:()=>r.getState(),onNodeMouseDown:d=>{sh({id:d,store:r,nodeRef:e})},onDragStart:()=>{s(!0)},onDragStop:()=>{s(!1)}})},[]),(0,H.useEffect)(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:l}),()=>{c.current?.destroy()}},[n,o,t,a,e,i,l]),u}var iM=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function T_(){let e=Ie();return(0,H.useCallback)(n=>{let{nodeExtent:o,snapToGrid:i,snapGrid:a,nodesDraggable:l,onError:r,updateNodePositions:u,nodeLookup:s,nodeOrigin:c}=e.getState(),d=new Map,f=iM(l),m=i?a[0]:5,g=i?a[1]:5,b=n.direction.x*m*n.factor,S=n.direction.y*g*n.factor;for(let[,h]of s){if(!f(h))continue;let y={x:h.internals.positionAbsolute.x+b,y:h.internals.positionAbsolute.y+S};i&&(y=ml(y,a));let{position:p,positionAbsolute:v}=Vm({nodeId:h.id,nextPosition:y,nodeLookup:s,nodeExtent:o,nodeOrigin:c,onError:r});h.position=p,h.internals.positionAbsolute=v,d.set(h.id,h)}u(d)},[])}var fh=(0,H.createContext)(null),aM=fh.Provider;fh.Consumer;var N_=()=>(0,H.useContext)(fh),lM=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),rM=(e,t,n)=>o=>{let{connectionClickStartHandle:i,connectionMode:a,connection:l}=o,{fromHandle:r,toHandle:u,isValid:s}=l,c=u?.nodeId===e&&u?.id===t&&u?.type===n;return{connectingFrom:r?.nodeId===e&&r?.id===t&&r?.type===n,connectingTo:c,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===si.Strict?r?.type!==n:e!==r?.nodeId||t!==r?.id,connectionInProcess:!!r,clickConnectionInProcess:!!i,valid:c&&s}};function uM({type:e="source",position:t=ee.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:l,onConnect:r,children:u,className:s,onMouseDown:c,onTouchStart:d,...f},m){let g=l||null,b=e==="target",S=Ie(),h=N_(),{connectOnClick:y,noPanClassName:p,rfId:v}=Se(lM,Ue),{connectingFrom:x,connectingTo:T,clickConnecting:E,isPossibleEndHandle:N,connectionInProcess:w,clickConnectionInProcess:k,valid:A}=Se(rM(h,g,e),Ue);h||S.getState().onError?.("010",ln.error010());let z=M=>{let{defaultEdgeOptions:D,onConnect:R,hasDefaultEdges:O}=S.getState(),L={...D,...M};if(O){let{edges:V,setEdges:U}=S.getState();U(Wm(L,V))}R?.(L),r?.(L)},P=M=>{if(!h)return;let D=Fm(M.nativeEvent);if(i&&(D&&M.button===0||!D)){let R=S.getState();Qc.onPointerDown(M.nativeEvent,{handleDomNode:M.currentTarget,autoPanOnConnect:R.autoPanOnConnect,connectionMode:R.connectionMode,connectionRadius:R.connectionRadius,domNode:R.domNode,nodeLookup:R.nodeLookup,lib:R.lib,isTarget:b,handleId:g,nodeId:h,flowId:R.rfId,panBy:R.panBy,cancelConnection:R.cancelConnection,onConnectStart:R.onConnectStart,onConnectEnd:(...O)=>S.getState().onConnectEnd?.(...O),updateConnection:R.updateConnection,onConnect:z,isValidConnection:n||((...O)=>S.getState().isValidConnection?.(...O)??!0),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:R.autoPanSpeed,dragThreshold:R.connectionDragThreshold})}D?c?.(M):d?.(M)},_=M=>{let{onClickConnectStart:D,onClickConnectEnd:R,connectionClickStartHandle:O,connectionMode:L,isValidConnection:V,lib:U,rfId:I,nodeLookup:Z,connection:K}=S.getState();if(!h||!O&&!i)return;if(!O){D?.(M.nativeEvent,{nodeId:h,handleId:g,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:h,type:e,id:g}});return}let Q=Km(M.target),re=n||V,{connection:te,isValid:X}=Qc.isValid(M.nativeEvent,{handle:{nodeId:h,id:g,type:e},connectionMode:L,fromNodeId:O.nodeId,fromHandleId:O.id||null,fromType:O.type,isValidConnection:re,flowId:I,doc:Q,lib:U,nodeLookup:Z});X&&te&&z(te);let W=structuredClone(K);delete W.inProgress,W.toPosition=W.toHandle?W.toHandle.position:null,R?.(M,W),S.setState({connectionClickStartHandle:null})};return(0,B.jsx)("div",{"data-handleid":g,"data-nodeid":h,"data-handlepos":t,"data-id":`${v}-${h}-${g}-${e}`,className:Ze(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",p,s,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:a,clickconnecting:E,connectingfrom:x,connectingto:T,valid:A,connectionindicator:o&&(!w||N)&&(w||k?a:i)}]),onMouseDown:P,onTouchStart:P,onClick:y?_:void 0,ref:m,...f,children:u})}var Ji=(0,H.memo)(x_(uM));function sM({data:e,isConnectable:t,sourcePosition:n=ee.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[e?.label,(0,B.jsx)(Ji,{type:"source",position:n,isConnectable:t})]})}function cM({data:e,isConnectable:t,targetPosition:n=ee.Top,sourcePosition:o=ee.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Ji,{type:"target",position:n,isConnectable:t}),e?.label,(0,B.jsx)(Ji,{type:"source",position:o,isConnectable:t})]})}function fM(){return null}function dM({data:e,isConnectable:t,targetPosition:n=ee.Top}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Ji,{type:"target",position:n,isConnectable:t}),e?.label]})}var Wc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},o_={input:sM,default:cM,output:dM,group:fM};function pM(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var mM=e=>{let{width:t,height:n,x:o,y:i}=dl(e.nodeLookup,{filter:a=>!!a.selected});return{width:xn(t)?t:null,height:xn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function hM({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=Ie(),{width:i,height:a,transformString:l,userSelectionActive:r}=Se(mM,Ue),u=T_(),s=(0,H.useRef)(null);(0,H.useEffect)(()=>{n||s.current?.focus({preventScroll:!0})},[n]);let c=!r&&i!==null&&a!==null;if(E_({nodeRef:s,disabled:!c}),!c)return null;let d=e?m=>{let g=o.getState().nodes.filter(b=>b.selected);e(m,g)}:void 0,f=m=>{Object.prototype.hasOwnProperty.call(Wc,m.key)&&(m.preventDefault(),u({direction:Wc[m.key],factor:m.shiftKey?4:1}))};return(0,B.jsx)("div",{className:Ze(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:(0,B.jsx)("div",{ref:s,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:i,height:a}})})}var i_=typeof window<"u"?window:void 0,gM=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function C_({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:r,deleteKeyCode:u,selectionKeyCode:s,selectionOnDrag:c,selectionMode:d,onSelectionStart:f,onSelectionEnd:m,multiSelectionKeyCode:g,panActivationKeyCode:b,zoomActivationKeyCode:S,elementsSelectable:h,zoomOnScroll:y,zoomOnPinch:p,panOnScroll:v,panOnScrollSpeed:x,panOnScrollMode:T,zoomOnDoubleClick:E,panOnDrag:N,defaultViewport:w,translateExtent:k,minZoom:A,maxZoom:z,preventScrolling:P,onSelectionContextMenu:_,noWheelClassName:M,noPanClassName:D,disableKeyboardA11y:R,onViewportChange:O,isControlledViewport:L}){let{nodesSelectionActive:V,userSelectionActive:U}=Se(gM,Ue),I=au(s,{target:i_}),Z=au(b,{target:i_}),K=Z||N,Q=Z||v,re=c&&K!==!0,te=I||U||re;return $D({deleteKeyCode:u,multiSelectionKeyCode:g}),(0,B.jsx)(WD,{onPaneContextMenu:a,elementsSelectable:h,zoomOnScroll:y,zoomOnPinch:p,panOnScroll:Q,panOnScrollSpeed:x,panOnScrollMode:T,zoomOnDoubleClick:E,panOnDrag:!I&&K,defaultViewport:w,translateExtent:k,minZoom:A,maxZoom:z,zoomActivationKeyCode:S,preventScrolling:P,noWheelClassName:M,noPanClassName:D,onViewportChange:O,isControlledViewport:L,paneClickDistance:r,selectionOnDrag:re,children:(0,B.jsxs)(oM,{onSelectionStart:f,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:K,isSelecting:!!te,selectionMode:d,selectionKeyPressed:I,paneClickDistance:r,selectionOnDrag:re,children:[e,V&&(0,B.jsx)(hM,{onSelectionContextMenu:_,noPanClassName:D,disableKeyboardA11y:R})]})})}C_.displayName="FlowRenderer";var yM=(0,H.memo)(C_),vM=e=>t=>e?Uc(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function bM(e){return Se((0,H.useCallback)(vM(e),[e]),Ue)}var SM=e=>e.updateNodeInternals;function xM(){let e=Se(SM),[t]=(0,H.useState)(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{let o=new Map;n.forEach(i=>{let a=i.target.getAttribute("data-id");o.set(a,{id:a,nodeElement:i.target,force:!0})}),e(o)}));return(0,H.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function _M({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=Ie(),a=(0,H.useRef)(null),l=(0,H.useRef)(null),r=(0,H.useRef)(e.sourcePosition),u=(0,H.useRef)(e.targetPosition),s=(0,H.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,H.useEffect)(()=>{a.current&&!e.hidden&&(!c||l.current!==a.current)&&(l.current&&o?.unobserve(l.current),o?.observe(a.current),l.current=a.current)},[c,e.hidden]),(0,H.useEffect)(()=>()=>{l.current&&(o?.unobserve(l.current),l.current=null)},[]),(0,H.useEffect)(()=>{if(a.current){let d=s.current!==t,f=r.current!==e.sourcePosition,m=u.current!==e.targetPosition;(d||f||m)&&(s.current=t,r.current=e.sourcePosition,u.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function EM({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:i,onContextMenu:a,onDoubleClick:l,nodesDraggable:r,elementsSelectable:u,nodesConnectable:s,nodesFocusable:c,resizeObserver:d,noDragClassName:f,noPanClassName:m,disableKeyboardA11y:g,rfId:b,nodeTypes:S,nodeClickDistance:h,onError:y}){let{node:p,internals:v,isParent:x}=Se(X=>{let W=X.nodeLookup.get(e),se=X.parentLookup.has(e);return{node:W,internals:W.internals,isParent:se}},Ue),T=p.type||"default",E=S?.[T]||o_[T];E===void 0&&(y?.("003",ln.error003(T)),T="default",E=S?.default||o_.default);let N=!!(p.draggable||r&&typeof p.draggable>"u"),w=!!(p.selectable||u&&typeof p.selectable>"u"),k=!!(p.connectable||s&&typeof p.connectable>"u"),A=!!(p.focusable||c&&typeof p.focusable>"u"),z=Ie(),P=Zm(p),_=_M({node:p,nodeType:T,hasDimensions:P,resizeObserver:d}),M=E_({nodeRef:_,disabled:p.hidden||!N,noDragClassName:f,handleSelector:p.dragHandle,nodeId:e,isSelectable:w,nodeClickDistance:h}),D=T_();if(p.hidden)return null;let R=Xn(p),O=pM(p),L=w||N||t||n||o||i,V=n?X=>n(X,{...v.userNode}):void 0,U=o?X=>o(X,{...v.userNode}):void 0,I=i?X=>i(X,{...v.userNode}):void 0,Z=a?X=>a(X,{...v.userNode}):void 0,K=l?X=>l(X,{...v.userNode}):void 0,Q=X=>{let{selectNodesOnDrag:W,nodeDragThreshold:se}=z.getState();w&&(!W||!N||se>0)&&sh({id:e,store:z,nodeRef:_}),t&&t(X,{...v.userNode})},re=X=>{if(!($m(X.nativeEvent)||g)){if(Bm.includes(X.key)&&w){let W=X.key==="Escape";sh({id:e,store:z,unselect:W,nodeRef:_})}else if(N&&p.selected&&Object.prototype.hasOwnProperty.call(Wc,X.key)){X.preventDefault();let{ariaLabelConfig:W}=z.getState();z.setState({ariaLiveMessage:W["node.a11yDescription.ariaLiveMessage"]({direction:X.key.replace("Arrow","").toLowerCase(),x:~~v.positionAbsolute.x,y:~~v.positionAbsolute.y})}),D({direction:Wc[X.key],factor:X.shiftKey?4:1})}}},te=()=>{if(g||!_.current?.matches(":focus-visible"))return;let{transform:X,width:W,height:se,autoPanOnNodeFocus:ce,setCenter:j}=z.getState();if(!ce)return;Uc(new Map([[e,p]]),{x:0,y:0,width:W,height:se},X,!0).length>0||j(p.position.x+R.width/2,p.position.y+R.height/2,{zoom:X[2]})};return(0,B.jsx)("div",{className:Ze(["react-flow__node",`react-flow__node-${T}`,{[m]:N},p.className,{selected:p.selected,selectable:w,parent:x,draggable:N,dragging:M}]),ref:_,style:{zIndex:v.z,transform:`translate(${v.positionAbsolute.x}px,${v.positionAbsolute.y}px)`,pointerEvents:L?"all":"none",visibility:P?"visible":"hidden",...p.style,...O},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:U,onMouseLeave:I,onContextMenu:Z,onClick:Q,onDoubleClick:K,onKeyDown:A?re:void 0,tabIndex:A?0:void 0,onFocus:A?te:void 0,role:p.ariaRole??(A?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${h_}-${b}`,"aria-label":p.ariaLabel,...p.domAttributes,children:(0,B.jsx)(aM,{value:e,children:(0,B.jsx)(E,{id:e,data:p.data,type:T,positionAbsoluteX:v.positionAbsolute.x,positionAbsoluteY:v.positionAbsolute.y,selected:p.selected??!1,selectable:w,draggable:N,deletable:p.deletable??!0,isConnectable:k,sourcePosition:p.sourcePosition,targetPosition:p.targetPosition,dragging:M,dragHandle:p.dragHandle,zIndex:v.z,parentId:p.parentId,...R})})})}var TM=(0,H.memo)(EM),NM=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function w_(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=Se(NM,Ue),l=bM(e.onlyRenderVisibleElements),r=xM();return(0,B.jsx)("div",{className:"react-flow__nodes",style:nf,children:l.map(u=>(0,B.jsx)(TM,{id:u,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:r,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},u))})}w_.displayName="NodeRenderer";var CM=(0,H.memo)(w_);function wM(e){return Se((0,H.useCallback)(n=>{if(!e)return n.edges.map(i=>i.id);let o=[];if(n.width&&n.height)for(let i of n.edges){let a=n.nodeLookup.get(i.source),l=n.nodeLookup.get(i.target);a&&l&&cx({sourceNode:a,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),Ue)}var AM=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,B.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},DM=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,B.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},a_={[ul.Arrow]:AM,[ul.ArrowClosed]:DM};function MM(e){let t=Ie();return(0,H.useMemo)(()=>Object.prototype.hasOwnProperty.call(a_,e)?a_[e]:(t.getState().onError?.("009",ln.error009(e)),null),[e])}var OM=({id:e,type:t,color:n,width:o=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:r="auto-start-reverse"})=>{let u=MM(t);return u?(0,B.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:r,refX:"0",refY:"0",children:(0,B.jsx)(u,{color:n,strokeWidth:l})}):null},A_=({defaultColor:e,rfId:t})=>{let n=Se(a=>a.edges),o=Se(a=>a.defaultEdgeOptions),i=(0,H.useMemo)(()=>dx(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return i.length?(0,B.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,B.jsx)("defs",{children:i.map(a=>(0,B.jsx)(OM,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};A_.displayName="MarkerDefinitions";var RM=(0,H.memo)(A_);function D_({x:e,y:t,label:n,labelStyle:o,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:l=[2,4],labelBgBorderRadius:r=2,children:u,className:s,...c}){let[d,f]=(0,H.useState)({x:1,y:0,width:0,height:0}),m=Ze(["react-flow__edge-textwrapper",s]),g=(0,H.useRef)(null);return(0,H.useEffect)(()=>{if(g.current){let b=g.current.getBBox();f({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?(0,B.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:m,visibility:d.width?"visible":"hidden",...c,children:[i&&(0,B.jsx)("rect",{width:d.width+2*l[0],x:-l[0],y:-l[1],height:d.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:r,ry:r}),(0,B.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:g,style:o,children:n}),u]}):null}D_.displayName="EdgeText";var zM=(0,H.memo)(D_);function of({path:e,labelX:t,labelY:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:u,interactionWidth:s=20,...c}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{...c,d:e,fill:"none",className:Ze(["react-flow__edge-path",c.className])}),s?(0,B.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:s,className:"react-flow__edge-interaction"}):null,o&&xn(t)&&xn(n)?(0,B.jsx)(zM,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:u}):null]})}function l_({pos:e,x1:t,y1:n,x2:o,y2:i}){return e===ee.Left||e===ee.Right?[.5*(t+o),n]:[t,.5*(n+i)]}function M_({sourceX:e,sourceY:t,sourcePosition:n=ee.Bottom,targetX:o,targetY:i,targetPosition:a=ee.Top}){let[l,r]=l_({pos:n,x1:e,y1:t,x2:o,y2:i}),[u,s]=l_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,m]=Vc({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:l,sourceControlY:r,targetControlX:u,targetControlY:s});return[`M${e},${t} C${l},${r} ${u},${s} ${o},${i}`,c,d,f,m]}function O_(e){return(0,H.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l,targetPosition:r,label:u,labelStyle:s,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:S,interactionWidth:h})=>{let[y,p,v]=M_({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r}),x=e.isInternal?void 0:t;return(0,B.jsx)(of,{id:x,path:y,labelX:p,labelY:v,label:u,labelStyle:s,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:S,interactionWidth:h})})}var LM=O_({isInternal:!1}),R_=O_({isInternal:!0});LM.displayName="SimpleBezierEdge";R_.displayName="SimpleBezierEdgeInternal";function z_(e){return(0,H.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:u,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:d,style:f,sourcePosition:m=ee.Bottom,targetPosition:g=ee.Top,markerEnd:b,markerStart:S,pathOptions:h,interactionWidth:y})=>{let[p,v,x]=iu({sourceX:n,sourceY:o,sourcePosition:m,targetX:i,targetY:a,targetPosition:g,borderRadius:h?.borderRadius,offset:h?.offset,stepPosition:h?.stepPosition}),T=e.isInternal?void 0:t;return(0,B.jsx)(of,{id:T,path:p,labelX:v,labelY:x,label:l,labelStyle:r,labelShowBg:u,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:b,markerStart:S,interactionWidth:y})})}var L_=z_({isInternal:!1}),B_=z_({isInternal:!0});L_.displayName="SmoothStepEdge";B_.displayName="SmoothStepEdgeInternal";function H_(e){return(0,H.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,B.jsx)(L_,{...n,id:o,pathOptions:(0,H.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var BM=H_({isInternal:!1}),k_=H_({isInternal:!0});BM.displayName="StepEdge";k_.displayName="StepEdgeInternal";function U_(e){return(0,H.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:u,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:m,markerStart:g,interactionWidth:b})=>{let[S,h,y]=Xc({sourceX:n,sourceY:o,targetX:i,targetY:a}),p=e.isInternal?void 0:t;return(0,B.jsx)(of,{id:p,path:S,labelX:h,labelY:y,label:l,labelStyle:r,labelShowBg:u,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:m,markerStart:g,interactionWidth:b})})}var HM=U_({isInternal:!1}),G_=U_({isInternal:!0});HM.displayName="StraightEdge";G_.displayName="StraightEdgeInternal";function P_(e){return(0,H.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l=ee.Bottom,targetPosition:r=ee.Top,label:u,labelStyle:s,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:S,pathOptions:h,interactionWidth:y})=>{let[p,v,x]=Yc({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r,curvature:h?.curvature}),T=e.isInternal?void 0:t;return(0,B.jsx)(of,{id:T,path:p,labelX:v,labelY:x,label:u,labelStyle:s,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:m,style:g,markerEnd:b,markerStart:S,interactionWidth:y})})}var kM=P_({isInternal:!1}),I_=P_({isInternal:!0});kM.displayName="BezierEdge";I_.displayName="BezierEdgeInternal";var r_={default:I_,straight:G_,step:k_,smoothstep:B_,simplebezier:R_},u_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},UM=(e,t,n)=>n===ee.Left?e-t:n===ee.Right?e+t:e,GM=(e,t,n)=>n===ee.Top?e-t:n===ee.Bottom?e+t:e,s_="react-flow__edgeupdater";function c_({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:l,type:r}){return(0,B.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:l,className:Ze([s_,`${s_}-${r}`]),cx:UM(t,o,e),cy:GM(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function PM({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:i,targetX:a,targetY:l,sourcePosition:r,targetPosition:u,onReconnect:s,onReconnectStart:c,onReconnectEnd:d,setReconnecting:f,setUpdateHover:m}){let g=Ie(),b=(v,x)=>{if(v.button!==0)return;let{autoPanOnConnect:T,domNode:E,connectionMode:N,connectionRadius:w,lib:k,onConnectStart:A,cancelConnection:z,nodeLookup:P,rfId:_,panBy:M,updateConnection:D}=g.getState(),R=x.type==="target",O=(U,I)=>{f(!1),d?.(U,n,x.type,I)},L=U=>s?.(n,U),V=(U,I)=>{f(!0),c?.(v,n,x.type),A?.(U,I)};Qc.onPointerDown(v.nativeEvent,{autoPanOnConnect:T,connectionMode:N,connectionRadius:w,domNode:E,handleId:x.id,nodeId:x.nodeId,nodeLookup:P,isTarget:R,edgeUpdaterType:x.type,lib:k,flowId:_,cancelConnection:z,panBy:M,isValidConnection:(...U)=>g.getState().isValidConnection?.(...U)??!0,onConnect:L,onConnectStart:V,onConnectEnd:(...U)=>g.getState().onConnectEnd?.(...U),onReconnectEnd:O,updateConnection:D,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:v.currentTarget})},S=v=>b(v,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),h=v=>b(v,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),y=()=>m(!0),p=()=>m(!1);return(0,B.jsxs)(B.Fragment,{children:[(e===!0||e==="source")&&(0,B.jsx)(c_,{position:r,centerX:o,centerY:i,radius:t,onMouseDown:S,onMouseEnter:y,onMouseOut:p,type:"source"}),(e===!0||e==="target")&&(0,B.jsx)(c_,{position:u,centerX:a,centerY:l,radius:t,onMouseDown:h,onMouseEnter:y,onMouseOut:p,type:"target"})]})}function IM({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:i,onDoubleClick:a,onContextMenu:l,onMouseEnter:r,onMouseMove:u,onMouseLeave:s,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:m,rfId:g,edgeTypes:b,noPanClassName:S,onError:h,disableKeyboardA11y:y}){let p=Se(j=>j.edgeLookup.get(e)),v=Se(j=>j.defaultEdgeOptions);p=v?{...v,...p}:p;let x=p.type||"default",T=b?.[x]||r_[x];T===void 0&&(h?.("011",ln.error011(x)),x="default",T=b?.default||r_.default);let E=!!(p.focusable||t&&typeof p.focusable>"u"),N=typeof d<"u"&&(p.reconnectable||n&&typeof p.reconnectable>"u"),w=!!(p.selectable||o&&typeof p.selectable>"u"),k=(0,H.useRef)(null),[A,z]=(0,H.useState)(!1),[P,_]=(0,H.useState)(!1),M=Ie(),{zIndex:D,sourceX:R,sourceY:O,targetX:L,targetY:V,sourcePosition:U,targetPosition:I}=Se((0,H.useCallback)(j=>{let q=j.nodeLookup.get(p.source),$=j.nodeLookup.get(p.target);if(!q||!$)return{zIndex:p.zIndex,...u_};let ae=fx({id:e,sourceNode:q,targetNode:$,sourceHandle:p.sourceHandle||null,targetHandle:p.targetHandle||null,connectionMode:j.connectionMode,onError:h});return{zIndex:sx({selected:p.selected,zIndex:p.zIndex,sourceNode:q,targetNode:$,elevateOnSelect:j.elevateEdgesOnSelect,zIndexMode:j.zIndexMode}),...ae||u_}},[p.source,p.target,p.sourceHandle,p.targetHandle,p.selected,p.zIndex]),Ue),Z=(0,H.useMemo)(()=>p.markerStart?`url('#${qc(p.markerStart,g)}')`:void 0,[p.markerStart,g]),K=(0,H.useMemo)(()=>p.markerEnd?`url('#${qc(p.markerEnd,g)}')`:void 0,[p.markerEnd,g]);if(p.hidden||R===null||O===null||L===null||V===null)return null;let Q=j=>{let{addSelectedEdges:q,unselectNodesAndEdges:$,multiSelectionActive:ae}=M.getState();w&&(M.setState({nodesSelectionActive:!1}),p.selected&&ae?($({nodes:[],edges:[p]}),k.current?.blur()):q([e])),i&&i(j,p)},re=a?j=>{a(j,{...p})}:void 0,te=l?j=>{l(j,{...p})}:void 0,X=r?j=>{r(j,{...p})}:void 0,W=u?j=>{u(j,{...p})}:void 0,se=s?j=>{s(j,{...p})}:void 0,ce=j=>{if(!y&&Bm.includes(j.key)&&w){let{unselectNodesAndEdges:q,addSelectedEdges:$}=M.getState();j.key==="Escape"?(k.current?.blur(),q({edges:[p]})):$([e])}};return(0,B.jsx)("svg",{style:{zIndex:D},children:(0,B.jsxs)("g",{className:Ze(["react-flow__edge",`react-flow__edge-${x}`,p.className,S,{selected:p.selected,animated:p.animated,inactive:!w&&!i,updating:A,selectable:w}]),onClick:Q,onDoubleClick:re,onContextMenu:te,onMouseEnter:X,onMouseMove:W,onMouseLeave:se,onKeyDown:E?ce:void 0,tabIndex:E?0:void 0,role:p.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":p.ariaLabel===null?void 0:p.ariaLabel||`Edge from ${p.source} to ${p.target}`,"aria-describedby":E?`${g_}-${g}`:void 0,ref:k,...p.domAttributes,children:[!P&&(0,B.jsx)(T,{id:e,source:p.source,target:p.target,type:p.type,selected:p.selected,animated:p.animated,selectable:w,deletable:p.deletable??!0,label:p.label,labelStyle:p.labelStyle,labelShowBg:p.labelShowBg,labelBgStyle:p.labelBgStyle,labelBgPadding:p.labelBgPadding,labelBgBorderRadius:p.labelBgBorderRadius,sourceX:R,sourceY:O,targetX:L,targetY:V,sourcePosition:U,targetPosition:I,data:p.data,style:p.style,sourceHandleId:p.sourceHandle,targetHandleId:p.targetHandle,markerStart:Z,markerEnd:K,pathOptions:"pathOptions"in p?p.pathOptions:void 0,interactionWidth:p.interactionWidth}),N&&(0,B.jsx)(PM,{edge:p,isReconnectable:N,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:m,sourceX:R,sourceY:O,targetX:L,targetY:V,sourcePosition:U,targetPosition:I,setUpdateHover:z,setReconnecting:_})]})})}var VM=(0,H.memo)(IM),YM=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function V_({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:i,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:r,onEdgeMouseMove:u,onEdgeMouseLeave:s,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:m,onReconnectEnd:g,disableKeyboardA11y:b}){let{edgesFocusable:S,edgesReconnectable:h,elementsSelectable:y,onError:p}=Se(YM,Ue),v=wM(t);return(0,B.jsxs)("div",{className:"react-flow__edges",children:[(0,B.jsx)(RM,{defaultColor:e,rfId:n}),v.map(x=>(0,B.jsx)(VM,{id:x,edgesFocusable:S,edgesReconnectable:h,elementsSelectable:y,noPanClassName:i,onReconnect:a,onContextMenu:l,onMouseEnter:r,onMouseMove:u,onMouseLeave:s,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:m,onReconnectEnd:g,rfId:n,onError:p,edgeTypes:o,disableKeyboardA11y:b},x))]})}V_.displayName="EdgeRenderer";var XM=(0,H.memo)(V_),qM=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function ZM({children:e}){let t=Se(qM);return(0,B.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function jM(e){let t=ch(),n=(0,H.useRef)(!1);(0,H.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var QM=e=>e.panZoom?.syncViewport;function KM(e){let t=Se(QM),n=Ie();return(0,H.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function f_(e){return e.connection.inProgress?{...e.connection,to:hl(e.connection.to,e.transform)}:{...e.connection}}function $M(e){return e?n=>{let o=f_(n);return e(o)}:f_}function FM(e){let t=$M(e);return Se(t,Ue)}var JM=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function WM({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:l,isValid:r,inProgress:u}=Se(JM,Ue);return!(a&&i&&u)?null:(0,B.jsx)("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:(0,B.jsx)("g",{className:Ze(["react-flow__connection",Um(r)]),children:(0,B.jsx)(Y_,{style:t,type:n,CustomComponent:o,isValid:r})})})}var Y_=({style:e,type:t=Yn.Bezier,CustomComponent:n,isValid:o})=>{let{inProgress:i,from:a,fromNode:l,fromHandle:r,fromPosition:u,to:s,toNode:c,toHandle:d,toPosition:f,pointer:m}=FM();if(!i)return;if(n)return(0,B.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:r,fromX:a.x,fromY:a.y,toX:s.x,toY:s.y,fromPosition:u,toPosition:f,connectionStatus:Um(o),toNode:c,toHandle:d,pointer:m});let g="",b={sourceX:a.x,sourceY:a.y,sourcePosition:u,targetX:s.x,targetY:s.y,targetPosition:f};switch(t){case Yn.Bezier:[g]=Yc(b);break;case Yn.SimpleBezier:[g]=M_(b);break;case Yn.Step:[g]=iu({...b,borderRadius:0});break;case Yn.SmoothStep:[g]=iu(b);break;default:[g]=Xc(b)}return(0,B.jsx)("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};Y_.displayName="ConnectionLine";var eO={};function d_(e=eO){let t=(0,H.useRef)(e),n=Ie();(0,H.useEffect)(()=>{},[e])}function tO(){let e=Ie(),t=(0,H.useRef)(!1);(0,H.useEffect)(()=>{},[])}function X_({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:r,onNodeMouseMove:u,onNodeMouseLeave:s,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:m,connectionLineType:g,connectionLineStyle:b,connectionLineComponent:S,connectionLineContainerStyle:h,selectionKeyCode:y,selectionOnDrag:p,selectionMode:v,multiSelectionKeyCode:x,panActivationKeyCode:T,zoomActivationKeyCode:E,deleteKeyCode:N,onlyRenderVisibleElements:w,elementsSelectable:k,defaultViewport:A,translateExtent:z,minZoom:P,maxZoom:_,preventScrolling:M,defaultMarkerColor:D,zoomOnScroll:R,zoomOnPinch:O,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:U,zoomOnDoubleClick:I,panOnDrag:Z,onPaneClick:K,onPaneMouseEnter:Q,onPaneMouseMove:re,onPaneMouseLeave:te,onPaneScroll:X,onPaneContextMenu:W,paneClickDistance:se,nodeClickDistance:ce,onEdgeContextMenu:j,onEdgeMouseEnter:q,onEdgeMouseMove:$,onEdgeMouseLeave:ae,reconnectRadius:me,onReconnect:Ke,onReconnectStart:Ve,onReconnectEnd:pt,noDragClassName:ot,noWheelClassName:No,noPanClassName:Co,disableKeyboardA11y:hi,nodeExtent:gi,rfId:Ln,viewport:Qt,onViewportChange:xt}){return d_(e),d_(t),tO(),jM(n),KM(Qt),(0,B.jsx)(yM,{onPaneClick:K,onPaneMouseEnter:Q,onPaneMouseMove:re,onPaneMouseLeave:te,onPaneContextMenu:W,onPaneScroll:X,paneClickDistance:se,deleteKeyCode:N,selectionKeyCode:y,selectionOnDrag:p,selectionMode:v,onSelectionStart:f,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:T,zoomActivationKeyCode:E,elementsSelectable:k,zoomOnScroll:R,zoomOnPinch:O,zoomOnDoubleClick:I,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:U,panOnDrag:Z,defaultViewport:A,translateExtent:z,minZoom:P,maxZoom:_,onSelectionContextMenu:d,preventScrolling:M,noDragClassName:ot,noWheelClassName:No,noPanClassName:Co,disableKeyboardA11y:hi,onViewportChange:xt,isControlledViewport:!!Qt,children:(0,B.jsxs)(ZM,{children:[(0,B.jsx)(XM,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Ke,onReconnectStart:Ve,onReconnectEnd:pt,onlyRenderVisibleElements:w,onEdgeContextMenu:j,onEdgeMouseEnter:q,onEdgeMouseMove:$,onEdgeMouseLeave:ae,reconnectRadius:me,defaultMarkerColor:D,noPanClassName:Co,disableKeyboardA11y:hi,rfId:Ln}),(0,B.jsx)(WM,{style:b,type:g,component:S,containerStyle:h}),(0,B.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,B.jsx)(CM,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:r,onNodeMouseMove:u,onNodeMouseLeave:s,onNodeContextMenu:c,nodeClickDistance:ce,onlyRenderVisibleElements:w,noPanClassName:Co,noDragClassName:ot,disableKeyboardA11y:hi,nodeExtent:gi,rfId:Ln}),(0,B.jsx)("div",{className:"react-flow__viewport-portal"})]})})}X_.displayName="GraphView";var nO=(0,H.memo)(X_),p_=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:u=.5,maxZoom:s=2,nodeOrigin:c,nodeExtent:d,zIndexMode:f="basic"}={})=>{let m=new Map,g=new Map,b=new Map,S=new Map,h=o??t??[],y=n??e??[],p=c??[0,0],v=d??fl;ih(b,S,h);let x=Zc(y,m,g,{nodeOrigin:p,nodeExtent:v,zIndexMode:f}),T=[0,0,1];if(l&&i&&a){let E=dl(m,{filter:A=>!!((A.width||A.initialWidth)&&(A.height||A.initialHeight))}),{x:N,y:w,zoom:k}=ou(E,i,a,u,s,r?.padding??.1);T=[N,w,k]}return{rfId:"1",width:i??0,height:a??0,transform:T,nodes:y,nodesInitialized:x,nodeLookup:m,parentLookup:g,edges:h,edgeLookup:S,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:u,maxZoom:s,translateExtent:fl,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:si.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:p,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:r,fitViewResolver:null,connection:{...km},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:qm,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Hm,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},oO=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:u,maxZoom:s,nodeOrigin:c,nodeExtent:d,zIndexMode:f})=>Xx((m,g)=>{async function b(){let{nodeLookup:S,panZoom:h,fitViewOptions:y,fitViewResolver:p,width:v,height:x,minZoom:T,maxZoom:E}=g();h&&(await ox({nodes:S,width:v,height:x,panZoom:h,minZoom:T,maxZoom:E},y),p?.resolve(!0),m({fitViewResolver:null}))}return{...p_({nodes:e,edges:t,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:u,maxZoom:s,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:o,zIndexMode:f}),setNodes:S=>{let{nodeLookup:h,parentLookup:y,nodeOrigin:p,elevateNodesOnSelect:v,fitViewQueued:x,zIndexMode:T}=g(),E=Zc(S,h,y,{nodeOrigin:p,nodeExtent:d,elevateNodesOnSelect:v,checkEquality:!0,zIndexMode:T});x&&E?(b(),m({nodes:S,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:S,nodesInitialized:E})},setEdges:S=>{let{connectionLookup:h,edgeLookup:y}=g();ih(h,y,S),m({edges:S})},setDefaultNodesAndEdges:(S,h)=>{if(S){let{setNodes:y}=g();y(S),m({hasDefaultNodes:!0})}if(h){let{setEdges:y}=g();y(h),m({hasDefaultEdges:!0})}},updateNodeInternals:S=>{let{triggerNodeChanges:h,nodeLookup:y,parentLookup:p,domNode:v,nodeOrigin:x,nodeExtent:T,debug:E,fitViewQueued:N,zIndexMode:w}=g(),{changes:k,updatedInternals:A}=gx(S,y,p,v,x,T,w);A&&(mx(y,p,{nodeOrigin:x,nodeExtent:T,zIndexMode:w}),N?(b(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),k?.length>0&&(E&&console.log("React Flow: trigger node changes",k),h?.(k)))},updateNodePositions:(S,h=!1)=>{let y=[],p=[],{nodeLookup:v,triggerNodeChanges:x,connection:T,updateConnection:E,onNodesChangeMiddlewareMap:N}=g();for(let[w,k]of S){let A=v.get(w),z=!!(A?.expandParent&&A?.parentId&&k?.position),P={id:w,type:"position",position:z?{x:Math.max(0,k.position.x),y:Math.max(0,k.position.y)}:k.position,dragging:h};if(A&&T.inProgress&&T.fromNode.id===A.id){let _=ci(A,T.fromHandle,ee.Left,!0);E({...T,from:_})}z&&A.parentId&&y.push({id:w,parentId:A.parentId,rect:{...k.internals.positionAbsolute,width:k.measured.width??0,height:k.measured.height??0}}),p.push(P)}if(y.length>0){let{parentLookup:w,nodeOrigin:k}=g(),A=jc(y,v,w,k);p.push(...A)}for(let w of N.values())p=w(p);x(p)},triggerNodeChanges:S=>{let{onNodesChange:h,setNodes:y,nodes:p,hasDefaultNodes:v,debug:x}=g();if(S?.length){if(v){let T=b_(S,p);y(T)}x&&console.log("React Flow: trigger node changes",S),h?.(S)}},triggerEdgeChanges:S=>{let{onEdgesChange:h,setEdges:y,edges:p,hasDefaultEdges:v,debug:x}=g();if(S?.length){if(v){let T=S_(S,p);y(T)}x&&console.log("React Flow: trigger edge changes",S),h?.(S)}},addSelectedNodes:S=>{let{multiSelectionActive:h,edgeLookup:y,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:x}=g();if(h){let T=S.map(E=>Fi(E,!0));v(T);return}v(vl(p,new Set([...S]),!0)),x(vl(y))},addSelectedEdges:S=>{let{multiSelectionActive:h,edgeLookup:y,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:x}=g();if(h){let T=S.map(E=>Fi(E,!0));x(T);return}x(vl(y,new Set([...S]))),v(vl(p,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:h}={})=>{let{edges:y,nodes:p,nodeLookup:v,triggerNodeChanges:x,triggerEdgeChanges:T}=g(),E=S||p,N=h||y,w=[];for(let A of E){if(!A.selected)continue;let z=v.get(A.id);z&&(z.selected=!1),w.push(Fi(A.id,!1))}let k=[];for(let A of N)A.selected&&k.push(Fi(A.id,!1));x(w),T(k)},setMinZoom:S=>{let{panZoom:h,maxZoom:y}=g();h?.setScaleExtent([S,y]),m({minZoom:S})},setMaxZoom:S=>{let{panZoom:h,minZoom:y}=g();h?.setScaleExtent([y,S]),m({maxZoom:S})},setTranslateExtent:S=>{g().panZoom?.setTranslateExtent(S),m({translateExtent:S})},resetSelectedElements:()=>{let{edges:S,nodes:h,triggerNodeChanges:y,triggerEdgeChanges:p,elementsSelectable:v}=g();if(!v)return;let x=h.reduce((E,N)=>N.selected?[...E,Fi(N.id,!1)]:E,[]),T=S.reduce((E,N)=>N.selected?[...E,Fi(N.id,!1)]:E,[]);y(x),p(T)},setNodeExtent:S=>{let{nodes:h,nodeLookup:y,parentLookup:p,nodeOrigin:v,elevateNodesOnSelect:x,nodeExtent:T,zIndexMode:E}=g();S[0][0]===T[0][0]&&S[0][1]===T[0][1]&&S[1][0]===T[1][0]&&S[1][1]===T[1][1]||(Zc(h,y,p,{nodeOrigin:v,nodeExtent:S,elevateNodesOnSelect:x,checkEquality:!1,zIndexMode:E}),m({nodeExtent:S}))},panBy:S=>{let{transform:h,width:y,height:p,panZoom:v,translateExtent:x}=g();return yx({delta:S,panZoom:v,transform:h,translateExtent:x,width:y,height:p})},setCenter:async(S,h,y)=>{let{width:p,height:v,maxZoom:x,panZoom:T}=g();if(!T)return Promise.resolve(!1);let E=typeof y?.zoom<"u"?y.zoom:x;return await T.setViewport({x:p/2-S*E,y:v/2-h*E,zoom:E},{duration:y?.duration,ease:y?.ease,interpolate:y?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...km}})},updateConnection:S=>{m({connection:S})},reset:()=>m({...p_()})}},Object.is);function iO({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:i,initialHeight:a,initialMinZoom:l,initialMaxZoom:r,initialFitViewOptions:u,fitView:s,nodeOrigin:c,nodeExtent:d,zIndexMode:f,children:m}){let[g]=(0,H.useState)(()=>oO({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:s,minZoom:l,maxZoom:r,fitViewOptions:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f}));return(0,B.jsx)(ED,{value:g,children:(0,B.jsx)(ZD,{children:m})})}function aO({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:i,width:a,height:l,fitView:r,fitViewOptions:u,minZoom:s,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:m}){return(0,H.useContext)(ef)?(0,B.jsx)(B.Fragment,{children:e}):(0,B.jsx)(iO,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:i,initialWidth:a,initialHeight:l,fitView:r,initialFitViewOptions:u,initialMinZoom:s,initialMaxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:m,children:e})}var lO={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function rO({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:i,nodeTypes:a,edgeTypes:l,onNodeClick:r,onEdgeClick:u,onInit:s,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:m,onConnectStart:g,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:h,onNodeMouseEnter:y,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:x,onNodeDoubleClick:T,onNodeDragStart:E,onNodeDrag:N,onNodeDragStop:w,onNodesDelete:k,onEdgesDelete:A,onDelete:z,onSelectionChange:P,onSelectionDragStart:_,onSelectionDrag:M,onSelectionDragStop:D,onSelectionContextMenu:R,onSelectionStart:O,onSelectionEnd:L,onBeforeDelete:V,connectionMode:U,connectionLineType:I=Yn.Bezier,connectionLineStyle:Z,connectionLineComponent:K,connectionLineContainerStyle:Q,deleteKeyCode:re="Backspace",selectionKeyCode:te="Shift",selectionOnDrag:X=!1,selectionMode:W=Qi.Full,panActivationKeyCode:se="Space",multiSelectionKeyCode:ce=gl()?"Meta":"Control",zoomActivationKeyCode:j=gl()?"Meta":"Control",snapToGrid:q,snapGrid:$,onlyRenderVisibleElements:ae=!1,selectNodesOnDrag:me,nodesDraggable:Ke,autoPanOnNodeFocus:Ve,nodesConnectable:pt,nodesFocusable:ot,nodeOrigin:No=y_,edgesFocusable:Co,edgesReconnectable:hi,elementsSelectable:gi=!0,defaultViewport:Ln=HD,minZoom:Qt=.5,maxZoom:xt=2,translateExtent:oa=fl,preventScrolling:bu=!0,nodeExtent:ia,defaultMarkerColor:xl="#b1b1b7",zoomOnScroll:Su=!0,zoomOnPinch:aa=!0,panOnScroll:la=!1,panOnScrollSpeed:Tn=.5,panOnScrollMode:wo=bo.Free,zoomOnDoubleClick:_l=!0,panOnDrag:El=!0,onPaneClick:Ef,onPaneMouseEnter:ra,onPaneMouseMove:ua,onPaneMouseLeave:Tf,onPaneScroll:yi,onPaneContextMenu:Nf,paneClickDistance:Cf=1,nodeClickDistance:$e=0,children:Ao,onReconnect:wf,onReconnectStart:xu,onReconnectEnd:Tl,onEdgeContextMenu:_u,onEdgeDoubleClick:Eu,onEdgeMouseEnter:Af,onEdgeMouseMove:sn,onEdgeMouseLeave:jn,reconnectRadius:Tu=10,onNodesChange:Nu,onEdgesChange:Nl,noDragClassName:Cu="nodrag",noWheelClassName:Nn="nowheel",noPanClassName:Cl="nopan",fitView:wl,fitViewOptions:Al,connectOnClick:wu,attributionPosition:Df,proOptions:oe,defaultEdgeOptions:C,elevateNodesOnSelect:Y=!0,elevateEdgesOnSelect:J=!1,disableKeyboardA11y:Me=!1,autoPanOnConnect:ut,autoPanOnNodeDrag:Ye,autoPanSpeed:_t,connectionRadius:Cn,isValidConnection:Do,onError:Dl,style:it,id:Ml,nodeDragThreshold:Au,connectionDragThreshold:FE,viewport:JE,onViewportChange:WE,width:eT,height:tT,colorMode:nT="light",debug:oT,onScroll:Wh,ariaLabelConfig:iT,zIndexMode:eg="basic",...aT},lT){let Mf=Ml||"1",rT=PD(nT),uT=(0,H.useCallback)(tg=>{tg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Wh?.(tg)},[Wh]);return(0,B.jsx)("div",{"data-testid":"rf__wrapper",...aT,onScroll:uT,style:{...it,...lO},ref:lT,className:Ze(["react-flow",i,rT]),id:Ml,role:"application",children:(0,B.jsxs)(aO,{nodes:e,edges:t,width:eT,height:tT,fitView:wl,fitViewOptions:Al,minZoom:Qt,maxZoom:xt,nodeOrigin:No,nodeExtent:ia,zIndexMode:eg,children:[(0,B.jsx)(nO,{onInit:s,onNodeClick:r,onEdgeClick:u,onNodeMouseEnter:y,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:x,onNodeDoubleClick:T,nodeTypes:a,edgeTypes:l,connectionLineType:I,connectionLineStyle:Z,connectionLineComponent:K,connectionLineContainerStyle:Q,selectionKeyCode:te,selectionOnDrag:X,selectionMode:W,deleteKeyCode:re,multiSelectionKeyCode:ce,panActivationKeyCode:se,zoomActivationKeyCode:j,onlyRenderVisibleElements:ae,defaultViewport:Ln,translateExtent:oa,minZoom:Qt,maxZoom:xt,preventScrolling:bu,zoomOnScroll:Su,zoomOnPinch:aa,zoomOnDoubleClick:_l,panOnScroll:la,panOnScrollSpeed:Tn,panOnScrollMode:wo,panOnDrag:El,onPaneClick:Ef,onPaneMouseEnter:ra,onPaneMouseMove:ua,onPaneMouseLeave:Tf,onPaneScroll:yi,onPaneContextMenu:Nf,paneClickDistance:Cf,nodeClickDistance:$e,onSelectionContextMenu:R,onSelectionStart:O,onSelectionEnd:L,onReconnect:wf,onReconnectStart:xu,onReconnectEnd:Tl,onEdgeContextMenu:_u,onEdgeDoubleClick:Eu,onEdgeMouseEnter:Af,onEdgeMouseMove:sn,onEdgeMouseLeave:jn,reconnectRadius:Tu,defaultMarkerColor:xl,noDragClassName:Cu,noWheelClassName:Nn,noPanClassName:Cl,rfId:Mf,disableKeyboardA11y:Me,nodeExtent:ia,viewport:JE,onViewportChange:WE}),(0,B.jsx)(GD,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:m,onConnectStart:g,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:h,nodesDraggable:Ke,autoPanOnNodeFocus:Ve,nodesConnectable:pt,nodesFocusable:ot,edgesFocusable:Co,edgesReconnectable:hi,elementsSelectable:gi,elevateNodesOnSelect:Y,elevateEdgesOnSelect:J,minZoom:Qt,maxZoom:xt,nodeExtent:ia,onNodesChange:Nu,onEdgesChange:Nl,snapToGrid:q,snapGrid:$,connectionMode:U,translateExtent:oa,connectOnClick:wu,defaultEdgeOptions:C,fitView:wl,fitViewOptions:Al,onNodesDelete:k,onEdgesDelete:A,onDelete:z,onNodeDragStart:E,onNodeDrag:N,onNodeDragStop:w,onSelectionDrag:M,onSelectionDragStart:_,onSelectionDragStop:D,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:Cl,nodeOrigin:No,rfId:Mf,autoPanOnConnect:ut,autoPanOnNodeDrag:Ye,autoPanSpeed:_t,onError:Dl,connectionRadius:Cn,isValidConnection:Do,selectNodesOnDrag:me,nodeDragThreshold:Au,connectionDragThreshold:FE,onBeforeDelete:V,debug:oT,ariaLabelConfig:iT,zIndexMode:eg}),(0,B.jsx)(BD,{onSelectionChange:P}),Ao,(0,B.jsx)(MD,{proOptions:oe,position:Df}),(0,B.jsx)(DD,{rfId:Mf,disableKeyboardA11y:Me})]})})}var q_=x_(rO);function Z_(e){let[t,n]=(0,H.useState)(e),o=(0,H.useCallback)(i=>n(a=>b_(i,a)),[]);return[t,n,o]}function j_(e){let[t,n]=(0,H.useState)(e),o=(0,H.useCallback)(i=>n(a=>S_(i,a)),[]);return[t,n,o]}var HH=ln.error014();function uO({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,B.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Ze(["react-flow__background-pattern",n,o])})}function sO({radius:e,className:t}){return(0,B.jsx)("circle",{cx:e,cy:e,r:e,className:Ze(["react-flow__background-pattern","dots",t])})}var qn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(qn||(qn={}));var cO={[qn.Dots]:1,[qn.Lines]:1,[qn.Cross]:6},fO=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Q_({id:e,variant:t=qn.Dots,gap:n=20,size:o,lineWidth:i=1,offset:a=0,color:l,bgColor:r,style:u,className:s,patternClassName:c}){let d=(0,H.useRef)(null),{transform:f,patternId:m}=Se(fO,Ue),g=o||cO[t],b=t===qn.Dots,S=t===qn.Cross,h=Array.isArray(n)?n:[n,n],y=[h[0]*f[2]||1,h[1]*f[2]||1],p=g*f[2],v=Array.isArray(a)?a:[a,a],x=S?[p,p]:y,T=[v[0]*f[2]||1+x[0]/2,v[1]*f[2]||1+x[1]/2],E=`${m}${e||""}`;return(0,B.jsxs)("svg",{className:Ze(["react-flow__background",s]),style:{...u,...nf,"--xy-background-color-props":r,"--xy-background-pattern-color-props":l},ref:d,"data-testid":"rf__background",children:[(0,B.jsx)("pattern",{id:E,x:f[0]%y[0],y:f[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:b?(0,B.jsx)(sO,{radius:p/2,className:c}):(0,B.jsx)(uO,{dimensions:x,lineWidth:i,variant:t,className:c})}),(0,B.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}Q_.displayName="Background";var K_=(0,H.memo)(Q_);function dO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,B.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function pO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,B.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function mO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,B.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function hO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,B.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function gO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,B.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Jc({children:e,className:t,...n}){return(0,B.jsx)("button",{type:"button",className:Ze(["react-flow__controls-button",t]),...n,children:e})}var yO=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function $_({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:l,onFitView:r,onInteractiveChange:u,className:s,children:c,position:d="bottom-left",orientation:f="vertical","aria-label":m}){let g=Ie(),{isInteractive:b,minZoomReached:S,maxZoomReached:h,ariaLabelConfig:y}=Se(yO,Ue),{zoomIn:p,zoomOut:v,fitView:x}=ch(),T=()=>{p(),a?.()},E=()=>{v(),l?.()},N=()=>{x(i),r?.()},w=()=>{g.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),u?.(!b)};return(0,B.jsxs)(tf,{className:Ze(["react-flow__controls",f==="horizontal"?"horizontal":"vertical",s]),position:d,style:e,"data-testid":"rf__controls","aria-label":m??y["controls.ariaLabel"],children:[t&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Jc,{onClick:T,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:h,children:(0,B.jsx)(dO,{})}),(0,B.jsx)(Jc,{onClick:E,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:S,children:(0,B.jsx)(pO,{})})]}),n&&(0,B.jsx)(Jc,{className:"react-flow__controls-fitview",onClick:N,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:(0,B.jsx)(mO,{})}),o&&(0,B.jsx)(Jc,{className:"react-flow__controls-interactive",onClick:w,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:b?(0,B.jsx)(gO,{}):(0,B.jsx)(hO,{})}),c]})}$_.displayName="Controls";var kH=(0,H.memo)($_);function vO({id:e,x:t,y:n,width:o,height:i,style:a,color:l,strokeColor:r,strokeWidth:u,className:s,borderRadius:c,shapeRendering:d,selected:f,onClick:m}){let{background:g,backgroundColor:b}=a||{},S=l||g||b;return(0,B.jsx)("rect",{className:Ze(["react-flow__minimap-node",{selected:f},s]),x:t,y:n,rx:c,ry:c,width:o,height:i,style:{fill:S,stroke:r,strokeWidth:u},shapeRendering:d,onClick:m?h=>m(h,e):void 0})}var bO=(0,H.memo)(vO),SO=e=>e.nodes.map(t=>t.id),uh=e=>e instanceof Function?e:()=>e;function xO({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=bO,onClick:l}){let r=Se(SO,Ue),u=uh(t),s=uh(e),c=uh(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,B.jsx)(B.Fragment,{children:r.map(f=>(0,B.jsx)(EO,{id:f,nodeColorFunc:u,nodeStrokeColorFunc:s,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:l,shapeRendering:d},f))})}function _O({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:l,NodeComponent:r,onClick:u}){let{node:s,x:c,y:d,width:f,height:m}=Se(g=>{let b=g.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};let S=b.internals.userNode,{x:h,y}=b.internals.positionAbsolute,{width:p,height:v}=Xn(S);return{node:S,x:h,y,width:p,height:v}},Ue);return!s||s.hidden||!Zm(s)?null:(0,B.jsx)(r,{x:c,y:d,width:f,height:m,style:s.style,selected:!!s.selected,className:o(s),color:t(s),borderRadius:i,strokeColor:n(s),strokeWidth:a,shapeRendering:l,onClick:u,id:s.id})}var EO=(0,H.memo)(_O),TO=(0,H.memo)(xO),NO=200,CO=150,wO=e=>!e.hidden,AO=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Ym(dl(e.nodeLookup,{filter:wO}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},DO="react-flow__minimap-desc";function F_({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:r,bgColor:u,maskColor:s,maskStrokeColor:c,maskStrokeWidth:d,position:f="bottom-right",onClick:m,onNodeClick:g,pannable:b=!1,zoomable:S=!1,ariaLabel:h,inversePan:y,zoomStep:p=1,offsetScale:v=5}){let x=Ie(),T=(0,H.useRef)(null),{boundingRect:E,viewBB:N,rfId:w,panZoom:k,translateExtent:A,flowWidth:z,flowHeight:P,ariaLabelConfig:_}=Se(AO,Ue),M=e?.width??NO,D=e?.height??CO,R=E.width/M,O=E.height/D,L=Math.max(R,O),V=L*M,U=L*D,I=v*L,Z=E.x-(V-E.width)/2-I,K=E.y-(U-E.height)/2-I,Q=V+I*2,re=U+I*2,te=`${DO}-${w}`,X=(0,H.useRef)(0),W=(0,H.useRef)();X.current=L,(0,H.useEffect)(()=>{if(T.current&&k)return W.current=Tx({domNode:T.current,panZoom:k,getTransform:()=>x.getState().transform,getViewScale:()=>X.current}),()=>{W.current?.destroy()}},[k]),(0,H.useEffect)(()=>{W.current?.update({translateExtent:A,width:z,height:P,inversePan:y,pannable:b,zoomStep:p,zoomable:S})},[b,S,y,p,A,z,P]);let se=m?q=>{let[$,ae]=W.current?.pointer(q)||[0,0];m(q,{x:$,y:ae})}:void 0,ce=g?(0,H.useCallback)((q,$)=>{let ae=x.getState().nodeLookup.get($).internals.userNode;g(q,ae)},[]):void 0,j=h??_["minimap.ariaLabel"];return(0,B.jsx)(tf,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*L:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:Ze(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,B.jsxs)("svg",{width:M,height:D,viewBox:`${Z} ${K} ${Q} ${re}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":te,ref:T,onClick:se,children:[j&&(0,B.jsx)("title",{id:te,children:j}),(0,B.jsx)(TO,{onClick:ce,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:r}),(0,B.jsx)("path",{className:"react-flow__minimap-mask",d:`M${Z-I},${K-I}h${Q+I*2}v${re+I*2}h${-Q-I*2}z- M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}F_.displayName="MiniMap";var UH=(0,H.memo)(F_),MO=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,OO={[fi.Line]:"right",[fi.Handle]:"bottom-right"};function RO({nodeId:e,position:t,variant:n=fi.Handle,className:o,style:i=void 0,children:a,color:l,minWidth:r=10,minHeight:u=10,maxWidth:s=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:m=!0,shouldResize:g,onResizeStart:b,onResize:S,onResizeEnd:h}){let y=N_(),p=typeof e=="string"?e:y,v=Ie(),x=(0,H.useRef)(null),T=n===fi.Handle,E=Se((0,H.useCallback)(MO(T&&m),[T,m]),Ue),N=(0,H.useRef)(null),w=t??OO[n];(0,H.useEffect)(()=>{if(!(!x.current||!p))return N.current||(N.current=Dx({domNode:x.current,nodeId:p,getStoreItems:()=>{let{nodeLookup:A,transform:z,snapGrid:P,snapToGrid:_,nodeOrigin:M,domNode:D}=v.getState();return{nodeLookup:A,transform:z,snapGrid:P,snapToGrid:_,nodeOrigin:M,paneDomNode:D}},onChange:(A,z)=>{let{triggerNodeChanges:P,nodeLookup:_,parentLookup:M,nodeOrigin:D}=v.getState(),R=[],O={x:A.x,y:A.y},L=_.get(p);if(L&&L.expandParent&&L.parentId){let V=L.origin??D,U=A.width??L.measured.width??0,I=A.height??L.measured.height??0,Z={id:L.id,parentId:L.parentId,rect:{width:U,height:I,...jm({x:A.x??L.position.x,y:A.y??L.position.y},{width:U,height:I},L.parentId,_,V)}},K=jc([Z],_,M,D);R.push(...K),O.x=A.x?Math.max(V[0]*U,A.x):void 0,O.y=A.y?Math.max(V[1]*I,A.y):void 0}if(O.x!==void 0&&O.y!==void 0){let V={id:p,type:"position",position:{...O}};R.push(V)}if(A.width!==void 0&&A.height!==void 0){let U={id:p,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:A.width,height:A.height}};R.push(U)}for(let V of z){let U={...V,type:"position"};R.push(U)}P(R)},onEnd:({width:A,height:z})=>{let P={id:p,type:"dimensions",resizing:!1,dimensions:{width:A,height:z}};v.getState().triggerNodeChanges([P])}})),N.current.update({controlPosition:w,boundaries:{minWidth:r,minHeight:u,maxWidth:s,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:b,onResize:S,onResizeEnd:h,shouldResize:g}),()=>{N.current?.destroy()}},[w,r,u,s,c,d,b,S,h,g]);let k=w.split("-");return(0,B.jsx)("div",{className:Ze(["react-flow__resize-control","nodrag",...k,n,o]),ref:x,style:{...i,scale:E,...l&&{[T?"backgroundColor":"borderColor"]:l}},children:a})}var GH=(0,H.memo)(RO);var af="pipeCard",J_="default",W_="controllerGroup",dh="stuff_";function di(e){return dh+e}function lf(e){return e.startsWith(dh)}function ph(e){return e.slice(dh.length)}var rf={DEFAULT:"default",STEP:"step",STRAIGHT:"straight",SMOOTH_STEP:"smoothstep"},uf=40,sf=48,cf=20,lu="arrowclosed";function eE(e){let t=e.style?.width;if(t==null)return 200;let n=typeof t=="number"?t:parseFloat(t);return isNaN(n)||n<=0?200:n}function tE(e){let t=e.style?.height;if(t!=null){let n=typeof t=="number"?t:parseFloat(t);if(!isNaN(n)&&n>0)return n}return e.data?.isStuff?60:70}function nE(e){if(!e)return null;let t={},n={},o={},i={},a=new Set;for(let r of e.edges)r.kind==="contains"&&(i[r.source]||(i[r.source]=[]),i[r.source].push(r.target),a.add(r.target));let l=new Set(Object.keys(i));for(let r of e.nodes){let u=r.io||{},s=l.has(r.id);for(let c of u.outputs||[])c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!s&&(n[c.digest]=r.id);for(let c of u.inputs||[])c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!s&&(o[c.digest]||(o[c.digest]=[]),o[c.digest].push(r.id))}return{stuffRegistry:t,stuffProducers:n,stuffConsumers:o,controllerNodeIds:l,childNodeIds:a,containmentTree:i}}function Wi(e,t){let n={};for(let[l,r]of Object.entries(t.containmentTree))for(let u of r)n[u]=l;for(let[l,r]of Object.entries(t.stuffProducers)){let u="stuff_"+l,s=n[r];s&&(n[u]=s)}for(let l of e.nodes){if(!t.controllerNodeIds.has(l.id))continue;let r=n[l.id];if(r)for(let u of l.io?.outputs||[]){if(!u.digest)continue;let s="stuff_"+u.digest;n[s]||(n[s]=r)}}for(let l of e.edges)if(l.kind==="batch_item"&&l.target_stuff_digest){let r="stuff_"+l.target_stuff_digest;t.controllerNodeIds.has(l.source)&&(n[r]=l.source)}let o=new Set;for(let l of e.edges)(l.kind==="batch_item"||l.kind==="batch_aggregate"||l.kind==="parallel_combine")&&(l.source_stuff_digest&&o.add(l.source_stuff_digest),l.target_stuff_digest&&o.add(l.target_stuff_digest));let i="stuff_",a=Object.keys(n).filter(l=>l.startsWith(i));for(let l of a){let r=l.slice(i.length),u=n[l];if(!u)continue;let s=t.stuffConsumers[r]||[];if(s.length===0){o.has(r)||delete n[l];continue}for(;u;){let c=u;if(s.some(m=>zO(m,c,n)))break;let f=n[u];f?(n[l]=f,u=f):(delete n[l],u=void 0)}}return n}function zO(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function oE(e,t){return e.pipe_registry?.[t]}function mh(e,t){if(!e.concept_registry)return;let n=e.concept_registry[t];if(n)return n;for(let o of Object.values(e.concept_registry))if(o.code===t)return o}function iE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function aE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function lE(e){if(!e)return null;if(typeof e=="string")return iE(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(iE(o))return o;return null}function rE(e){if(!e)return null;if(typeof e=="string")return aE(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(aE(o))return o;return null}function uE(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.filename=="string"&&t.filename?t.filename:null}function sE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function hh(e,t){for(let n of e.nodes)for(let o of n.io?.outputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};for(let n of e.nodes)for(let o of n.io?.inputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};return null}var So=ie(Nt(),1);var{entries:vE,setPrototypeOf:cE,isFrozen:LO,getPrototypeOf:BO,getOwnPropertyDescriptor:HO}=Object,{freeze:zt,seal:En,create:pf}=Object,{apply:_h,construct:Eh}=typeof Reflect<"u"&&Reflect;zt||(zt=function(t){return t});En||(En=function(t){return t});_h||(_h=function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return t.apply(n,i)});Eh||(Eh=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new t(...o)});var ff=Lt(Array.prototype.forEach),kO=Lt(Array.prototype.lastIndexOf),fE=Lt(Array.prototype.pop),ru=Lt(Array.prototype.push),UO=Lt(Array.prototype.splice),mf=Lt(String.prototype.toLowerCase),gh=Lt(String.prototype.toString),yh=Lt(String.prototype.match),uu=Lt(String.prototype.replace),GO=Lt(String.prototype.indexOf),PO=Lt(String.prototype.trim),rn=Lt(Object.prototype.hasOwnProperty),Rt=Lt(RegExp.prototype.test),su=IO(TypeError);function Lt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return _h(e,t,o)}}function IO(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Eh(e,n)}}function he(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mf;cE&&cE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(LO(t)||(t[o]=a),i=a)}e[i]=!0}return e}function VO(e){for(let t=0;t<e.length;t++)rn(e,t)||(e[t]=null);return e}function Zn(e){let t=pf(null);for(let[n,o]of vE(e))rn(e,n)&&(Array.isArray(o)?t[n]=VO(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Zn(o):t[n]=o);return t}function cu(e,t){for(;e!==null;){let o=HO(e,t);if(o){if(o.get)return Lt(o.get);if(typeof o.value=="function")return Lt(o.value)}e=BO(e)}function n(){return null}return n}var dE=zt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),vh=zt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),bh=zt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),YO=zt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Sh=zt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),XO=zt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pE=zt(["#text"]),mE=zt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),xh=zt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hE=zt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),df=zt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qO=En(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ZO=En(/<%[\w\W]*|[\w\W]*%>/gm),jO=En(/\$\{[\w\W]*/gm),QO=En(/^data-[\-\w.\u00B7-\uFFFF]+$/),KO=En(/^aria-[\-\w]+$/),bE=En(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$O=En(/^(?:\w+script|data):/i),FO=En(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),SE=En(/^html$/i),JO=En(/^[a-z][.\w]*(-[.\w]+)+$/i),gE=Object.freeze({__proto__:null,ARIA_ATTR:KO,ATTR_WHITESPACE:FO,CUSTOM_ELEMENT:JO,DATA_ATTR:QO,DOCTYPE_NAME:SE,ERB_EXPR:ZO,IS_ALLOWED_URI:bE,IS_SCRIPT_OR_DATA:$O,MUSTACHE_EXPR:qO,TMPLIT_EXPR:jO}),fu={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},WO=function(){return typeof window>"u"?null:window},eR=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));let a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},yE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:WO(),t=oe=>xE(oe);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==fu.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,o=n,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:r,Element:u,NodeFilter:s,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:m}=e,g=u.prototype,b=cu(g,"cloneNode"),S=cu(g,"remove"),h=cu(g,"nextSibling"),y=cu(g,"childNodes"),p=cu(g,"parentNode");if(typeof l=="function"){let oe=n.createElement("template");oe.content&&oe.content.ownerDocument&&(n=oe.content.ownerDocument)}let v,x="",{implementation:T,createNodeIterator:E,createDocumentFragment:N,getElementsByTagName:w}=n,{importNode:k}=o,A=yE();t.isSupported=typeof vE=="function"&&typeof p=="function"&&T&&T.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:P,TMPLIT_EXPR:_,DATA_ATTR:M,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:L}=gE,{IS_ALLOWED_URI:V}=gE,U=null,I=he({},[...dE,...vh,...bh,...Sh,...pE]),Z=null,K=he({},[...mE,...xh,...hE,...df]),Q=Object.seal(pf(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,te=null,X=Object.seal(pf(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),W=!0,se=!0,ce=!1,j=!0,q=!1,$=!0,ae=!1,me=!1,Ke=!1,Ve=!1,pt=!1,ot=!1,No=!0,Co=!1,hi="user-content-",gi=!0,Ln=!1,Qt={},xt=null,oa=he({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),bu=null,ia=he({},["audio","video","img","source","image","track"]),xl=null,Su=he({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),aa="http://www.w3.org/1998/Math/MathML",la="http://www.w3.org/2000/svg",Tn="http://www.w3.org/1999/xhtml",wo=Tn,_l=!1,El=null,Ef=he({},[aa,la,Tn],gh),ra=he({},["mi","mo","mn","ms","mtext"]),ua=he({},["annotation-xml"]),Tf=he({},["title","style","font","a","script"]),yi=null,Nf=["application/xhtml+xml","text/html"],Cf="text/html",$e=null,Ao=null,wf=n.createElement("form"),xu=function(C){return C instanceof RegExp||C instanceof Function},Tl=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ao&&Ao===C)){if((!C||typeof C!="object")&&(C={}),C=Zn(C),yi=Nf.indexOf(C.PARSER_MEDIA_TYPE)===-1?Cf:C.PARSER_MEDIA_TYPE,$e=yi==="application/xhtml+xml"?gh:mf,U=rn(C,"ALLOWED_TAGS")?he({},C.ALLOWED_TAGS,$e):I,Z=rn(C,"ALLOWED_ATTR")?he({},C.ALLOWED_ATTR,$e):K,El=rn(C,"ALLOWED_NAMESPACES")?he({},C.ALLOWED_NAMESPACES,gh):Ef,xl=rn(C,"ADD_URI_SAFE_ATTR")?he(Zn(Su),C.ADD_URI_SAFE_ATTR,$e):Su,bu=rn(C,"ADD_DATA_URI_TAGS")?he(Zn(ia),C.ADD_DATA_URI_TAGS,$e):ia,xt=rn(C,"FORBID_CONTENTS")?he({},C.FORBID_CONTENTS,$e):oa,re=rn(C,"FORBID_TAGS")?he({},C.FORBID_TAGS,$e):Zn({}),te=rn(C,"FORBID_ATTR")?he({},C.FORBID_ATTR,$e):Zn({}),Qt=rn(C,"USE_PROFILES")?C.USE_PROFILES:!1,W=C.ALLOW_ARIA_ATTR!==!1,se=C.ALLOW_DATA_ATTR!==!1,ce=C.ALLOW_UNKNOWN_PROTOCOLS||!1,j=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,q=C.SAFE_FOR_TEMPLATES||!1,$=C.SAFE_FOR_XML!==!1,ae=C.WHOLE_DOCUMENT||!1,Ve=C.RETURN_DOM||!1,pt=C.RETURN_DOM_FRAGMENT||!1,ot=C.RETURN_TRUSTED_TYPE||!1,Ke=C.FORCE_BODY||!1,No=C.SANITIZE_DOM!==!1,Co=C.SANITIZE_NAMED_PROPS||!1,gi=C.KEEP_CONTENT!==!1,Ln=C.IN_PLACE||!1,V=C.ALLOWED_URI_REGEXP||bE,wo=C.NAMESPACE||Tn,ra=C.MATHML_TEXT_INTEGRATION_POINTS||ra,ua=C.HTML_INTEGRATION_POINTS||ua,Q=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&xu(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Q.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&xu(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Q.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(se=!1),pt&&(Ve=!0),Qt&&(U=he({},pE),Z=pf(null),Qt.html===!0&&(he(U,dE),he(Z,mE)),Qt.svg===!0&&(he(U,vh),he(Z,xh),he(Z,df)),Qt.svgFilters===!0&&(he(U,bh),he(Z,xh),he(Z,df)),Qt.mathMl===!0&&(he(U,Sh),he(Z,hE),he(Z,df))),rn(C,"ADD_TAGS")||(X.tagCheck=null),rn(C,"ADD_ATTR")||(X.attributeCheck=null),C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?X.tagCheck=C.ADD_TAGS:(U===I&&(U=Zn(U)),he(U,C.ADD_TAGS,$e))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?X.attributeCheck=C.ADD_ATTR:(Z===K&&(Z=Zn(Z)),he(Z,C.ADD_ATTR,$e))),C.ADD_URI_SAFE_ATTR&&he(xl,C.ADD_URI_SAFE_ATTR,$e),C.FORBID_CONTENTS&&(xt===oa&&(xt=Zn(xt)),he(xt,C.FORBID_CONTENTS,$e)),C.ADD_FORBID_CONTENTS&&(xt===oa&&(xt=Zn(xt)),he(xt,C.ADD_FORBID_CONTENTS,$e)),gi&&(U["#text"]=!0),ae&&he(U,["html","head","body"]),U.table&&(he(U,["tbody"]),delete re.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw su('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw su('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=C.TRUSTED_TYPES_POLICY,x=v.createHTML("")}else v===void 0&&(v=eR(m,i)),v!==null&&typeof x=="string"&&(x=v.createHTML(""));zt&&zt(C),Ao=C}},_u=he({},[...vh,...bh,...YO]),Eu=he({},[...Sh,...XO]),Af=function(C){let Y=p(C);(!Y||!Y.tagName)&&(Y={namespaceURI:wo,tagName:"template"});let J=mf(C.tagName),Me=mf(Y.tagName);return El[C.namespaceURI]?C.namespaceURI===la?Y.namespaceURI===Tn?J==="svg":Y.namespaceURI===aa?J==="svg"&&(Me==="annotation-xml"||ra[Me]):!!_u[J]:C.namespaceURI===aa?Y.namespaceURI===Tn?J==="math":Y.namespaceURI===la?J==="math"&&ua[Me]:!!Eu[J]:C.namespaceURI===Tn?Y.namespaceURI===la&&!ua[Me]||Y.namespaceURI===aa&&!ra[Me]?!1:!Eu[J]&&(Tf[J]||!_u[J]):!!(yi==="application/xhtml+xml"&&El[C.namespaceURI]):!1},sn=function(C){ru(t.removed,{element:C});try{p(C).removeChild(C)}catch{S(C)}},jn=function(C,Y){try{ru(t.removed,{attribute:Y.getAttributeNode(C),from:Y})}catch{ru(t.removed,{attribute:null,from:Y})}if(Y.removeAttribute(C),C==="is")if(Ve||pt)try{sn(Y)}catch{}else try{Y.setAttribute(C,"")}catch{}},Tu=function(C){let Y=null,J=null;if(Ke)C="<remove></remove>"+C;else{let Ye=yh(C,/^[\r\n\t ]+/);J=Ye&&Ye[0]}yi==="application/xhtml+xml"&&wo===Tn&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");let Me=v?v.createHTML(C):C;if(wo===Tn)try{Y=new f().parseFromString(Me,yi)}catch{}if(!Y||!Y.documentElement){Y=T.createDocument(wo,"template",null);try{Y.documentElement.innerHTML=_l?x:Me}catch{}}let ut=Y.body||Y.documentElement;return C&&J&&ut.insertBefore(n.createTextNode(J),ut.childNodes[0]||null),wo===Tn?w.call(Y,ae?"html":"body")[0]:ae?Y.documentElement:ut},Nu=function(C){return E.call(C.ownerDocument||C,C,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},Nl=function(C){return C instanceof d&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof c)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},Cu=function(C){return typeof r=="function"&&C instanceof r};function Nn(oe,C,Y){ff(oe,J=>{J.call(t,C,Y,Ao)})}let Cl=function(C){let Y=null;if(Nn(A.beforeSanitizeElements,C,null),Nl(C))return sn(C),!0;let J=$e(C.nodeName);if(Nn(A.uponSanitizeElement,C,{tagName:J,allowedTags:U}),$&&C.hasChildNodes()&&!Cu(C.firstElementChild)&&Rt(/<[/\w!]/g,C.innerHTML)&&Rt(/<[/\w!]/g,C.textContent)||C.nodeType===fu.progressingInstruction||$&&C.nodeType===fu.comment&&Rt(/<[/\w]/g,C.data))return sn(C),!0;if(!(X.tagCheck instanceof Function&&X.tagCheck(J))&&(!U[J]||re[J])){if(!re[J]&&Al(J)&&(Q.tagNameCheck instanceof RegExp&&Rt(Q.tagNameCheck,J)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(J)))return!1;if(gi&&!xt[J]){let Me=p(C)||C.parentNode,ut=y(C)||C.childNodes;if(ut&&Me){let Ye=ut.length;for(let _t=Ye-1;_t>=0;--_t){let Cn=b(ut[_t],!0);Cn.__removalCount=(C.__removalCount||0)+1,Me.insertBefore(Cn,h(C))}}}return sn(C),!0}return C instanceof u&&!Af(C)||(J==="noscript"||J==="noembed"||J==="noframes")&&Rt(/<\/no(script|embed|frames)/i,C.innerHTML)?(sn(C),!0):(q&&C.nodeType===fu.text&&(Y=C.textContent,ff([z,P,_],Me=>{Y=uu(Y,Me," ")}),C.textContent!==Y&&(ru(t.removed,{element:C.cloneNode()}),C.textContent=Y)),Nn(A.afterSanitizeElements,C,null),!1)},wl=function(C,Y,J){if(te[Y]||No&&(Y==="id"||Y==="name")&&(J in n||J in wf))return!1;if(!(se&&!te[Y]&&Rt(M,Y))){if(!(W&&Rt(D,Y))){if(!(X.attributeCheck instanceof Function&&X.attributeCheck(Y,C))){if(!Z[Y]||te[Y]){if(!(Al(C)&&(Q.tagNameCheck instanceof RegExp&&Rt(Q.tagNameCheck,C)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(C))&&(Q.attributeNameCheck instanceof RegExp&&Rt(Q.attributeNameCheck,Y)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(Y,C))||Y==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&Rt(Q.tagNameCheck,J)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(J))))return!1}else if(!xl[Y]){if(!Rt(V,uu(J,O,""))){if(!((Y==="src"||Y==="xlink:href"||Y==="href")&&C!=="script"&&GO(J,"data:")===0&&bu[C])){if(!(ce&&!Rt(R,uu(J,O,"")))){if(J)return!1}}}}}}}return!0},Al=function(C){return C!=="annotation-xml"&&yh(C,L)},wu=function(C){Nn(A.beforeSanitizeAttributes,C,null);let{attributes:Y}=C;if(!Y||Nl(C))return;let J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0},Me=Y.length;for(;Me--;){let ut=Y[Me],{name:Ye,namespaceURI:_t,value:Cn}=ut,Do=$e(Ye),Dl=Cn,it=Ye==="value"?Dl:PO(Dl);if(J.attrName=Do,J.attrValue=it,J.keepAttr=!0,J.forceKeepAttr=void 0,Nn(A.uponSanitizeAttribute,C,J),it=J.attrValue,Co&&(Do==="id"||Do==="name")&&(jn(Ye,C),it=hi+it),$&&Rt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,it)){jn(Ye,C);continue}if(Do==="attributename"&&yh(it,"href")){jn(Ye,C);continue}if(J.forceKeepAttr)continue;if(!J.keepAttr){jn(Ye,C);continue}if(!j&&Rt(/\/>/i,it)){jn(Ye,C);continue}q&&ff([z,P,_],Au=>{it=uu(it,Au," ")});let Ml=$e(C.nodeName);if(!wl(Ml,Do,it)){jn(Ye,C);continue}if(v&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!_t)switch(m.getAttributeType(Ml,Do)){case"TrustedHTML":{it=v.createHTML(it);break}case"TrustedScriptURL":{it=v.createScriptURL(it);break}}if(it!==Dl)try{_t?C.setAttributeNS(_t,Ye,it):C.setAttribute(Ye,it),Nl(C)?sn(C):fE(t.removed)}catch{jn(Ye,C)}}Nn(A.afterSanitizeAttributes,C,null)},Df=function oe(C){let Y=null,J=Nu(C);for(Nn(A.beforeSanitizeShadowDOM,C,null);Y=J.nextNode();)Nn(A.uponSanitizeShadowNode,Y,null),Cl(Y),wu(Y),Y.content instanceof a&&oe(Y.content);Nn(A.afterSanitizeShadowDOM,C,null)};return t.sanitize=function(oe){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,J=null,Me=null,ut=null;if(_l=!oe,_l&&(oe="<!-->"),typeof oe!="string"&&!Cu(oe))if(typeof oe.toString=="function"){if(oe=oe.toString(),typeof oe!="string")throw su("dirty is not a string, aborting")}else throw su("toString is not a function");if(!t.isSupported)return oe;if(me||Tl(C),t.removed=[],typeof oe=="string"&&(Ln=!1),Ln){if(oe.nodeName){let Cn=$e(oe.nodeName);if(!U[Cn]||re[Cn])throw su("root node is forbidden and cannot be sanitized in-place")}}else if(oe instanceof r)Y=Tu("<!---->"),J=Y.ownerDocument.importNode(oe,!0),J.nodeType===fu.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?Y=J:Y.appendChild(J);else{if(!Ve&&!q&&!ae&&oe.indexOf("<")===-1)return v&&ot?v.createHTML(oe):oe;if(Y=Tu(oe),!Y)return Ve?null:ot?x:""}Y&&Ke&&sn(Y.firstChild);let Ye=Nu(Ln?oe:Y);for(;Me=Ye.nextNode();)Cl(Me),wu(Me),Me.content instanceof a&&Df(Me.content);if(Ln)return oe;if(Ve){if(pt)for(ut=N.call(Y.ownerDocument);Y.firstChild;)ut.appendChild(Y.firstChild);else ut=Y;return(Z.shadowroot||Z.shadowrootmode)&&(ut=k.call(o,ut,!0)),ut}let _t=ae?Y.outerHTML:Y.innerHTML;return ae&&U["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&Rt(SE,Y.ownerDocument.doctype.name)&&(_t="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>-`+_t),q&&ff([z,P,_],Cn=>{_t=uu(_t,Cn," ")}),v&&ot?v.createHTML(_t):_t},t.setConfig=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Tl(oe),me=!0},t.clearConfig=function(){Ao=null,me=!1},t.isValidAttribute=function(oe,C,Y){Ao||Tl({});let J=$e(oe),Me=$e(C);return wl(J,Me,Y)},t.addHook=function(oe,C){typeof C=="function"&&ru(A[oe],C)},t.removeHook=function(oe,C){if(C!==void 0){let Y=kO(A[oe],C);return Y===-1?void 0:UO(A[oe],Y,1)[0]}return fE(A[oe])},t.removeHooks=function(oe){A[oe]=[]},t.removeAllHooks=function(){A=yE()},t}var _E=xE();var de=ie(pe(),1),tR=(0,de.jsx)("svg",{viewBox:"0 0 24 24",children:(0,de.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),nR=(0,de.jsx)("svg",{viewBox:"0 0 24 24",children:(0,de.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),oR=(0,de.jsx)("svg",{viewBox:"0 0 24 24",children:(0,de.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),iR=(0,de.jsx)("svg",{viewBox:"0 0 24 24",children:(0,de.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})}),aR=(0,de.jsx)("svg",{viewBox:"0 0 24 24",children:(0,de.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})});function hf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Th(e,t,n){let o=new Blob([e],{type:n}),i=URL.createObjectURL(o),a=document.createElement("a");a.href=i,a.download=t,a.click(),setTimeout(()=>URL.revokeObjectURL(i),1e4)}function EE(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function gf({stuff:e,className:t}){let[n,o]=So.default.useState("html"),[i,a]=So.default.useState(!1),l=So.default.useRef(null),r=So.default.useMemo(()=>rE(e.data),[e.data]),u=So.default.useMemo(()=>lE(e.data),[e.data]),s=So.default.useMemo(()=>uE(e.data),[e.data]),c=sE(e.contentType),d=So.default.useMemo(()=>{if(e.data==null)return null;try{return JSON.stringify(e.data,null,2)}catch{return"[Unable to serialize data]"}},[e.data]);So.default.useEffect(()=>{n!=="html"||!l.current||l.current.querySelectorAll("a").forEach(y=>{y.setAttribute("target","_blank"),y.setAttribute("rel","noopener noreferrer")})},[n,e.dataHtml]);function f(y){let p=s||e.name;return(0,de.jsxs)("div",{className:"stuff-viewer-local-file",children:[(0,de.jsx)("div",{className:"stuff-viewer-local-file-icon",children:aR}),(0,de.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[p&&(0,de.jsx)("div",{className:"stuff-viewer-local-file-name",children:p}),(0,de.jsxs)("div",{className:"stuff-viewer-local-file-hint",children:[y," \u2014 no preview available"]})]})]})}function m(){if(n==="html"){if(e.contentType==="application/pdf"){if(r){let y=r.includes("#")?r:`${r}#pagemode=none`;return(0,de.jsx)("div",{className:"stuff-viewer-pdf",children:(0,de.jsx)("embed",{src:y,type:"application/pdf"})})}return f("PDF")}return e.contentType?.startsWith("image/")?r?(0,de.jsx)("div",{className:"stuff-viewer-image",children:(0,de.jsx)("img",{src:r,alt:e.name||"Image content"})}):f("Image"):e.dataHtml?(0,de.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:_E.sanitize(e.dataHtml)}}):d?(0,de.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:hf(d)}}):(0,de.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return n==="json"?d?(0,de.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:hf(d)}}):(0,de.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,de.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:hf(e.dataText)}}):d?(0,de.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:hf(d)}}):(0,de.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function g(){let y;n==="json"?y=d||"":n==="text"?y=e.dataText||d||"":y=e.dataText||e.dataHtml||d||"",y&&navigator.clipboard&&navigator.clipboard.writeText(y).then(()=>{a(!0),setTimeout(()=>a(!1),1500)}).catch(()=>{})}function b(){if(e.contentType?.startsWith("image/")&&u){let y=e.contentType.split("/")[1]||"png";EE(u,`${e.name||"stuff"}.${y}`);return}if(e.contentType==="application/pdf"&&u){EE(u,`${e.name||"stuff"}.pdf`);return}n==="json"?Th(d||"{}",`${e.name||"stuff"}.json`,"application/json"):n==="text"?Th(e.dataText||d||"",`${e.name||"stuff"}.txt`,"text/plain"):Th(e.dataHtml||d||"",`${e.name||"stuff"}.html`,"text/html")}function S(){u&&window.open(u,"_blank","noopener,noreferrer")}let h=["stuff-viewer",t].filter(Boolean).join(" ");return(0,de.jsxs)("div",{className:h,children:[(0,de.jsxs)("div",{className:"stuff-viewer-header",children:[(0,de.jsx)("h3",{className:"stuff-viewer-title",children:e.name||"Data"}),e.concept&&(0,de.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,de.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,de.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(y=>(0,de.jsx)("button",{type:"button",className:`stuff-viewer-tab${n===y?" stuff-viewer-tab--active":""}`,onClick:()=>o(y),children:y==="html"?c:y==="json"?"JSON":"Pretty"},y))}),(0,de.jsxs)("div",{className:"stuff-viewer-actions",children:[u&&(0,de.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:S,title:"Open in new window","aria-label":"Open in new window",children:iR}),(0,de.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${i?" stuff-viewer-action-btn--copied":""}`,onClick:g,title:"Copy","aria-label":"Copy",children:i?nR:tR}),(0,de.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:b,title:"Download","aria-label":"Download",children:oR})]})]}),(0,de.jsx)("div",{className:"stuff-viewer-content",ref:l,children:m()})]})}var TE=ie(Nt(),1);var bl=ie(pe(),1);function NE({isOpen:e,onClose:t,children:n,width:o,isDragging:i,onResizeHandleMouseDown:a,closeOnEscape:l=!0}){TE.default.useEffect(()=>{if(!e||!l)return;let u=s=>{s.key==="Escape"&&t()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e,l,t]);let r=["detail-panel",!e&&"detail-panel--closed",i&&"detail-panel--dragging"].filter(Boolean).join(" ");return(0,bl.jsxs)("div",{className:r,style:o?{width:`${o}px`}:void 0,children:[a&&(0,bl.jsx)("div",{className:"detail-panel-resize-handle",onMouseDown:a,role:"separator","aria-orientation":"vertical","aria-label":"Resize panel"}),(0,bl.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"}),(0,bl.jsx)("div",{className:"detail-panel-content",children:n})]})}var ea=ie(Nt(),1),lR=.6;function CE({defaultWidth:e,minWidth:t,maxWidth:n,containerRef:o}){let[i,a]=ea.default.useState(e),[l,r]=ea.default.useState(!1),u=ea.default.useRef({startX:0,startWidth:0,maxAllowed:n}),s=ea.default.useRef(null),c=ea.default.useCallback(d=>{d.preventDefault(),d.stopPropagation();let f=o?.current?.getBoundingClientRect().width,m=f?Math.min(n,f*lR):n;u.current={startX:d.clientX,startWidth:i,maxAllowed:m},r(!0),document.body.style.userSelect="none",document.body.style.cursor="col-resize"},[i,n,o]);return ea.default.useEffect(()=>{if(!l)return;let d=m=>{s.current!==null&&cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{let{startX:g,startWidth:b,maxAllowed:S}=u.current,h=g-m.clientX,y=Math.max(t,Math.min(S,b+h));a(y),s.current=null})},f=()=>{r(!1),document.body.style.userSelect="",document.body.style.cursor="",s.current!==null&&(cancelAnimationFrame(s.current),s.current=null)};return document.addEventListener("mousemove",d),document.addEventListener("mouseup",f),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),document.body.style.userSelect="",document.body.style.cursor="",s.current!==null&&(cancelAnimationFrame(s.current),s.current=null)}},[l,t]),{width:i,isDragging:l,handleMouseDown:c}}var DE=ie(Nt(),1);var yf=ie(Nt(),1),ze=ie(pe(),1);function Nh(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function ne({label:e,value:t}){return t==null?null:(0,ze.jsxs)("div",{className:"detail-kv-row",children:[(0,ze.jsx)("span",{className:"detail-kv-key",children:e}),(0,ze.jsx)("span",{className:"detail-kv-value",children:String(t)})]})}function Ch({label:e,text:t}){return t?(0,ze.jsxs)("div",{children:[(0,ze.jsx)("div",{className:"detail-section-label",children:e}),(0,ze.jsx)("div",{className:"detail-prompt-block",children:t})]}):null}var rR=(0,ze.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,ze.jsx)("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})}),uR=(0,ze.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,ze.jsx)("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),sR=(0,ze.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,ze.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),cR=(0,ze.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,ze.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),wE={all:"unset",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:9,color:"#64748b",padding:"2px 6px",borderRadius:3,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",transition:"color 0.15s"};function zn({label:e,templateText:t,renderedText:n}){let[o,i]=(0,yf.useState)(!1),[a,l]=(0,yf.useState)(!1),[r,u]=(0,yf.useState)(!1),s=!!t,c=!!n;if(!s&&!c)return null;let d=s&&c,f=d?o?t:n:t||n;function m(){!f||!navigator.clipboard||navigator.clipboard.writeText(f).then(()=>{l(!0),setTimeout(()=>l(!1),1500)}).catch(()=>{})}return(0,ze.jsxs)("div",{children:[(0,ze.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4},children:[(0,ze.jsx)("div",{className:"detail-section-label",style:{marginBottom:0},children:e}),(0,ze.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,ze.jsx)("button",{onClick:()=>u(g=>!g),title:r?"Collapse prompt":"Expand prompt","aria-label":r?"Collapse prompt":"Expand prompt",className:"detail-prompt-expand-btn",children:r?uR:rR}),(0,ze.jsx)("button",{onClick:m,title:"Copy prompt","aria-label":"Copy prompt",style:{...wE,color:a?"#10b981":"#64748b"},children:a?cR:sR}),d&&(0,ze.jsxs)("button",{onClick:()=>i(g=>!g),style:wE,children:[(0,ze.jsx)("span",{style:{width:22,height:12,borderRadius:6,background:o?"rgba(255,255,255,0.12)":"#50FA7B33",position:"relative",display:"inline-block",transition:"background 0.15s"},children:(0,ze.jsx)("span",{style:{position:"absolute",top:2,left:o?2:12,width:8,height:8,borderRadius:"50%",background:o?"#94a3b8":"#50FA7B",transition:"left 0.15s, background 0.15s"}})}),o?"template":"rendered"]})]})]}),(0,ze.jsx)("div",{className:`detail-prompt-block ${r?"detail-prompt-block--expanded":"detail-prompt-block--collapsed"}`,style:{marginTop:6},children:f})]})}var St=ie(pe(),1);function wh({blueprint:e,executionData:t}){let n=e.llm_prompt_spec,o=n.user_image_references&&n.user_image_references.length>0,i=n.user_document_references&&n.user_document_references.length>0,a=n.system_image_references&&n.system_image_references.length>0,l=n.system_document_references&&n.system_document_references.length>0,r=t?.resolved_model,u=t?.resolved_model_for_object,s=t?.rendered_system_prompt,c=t?.rendered_user_prompt,d=t?.structuring_path,f=t?.is_multiple_output,m=r||e.llm_choices?.for_text,g=u||e.llm_choices?.for_object;return(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(ne,{label:"Model",value:m}),g&&g!==m&&(0,St.jsx)(ne,{label:"Model (object)",value:g}),(0,St.jsx)(ne,{label:"Structuring",value:d||e.structuring_method}),(0,St.jsx)(ne,{label:"Multiple Output",value:f}),(0,St.jsx)(ne,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,St.jsx)(ne,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,St.jsx)(ne,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,St.jsx)(ne,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,St.jsx)(ne,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),l&&(0,St.jsx)(ne,{label:"System Document Refs",value:`${n.system_document_references.length} references`}),(0,St.jsx)(zn,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:s}),(0,St.jsx)(zn,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c})]})}function Ah(e){return null}var Xt=ie(pe(),1);function Dh({blueprint:e,executionData:t}){let n=e.img_gen_prompt_blueprint,o=t?.resolved_model,i=t?.rendered_prompt,a=t?.rendered_negative_prompt;return(0,Xt.jsxs)(Xt.Fragment,{children:[(0,Xt.jsx)(ne,{label:"Model",value:o||e.img_gen_choice}),(0,Xt.jsx)(zn,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,Xt.jsx)(zn,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,Xt.jsx)(ne,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,Xt.jsx)(ne,{label:"Output Format",value:e.output_format}),(0,Xt.jsx)(ne,{label:"Background",value:e.background}),(0,Xt.jsx)(ne,{label:"Is Raw",value:e.is_raw}),(0,Xt.jsx)(ne,{label:"Seed",value:e.seed}),(0,Xt.jsx)(ne,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}function Mh(e){return null}var qt=ie(pe(),1);function Oh({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsx)(ne,{label:"Model",value:n||e.extract_choice}),(0,qt.jsx)(ne,{label:"Document Variable",value:e.document_stuff_name}),(0,qt.jsx)(ne,{label:"Caption Images",value:e.should_caption_images}),(0,qt.jsx)(ne,{label:"Max Page Images",value:e.max_page_images}),(0,qt.jsx)(ne,{label:"Include Page Views",value:e.should_include_page_views}),(0,qt.jsx)(ne,{label:"Page Views DPI",value:e.page_views_dpi}),(0,qt.jsx)(ne,{label:"Render JS",value:e.render_js}),(0,qt.jsx)(ne,{label:"Include Raw HTML",value:e.include_raw_html}),(0,qt.jsx)(ne,{label:"Image Variable",value:e.image_stuff_name})]})}function Rh(e){return null}var Zt=ie(pe(),1);function zh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(ne,{label:"Model",value:n||e.search_choice}),(0,Zt.jsx)(zn,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,Zt.jsx)(ne,{label:"Max Results",value:e.max_results_override}),(0,Zt.jsx)(ne,{label:"Include Images",value:e.include_images_override}),(0,Zt.jsx)(ne,{label:"Structured Output",value:e.is_structured_output}),(0,Zt.jsx)(ne,{label:"From Date",value:e.from_date}),(0,Zt.jsx)(ne,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,Zt.jsx)(ne,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,Zt.jsx)(ne,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}function Lh(e){return null}var Ce=ie(pe(),1);function fR(e){switch(e.method){case"from_var":{let t=`\u2190 ${e.from_path??"?"}`;return e.list_to_dict_keyed_by?`${t} (keyed by ${e.list_to_dict_keyed_by})`:t}case"fixed":return`= ${JSON.stringify(e.fixed_value)}`;case"nested":return"(nested construct)";case"template":return e.template??"(empty template)"}}var dR=60;function pR(e){return e.length>dR||e.includes(`-`)}function mR({label:e,value:t}){return(0,Ce.jsxs)("div",{className:"detail-field-block",children:[(0,Ce.jsx)("div",{className:"detail-field-block-label",children:e}),(0,Ce.jsx)("div",{className:"detail-field-block-value",children:t})]})}function AE({blueprint:e,depth:t,resolvedFields:n}){let o=[],i=[],a=[];for(let[r,u]of Object.entries(e.fields))u.method==="template"?a.push([r,u]):u.method==="nested"?i.push([r,u]):o.push([r,u]);let l=t>0?{paddingLeft:t*12}:void 0;return(0,Ce.jsxs)(Ce.Fragment,{children:[o.map(([r,u])=>{let s=fR(u);return pR(s)?(0,Ce.jsx)("div",{style:l,children:(0,Ce.jsx)(mR,{label:r,value:s})},r):(0,Ce.jsx)("div",{style:l,children:(0,Ce.jsx)(ne,{label:r,value:s})},r)}),a.map(([r,u])=>{let s=n?.[r],c=typeof s=="string"?s:void 0;return(0,Ce.jsx)("div",{style:l,children:(0,Ce.jsx)(zn,{label:`Template \u2014 ${r}`,templateText:u.template??null,renderedText:c})},r)}),i.map(([r,u])=>u.nested?(0,Ce.jsxs)("div",{children:[(0,Ce.jsxs)("div",{className:"detail-nested-header",style:t>0?{paddingLeft:t*12}:void 0,children:[(0,Ce.jsx)("span",{className:"detail-nested-header-name",children:r}),(0,Ce.jsxs)("span",{className:"detail-nested-header-meta",children:["nested \xB7 ",Object.keys(u.nested.fields).length," field",Object.keys(u.nested.fields).length===1?"":"s"]})]}),(0,Ce.jsx)(AE,{blueprint:u.nested,depth:t+1,resolvedFields:n&&typeof n[r]=="object"&&n[r]!==null?n[r]:null})]},r):null)]})}function Bh({blueprint:e,executionData:t}){let n=t?.rendered_text,o=t?.compose_mode,i=t?.resolved_fields??null,a=e.construct_blueprint,l=a!==null&&Object.keys(a.fields).length>0;return(0,Ce.jsxs)(Ce.Fragment,{children:[(0,Ce.jsx)(ne,{label:"Mode",value:o||(l?"construct":"template")}),(0,Ce.jsx)(ne,{label:"Category",value:e.category}),(0,Ce.jsx)(ne,{label:"Templating Style",value:e.templating_style}),e.template&&(0,Ce.jsx)(zn,{label:"Template",templateText:e.template,renderedText:n}),l&&(0,Ce.jsxs)(Ce.Fragment,{children:[(0,Ce.jsx)("div",{className:"detail-section-label",children:"FIELDS"}),(0,Ce.jsx)(AE,{blueprint:a,depth:0,resolvedFields:i})]})]})}function Hh(e){return null}var Tt=ie(pe(),1);function kh({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsx)(Ch,{label:"Expression",text:e.expression}),n&&(0,Tt.jsx)(ne,{label:"Expression Result",value:n}),(0,Tt.jsxs)("div",{children:[(0,Tt.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,Tt.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,Tt.jsx)("span",{className:"detail-kv-key",children:i}),(0,Tt.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,Tt.jsxs)("div",{className:"detail-kv-row",children:[(0,Tt.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,Tt.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,Tt.jsx)(ne,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}function Uh(e){return null}var xo=ie(pe(),1);function Gh({blueprint:e}){return(0,xo.jsxs)("div",{children:[(0,xo.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,xo.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,xo.jsxs)("div",{className:"detail-step-item",children:[(0,xo.jsx)("span",{className:"detail-step-index",children:n+1}),(0,xo.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,xo.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}function Ph(e){return null}var un=ie(pe(),1);function Ih({blueprint:e}){return(0,un.jsxs)(un.Fragment,{children:[(0,un.jsxs)("div",{children:[(0,un.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,un.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,un.jsxs)("div",{className:"detail-step-item",children:[(0,un.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,un.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,un.jsx)(ne,{label:"Add Each Output",value:e.add_each_output}),(0,un.jsx)(ne,{label:"Combined Output",value:e.combined_output})]})}function Vh(e){return null}var _o=ie(pe(),1);function Yh({blueprint:e,executionData:t}){let n=t?.item_count;return(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(ne,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,_o.jsx)(ne,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,_o.jsx)(ne,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,_o.jsx)(ne,{label:"Items Processed",value:n})]})}function Xh(e){return null}var F=ie(pe(),1),hR={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},gR=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),yR={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4"};function ME({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type??"PipeFunc",i=gR.has(o),a=hR[o]??o,l=e.status??"scheduled",r=yR[l]??"#6272a4",u=DE.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let f=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,m=oE(t,f);if(m)return m;for(let[g,b]of Object.entries(t.pipe_registry))if(g.endsWith(`.${e.pipe_code}`))return b},[e.pipe_code,t]),s=e.io?.inputs??[],c=e.io?.outputs??[],d=u?.description??e.description;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)("div",{className:"detail-sticky-header",children:[(0,F.jsxs)("div",{className:"detail-header",children:[(0,F.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:a}),(0,F.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code??"unknown"})]}),(0,F.jsxs)("div",{className:"detail-status",children:[(0,F.jsx)("span",{className:"detail-status-dot",style:{background:r}}),(0,F.jsx)("span",{className:"detail-status-label",style:{color:r},children:l}),e.timing?.duration!=null&&(0,F.jsx)("span",{className:"detail-duration",children:Nh(e.timing.duration)})]}),d&&(0,F.jsx)("div",{className:"detail-description",children:d}),s.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,F.jsx)("div",{className:"detail-io-list",children:s.map((f,m)=>(0,F.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,F.jsx)("span",{className:"detail-io-name",children:f.name??"unnamed"}),f.concept&&(0,F.jsx)("span",{className:"detail-io-concept",children:f.concept})]},m))})]}),c.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,F.jsx)("div",{className:"detail-io-list",children:c.map((f,m)=>(0,F.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,F.jsx)("span",{className:"detail-io-name",children:f.name??"unnamed"}),f.concept&&(0,F.jsx)("span",{className:"detail-io-concept",children:f.concept})]},m))})]}),(s.length>0||c.length>0)&&(0,F.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}})]}),u&&(0,F.jsx)(vR,{blueprint:u,executionData:e.execution_data}),e.execution_data&&Object.keys(e.execution_data).length>0&&(0,F.jsx)(bR,{executionData:e.execution_data,pipeType:o}),e.error&&(0,F.jsxs)("div",{className:"detail-error",children:[(0,F.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,F.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,F.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),e.metrics&&Object.keys(e.metrics).length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([f,m])=>(0,F.jsx)(ne,{label:f,value:typeof m=="number"?m.toLocaleString():String(m)},f))]}),e.tags&&Object.keys(e.tags).length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,F.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([f,m])=>(0,F.jsxs)("span",{className:"detail-tag",children:[(0,F.jsxs)("span",{className:"detail-tag-key",children:[f,": "]}),(0,F.jsx)("span",{className:"detail-tag-value",children:m})]},f))})]}),!u&&(0,F.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function vR({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,F.jsx)(wh,{blueprint:e,executionData:t});case"PipeImgGen":return(0,F.jsx)(Dh,{blueprint:e,executionData:t});case"PipeCompose":return(0,F.jsx)(Bh,{blueprint:e,executionData:t});case"PipeExtract":return(0,F.jsx)(Oh,{blueprint:e,executionData:t});case"PipeSearch":return(0,F.jsx)(zh,{blueprint:e,executionData:t});case"PipeSequence":return(0,F.jsx)(Gh,{blueprint:e,executionData:t});case"PipeParallel":return(0,F.jsx)(Ih,{blueprint:e,executionData:t});case"PipeCondition":return(0,F.jsx)(kh,{blueprint:e,executionData:t});case"PipeBatch":return(0,F.jsx)(Yh,{blueprint:e,executionData:t});case"PipeFunc":return null}}function bR({executionData:e,pipeType:t}){switch(t){case"PipeLLM":return(0,F.jsx)(Ah,{data:e});case"PipeImgGen":return(0,F.jsx)(Mh,{data:e});case"PipeExtract":return(0,F.jsx)(Rh,{data:e});case"PipeSearch":return(0,F.jsx)(Lh,{data:e});case"PipeCompose":return(0,F.jsx)(Hh,{data:e});case"PipeCondition":return(0,F.jsx)(Uh,{data:e});case"PipeSequence":return(0,F.jsx)(Ph,{data:e});case"PipeParallel":return(0,F.jsx)(Vh,{data:e});case"PipeBatch":return(0,F.jsx)(Xh,{data:e});default:return(0,F.jsx)(SR,{data:e})}}function SR({data:e}){let t=Object.entries(e);return t.length===0?null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,F.jsx)(ne,{label:n,value:String(o)},n))]})}var xe=ie(pe(),1);function qh({concept:e,ioData:t,isDryRun:n}){return(0,xe.jsxs)(xe.Fragment,{children:[(0,xe.jsxs)("div",{className:"detail-header",children:[(0,xe.jsx)("span",{className:"detail-concept-code",children:e.code}),(0,xe.jsx)("span",{className:"detail-concept-domain",children:e.domain_code})]}),e.description&&(0,xe.jsx)("div",{className:"detail-description",children:e.description}),e.refines&&(0,xe.jsxs)("div",{className:"detail-refines",children:["refines ",(0,xe.jsx)("span",{className:"detail-refines-code",children:e.refines})]}),e.json_schema?(0,xe.jsxs)("div",{children:[(0,xe.jsx)("div",{className:"detail-section-label",children:"Structure"}),(0,xe.jsx)(xR,{schema:e.json_schema,isDryRun:n})]}):(0,xe.jsx)("div",{className:"detail-not-available",children:"Schema not available"}),t&&!n&&(0,xe.jsxs)("div",{children:[(0,xe.jsx)("div",{className:"detail-section-label",children:"Data"}),(0,xe.jsx)(gf,{stuff:ER(t)})]})]})}function xR({schema:e,isDryRun:t}){let n=e.properties,o=new Set(e.required??[]);if(!n||Object.keys(n).length===0)return(0,xe.jsx)("div",{className:"detail-not-available",children:"No fields defined"});let i=Object.entries(n),a=t?i.filter(([l])=>o.has(l)):i;return(0,xe.jsxs)("table",{className:"detail-schema-table",children:[(0,xe.jsx)("thead",{children:(0,xe.jsxs)("tr",{children:[(0,xe.jsx)("th",{children:"Field"}),(0,xe.jsx)("th",{children:"Type"}),(0,xe.jsx)("th",{}),(0,xe.jsx)("th",{children:"Description"})]})}),(0,xe.jsx)("tbody",{children:a.map(([l,r])=>(0,xe.jsxs)("tr",{children:[(0,xe.jsx)("td",{className:"detail-schema-field",children:l}),(0,xe.jsx)("td",{className:"detail-schema-type",children:_R(r)}),(0,xe.jsx)("td",{children:o.has(l)&&(0,xe.jsx)("span",{className:"detail-schema-required",children:"req"})}),(0,xe.jsx)("td",{children:r.description??""})]},l))})]})}function _R(e){return e.type?String(e.type):e.anyOf?"union":e.allOf?"all":e.$ref?String(e.$ref).split("/").pop()??"ref":"unknown"}function ER(e){return"digest"in e?e:{digest:e.digest??"",name:e.name,concept:e.concept,contentType:e.content_type,data:e.data,dataText:e.data_text,dataHtml:e.data_html}}function du(e){return e.map(t=>({id:t.id,type:t.type,data:t.data,position:t.position,style:t.style,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,parentId:t.parentId,extent:t.extent,selected:t.selected}))}function pu(e){return e.map(t=>({id:t.id,source:t.source,target:t.target,type:t.type,animated:t.animated,label:t.label,labelStyle:t.labelStyle,labelBgStyle:t.labelBgStyle,labelBgPadding:t.labelBgPadding,labelBgBorderRadius:t.labelBgBorderRadius,style:t.style,markerEnd:t.markerEnd}))}function TR(e,t){let n=t||"this step";return`${{PipeLLM:"Analyze and generate output using",PipeExtract:"Extract content from",PipeCompose:"Compose output using",PipeImgGen:"Generate image for",PipeSearch:"Search the web for",PipeFunc:"Process data in"}[e||""]||"Execute"} ${n.replace(/_/g," ")}`}var NR=7,CR=48,wR=140;function AR(e,t,n){let o=[],i=[],a=new Set;for(let u of Object.values(t.stuffProducers))a.add(u);for(let u of Object.values(t.stuffConsumers))for(let s of u)a.add(s);for(let u of e.nodes){if(!a.has(u.id))continue;let s=u.status==="failed",c=u.pipe_code||u.id.split(":").pop()||u.id,d=(u.io?.inputs??[]).map(g=>({name:g.name??"",concept:g.concept??""})),f=(u.io?.outputs??[]).map(g=>({name:g.name??"",concept:g.concept??""})),m=u.pipe_type||"PipeFunc";o.push({id:u.id,type:af,data:{labelDescriptor:{kind:"pipe",label:c,isFailed:s},nodeData:u,isPipe:!0,isStuff:!1,labelText:c,pipeCode:u.pipe_code||c,pipeType:u.pipe_type,pipeCardData:{pipeCode:u.pipe_code||c,pipeType:m,description:u.description||TR(u.pipe_type,u.pipe_code),status:u.status||"scheduled",inputs:d,outputs:f}},position:{x:0,y:0}})}for(let[u,s]of Object.entries(t.stuffRegistry)){let c=di(u),d=s.name||"data",f=s.concept||"",m=Math.max(d.length,f.length)*NR+CR,g=Math.max(wR,m),b=!t.stuffProducers[u],S=!b&&!t.stuffConsumers[u]?.length,h=b?"input":S?"output":void 0,y=b?"var(--color-stuff-input-border, #50FA7B)":S?"var(--color-stuff-output-border, #a78bfa)":"var(--color-stuff-border)";o.push({id:c,type:J_,data:{labelDescriptor:{kind:"stuff",label:d,concept:f},isStuff:!0,isPipe:!1,labelText:d,stuffRole:h,stuffDigest:u},position:{x:0,y:0},style:{background:"var(--color-stuff-bg)",border:`2px solid ${y}`,borderRadius:"999px",padding:"0",width:g+"px",boxShadow:"var(--shadow-md)"}})}let l=0;for(let[u,s]of Object.entries(t.stuffProducers)){let c=di(u);i.push({id:"edge_"+l++,source:s,target:c,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:lu,color:"var(--color-edge)"}})}for(let[u,s]of Object.entries(t.stuffConsumers)){let c=di(u);for(let d of s)i.push({id:"edge_"+l++,source:c,target:d,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:lu,color:"var(--color-edge)"}})}for(let u of e.edges){if(u.kind!=="parallel_combine"||!u.source_stuff_digest||!u.target_stuff_digest||!t.stuffRegistry[u.source_stuff_digest]||!t.stuffRegistry[u.target_stuff_digest])continue;let s=di(u.source_stuff_digest),c=di(u.target_stuff_digest);i.push({id:u.id||"edge_"+l++,source:s,target:c,type:"smoothstep",animated:!1,style:{stroke:"var(--color-parallel-combine)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:lu,color:"var(--color-parallel-combine)"}})}for(let u of e.edges){if(u.kind!=="batch_item"&&u.kind!=="batch_aggregate"||!u.source_stuff_digest||!u.target_stuff_digest||!t.stuffRegistry[u.source_stuff_digest]||!t.stuffRegistry[u.target_stuff_digest])continue;let s=di(u.source_stuff_digest),c=di(u.target_stuff_digest),d=u.kind==="batch_item";i.push({id:u.id||"edge_"+l++,source:s,target:c,type:n,animated:!1,_batchEdge:!0,label:u.label||"",labelStyle:{fontSize:"10px",fontFamily:"var(--font-mono)",fill:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"},labelBgStyle:{fill:"var(--color-bg)",fillOpacity:.9},style:{stroke:d?"var(--color-batch-item)":"var(--color-batch-aggregate)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:lu,color:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let r=Wi(e,t);for(let u of i){let s=r[u.source]||null,c=r[u.target]||null;s&&c&&s!==c&&(u._crossGroup=!0,u.style={...u.style,strokeWidth:1.5,opacity:.65})}for(let u of i)u._batchEdge&&(u.style={...u.style,opacity:.7});return{nodes:o,edges:i}}function OE(e,t){if(e){let n=nE(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:AR(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}var DR=window.ELK,RE=DR;function MR(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var OR="_in",RR="_out";function jh(e){return e+OR}function Qh(e){return e+RR}function zR(e,t,n){let o={LR:{inSide:"WEST",outSide:"EAST"},RL:{inSide:"EAST",outSide:"WEST"},TB:{inSide:"NORTH",outSide:"SOUTH"},BT:{inSide:"SOUTH",outSide:"NORTH"}},{inSide:i,outSide:a}=o[n],l=n==="LR"||n==="RL",r=l?n==="LR"?0:t.width:t.width/2,u=l?t.height/2:n==="TB"?0:t.height,s=l?n==="LR"?t.width:0:t.width/2,c=l?t.height/2:n==="TB"?t.height:0;return[{id:jh(e),x:r,y:u,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:Qh(e),x:s,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}var LR=320,HE=28,BR=24,Zh=8,HR=22,kR=16,UR=3,zE=38,LE=30,vf=22,GR=140,PR=100,IR=17,VR=58,YR=5.5,XR=5,qR=4.5,ZR=4;function jR(e,t,n){if(!e)return 0;if(!t)return 1;let o=n-HE,i=Math.max(1,Math.floor(o/YR)),a=Math.ceil(e.length/i);return Math.min(UR,Math.max(1,a))}function QR(e,t){let n=Math.min(GR,Math.ceil(e.length*XR)),o=Math.min(PR,Math.ceil(t.length*qR));return n+o+IR}function BE(e,t){if(e.length===0)return 0;let n=t-HE-VR,o=1,i=0;for(let a of e){let l=QR(a.name,a.concept);if(i===0){i=l;continue}i+l<=n?i+=l:(o+=1,i=l)}return o}function Sl(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===af,l=t?180:280,r=t?240:400,u=Math.max(180,Math.min(r,i.length*8+60)),s;o?s=Math.max(180,u):a&&n.pipeCardData?s=r:s=Math.max(a?l:200,u);let c;if(o)c=60;else if(a&&n.pipeCardData){let d=n.pipeCardData,f=d.inputs??[],m=d.outputs??[],g=d.description||n.nodeData?.description||"",b=BR+HR,S=jR(g,t,s);S>0&&(b+=Zh+S*kR);let h=f.slice(0,ZR);if(h.length>0)if(b+=Zh,t)b+=zE+(h.length-1)*vf;else{let y=BE(h,s);b+=LE+(y-1)*vf}if(m.length>0)if(b+=Zh,t)b+=zE+(m.length-1)*vf;else{let y=BE(m,s);b+=LE+(y-1)*vf}c=Math.min(LR,b)}else c=a?120:70;return{width:s,height:c}}function KR(e,t){let n={},o=new Set;function i(a){if(n[a]!==void 0)return n[a];if(o.has(a))return 0;o.add(a);let l=t[a]||[],r=-1;for(let u of l)e.has(u)&&(r=Math.max(r,i(u)));return o.delete(a),n[a]=r+1,n[a]}for(let a of e)i(a);return n}function bf(e,t,n){return{id:e,width:t.width,height:t.height,ports:zR(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function kE(e,t,n,o,i,a){let l=i==="LR"||i==="RL",r=a?.nodesep??80,u=a?.ranksep??70,s=MR(i),c="30",d={"elk.algorithm":"layered","elk.direction":s,"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(u),"elk.spacing.edgeNode":c,"elk.spacing.edgeEdge":"20","elk.layered.spacing.edgeNodeBetweenLayers":c,"elk.layered.spacing.edgeEdgeBetweenLayers":"15","elk.layered.nodePlacement.favorStraightEdges":"true"};if(!n||!o||o.controllerNodeIds.size===0){let x={},T=e.map(N=>{let w=Sl(N,l);return x[N.id]=w,bf(N.id,w,i)}),E=t.map(N=>({id:N.id,sources:[Qh(N.source)],targets:[jh(N.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:T,edges:E},dimensionMap:x}}let f=Wi(n,o),m=KR(o.controllerNodeIds,o.containmentTree),g={},b=new Map;for(let x of e)b.set(x.id,x);let S={},h=Array.from(o.controllerNodeIds);h.sort((x,T)=>(m[x]??0)-(m[T]??0));for(let x of h){let E=1+(m[x]??0)*.15,N=Math.round(uf*E),w=Math.round(sf*E),k=Math.round(cf*E),A={"elk.padding":`[top=${w},left=${N},bottom=${k},right=${N}]`,"elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(u),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},z=[],P=o.containmentTree[x]||[];for(let _ of P)if(o.controllerNodeIds.has(_)){let M=S[_];M&&z.push(M)}else{let M=b.get(_);if(M){let D=Sl(M,l);g[_]=D,z.push(bf(_,D,i))}}for(let _ of e)if(_.data.isStuff&&f[_.id]===x&&!z.some(M=>M.id===_.id)){let M=Sl(_,l);g[_.id]=M,z.push(bf(_.id,M,i))}S[x]={id:x,layoutOptions:A,children:z}}let y=[];for(let x of h)if(!f[x]){let T=S[x];T&&y.push(T)}for(let x of e)if(!f[x.id]&&!o.controllerNodeIds.has(x.id)){let T=Sl(x,l);g[x.id]=T,y.push(bf(x.id,T,i))}let p=new Set(e.map(x=>x.id)),v=t.filter(x=>p.has(x.source)&&p.has(x.target)).map(x=>({id:x.id,sources:[Qh(x.source)],targets:[jh(x.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:y,edges:v},dimensionMap:g}}function UE(e){let t={};function n(o,i,a){let l=i+(o.x??0),r=a+(o.y??0);o.id!=="root"&&(t[o.id]={x:l,y:r,width:o.width??0,height:o.height??0});for(let u of o.children??[])n(u,l,r)}return n(e,0,0),t}var Kh=null;function $R(){return Kh||(Kh=new RE),Kh}async function $h(e,t,n,o,i,a){if(e.length===0)return{nodes:[],edges:t,controllerPositions:{}};let l=n==="LR"||n==="RL",{elkGraph:r,dimensionMap:u}=kE(e,t,i??null,a??null,n,o),s=await $R().layout(r),c=UE(s),d={};if(a)for(let m of a.controllerNodeIds)c[m]&&(d[m]=c[m]);return{nodes:e.map(m=>{let g=c[m.id],b=u[m.id]??Sl(m,l),S=b.width,h=b.height,y=m.data.pipeCardData,v=y?{...y,direction:l?"LR":"TB"}:void 0;return{...m,data:{...m.data,_estimatedWidth:S,_estimatedHeight:h,pipeCardData:v},style:{...m.style,width:S+"px",height:h+"px"},position:{x:g?g.x:0,y:g?g.y:0},sourcePosition:l?n==="LR"?"right":"left":n==="TB"?"bottom":"top",targetPosition:l?n==="LR"?"left":"right":n==="TB"?"top":"bottom"}}),edges:t,controllerPositions:d}}var mu=5;function FR(e,t,n){let o=new Set,i=[e];for(;i.length>0;){let a=i.pop();for(let l of t[a]||[])o.add(l),n.has(l)&&i.push(l)}return o}function JR(e,t,n,o){let i={};for(let g of n)i[g.id]=g;let a={};for(let g of e.nodes)t.controllerNodeIds.has(g.id)&&(a[g.id]=g);let l={},r=new Set;function u(g){if(l[g]!==void 0)return l[g];if(r.has(g))throw new Error(`Cycle detected in containment tree: controller "${g}" is part of a containment cycle`);r.add(g);let b=t.containmentTree[g]||[],S=-1;for(let h of b)t.controllerNodeIds.has(h)&&(S=Math.max(S,u(h)));return r.delete(g),l[g]=S+1,l[g]}let s=Wi(e,t),c={};for(let[g,b]of Object.entries(s))lf(g)&&i[g]&&(c[b]||(c[b]=[]),c[b].push(g));let d=Array.from(t.controllerNodeIds);for(let g of d)u(g);d.sort((g,b)=>l[g]-l[b]);let f=[],m={};for(let g of d){let S=(t.containmentTree[g]||[]).filter(A=>i[A]),h=c[g]||[],y=[...S,...h];if(y.length===0)continue;let p,v,x,T,E=o?.[g];if(E)p=E.x,v=E.y,x=E.width,T=E.height;else{let A=1/0,z=1/0,P=-1/0,_=-1/0;for(let V of y){let U=i[V],I=U.position,Z=eE(U),K=tE(U);A=Math.min(A,I.x),z=Math.min(z,I.y),P=Math.max(P,I.x+Z),_=Math.max(_,I.y+K)}let D=1+(l[g]??0)*.15,R=Math.round(uf*D),O=Math.round(sf*D),L=Math.round(cf*D);p=A-R,v=z-O,x=P-A+2*R,T=_-z+O+L}let N=a[g]||{},w=N.pipe_code||g.split(":").pop()||g,k={id:g,type:W_,data:{label:w,pipeType:N.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:w,labelText:w},position:{x:p,y:v},style:{width:x+"px",height:T+"px",padding:"0"}};f.push(k),i[g]=k;for(let A of y)m[A]=g}for(let[g,b]of Object.entries(m)){let S=i[g],h=i[b];!S||!h||(S.position={x:S.position.x-h.position.x,y:S.position.y-h.position.y},S.parentId=b,S.extent="parent")}return f}function hu(e,t,n,o,i,a,l,r){if(!i||!o||!n)return{nodes:e,edges:t};let u={},s=new Set,c={};for(let p of n.nodes)o.controllerNodeIds.has(p.id)&&(c[p.id]=p.pipe_type||"");for(let p of o.controllerNodeIds){let v=o.containmentTree[p]||[];u[p]=v.length;let x=c[p]||"";(x==="PipeParallel"||x==="PipeBatch")&&v.length>mu&&!a?.has(p)&&s.add(p)}let d=e,f=t;if(s.size>0){let p=new Set;for(let x of s){let E=(o.containmentTree[x]||[]).slice(mu);for(let N of E)if(p.add(N),o.controllerNodeIds.has(N))for(let w of FR(N,o.containmentTree,o.controllerNodeIds))p.add(w)}let v=Wi(n,o);for(let x of e){if(!lf(x.id)||p.has(x.id))continue;let T=v[x.id];if(!T||!s.has(T)&&!p.has(T))continue;let E=t.filter(N=>{if(N.source!==x.id&&N.target!==x.id)return!1;let w=N.source===x.id?N.target:N.source;return!lf(w)});(E.length===0||E.every(N=>{let w=N.source===x.id?N.target:N.source;return p.has(w)}))&&p.add(x.id)}d=e.filter(x=>!p.has(x.id)),f=t.filter(x=>!p.has(x.source)&&!p.has(x.target))}let m=JR(n,o,d,r);if(m.length===0)return{nodes:d,edges:f};for(let p of m){let v=u[p.id]??0,x=s.has(p.id);if(p.data.childCount=v,p.data.isCollapsed=x,l){let T=p.id;p.data.onToggleCollapse=()=>l(T)}}let g=[...m,...d],b={};for(let p of g)b[p.id]=p;let S={},h=new Set;function y(p){if(S[p]!==void 0)return S[p];if(h.has(p))throw new Error(`Cycle detected in node parent chain: node "${p}" references itself as an ancestor`);h.add(p);let v=b[p];return S[p]=v&&v.parentId?1+y(v.parentId):0,h.delete(p),S[p]}for(let p of g)y(p.id);return g.sort((p,v)=>S[p.id]-S[v.id]),{nodes:g,edges:f}}var gu={direction:"LR",showControllers:!1,nodesep:50,ranksep:100,edgeType:rf.DEFAULT,initialZoom:null,panToTop:!0,paletteColors:{"--color-pipe":"#ff6b6b","--color-pipe-bg":"rgba(224,108,117,0.18)","--color-pipe-text":"#ffffff","--color-stuff":"#4ECDC4","--color-stuff-bg":"rgba(78,205,196,0.12)","--color-stuff-border":"#9ddcfd","--color-stuff-text":"#98FB98","--color-stuff-text-dim":"#9ddcfd","--color-edge":"#FFFACD","--color-batch-item":"#bd93f9","--color-batch-aggregate":"#50fa7b","--color-parallel-combine":"#d6a4ff","--color-success":"#50FA7B","--color-success-bg":"rgba(80,250,123,0.15)","--color-error":"#FF5555","--color-error-bg":"rgba(255,85,85,0.15)","--color-accent":"#8BE9FD","--color-warning":"#FFB86C","--color-bg":"#0a0a0a","--color-bg-dots":"rgba(255, 255, 255, 0.35)","--color-text-muted":"#94a3b8","--color-controller-text":"#94a3b8","--font-sans":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"--font-mono":'"JetBrains Mono", "Monaco", "Menlo", monospace',"--shadow-lg":"0 8px 24px rgba(0, 0, 0, 0.5)"}};var ta=ie(pe(),1);function WR(e){return e.kind==="pipe"?(0,ta.jsx)("div",{style:{padding:"10px 14px",display:"flex",flexDirection:"column",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.label,children:(0,ta.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"13px",fontWeight:600,color:"var(--color-pipe-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label})}):(0,ta.jsxs)("div",{style:{padding:"8px 24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.concept?`${e.label}: ${e.concept}`:e.label,children:[(0,ta.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"12px",fontWeight:600,color:"var(--color-stuff-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),e.concept&&(0,ta.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.concept})]})}function yu(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:WR(t.data.labelDescriptor)}}:t)}var pi=ie(pe(),1),ez={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function tz(e){return e?ez[e]:{badge:"",icon:""}}function nz(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function oz({data:e}){let t=tz(e.pipeType),n=nz(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>mu,i=o?(e.childCount??0)-mu:0;return(0,pi.jsxs)("div",{className:`controller-group-node ${n}`,children:[(0,pi.jsxs)("div",{className:"controller-group-header",children:[(0,pi.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,pi.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,pi.jsx)("span",{className:"controller-group-label",children:e.label})]}),o&&(0,pi.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var GE={controllerGroup:oz};var IE=ie(Nt(),1),Qe=ie(pe(),1),iz={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func"},PE={succeeded:{color:"#50FA7B",label:"Succeeded"},failed:{color:"#FF5555",label:"Failed"},running:{color:"#8BE9FD",label:"Running"},scheduled:{color:"#6272a4",label:"Scheduled"},skipped:{color:"#6272a4",label:"Skipped"}},Fh=4;function az(e){return iz[e]}function Eo({data:e,children:t}){let n=az(e.pipeType),o=PE[e.status]??PE.scheduled,i=e.status==="running",[a,l]=(0,IE.useState)(!1),r=e.inputs.length>Fh,u=r&&!a?e.inputs.slice(0,Fh):e.inputs,s=e.inputs.length-Fh,c=e.direction==="TB"?"pipe-card--tb":"pipe-card--lr";return(0,Qe.jsxs)("div",{className:`pipe-card ${c}`,children:[(0,Qe.jsxs)("div",{className:"pipe-card-header",children:[(0,Qe.jsx)("span",{className:"pipe-card-badge",children:n}),(0,Qe.jsx)("span",{className:"pipe-card-code",title:e.pipeCode,children:e.pipeCode}),(0,Qe.jsx)("span",{className:"pipe-card-status",style:{color:o.color},title:o.label,children:(0,Qe.jsx)("span",{className:`pipe-card-status-dot ${i?"pipe-card-status-dot--pulse":""}`,style:{background:o.color}})})]}),e.description&&(0,Qe.jsx)("span",{className:"pipe-card-description",title:e.description,children:e.description}),e.inputs.length>0&&(0,Qe.jsxs)("div",{className:"pipe-card-io",children:[(0,Qe.jsx)("span",{className:"pipe-card-io-label",children:"INPUTS"}),(0,Qe.jsxs)("div",{className:"pipe-card-io-pills",children:[u.map(d=>(0,Qe.jsxs)("span",{className:"pipe-card-io-pill",title:`${d.name}: ${d.concept}`,children:[(0,Qe.jsx)("span",{className:"pipe-card-io-pill-name",children:d.name}),(0,Qe.jsx)("span",{className:"pipe-card-io-pill-concept",children:d.concept})]},d.name)),r&&(0,Qe.jsx)("button",{className:"pipe-card-io-more",onClick:d=>{d.stopPropagation(),l(f=>!f)},children:a?"show less":`+${s} more`})]})]}),e.outputs.length>0&&(0,Qe.jsxs)("div",{className:"pipe-card-io",children:[(0,Qe.jsx)("span",{className:"pipe-card-io-label",children:"OUTPUT"}),(0,Qe.jsx)("div",{className:"pipe-card-io-pills",children:e.outputs.map(d=>(0,Qe.jsxs)("span",{className:"pipe-card-io-pill",title:`${d.name}: ${d.concept}`,children:[(0,Qe.jsx)("span",{className:"pipe-card-io-pill-name",children:d.name}),(0,Qe.jsx)("span",{className:"pipe-card-io-pill-concept",children:d.concept})]},d.name))})]}),t]})}var lz={PipeLLM:Eo,PipeExtract:Eo,PipeCompose:Eo,PipeImgGen:Eo,PipeSearch:Eo,PipeFunc:Eo};function VE(e){return lz[e]}var To=ie(pe(),1);function rz({data:e}){let t=VE(e.pipeType)??Eo;return(0,To.jsx)(t,{data:e})}function YE({data:e,sourcePosition:t=ee.Bottom,targetPosition:n=ee.Top}){let o=e.pipeCardData;return o?(0,To.jsxs)(To.Fragment,{children:[(0,To.jsx)(Ji,{type:"target",position:n}),(0,To.jsx)(rz,{data:o}),(0,To.jsx)(Ji,{type:"source",position:t})]}):null}var jt=ie(pe(),1),uz={...GE,pipeCard:YE};function sz({stuffData:e,graphspec:t}){let n=e.concept&&t?mh(t,e.concept):void 0;return(0,jt.jsx)(jt.Fragment,{children:n?(0,jt.jsx)(qh,{concept:n,ioData:e}):(0,jt.jsx)(gf,{stuff:e})})}function Sf(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function xf(e,t){return!t||Object.keys(t).length===0?e:e.map(n=>{let o=n.data.pipeCode;if(!o||!Object.hasOwn(t,o))return n;let i=t[o];return n.data.pipeCardData?.status===i?n:{...n,data:{...n.data,nodeData:n.data.nodeData?{...n.data.nodeData,status:i}:n.data.nodeData,pipeCardData:n.data.pipeCardData?{...n.data.pipeCardData,status:i}:n.data.pipeCardData}}})}function XE(e){let{graphspec:t,config:n=gu,direction:o=n.direction??gu.direction??"TB",showControllers:i=n.showControllers??gu.showControllers??!1,onNavigateToPipe:a,onStuffNodeClick:l,onReactFlowInit:r,statusMap:u,onNodeSelect:s,onPaneClick:c,renderDetailExtra:d}=e,f=De.default.useRef(null),[m,g]=De.default.useState(null),[b,S]=De.default.useState(null),{width:h,isDragging:y,handleMouseDown:p}=CE({defaultWidth:380,minWidth:280,maxWidth:800,containerRef:f});De.default.useEffect(()=>{g(null),S(null)},[t]),De.default.useEffect(()=>{let j=f.current;if(!j)return;let q=n.paletteColors??gu.paletteColors;if(q){for(let[$,ae]of Object.entries(q))j.style.setProperty($,ae);return()=>{for(let $ of Object.keys(q))j.style.removeProperty($)}}},[n.paletteColors]);let[v,x,T]=Z_([]),[E,N,w]=j_([]),k=De.default.useRef(null),A=De.default.useRef(null),z=De.default.useRef(null),[P,_]=De.default.useState(new Set),M=De.default.useCallback(j=>{_(q=>{let $=new Set(q);return $.has(j)?$.delete(j):$.add(j),$})},[]),D=n.edgeType||rf.DEFAULT,R=De.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),O=De.default.useRef(i);O.current=i;let L=De.default.useRef(o);L.current=o;let V=De.default.useRef(R);V.current=R;let U=De.default.useRef(n.initialZoom);U.current=n.initialZoom;let I=De.default.useRef(n.panToTop);I.current=n.panToTop;let Z=De.default.useRef(P);Z.current=P;let K=De.default.useRef(M);K.current=M;let Q=De.default.useRef(u);Q.current=u,De.default.useEffect(()=>{if(!A.current)return;let j=!1;return(async()=>{try{let q=A.current;if(!q)return;let $=await $h(q.nodes,q.edges,o,R,q._graphspec,q._analysis);if(j)return;z.current={nodes:$.nodes,edges:$.edges,controllerPositions:$.controllerPositions};let ae=hu(Sf($.nodes),$.edges,q._graphspec,q._analysis,O.current,Z.current,K.current,$.controllerPositions);x(xf(du(yu(ae.nodes)),Q.current)),N(pu(ae.edges)),setTimeout(()=>{!j&&k.current&&k.current.fitView({padding:.1})},50)}catch(q){console.error("[GraphViewer] ELK layout failed:",q)}})(),()=>{j=!0}},[o,R]),De.default.useEffect(()=>{if(!z.current||!A.current)return;let j=Sf(z.current.nodes),q=z.current.edges,$=hu(j,q,A.current._graphspec,A.current._analysis,i,P,M,z.current.controllerPositions);x(xf(du(yu($.nodes)),Q.current)),N(pu($.edges))},[i,P,M]),De.default.useEffect(()=>{if(!t){A.current=null,z.current=null,x([]),N([]);return}let j=!1;_(new Set);let{graphData:q,analysis:$}=OE(t,D);return A.current={nodes:q.nodes,edges:q.edges,_analysis:$,_graphspec:t},(async()=>{try{let ae=L.current,me=V.current,Ve=q.nodes.some(ot=>!ot.position||ot.position.x===0&&ot.position.y===0)?await $h(q.nodes,q.edges,ae,me,t,$):{...q,controllerPositions:{}};if(j)return;z.current={nodes:Ve.nodes,edges:Ve.edges,controllerPositions:Ve.controllerPositions};let pt=hu(Sf(Ve.nodes),Ve.edges,t,$,O.current,Z.current,K.current,Ve.controllerPositions);x(xf(du(yu(pt.nodes)),Q.current)),N(pu(pt.edges)),setTimeout(()=>{if(!j&&k.current&&(k.current.fitView({padding:.1}),U.current!==void 0&&U.current!==null&&k.current.zoomTo(U.current),I.current)){let ot=k.current.getViewport();k.current.setViewport({x:ot.x,y:20,zoom:ot.zoom})}},100)}catch(ae){console.error("[GraphViewer] ELK layout failed:",ae)}})(),()=>{j=!0}},[t,D]),De.default.useEffect(()=>{if(!z.current||!A.current)return;let j=Sf(z.current.nodes),q=z.current.edges,$=hu(j,q,A.current._graphspec,A.current._analysis,O.current,Z.current,K.current,z.current.controllerPositions);x(xf(du(yu($.nodes)),u)),N(pu($.edges))},[u]);let re=De.default.useCallback((j,q)=>{let $=q.data;if(s?.(q.id,$,j),$.isController||$.isPipe){let ae=$.pipeCode||$.labelText;ae&&a&&a(ae,$.pipeCardData?.status)}else if($.isStuff&&l&&t){let ae=ph(q.id),me=hh(t,ae);me&&l(me)}if(S(null),m?.nodeId===q.id&&!b)g(null);else if($.isPipe||$.isController)g({kind:"pipe",nodeId:q.id,nodeData:$});else if($.isStuff&&t){let ae=ph(q.id),me=hh(t,ae);g({kind:"stuff",nodeId:q.id,nodeData:$,stuffData:me??void 0})}x(ae=>ae.map(me=>({...me,selected:me.id===q.id})))},[x,a,s,l,t,m,b]),te=De.default.useCallback(j=>{k.current=j,r&&r(j)},[r]),X=De.default.useCallback(()=>{g(null),S(null),c?.()},[c]),W=De.default.useCallback(j=>{if(!t)return;let q=mh(t,j);q&&S(q)},[t]),se=m?.kind==="pipe"&&t?t.nodes.find(j=>j.pipe_code===m.nodeData.pipeCode):void 0,ce=m!==null||b!==null;return(0,jt.jsxs)("div",{ref:f,className:"react-flow-container",children:[(0,jt.jsx)(q_,{nodes:v,edges:E,nodeTypes:uz,onNodesChange:T,onEdgesChange:w,onNodeClick:re,onPaneClick:X,onInit:te,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:D},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},children:(0,jt.jsx)(K_,{variant:qn.Dots,gap:20,size:1,color:"var(--color-bg-dots)"})}),(0,jt.jsxs)(NE,{isOpen:ce,onClose:X,width:h,isDragging:y,onResizeHandleMouseDown:p,children:[b?(0,jt.jsx)(qh,{concept:b}):se&&t?(0,jt.jsx)(ME,{node:se,spec:t,onConceptClick:W}):m?.stuffData?(0,jt.jsx)(sz,{stuffData:m.stuffData,graphspec:t}):null,d&&m&&!b&&d(m.nodeId,m.nodeData)]})]})}var KE=null,$E={},na="LR",vu=!1,_f=null,mi=null;function qE(e){let t=document.getElementById(e);if(!t?.textContent)return null;try{return JSON.parse(t.textContent)}catch{return null}}function ZE(e){document.querySelectorAll(".direction-icon").forEach(n=>n.classList.remove("active"));let t=document.querySelector(e==="LR"?".tb-icon":".lr-icon");t&&t.classList.add("active")}function cz(e){_f=e}function fz(){return Jh.default.createElement(XE,{graphspec:KE,config:$E,direction:na,showControllers:vu,onReactFlowInit:cz})}function jE(){let e=document.getElementById("root");if(!e)return;let t=(0,QE.createRoot)(e);mi=()=>{t.render(Jh.default.createElement(fz))},mi(),setTimeout(()=>{let n=qE("pipelex-config")||{};if(KE=qE("pipelex-graphspec"),na=n.direction||"LR",vu=n.showControllers||!1,$E={direction:na,showControllers:vu,nodesep:n.nodesep,ranksep:n.ranksep,edgeType:n.edgeType,initialZoom:n.initialZoom,panToTop:n.panToTop,paletteColors:n.paletteColors},ZE(na),n.paletteColors)for(let[i,a]of Object.entries(n.paletteColors))document.body.style.setProperty(i,a);let o=document.getElementById("controllers-toggle");o&&(o.checked=vu),mi&&mi()},0),document.getElementById("direction-toggle")?.addEventListener("click",()=>{na=na==="LR"?"TB":"LR",ZE(na),mi&&mi()}),document.getElementById("controllers-toggle")?.addEventListener("change",n=>{vu=n.target.checked,mi&&mi()}),document.getElementById("zoom-in")?.addEventListener("click",()=>_f?.zoomIn()),document.getElementById("zoom-out")?.addEventListener("click",()=>_f?.zoomOut()),document.getElementById("zoom-fit")?.addEventListener("click",()=>_f?.fitView({padding:.1})),document.getElementById("theme-toggle")?.addEventListener("click",()=>{let n=document.body.getAttribute("data-theme")||"dark",o=n==="dark"?"light":n==="light"?"system":"dark";document.body.setAttribute("data-theme",o);let i=document.getElementById("theme-toggle")?.querySelector(".theme-label");i&&(i.textContent=o)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",jE):jE();})();-/*! Bundled license information:--react/cjs/react.production.js:- (**- * @license React- * react.production.js- *- * Copyright (c) Meta Platforms, Inc. and affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- *)--scheduler/cjs/scheduler.production.js:- (**- * @license React- * scheduler.production.js- *- * Copyright (c) Meta Platforms, Inc. and affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- *)--react-dom/cjs/react-dom.production.js:- (**- * @license React- * react-dom.production.js- *- * Copyright (c) Meta Platforms, Inc. and affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- *)--react-dom/cjs/react-dom-client.production.js:- (**- * @license React- * react-dom-client.production.js- *- * Copyright (c) Meta Platforms, Inc. and affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- *)--react/cjs/react-jsx-runtime.production.js:- (**- * @license React- * react-jsx-runtime.production.js- *- * Copyright (c) Meta Platforms, Inc. and affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- *)--use-sync-external-store/cjs/use-sync-external-store-shim.production.js:- (**- * @license React- * use-sync-external-store-shim.production.js- *- * Copyright (c) Meta Platforms, Inc. and affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- *)--use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:- (**- * @license React- * use-sync-external-store-shim/with-selector.production.js- *- * Copyright (c) Meta Platforms, Inc. and affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- *)--dompurify/dist/purify.es.mjs:- (*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE *)-*/diff --git a/pipelex/graph/reactflow/reactflow_html.py b/pipelex/graph/reactflow/reactflow_html.pyindex 1e4cad423..f30853716 100644--- a/pipelex/graph/reactflow/reactflow_html.py+++ b/pipelex/graph/reactflow/reactflow_html.py@@ -1,8 +1,8 @@"""ReactFlow HTML generator for GraphSpec rendering.-Generates standalone HTML files using the mthds-ui GraphViewer component.-The HTML template uses Jinja2 for data injection, consistent with mermaid rendering.-JS and CSS bundles are loaded from vendored assets.+Generates HTML files using the mthds-ui GraphViewer component, loaded from+jsDelivr with Subresource Integrity. The template uses Jinja2 for data+injection, consistent with mermaid rendering."""import json@@ -10,10 +10,9 @@ import jsonfrom pipelex.cogt.templating.template_category import TemplateCategoryfrom pipelex.graph.graphspec import GraphSpecfrom pipelex.graph.reactflow.reactflow_config import ReactFlowRenderingConfig-from pipelex.graph.reactflow.standalone_assets import get_standalone_css, get_standalone_js+from pipelex.graph.reactflow.standalone_assets import ELKJS, MTHDS_UI_CSS, MTHDS_UI_JSfrom pipelex.tools.jinja2.jinja2_rendering import render_jinja2_async, render_jinja2_syncfrom pipelex.tools.jinja2.jinja2_template_registry import TemplateRegistry-from pipelex.urls import URLs_REACTFLOW_TEMPLATE_KEY = "reactflow/main.html.jinja2"@@ -32,13 +31,29 @@ def _build_viewer_config(config: ReactFlowRenderingConfig) -> dict[str, object]:}+def _build_templating_context(+ graphspec: GraphSpec,+ config: ReactFlowRenderingConfig,+ title: str | None,+) -> dict[str, object]:+ return {+ "title": title or config.default_title,+ "graphspec_json": json.dumps(graphspec.model_dump(mode="json", by_alias=True), indent=2),+ "config_json": json.dumps(_build_viewer_config(config)),+ "theme": config.style.theme,+ "mthds_ui_js": MTHDS_UI_JS,+ "mthds_ui_css": MTHDS_UI_CSS,+ "elkjs": ELKJS,+ }++def generate_reactflow_html(graphspec: GraphSpec,config: ReactFlowRenderingConfig,*,title: str | None = None,) -> str:- """Generate single-file HTML with embedded GraphSpec and mthds-ui GraphViewer.+ """Generate HTML with embedded GraphSpec; viewer assets load from jsDelivr (SRI-pinned).Args:graphspec: The GraphSpec to embed and render.@@ -46,26 +61,13 @@ def generate_reactflow_html(title: Optional page title, overrides config.default_title.Returns:- Complete HTML page as a string with embedded GraphViewer.+ Complete HTML page as a string."""template_source = TemplateRegistry.get(_REACTFLOW_TEMPLATE_KEY)-- graphspec_json = json.dumps(graphspec.model_dump(mode="json", by_alias=True), indent=2)- config_json = json.dumps(_build_viewer_config(config))-return render_jinja2_sync(template_source=template_source,template_category=TemplateCategory.HTML,- templating_context={- "title": title or config.default_title,- "logo_dark": URLs.logo_white_on_transparent,- "logo_light": URLs.logo_black_on_transparent,- "graphspec_json": graphspec_json,- "config_json": config_json,- "theme": config.style.theme,- "viewer_js": get_standalone_js(),- "viewer_css": get_standalone_css(),- },+ templating_context=_build_templating_context(graphspec, config, title),)@@ -75,32 +77,10 @@ async def generate_reactflow_html_async(*,title: str | None = None,) -> str:- """Generate single-file HTML with embedded GraphSpec and mthds-ui GraphViewer (async version).-- Args:- graphspec: The GraphSpec to embed and render.- config: ReactFlow rendering configuration.- title: Optional page title, overrides config.default_title.-- Returns:- Complete HTML page as a string with embedded GraphViewer.- """+ """Async variant of `generate_reactflow_html`."""template_source = TemplateRegistry.get(_REACTFLOW_TEMPLATE_KEY)-- graphspec_json = json.dumps(graphspec.model_dump(mode="json", by_alias=True), indent=2)- config_json = json.dumps(_build_viewer_config(config))-return await render_jinja2_async(template_source=template_source,template_category=TemplateCategory.HTML,- templating_context={- "title": title or config.default_title,- "logo_dark": URLs.logo_white_on_transparent,- "logo_light": URLs.logo_black_on_transparent,- "graphspec_json": graphspec_json,- "config_json": config_json,- "theme": config.style.theme,- "viewer_js": get_standalone_js(),- "viewer_css": get_standalone_css(),- },+ templating_context=_build_templating_context(graphspec, config, title),)diff --git a/pipelex/graph/reactflow/standalone_assets.py b/pipelex/graph/reactflow/standalone_assets.pyindex b0f9dd50a..52a287706 100644--- a/pipelex/graph/reactflow/standalone_assets.py+++ b/pipelex/graph/reactflow/standalone_assets.py@@ -1,33 +1,43 @@-"""Standalone GraphViewer asset loader.+"""CDN-pinned GraphViewer asset references.-Loads the pre-built JS and CSS bundles from mthds-ui for embedding-in Jinja2 templates via the standard template rendering pipeline.+Generated HTML loads `@pipelex/mthds-ui` (the GraphViewer IIFE bundle + its+CSS) and `elkjs` from `cdn.jsdelivr.net` with Subresource Integrity (SRI)+hashes. Versions and `sha384` integrities are pinned here so the template+can read them through a single source of truth.++To bump a version, run `pipelex-dev refresh-graph-ui-sri`, which re-fetches+the URLs, recomputes the hashes, and rewrites this file."""-import importlib.resources-from functools import lru_cache+from typing import Literal++from pydantic import BaseModel, ConfigDict+++class CDNAsset(BaseModel):+ """A pinned CDN asset with its Subresource Integrity hash."""-_ASSET_PACKAGE = "pipelex.graph.reactflow.assets"+ model_config = ConfigDict(frozen=True, extra="forbid")+ url: str+ integrity: str+ crossorigin: Literal["anonymous", "use-credentials"] = "anonymous"-# @lru_cache(maxsize=1) memoizes the no-arg call: file is read once, then served from cache.-@lru_cache(maxsize=1)-def get_standalone_js() -> str:- """Load the pre-built GraphViewer JS bundle (IIFE).- Returns:- The JS bundle as a string, cached after first load.- """- package_files = importlib.resources.files(_ASSET_PACKAGE)- return (package_files / "graph-viewer.js").read_text(encoding="utf-8")+MTHDS_UI_VERSION = "0.6.3"+ELKJS_VERSION = "0.11.1"+MTHDS_UI_JS = CDNAsset(+ url=f"https://cdn.jsdelivr.net/npm/@pipelex/mthds-ui@{MTHDS_UI_VERSION}/dist/standalone/graph-viewer.js",+ integrity="sha384-BS9SD/K440VwYZxJCMuOi3g0FVlFz9ugiivYvkVpRDPFRo9FMc6IXQl9EM22VCSP",+)-@lru_cache(maxsize=1)-def get_standalone_css() -> str:- """Load the pre-built GraphViewer CSS bundle.+MTHDS_UI_CSS = CDNAsset(+ url=f"https://cdn.jsdelivr.net/npm/@pipelex/mthds-ui@{MTHDS_UI_VERSION}/dist/standalone/graph-viewer.css",+ integrity="sha384-Ue1fm1guW8EQGdaqrsi+8Zm5Iq5AGkxa5+UeWw+sy8vVCSYkGez6+80+p9/oxqOn",+)- Returns:- The CSS bundle as a string, cached after first load.- """- package_files = importlib.resources.files(_ASSET_PACKAGE)- return (package_files / "graph-viewer.css").read_text(encoding="utf-8")+ELKJS = CDNAsset(+ url=f"https://cdn.jsdelivr.net/npm/elkjs@{ELKJS_VERSION}/lib/elk.bundled.js",+ integrity="sha384-k7OFwtsMfFyYU75zZhPkC8VRASnGrW1pxavUnozOiO2B5M5gv6PYGOkEYZTrVtvo",+)diff --git a/pipelex/graph/reactflow/templates/reactflow.html.jinja2 b/pipelex/graph/reactflow/templates/reactflow.html.jinja2index 6bf707375..2bb90314b 100644--- a/pipelex/graph/reactflow/templates/reactflow.html.jinja2+++ b/pipelex/graph/reactflow/templates/reactflow.html.jinja2@@ -1,56 +1,27 @@<!DOCTYPE html><!--- Bundled: React (MIT), @xyflow/react (MIT), DOMPurify (MPL-2.0/Apache-2.0), @pipelex/mthds-ui (MIT)- External: elkjs (EPL-2.0) loaded from CDN+ External (loaded from jsDelivr with Subresource Integrity):+ React (MIT), @xyflow/react (MIT), DOMPurify (MPL-2.0/Apache-2.0),+ @pipelex/mthds-ui (MIT), elkjs (EPL-2.0).+ Nothing is bundled into this file — all viewer code is fetched at view time+ from cdn.jsdelivr.net with sha384 hashes that pin tamper-evident content.--><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>{{ title }}</title>-<style>-{{ viewer_css | safe }}-</style>+<link rel="stylesheet" href="{{ mthds_ui_css.url }}" integrity="{{ mthds_ui_css.integrity }}" crossorigin="{{ mthds_ui_css.crossorigin }}"></head><body data-theme="{{ theme }}"><div id="app-container">- <div class="toolbar">- <div class="header-brand">- <img src="{{ logo_dark }}" alt="Pipelex" class="header-logo dark-logo">- <img src="{{ logo_light }}" alt="Pipelex" class="header-logo light-logo">- <span class="header-title">{{ title }}</span>- </div>- <button id="direction-toggle" class="toolbar-btn" title="Toggle layout direction">- <span class="direction-icon lr-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg></span>- <span class="direction-icon tb-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><polyline points="19 12 12 19 5 12"/></svg></span>- </button>- <label class="toggle-switch" title="Show/hide controller containers">- <input type="checkbox" id="controllers-toggle">- <span class="toggle-track"><span class="toggle-knob"></span></span>- <span class="toggle-label">Controllers</span>- </label>- <div class="toolbar-spacer"></div>- <div class="toolbar-zoom">- <button id="zoom-out" class="toolbar-btn" title="Zoom out"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/></svg></button>- <button id="zoom-in" class="toolbar-btn" title="Zoom in"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg></button>- <button id="zoom-fit" class="toolbar-btn" title="Fit to view"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg></button>- </div>- <button id="theme-toggle" class="theme-btn" title="Toggle theme">- <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>- <span class="theme-label">{{ theme }}</span>- </button>- </div><div id="root"></div></div><script type="application/json" id="pipelex-graphspec">{{ graphspec_json | escape_script_tag | safe }}</script><script type="application/json" id="pipelex-config">{{ config_json | escape_script_tag | safe }}</script>-<!-- elkjs: EPL-2.0 licensed, loaded from CDN (not bundled) -->-<script src="https://unpkg.com/[email protected]/lib/elk.bundled.js"></script>--<script>-{{ viewer_js | escape_script_tag | safe }}-</script>+<script src="{{ elkjs.url }}" integrity="{{ elkjs.integrity }}" crossorigin="{{ elkjs.crossorigin }}"></script>+<script src="{{ mthds_ui_js.url }}" integrity="{{ mthds_ui_js.integrity }}" crossorigin="{{ mthds_ui_js.crossorigin }}"></script></body></html>diff --git a/pipelex/pipelex.toml b/pipelex/pipelex.tomlindex ad496af35..b3dd449f9 100644--- a/pipelex/pipelex.toml+++ b/pipelex/pipelex.toml@@ -348,9 +348,10 @@ edge_type = "bezier"initial_zoom = 1.0pan_to_top = truedefault_title = "Pipelex Graph"-# When true, PipeBatch controller nodes appear in the graph as pipe nodes for batch edges-# When false, batch edges connect stuff nodes directly (list -> items, items -> list)-show_batch_controller = false+# Forwarded to mthds-ui as `showControllers`: when true, controller pipes (PipeSequence,+# PipeParallel, PipeCondition, PipeBatch) render as grouping containers around their children;+# when false, they collapse out of the graph and edges connect stuff nodes directly.+show_batch_controller = true[pipelex.pipeline_execution_config.graph_config.reactflow_config.style]theme = "dark"diff --git a/pipelex/tracing/graphspec_assembler.py b/pipelex/tracing/graphspec_assembler.pyindex 4e1a6eeb3..7d3b75d76 100644--- a/pipelex/tracing/graphspec_assembler.py+++ b/pipelex/tracing/graphspec_assembler.py@@ -54,6 +54,8 @@ class _AssemblerNodeData:started_at: datetime,parent_node_id: str | None,input_specs: list[IOSpec] | None = None,+ description: str | None = None,+ domain_code: str | None = None,) -> None:self.node_id = node_idself.pipe_code = pipe_code@@ -61,6 +63,8 @@ class _AssemblerNodeData:self.node_kind = node_kindself.started_at = started_atself.parent_node_id = parent_node_id+ self.description = description+ self.domain_code = domain_codeself.ended_at: datetime | None = Noneself.status: NodeStatus = NodeStatus.RUNNINGself.metrics: dict[str, float] = {}@@ -88,6 +92,8 @@ class _AssemblerNodeData:kind=self.node_kind,pipe_code=self.pipe_code,pipe_type=self.pipe_type,+ description=self.description,+ domain_code=self.domain_code,status=self.status,timing=timing,node_io=node_io,@@ -223,6 +229,8 @@ class _AssemblerState:started_at=event.timestamp,parent_node_id=event.parent_node_id,input_specs=list(event.input_specs),+ description=event.description,+ domain_code=event.domain_code,)self._nodes[event.node_id] = node_datadiff --git a/pipelex/tracing/trace_events.py b/pipelex/tracing/trace_events.pyindex 00edb687b..49b30cc98 100644--- a/pipelex/tracing/trace_events.py+++ b/pipelex/tracing/trace_events.py@@ -69,6 +69,8 @@ class PipeStartEvent(TraceEvent):pipe_code: strpipe_type: strnode_kind: NodeKind+ description: str | None = None+ domain_code: str | None = Noneinput_specs: list[IOSpec] = Field(default_factory=empty_list_factory_of(IOSpec))pipe_data: dict[str, Any] = Field(default_factory=dict)concept_data: list[dict[str, Any]] = Field(default_factory=empty_list_factory_of(dict))diff --git a/tests/unit/pipelex/cli/dev/test_refresh_graph_ui_sri.py b/tests/unit/pipelex/cli/dev/test_refresh_graph_ui_sri.pynew file mode 100644index 000000000..23d1edd7a--- /dev/null+++ b/tests/unit/pipelex/cli/dev/test_refresh_graph_ui_sri.py@@ -0,0 +1,139 @@+"""Unit tests for the `pipelex-dev refresh-graph-ui-sri` command."""++import base64+import hashlib+import io+from pathlib import Path++import pytest+from pytest_mock import MockerFixture++from pipelex.cli.dev_cli.commands.refresh_graph_ui_sri_cmd import (+ _validate_sri, # noqa: PLC2701 # pyright: ignore[reportPrivateUsage]+ refresh_graph_ui_sri_cmd,+)+from pipelex.cli.exceptions import PipelexCLIError+++class TestRefreshGraphUiSri:+ _MTHDS_UI_JS_BYTES = b"// fake graph-viewer.js bundle"+ _MTHDS_UI_CSS_BYTES = b"/* fake graph-viewer.css */"+ _ELKJS_BYTES = b"// fake elk.bundled.js"++ @staticmethod+ def _expected_sri(payload: bytes) -> str:+ return "sha384-" + base64.b64encode(hashlib.sha384(payload).digest()).decode("ascii")++ def _install_fake_urlopen(self, mocker: MockerFixture) -> None:+ payloads: dict[str, bytes] = {+ "https://cdn.jsdelivr.net/npm/@pipelex/[email protected]/dist/standalone/graph-viewer.js": self._MTHDS_UI_JS_BYTES,+ "https://cdn.jsdelivr.net/npm/@pipelex/[email protected]/dist/standalone/graph-viewer.css": self._MTHDS_UI_CSS_BYTES,+ "https://cdn.jsdelivr.net/npm/[email protected]/lib/elk.bundled.js": self._ELKJS_BYTES,+ }++ def fake_urlopen(url: str, timeout: float = 30.0): # noqa: ARG001+ return io.BytesIO(payloads[url])++ mocker.patch("pipelex.cli.dev_cli.commands.refresh_graph_ui_sri_cmd.urlopen", side_effect=fake_urlopen)++ def test_writes_new_versions_and_integrities(self, tmp_path: Path, mocker: MockerFixture) -> None:+ self._install_fake_urlopen(mocker)+ target = tmp_path / "standalone_assets.py"++ refresh_graph_ui_sri_cmd(+ mthds_ui_version="1.2.3",+ elkjs_version="9.9.9",+ output_path=target,+ quiet=True,+ )++ content = target.read_text(encoding="utf-8")++ assert 'MTHDS_UI_VERSION = "1.2.3"' in content+ assert 'ELKJS_VERSION = "9.9.9"' in content++ expected_js_sri = self._expected_sri(self._MTHDS_UI_JS_BYTES)+ expected_css_sri = self._expected_sri(self._MTHDS_UI_CSS_BYTES)+ expected_elk_sri = self._expected_sri(self._ELKJS_BYTES)++ assert f'integrity="{expected_js_sri}"' in content+ assert f'integrity="{expected_css_sri}"' in content+ assert f'integrity="{expected_elk_sri}"' in content++ def test_written_module_is_importable_and_matches_constants(self, tmp_path: Path, mocker: MockerFixture) -> None:+ """The regenerated module file must be valid Python and round-trip through import."""+ self._install_fake_urlopen(mocker)+ target = tmp_path / "regenerated_standalone_assets.py"++ refresh_graph_ui_sri_cmd(+ mthds_ui_version="1.2.3",+ elkjs_version="9.9.9",+ output_path=target,+ quiet=True,+ )++ namespace: dict[str, object] = {}+ exec(compile(target.read_text(encoding="utf-8"), str(target), "exec"), namespace)++ assert namespace["MTHDS_UI_VERSION"] == "1.2.3"+ assert namespace["ELKJS_VERSION"] == "9.9.9"++ mthds_ui_js = namespace["MTHDS_UI_JS"]+ mthds_ui_css = namespace["MTHDS_UI_CSS"]+ elkjs = namespace["ELKJS"]++ assert mthds_ui_js.integrity == self._expected_sri(self._MTHDS_UI_JS_BYTES) # type: ignore[attr-defined]+ assert mthds_ui_css.integrity == self._expected_sri(self._MTHDS_UI_CSS_BYTES) # type: ignore[attr-defined]+ assert elkjs.integrity == self._expected_sri(self._ELKJS_BYTES) # type: ignore[attr-defined]++ assert "1.2.3" in mthds_ui_js.url # type: ignore[attr-defined]+ assert "9.9.9" in elkjs.url # type: ignore[attr-defined]++ @pytest.mark.parametrize(+ "bad_version",+ [+ '1.0.0"; import os; os.system("rm -rf ~") #',+ "1.0.0/../../../etc/passwd",+ "1.0.0\nimport os",+ "latest",+ "v1.0.0",+ "1.0",+ "1.0.0 ",+ "",+ ],+ )+ def test_rejects_malformed_versions(self, tmp_path: Path, mocker: MockerFixture, bad_version: str) -> None:+ """Strings that aren't strict SemVer must be rejected — guards against code injection into the regenerated module."""+ self._install_fake_urlopen(mocker)+ target = tmp_path / "standalone_assets.py"++ with pytest.raises(PipelexCLIError):+ refresh_graph_ui_sri_cmd(+ mthds_ui_version=bad_version,+ elkjs_version="9.9.9",+ output_path=target,+ quiet=True,+ )++ assert not target.exists(), "Output file must not be touched when validation fails"++ def test_validate_sri_accepts_canonical_sha384(self) -> None:+ """Real sha384 base64 output (48 bytes → 64 chars, no padding) must pass."""+ canonical = "sha384-" + base64.b64encode(hashlib.sha384(b"anything").digest()).decode("ascii")+ assert _validate_sri(canonical) == canonical++ @pytest.mark.parametrize(+ "bad_sri",+ [+ "sha384-" + "A" * 63, # one short+ "sha384-" + "A" * 65, # one long+ "sha384-" + "A" * 62 + "==", # padded — never produced by sha384(48 bytes)+ "sha384-" + "A" * 64 + "=", # trailing pad+ "sha256-" + "A" * 64, # wrong algo+ "sha384-" + "A" * 63 + "$", # bad alphabet+ "",+ ],+ )+ def test_validate_sri_rejects_non_canonical(self, bad_sri: str) -> None:+ with pytest.raises(PipelexCLIError):+ _validate_sri(bad_sri)diff --git a/tests/unit/pipelex/core/pipes/test_run_pipe_tracer_metadata.py b/tests/unit/pipelex/core/pipes/test_run_pipe_tracer_metadata.pynew file mode 100644index 000000000..eb3699046--- /dev/null+++ b/tests/unit/pipelex/core/pipes/test_run_pipe_tracer_metadata.py@@ -0,0 +1,66 @@+"""Verify that PipeAbstract.run_pipe forwards pipe metadata to the graph tracer."""++from typing import Callable++import pytest+from pytest_mock import MockerFixture++from pipelex.core.memory.working_memory_factory import WorkingMemoryFactory+from pipelex.core.pipes.pipe_factory import PipeFactory+from pipelex.pipe_operators.llm.pipe_llm import PipeLLM+from pipelex.pipe_operators.llm.pipe_llm_blueprint import PipeLLMBlueprint+from pipelex.pipe_run.pipe_run_params_factory import PipeRunParamsFactory+from pipelex.pipeline.job_metadata import JobMetadata+from tests.unit.pipelex.graph.conftest import make_graph_context++[email protected](loop_scope="class")+class TestRunPipeForwardsTracerMetadata:+ async def test_run_pipe_passes_description_and_domain_code_to_tracer(+ self,+ mocker: MockerFixture,+ load_empty_library: Callable[[], str],+ ) -> None:+ load_empty_library()++ blueprint = PipeLLMBlueprint(+ description="Greet the user with a friendly hello.",+ output="native.Text",+ prompt="Say hello.",+ )+ pipe = PipeFactory[PipeLLM].make_from_blueprint(+ domain_code="greeting_domain",+ pipe_code="say_hello",+ blueprint=blueprint,+ )++ expected_output = mocker.MagicMock()+ expected_output.working_memory.get_optional_main_stuff.return_value = None+ mocker.patch.object(PipeLLM, "_live_run_operator_pipe", mocker.AsyncMock(return_value=expected_output))+ mocker.patch.object(PipeLLM, "validate_before_run", mocker.AsyncMock(return_value=None))+ mocker.patch.object(PipeLLM, "validate_after_run", mocker.AsyncMock(return_value=None))++ on_pipe_start_mock = mocker.MagicMock(return_value=(None, None))+ mock_manager = mocker.MagicMock()+ mock_manager.on_pipe_start = on_pipe_start_mock+ mocker.patch(+ "pipelex.core.pipes.pipe_abstract.GraphTracerManager.get_instance",+ return_value=mock_manager,+ )++ job_metadata = JobMetadata(+ user_id="pytest",+ pipeline_run_id="test-run-meta",+ graph_context=make_graph_context(graph_id="test-run-meta"),+ )++ await pipe.run_pipe(+ job_metadata=job_metadata,+ working_memory=WorkingMemoryFactory.make_empty(),+ pipe_run_params=PipeRunParamsFactory.make_run_params(),+ )++ on_pipe_start_mock.assert_called_once()+ call_kwargs = on_pipe_start_mock.call_args.kwargs+ assert call_kwargs["description"] == "Greet the user with a friendly hello."+ assert call_kwargs["domain_code"] == "greeting_domain"diff --git a/tests/unit/pipelex/graph/reactflow/test_cdn_assets.py b/tests/unit/pipelex/graph/reactflow/test_cdn_assets.pynew file mode 100644index 000000000..652c3c6bb--- /dev/null+++ b/tests/unit/pipelex/graph/reactflow/test_cdn_assets.py@@ -0,0 +1,45 @@+"""Unit tests for the CDN asset constants module."""++import base64++from pipelex.graph.reactflow.standalone_assets import (+ ELKJS,+ ELKJS_VERSION,+ MTHDS_UI_CSS,+ MTHDS_UI_JS,+ MTHDS_UI_VERSION,+ CDNAsset,+)+++class TestCdnAssets:+ def test_assets_are_cdnasset_instances(self) -> None:+ assert isinstance(MTHDS_UI_JS, CDNAsset)+ assert isinstance(MTHDS_UI_CSS, CDNAsset)+ assert isinstance(ELKJS, CDNAsset)++ def test_urls_target_jsdelivr_npm(self) -> None:+ for asset in (MTHDS_UI_JS, MTHDS_UI_CSS, ELKJS):+ assert asset.url.startswith("https://cdn.jsdelivr.net/npm/"), asset.url++ def test_urls_pin_to_declared_versions(self) -> None:+ assert f"@pipelex/mthds-ui@{MTHDS_UI_VERSION}/" in MTHDS_UI_JS.url+ assert f"@pipelex/mthds-ui@{MTHDS_UI_VERSION}/" in MTHDS_UI_CSS.url+ assert f"elkjs@{ELKJS_VERSION}/" in ELKJS.url++ def test_integrity_is_sha384_and_decodes_to_48_bytes(self) -> None:+ for asset in (MTHDS_UI_JS, MTHDS_UI_CSS, ELKJS):+ assert asset.integrity.startswith("sha384-"), asset.integrity+ digest_b64 = asset.integrity.removeprefix("sha384-")+ # validate=True rejects bad alphabet and bad padding both+ digest_bytes = base64.b64decode(digest_b64, validate=True)+ assert len(digest_bytes) == 48, f"{asset.integrity} decoded to {len(digest_bytes)} bytes (expected 48)"++ def test_crossorigin_is_anonymous(self) -> None:+ for asset in (MTHDS_UI_JS, MTHDS_UI_CSS, ELKJS):+ assert asset.crossorigin == "anonymous"++ def test_js_and_css_paths_distinguished(self) -> None:+ assert MTHDS_UI_JS.url.endswith("/graph-viewer.js")+ assert MTHDS_UI_CSS.url.endswith("/graph-viewer.css")+ assert ELKJS.url.endswith("/elk.bundled.js")diff --git a/tests/unit/pipelex/graph/test_graph_tracer_node_metadata.py b/tests/unit/pipelex/graph/test_graph_tracer_node_metadata.pynew file mode 100644index 000000000..fd135ce64--- /dev/null+++ b/tests/unit/pipelex/graph/test_graph_tracer_node_metadata.py@@ -0,0 +1,63 @@+"""Unit tests for GraphTracer wiring of node-level pipe metadata."""++from datetime import datetime, timedelta, timezone++from pipelex.graph.graph_tracer import GraphTracer+from pipelex.graph.graphspec import NodeKind+from tests.unit.pipelex.graph.conftest import make_defaulted_data_inclusion_config+++class TestGraphTracerNodeMetadata:+ def test_on_pipe_start_persists_description_and_domain_code(self) -> None:+ tracer = GraphTracer()+ context = tracer.setup(graph_id="meta-test", data_inclusion=make_defaulted_data_inclusion_config())++ started_at = datetime.now(timezone.utc)+ node_id, _child = tracer.on_pipe_start(+ graph_context=context,+ pipe_code="summarize",+ pipe_type="PipeLLM",+ node_kind=NodeKind.OPERATOR,+ started_at=started_at,+ description="Summarize the input document.",+ domain_code="summarization",+ )++ tracer.on_pipe_end_success(+ node_id=node_id,+ ended_at=started_at + timedelta(milliseconds=10),+ )++ graph_spec = tracer.teardown()++ assert graph_spec is not None+ assert len(graph_spec.nodes) == 1+ node = graph_spec.nodes[0]+ assert node.description == "Summarize the input document."+ assert node.domain_code == "summarization"++ def test_on_pipe_start_defaults_metadata_to_none(self) -> None:+ tracer = GraphTracer()+ context = tracer.setup(graph_id="meta-default-test", data_inclusion=make_defaulted_data_inclusion_config())++ started_at = datetime.now(timezone.utc)+ node_id, _child = tracer.on_pipe_start(+ graph_context=context,+ pipe_code="noop",+ pipe_type="PipeLLM",+ node_kind=NodeKind.OPERATOR,+ started_at=started_at,+ )++ tracer.on_pipe_end_success(+ node_id=node_id,+ ended_at=started_at + timedelta(milliseconds=10),+ )++ graph_spec = tracer.teardown()++ assert graph_spec is not None+ assert len(graph_spec.nodes) == 1+ node = graph_spec.nodes[0]+ assert node.description is None+ assert node.domain_code is Nonediff --git a/tests/unit/pipelex/graph/test_node_spec_pipe_metadata.py b/tests/unit/pipelex/graph/test_node_spec_pipe_metadata.pynew file mode 100644index 000000000..c8c5d6fc8--- /dev/null+++ b/tests/unit/pipelex/graph/test_node_spec_pipe_metadata.py@@ -0,0 +1,47 @@+"""Unit tests for NodeSpec pipe metadata fields (description, domain_code)."""++from pipelex.graph.graphspec import NodeKind, NodeSpec, NodeStatus+++class TestNodeSpecPipeMetadata:+ def test_node_spec_accepts_description_and_domain_code(self) -> None:+ node = NodeSpec(+ node_id="node_001",+ kind=NodeKind.OPERATOR,+ pipe_code="generate_text",+ pipe_type="PipeLLM",+ status=NodeStatus.SUCCEEDED,+ description="Generate a paragraph of text from a topic.",+ domain_code="text_generation",+ )++ assert node.description == "Generate a paragraph of text from a topic."+ assert node.domain_code == "text_generation"++ def test_node_spec_defaults_description_and_domain_code_to_none(self) -> None:+ node = NodeSpec(+ node_id="node_002",+ kind=NodeKind.INPUT,+ pipe_code=None,+ pipe_type=None,+ status=NodeStatus.SUCCEEDED,+ )++ assert node.description is None+ assert node.domain_code is None++ def test_node_spec_round_trip_preserves_pipe_metadata(self) -> None:+ original = NodeSpec(+ node_id="node_003",+ kind=NodeKind.CONTROLLER,+ pipe_code="main_sequence",+ pipe_type="PipeSequence",+ status=NodeStatus.SUCCEEDED,+ description="Top-level orchestration pipe.",+ domain_code="orchestration",+ )++ round_tripped = NodeSpec(**original.model_dump(by_alias=True))++ assert round_tripped.description == original.description+ assert round_tripped.domain_code == original.domain_codediff --git a/tests/unit/pipelex/graph/test_reactflow_html.py b/tests/unit/pipelex/graph/test_reactflow_html.pyindex 871aea026..ac7708f80 100644--- a/tests/unit/pipelex/graph/test_reactflow_html.py+++ b/tests/unit/pipelex/graph/test_reactflow_html.py@@ -6,6 +6,7 @@ from pipelex.config import get_configfrom pipelex.graph.graphspec import GraphSpec, NodeKind, NodeSpec, NodeStatus, PipelineReffrom pipelex.graph.reactflow.reactflow_config import ReactFlowRenderingConfigfrom pipelex.graph.reactflow.reactflow_html import generate_reactflow_html+from pipelex.graph.reactflow.standalone_assets import ELKJS, MTHDS_UI_CSS, MTHDS_UI_JSclass TestReactFlowHtml:@@ -74,11 +75,36 @@ class TestReactFlowHtml:assert "</html>" in htmlassert '<div id="root">' in html- def test_html_contains_bundled_js(self) -> None:- """Test that HTML includes the mthds-ui GraphViewer bundle."""+ def test_html_loads_mthds_ui_js_from_cdn_with_sri(self) -> None:+ """The HTML must reference the pinned mthds-ui JS bundle on jsDelivr with SRI."""html = generate_reactflow_html(self._empty_graphspec(), self._rf_config())- assert '"use strict"' in html+ expected = f'<script src="{MTHDS_UI_JS.url}" integrity="{MTHDS_UI_JS.integrity}" crossorigin="{MTHDS_UI_JS.crossorigin}"></script>'+ assert expected in html++ def test_html_loads_mthds_ui_css_from_cdn_with_sri(self) -> None:+ """The HTML must reference the pinned mthds-ui CSS on jsDelivr with SRI."""+ html = generate_reactflow_html(self._empty_graphspec(), self._rf_config())++ expected = f'<link rel="stylesheet" href="{MTHDS_UI_CSS.url}" integrity="{MTHDS_UI_CSS.integrity}" crossorigin="{MTHDS_UI_CSS.crossorigin}">'+ assert expected in html++ def test_html_loads_elkjs_from_jsdelivr_with_sri(self) -> None:+ """Elkjs must come from jsDelivr (not unpkg) and carry an SRI hash."""+ html = generate_reactflow_html(self._empty_graphspec(), self._rf_config())++ expected = f'<script src="{ELKJS.url}" integrity="{ELKJS.integrity}" crossorigin="{ELKJS.crossorigin}"></script>'+ assert expected in html+ assert "unpkg.com/elkjs" not in html++ def test_html_does_not_inline_bundle_contents(self) -> None:+ """Bundle bytes must not be inlined — externalized via <link>/<script src>."""+ html = generate_reactflow_html(self._empty_graphspec(), self._rf_config())++ # Tokens that only exist inside the IIFE bundle / CSS bundle.+ assert '"use strict"' not in html+ assert ".react-flow" not in html+ assert "<style>" not in htmldef test_json_data_scripts_have_no_nonce(self) -> None:"""Verify application/json script tags do NOT have a nonce attribute."""@@ -98,3 +124,15 @@ class TestReactFlowHtml:html = generate_reactflow_html(self._empty_graphspec(), self._rf_config())assert html.count("</script>") == 4++ def test_no_legacy_toolbar(self) -> None:+ """Verify the old hand-rendered toolbar is gone; mthds-ui v0.6+ owns chrome."""+ html = generate_reactflow_html(self._empty_graphspec(), self._rf_config())++ assert '<div class="toolbar">' not in html+ assert 'id="direction-toggle"' not in html+ assert 'id="controllers-toggle"' not in html+ assert 'id="zoom-in"' not in html+ assert 'id="zoom-out"' not in html+ assert 'id="zoom-fit"' not in html+ assert 'id="theme-toggle"' not in htmldiff --git a/tests/unit/pipelex/graph/test_smoke_html_render.py b/tests/unit/pipelex/graph/test_smoke_html_render.pynew file mode 100644index 000000000..1795cc238--- /dev/null+++ b/tests/unit/pipelex/graph/test_smoke_html_render.py@@ -0,0 +1,31 @@+"""Bounded-size smoke check: catches a regression where assets get re-inlined."""++from datetime import datetime, timezone++from pipelex.config import get_config+from pipelex.graph.graphspec import GraphSpec, NodeKind, NodeSpec, NodeStatus, PipelineRef+from pipelex.graph.reactflow.reactflow_html import generate_reactflow_html+++class TestSmokeHtmlRender:+ def test_rendered_html_stays_small_when_assets_externalized(self) -> None:+ node = NodeSpec(node_id="n1", kind=NodeKind.OPERATOR, pipe_code="hello", status=NodeStatus.SUCCEEDED)+ graph = GraphSpec(+ graph_id="smoke",+ created_at=datetime.now(timezone.utc),+ pipeline_ref=PipelineRef(),+ nodes=[node],+ edges=[],+ )+ config = get_config().pipelex.pipeline_execution_config.graph_config.reactflow_config++ html = generate_reactflow_html(graph, config)++ assert "cdn.jsdelivr.net/npm/@pipelex/mthds-ui" in html+ assert "cdn.jsdelivr.net/npm/elkjs" in html+ assert "sha384-" in html+ # A real render with externalized assets is ~2 kB. The bundle this used to+ # inline is ~466 kB JS + ~55 kB CSS. A 10 kB ceiling catches any meaningful+ # re-inlining (CSS chunk, base64 image, vendored elkjs) while leaving headroom+ # for legitimate template growth.+ assert len(html) < 10_000, f"HTML unexpectedly large ({len(html)} bytes) — assets may have been re-inlined"diff --git a/tests/unit/pipelex/tracing/test_graphspec_assembler.py b/tests/unit/pipelex/tracing/test_graphspec_assembler.pyindex d5cbe6f2a..cf48071a7 100644--- a/tests/unit/pipelex/tracing/test_graphspec_assembler.py+++ b/tests/unit/pipelex/tracing/test_graphspec_assembler.py@@ -642,3 +642,53 @@ class TestGraphSpecAssembler:# Verify passthrough node has no output_specs (pass-through was skipped)passthrough_node = next(node for node in result.nodes if node.node_id == passthrough)assert len(passthrough_node.node_io.outputs) == 0++ def test_pipe_start_description_and_domain_code_propagate_to_node_spec(self) -> None:+ node = _node_id(_WF_A, 0)+ events = [+ PipeStartEvent(+ **_base(_WF_A, 0),+ node_id=node,+ pipe_code="summarize",+ pipe_type="PipeLLM",+ node_kind=NodeKind.OPERATOR,+ description="Summarize the input document.",+ domain_code="summarization",+ ),+ PipeEndSuccessEvent(+ **_base(_WF_A, 1),+ node_id=node,+ ended_at=_time_at(1),+ ),+ ]++ result = GraphSpecAssembler.assemble(events=events, graph_id=_GRAPH_ID)++ assert len(result.nodes) == 1+ assembled_node = result.nodes[0]+ assert assembled_node.description == "Summarize the input document."+ assert assembled_node.domain_code == "summarization"++ def test_pipe_start_without_metadata_yields_none_on_node_spec(self) -> None:+ node = _node_id(_WF_A, 0)+ events = [+ PipeStartEvent(+ **_base(_WF_A, 0),+ node_id=node,+ pipe_code="noop",+ pipe_type="PipeLLM",+ node_kind=NodeKind.OPERATOR,+ ),+ PipeEndSuccessEvent(+ **_base(_WF_A, 1),+ node_id=node,+ ended_at=_time_at(1),+ ),+ ]++ result = GraphSpecAssembler.assemble(events=events, graph_id=_GRAPH_ID)++ assert len(result.nodes) == 1+ assembled_node = result.nodes[0]+ assert assembled_node.description is None+ assert assembled_node.domain_code is Nonediff --git a/tests/unit/pipelex/tracing/test_trace_events.py b/tests/unit/pipelex/tracing/test_trace_events.pyindex 878b48f1e..fd2a3419e 100644--- a/tests/unit/pipelex/tracing/test_trace_events.py+++ b/tests/unit/pipelex/tracing/test_trace_events.py@@ -337,6 +337,49 @@ class TestTraceEvents:assert restored.tokens_usage.nb_tokens_by_category[TokenCategory.INPUT] == 100assert restored.tokens_usage.nb_tokens_by_category[TokenCategory.OUTPUT] == 50+ def test_pipe_start_carries_description_and_domain_code(self) -> None:+ event = PipeStartEvent(+ **_Shared.make_base_fields(),+ node_id=_Shared.NODE_ID,+ pipe_code="gen_summary",+ pipe_type="PipeLLM",+ node_kind=NodeKind.OPERATOR,+ description="Summarize the input document.",+ domain_code="summarization",+ )++ assert event.description == "Summarize the input document."+ assert event.domain_code == "summarization"++ def test_pipe_start_description_and_domain_code_default_to_none(self) -> None:+ event = PipeStartEvent(+ **_Shared.make_base_fields(),+ node_id=_Shared.NODE_ID,+ pipe_code="noop_pipe",+ pipe_type="PipeNoop",+ node_kind=NodeKind.OPERATOR,+ )++ assert event.description is None+ assert event.domain_code is None++ def test_pipe_start_description_and_domain_code_round_trip(self) -> None:+ event = PipeStartEvent(+ **_Shared.make_base_fields(),+ node_id=_Shared.NODE_ID,+ pipe_code="gen_summary",+ pipe_type="PipeLLM",+ node_kind=NodeKind.OPERATOR,+ description="Summarize the input document.",+ domain_code="summarization",+ )++ json_str = event.model_dump_json()+ restored = PipeStartEvent.model_validate_json(json_str)++ assert restored.description == "Summarize the input document."+ assert restored.domain_code == "summarization"+def test_all_event_kinds_covered(self) -> None:"""Every TraceEventKind has a corresponding test case and event class."""tested_kinds = {entry[1] for entry in self.EVENTS_AND_KINDS}diff --git a/wip/stuffs-as-nodespec.md b/wip/stuffs-as-nodespec.mdnew file mode 100644index 000000000..da537432d--- /dev/null+++ b/wip/stuffs-as-nodespec.md@@ -0,0 +1,63 @@+# Stuffs as first-class NodeSpec++## Why this exists++When we promoted `description` and `domain_code` onto `NodeSpec` for pipes (see commits on `feature/Update-html-mthds-ui`), we deliberately stopped at pipes. Concepts have the same metadata (`domain_code`, `description`) and the same problem: today, the only way for a renderer to discover the domain or human description of a stuff's concept is to join with `GraphSpec.concept_registry` — and that registry is empty when `data_inclusion.pipe_and_concept_registry = False`.++So the symmetric fix is to make stuffs self-describing in the graph, just like pipe nodes now are.++This is a starter, not a worked plan. Treat the design below as a starting point — the code will likely have moved by the time we pick this up, and several of the choices below are reversible.++## Current shape (snapshot)++- `NodeKind` already defines `INPUT`, `OUTPUT`, `ARTIFACT` — so the type system says `NodeSpec` is meant to span pipes and stuffs.+- In practice today, only pipe-shaped `NodeSpec`s ever get emitted. `GraphTracer.on_pipe_start` and `GraphSpecAssembler._handle_pipe_start` create `PIPE_CALL` / `CONTROLLER` / `OPERATOR` nodes only.+- Stuffs live as `IOSpec` entries inside `NodeSpec.node_io.inputs` / `.outputs`.+- Renderers (mermaidflow, reactflow) synthesize stuff "nodes" inline at render time from `IOSpec` data, using digest-derived IDs — they never enter the model.++That inline synthesis is the asymmetry: pipe NodeSpecs are model-level, stuff nodes are render-level.++## What this rework would do++Make stuffs first-class `NodeSpec` instances:++- Tracer (and replay assembler) emit a `NodeSpec` per stuff with `kind` ∈ {`INPUT`, `OUTPUT`, `ARTIFACT`}.+- The stuff's concept metadata lives on the same `NodeSpec.description` / `NodeSpec.domain_code` fields we just added — same shape, semantics depend on `kind`:+ - On a pipe-call node: pipe's `description` and `domain_code`.+ - On a stuff node: the concept's `description` and `domain_code`.+- Pipe ↔ stuff relationships move out of `IOSpec` lists and into `EdgeSpec` entries (data edges already exist; this would extend their role).+- `IOSpec` goes away (or becomes a thin reference to the stuff node by `node_id`). One source of truth.++## Decisions taken in the discussion (revisable)++These were chosen quickly in chat and should be re-examined when picking this up:++- **One source of truth.** Stuffs as `NodeSpec` replaces `IOSpec`, not in parallel with it. Two-source designs were rejected to avoid drift between the in-model graph and the rendered one.+- **`NodeSpec.description` / `.domain_code` are polymorphic by `NodeKind`.** Same fields, semantics change by kind. The alternative (separate `concept_description` / `concept_domain_code` fields) was considered uglier given the taxonomy already exists.+- **`INPUT` / `OUTPUT` / `ARTIFACT` are semantic, not visual-only.** `INPUT` = pipeline entrypoint, `OUTPUT` = pipeline final, `ARTIFACT` = intermediate stuff. The tracer/assembler is responsible for classifying — renderers should not need to derive this from edge topology.++If any of these no longer fits when we revisit, change them. The starter doesn't lock anything in.++## Likely impact surface++Not exhaustive — just the obvious ones to scope from before committing:++- `pipelex/graph/graph_tracer.py` and `pipelex/tracing/graphspec_assembler.py` — emit stuff nodes, classify kind, drop or rewrite `IOSpec` aggregation.+- `pipelex/graph/graphspec.py` — `NodeSpec` field semantics doc, possibly retire `IOSpec` / `NodeIOSpec`.+- `pipelex/tracing/trace_events.py` — `PipeStartEvent.input_specs` rethink (events probably emit stuff-node ids instead of inline `IOSpec`).+- Every renderer that today synthesizes stuff nodes at render time (mermaidflow, reactflow JS bundle, HTML).+- All `GraphSpec` JSON fixtures under `tests/data/graphs/` — breaking change, will need regeneration.+- The existing pipe-side `description` / `domain_code` work landed in this branch — confirm semantics stay consistent when extended to stuff kinds.++## Open questions to settle before starting++- Stuff node identity: derive `node_id` from `stuff_code` (digest), or assign sequenced IDs like pipe nodes?+- Concept reference on the stuff node: still keep a `concept` string (qualified `domain.code`)? Drop it now that `domain_code` is a real field?+- Migration story for older `GraphSpec` JSON files. Probably "no back-compat" per repo policy, but worth confirming.+- `ERROR` `NodeKind` — same treatment as data kinds, or stays pipe-attached?++## Out of scope for this future work++- The pipe-side metadata wiring is already done — don't redo it.+- Adding new `NodeKind`s.+- Cross-pipeline concept dedup beyond what `concept_registry` already does.