Skip to content

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.

Feature/node mthds UI (#819)

Thomas Hebrardc859b9a03f24
diff --git a/.claude/skills/update-graph-ui/SKILL.md b/.claude/skills/update-graph-ui/SKILL.md
new file mode 100644
index 000000000..7d1223baa
--- /dev/null
+++ b/.claude/skills/update-graph-ui/SKILL.md
@@ -0,0 +1,112 @@
+---
+name: update-graph-ui
+description: >
+ 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.
+user_invocable: true
+---
+
+# Update Graph UI Assets
+
+Update the vendored mthds-ui graph viewer assets in pipelex to a new version.
+
+## Prerequisites
+
+- `node` and `npm` must be on PATH
+- Git access to `github.com/Pipelex/mthds-ui`
+
+## Workflow
+
+### 1. Check current state
+
+```bash
+grep '@pipelex/mthds-ui' package.json
+cat pipelex/graph/reactflow/assets/.graph-ui-version
+```
+
+Report the currently pinned version and the currently synced version.
+
+### 2. Determine target version
+
+Ask the user which version to update to, or check the latest tag:
+
+```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
+```
+
+Show the user the latest available version and ask for confirmation.
+
+### 3. Update package.json
+
+Edit `package.json` to change the version tag and update the pinned SHA:
+
+```bash
+git ls-remote https://github.com/Pipelex/mthds-ui.git refs/tags/v<NEW_VERSION> refs/tags/v<NEW_VERSION>^{}
+```
+
+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>"
+}
+```
+
+### 4. Sync assets
+
+```bash
+make sync-graph-ui
+```
+
+This clones mthds-ui at the pinned tag, builds the standalone JS/CSS bundles,
+and copies them to `pipelex/graph/reactflow/assets/`.
+
+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)
+
+### 5. Verify sync
+
+```bash
+make check-graph-ui-sync
+```
+
+Must print "up-to-date". If not, something went wrong in step 4.
+
+### 6. Run graph tests
+
+```bash
+.venv/bin/pytest tests/unit/pipelex/graph/test_reactflow_html.py -v --no-header
+```
+
+All tests must pass. These verify:
+- HTML generation with embedded GraphSpec
+- Bundled JS/CSS is present
+- Config JSON embedding
+- HTML structure validity
+
+### 7. Run full quality checks
+
+```bash
+make agent-check
+```
+
+Ensures the new assets don't break lint, type checking, or any other checks.
+
+### 8. Report
+
+Tell 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`
diff --git a/.github/workflows/graph-ui-check.yml b/.github/workflows/graph-ui-check.yml
new file mode 100644
index 000000000..ee0c262a3
--- /dev/null
+++ b/.github/workflows/graph-ui-check.yml
@@ -0,0 +1,24 @@
+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/"//')
+ SYNCED_VERSION=$(cat pipelex/graph/reactflow/assets/.graph-ui-version 2>/dev/null | tr -d '[:space:]' || echo "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/.gitignore b/.gitignore
index 30d6c1835..bc55bffb2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -72,6 +72,10 @@ mthds-wip
# Derived artifacts (auto-generated, not tracked)
derived/
+# Node.js (used only for syncing mthds-ui graph viewer assets)
+node_modules/
+package-lock.json
+
# Claude plans
.claude/plans/
.gstack/
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 6c602ee57..34e0b43d5 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -35,5 +35,6 @@
"[mthds]": {
"editor.defaultFormatter": "Pipelex.pipelex",
"editor.formatOnSave": true
- }
+ },
+ "pipelex.graph.direction": "left_to_right"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 532538710..c62d496b1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,8 +2,15 @@
## [Unreleased]
+### Added
+
+- **Graph UI asset sync workflow**: `package.json` pins `@pipelex/mthds-ui` to a git tag, `make sync-graph-ui` clones and builds standalone assets, `make check-graph-ui-sync` verifies version alignment
+- **CI check**: `graph-ui-check.yml` workflow validates graph viewer assets match the pinned version on PRs to main
+- **`/update-graph-ui` skill**: automates bumping the mthds-ui version, syncing assets, and running tests
+
### Changed
+- **Graph viewer updated to mthds-ui v0.3.0**: resizable detail panel, escape-to-close, sticky header, prompt expand/collapse with copy button, concept refinement display
- **README install instructions**: Replaced step-by-step Claude Code setup with single copy-paste messages for Claude Code and Codex, added manual install section
## [v0.23.8] - 2026-04-07
diff --git a/Makefile b/Makefile
index 2040382eb..de566a374 100644
--- a/Makefile
+++ b/Makefile
@@ -135,6 +135,11 @@ make docs-deploy-specific-version - Deploy docs for the current version
make docs-deploy-root - Deploy root assets (404.html, robots.txt, index.html) to gh-pages
make 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 server
make view-graph - Start server and open ReactFlow graph in browser
@@ -176,6 +181,7 @@ export HELP
update-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 \
docs-deploy-root
all help:
@@ -944,6 +950,55 @@ sg: serve-graph
vg: view-graph
@echo "> done: vg = view-graph"
+##########################################################################################
+### 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/TODOS.md b/TODOS.md
new file mode 100644
index 000000000..3ec03b87b
--- /dev/null
+++ b/TODOS.md
@@ -0,0 +1,17 @@
+# TODOs
+
+## Graph viewer: use relative URLs for storage assets
+
+**What:** When generating graph HTML output, copy referenced storage files (images, PDFs) into an `assets/` subdirectory next to the HTML file and set `public_url` to relative paths (`assets/filename.ext`) instead of `file://` absolute paths.
+
+**Why:** `file://` URLs are blocked by browsers when the HTML is served over HTTP (e.g., `localhost:3002`). Images and PDFs don't render in the graph viewer panel. Relative URLs work in all contexts: opened as a local file, served over HTTP, zipped and shared, or deployed to cloud.
+
+**Where to start:**
+- `pipelex/tools/storage/local_storage_provider.py:108-119` — where `file://` URLs are generated via `file_path.as_uri()`
+- `pipelex/graph/graph_rendering.py` — where graph HTML is generated. This is where file copying should happen.
+- `pipelex/pipeline/input_normalizer.py:182-239` — where `public_url` is populated on ImageContent/DocumentContent
+- S3/GCP providers already generate absolute HTTPS URLs and need no changes
+
+**Approach:** During graph HTML generation, resolve all `pipelex-storage://` URIs to local file paths, copy them into an `assets/` subdirectory next to the output HTML, and rewrite `public_url` to the relative path. This follows the pattern used by pytest-html, Allure reports, and static site generators.
+
+**Depends on:** Nothing. Self-contained change in pipelex.
diff --git a/package.json b/package.json
new file mode 100644
index 000000000..babf8bb18
--- /dev/null
+++ b/package.json
@@ -0,0 +1,10 @@
+{
+ "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"
+ }
+}
\ No newline at end of file
diff --git a/pipelex/graph/reactflow/assets/.graph-ui-version b/pipelex/graph/reactflow/assets/.graph-ui-version
new file mode 100644
index 000000000..f54b24304
--- /dev/null
+++ b/pipelex/graph/reactflow/assets/.graph-ui-version
@@ -0,0 +1 @@
+v0.3.4
diff --git a/pipelex/graph/reactflow/assets/graph-viewer.css b/pipelex/graph/reactflow/assets/graph-viewer.css
index 8df051667..816749487 100644
--- a/pipelex/graph/reactflow/assets/graph-viewer.css
+++ b/pipelex/graph/reactflow/assets/graph-viewer.css
@@ -886,15 +886,23 @@ svg.react-flow__connectionline {
}
}
-/* Description */
+/* 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: 2;
+ -webkit-line-clamp: 3;
-webkit-box-orient: vertical;
- overflow: hidden;
+}
+.pipe-card--tb .pipe-card-description {
+ white-space: nowrap;
}
/* I/O section — base (appearance only, layout set per-direction below) */
@@ -1242,6 +1250,50 @@ svg.react-flow__connectionline {
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);
@@ -1273,6 +1325,64 @@ svg.react-flow__connectionline {
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;
@@ -1288,7 +1398,7 @@ svg.react-flow__connectionline {
color: #64748b;
font-size: 18px;
line-height: 1;
- z-index: 1;
+ z-index: 3;
}
.detail-panel-close:hover {
@@ -1305,6 +1415,20 @@ svg.react-flow__connectionline {
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 {
@@ -1425,26 +1549,121 @@ svg.react-flow__connectionline {
padding: 10px 12px;
white-space: pre-wrap;
word-break: break-word;
- max-height: 200px;
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: center;
+ 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 ──────────────────────────────────────────────── */
diff --git a/pipelex/graph/reactflow/assets/graph-viewer.js b/pipelex/graph/reactflow/assets/graph-viewer.js
index 03fb19930..eb784b535 100644
--- a/pipelex/graph/reactflow/assets/graph-viewer.js
+++ b/pipelex/graph/reactflow/assets/graph-viewer.js
@@ -1,19 +1,20 @@
-"use strict";(()=>{var jE=Object.create;var Fh=Object.defineProperty;var KE=Object.getOwnPropertyDescriptor;var $E=Object.getOwnPropertyNames;var FE=Object.getPrototypeOf,JE=Object.prototype.hasOwnProperty;var Rt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var WE=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $E(t))!JE.call(e,i)&&i!==n&&Fh(e,i,{get:()=>t[i],enumerable:!(o=KE(t,i))||o.enumerable});return e};var ae=(e,t,n)=>(n=e!=null?jE(FE(e)):{},WE(t||!e||!e.__esModule?Fh(n,"default",{value:e,enumerable:!0}):n,e));var ug=Rt(ue=>{"use strict";var Mf=Symbol.for("react.transitional.element"),eN=Symbol.for("react.portal"),tN=Symbol.for("react.fragment"),nN=Symbol.for("react.strict_mode"),oN=Symbol.for("react.profiler"),iN=Symbol.for("react.consumer"),aN=Symbol.for("react.context"),lN=Symbol.for("react.forward_ref"),rN=Symbol.for("react.suspense"),uN=Symbol.for("react.memo"),ng=Symbol.for("react.lazy"),sN=Symbol.for("react.activity"),Jh=Symbol.iterator;function cN(e){return e===null||typeof e!="object"?null:(e=Jh&&e[Jh]||e["@@iterator"],typeof e=="function"?e:null)}var og={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ig=Object.assign,ag={};function sa(e,t,n){this.props=e,this.context=t,this.refs=ag,this.updater=n||og}sa.prototype.isReactComponent={};sa.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")};sa.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lg(){}lg.prototype=sa.prototype;function Df(e,t,n){this.props=e,this.context=t,this.refs=ag,this.updater=n||og}var Of=Df.prototype=new lg;Of.constructor=Df;ig(Of,sa.prototype);Of.isPureReactComponent=!0;var Wh=Array.isArray;function Af(){}var Re={H:null,A:null,T:null,S:null},rg=Object.prototype.hasOwnProperty;function Rf(e,t,n){var o=n.ref;return{$$typeof:Mf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function fN(e,t){return Rf(e.type,t,e.props)}function zf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Mf}function dN(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var eg=/\/+/g;function wf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?dN(""+e.key):t.toString(36)}function pN(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Af,Af):(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 ua(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 Mf:case eN:l=!0;break;case ng:return l=e._init,ua(l(e._payload),t,n,o,i)}}if(l)return i=i(e),l=o===""?"."+wf(e,0):o,Wh(i)?(n="",l!=null&&(n=l.replace(eg,"$&/")+"/"),ua(i,t,n,"",function(s){return s})):i!=null&&(zf(i)&&(i=fN(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(eg,"$&/")+"/")+l)),t.push(i)),1;l=0;var r=o===""?".":o+":";if(Wh(e))for(var u=0;u<e.length;u++)o=e[u],a=r+wf(o,u),l+=ua(o,t,n,a,i);else if(u=cN(e),typeof u=="function")for(e=u.call(e),u=0;!(o=e.next()).done;)o=o.value,a=r+wf(o,u++),l+=ua(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return ua(pN(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 Au(e,t,n){if(e==null)return e;var o=[],i=0;return ua(e,o,"","",function(a){return t.call(n,a,i++)}),o}function mN(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 tg=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)},hN={map:Au,forEach:function(e,t,n){Au(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Au(e,function(){t++}),t},toArray:function(e){return Au(e,function(t){return t})||[]},only:function(e){if(!zf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ue.Activity=sN;ue.Children=hN;ue.Component=sa;ue.Fragment=tN;ue.Profiler=oN;ue.PureComponent=Df;ue.StrictMode=nN;ue.Suspense=rN;ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Re;ue.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Re.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=ig({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!rg.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 Rf(e.type,i,o)};ue.createContext=function(e){return e={$$typeof:aN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:iN,_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)rg.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 Rf(e,a,i)};ue.createRef=function(){return{current:null}};ue.forwardRef=function(e){return{$$typeof:lN,render:e}};ue.isValidElement=zf;ue.lazy=function(e){return{$$typeof:ng,_payload:{_status:-1,_result:e},_init:mN}};ue.memo=function(e,t){return{$$typeof:uN,type:e,compare:t===void 0?null:t}};ue.startTransition=function(e){var t=Re.T,n={};Re.T=n;try{var o=e(),i=Re.S;i!==null&&i(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Af,tg)}catch(a){tg(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Re.T=t}};ue.unstable_useCacheRefresh=function(){return Re.H.useCacheRefresh()};ue.use=function(e){return Re.H.use(e)};ue.useActionState=function(e,t,n){return Re.H.useActionState(e,t,n)};ue.useCallback=function(e,t){return Re.H.useCallback(e,t)};ue.useContext=function(e){return Re.H.useContext(e)};ue.useDebugValue=function(){};ue.useDeferredValue=function(e,t){return Re.H.useDeferredValue(e,t)};ue.useEffect=function(e,t){return Re.H.useEffect(e,t)};ue.useEffectEvent=function(e){return Re.H.useEffectEvent(e)};ue.useId=function(){return Re.H.useId()};ue.useImperativeHandle=function(e,t,n){return Re.H.useImperativeHandle(e,t,n)};ue.useInsertionEffect=function(e,t){return Re.H.useInsertionEffect(e,t)};ue.useLayoutEffect=function(e,t){return Re.H.useLayoutEffect(e,t)};ue.useMemo=function(e,t){return Re.H.useMemo(e,t)};ue.useOptimistic=function(e,t){return Re.H.useOptimistic(e,t)};ue.useReducer=function(e,t,n){return Re.H.useReducer(e,t,n)};ue.useRef=function(e){return Re.H.useRef(e)};ue.useState=function(e){return Re.H.useState(e)};ue.useSyncExternalStore=function(e,t,n){return Re.H.useSyncExternalStore(e,t,n)};ue.useTransition=function(){return Re.H.useTransition()};ue.version="19.2.4"});var Zt=Rt((AR,sg)=>{"use strict";sg.exports=ug()});var bg=Rt(Ue=>{"use strict";function Uf(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 zn(e){return e.length===0?null:e[0]}function Ou(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}Ue.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(cg=performance,Ue.unstable_now=function(){return cg.now()}):(Lf=Date,fg=Lf.now(),Ue.unstable_now=function(){return Lf.now()-fg});var cg,Lf,fg,Qn=[],Mo=[],gN=1,sn=null,vt=3,Gf=!1,Ml=!1,Dl=!1,kf=!1,mg=typeof setTimeout=="function"?setTimeout:null,hg=typeof clearTimeout=="function"?clearTimeout:null,dg=typeof setImmediate<"u"?setImmediate:null;function Du(e){for(var t=zn(Mo);t!==null;){if(t.callback===null)Ou(Mo);else if(t.startTime<=e)Ou(Mo),t.sortIndex=t.expirationTime,Uf(Qn,t);else break;t=zn(Mo)}}function Vf(e){if(Dl=!1,Du(e),!Ml)if(zn(Qn)!==null)Ml=!0,fa||(fa=!0,ca());else{var t=zn(Mo);t!==null&&Pf(Vf,t.startTime-e)}}var fa=!1,Ol=-1,gg=5,yg=-1;function vg(){return kf?!0:!(Ue.unstable_now()-yg<gg)}function Bf(){if(kf=!1,fa){var e=Ue.unstable_now();yg=e;var t=!0;try{e:{Ml=!1,Dl&&(Dl=!1,hg(Ol),Ol=-1),Gf=!0;var n=vt;try{t:{for(Du(e),sn=zn(Qn);sn!==null&&!(sn.expirationTime>e&&vg());){var o=sn.callback;if(typeof o=="function"){sn.callback=null,vt=sn.priorityLevel;var i=o(sn.expirationTime<=e);if(e=Ue.unstable_now(),typeof i=="function"){sn.callback=i,Du(e),t=!0;break t}sn===zn(Qn)&&Ou(Qn),Du(e)}else Ou(Qn);sn=zn(Qn)}if(sn!==null)t=!0;else{var a=zn(Mo);a!==null&&Pf(Vf,a.startTime-e),t=!1}}break e}finally{sn=null,vt=n,Gf=!1}t=void 0}}finally{t?ca():fa=!1}}}var ca;typeof dg=="function"?ca=function(){dg(Bf)}:typeof MessageChannel<"u"?(Hf=new MessageChannel,pg=Hf.port2,Hf.port1.onmessage=Bf,ca=function(){pg.postMessage(null)}):ca=function(){mg(Bf,0)};var Hf,pg;function Pf(e,t){Ol=mg(function(){e(Ue.unstable_now())},t)}Ue.unstable_IdlePriority=5;Ue.unstable_ImmediatePriority=1;Ue.unstable_LowPriority=4;Ue.unstable_NormalPriority=3;Ue.unstable_Profiling=null;Ue.unstable_UserBlockingPriority=2;Ue.unstable_cancelCallback=function(e){e.callback=null};Ue.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"):gg=0<e?Math.floor(1e3/e):5};Ue.unstable_getCurrentPriorityLevel=function(){return vt};Ue.unstable_next=function(e){switch(vt){case 1:case 2:case 3:var t=3;break;default:t=vt}var n=vt;vt=t;try{return e()}finally{vt=n}};Ue.unstable_requestPaint=function(){kf=!0};Ue.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=vt;vt=e;try{return t()}finally{vt=n}};Ue.unstable_scheduleCallback=function(e,t,n){var o=Ue.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:gN++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,Uf(Mo,e),zn(Qn)===null&&e===zn(Mo)&&(Dl?(hg(Ol),Ol=-1):Dl=!0,Pf(Vf,n-o))):(e.sortIndex=i,Uf(Qn,e),Ml||Gf||(Ml=!0,fa||(fa=!0,ca()))),e};Ue.unstable_shouldYield=vg;Ue.unstable_wrapCallback=function(e){var t=vt;return function(){var n=vt;vt=t;try{return e.apply(this,arguments)}finally{vt=n}}}});var xg=Rt((DR,Sg)=>{"use strict";Sg.exports=bg()});var Eg=Rt(_t=>{"use strict";var yN=Zt();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 Do(){}var xt={d:{f:Do,r:function(){throw Error(_g(522))},D:Do,C:Do,L:Do,m:Do,X:Do,S:Do,M:Do},p:0,findDOMNode:null},vN=Symbol.for("react.portal");function bN(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:vN,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var Rl=yN.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Ru(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}_t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=xt;_t.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(_g(299));return bN(e,t,null,n)};_t.flushSync=function(e){var t=Rl.T,n=xt.p;try{if(Rl.T=null,xt.p=2,e)return e()}finally{Rl.T=t,xt.p=n,xt.d.f()}};_t.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,xt.d.C(e,t))};_t.prefetchDNS=function(e){typeof e=="string"&&xt.d.D(e)};_t.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=Ru(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?xt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&xt.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};_t.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Ru(t.as,t.crossOrigin);xt.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&&xt.d.M(e)};_t.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=Ru(n,t.crossOrigin);xt.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})}};_t.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Ru(t.as,t.crossOrigin);xt.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 xt.d.m(e)};_t.requestFormReset=function(e){xt.d.r(e)};_t.unstable_batchedUpdates=function(e,t){return e(t)};_t.useFormState=function(e,t,n){return Rl.H.useFormState(e,t,n)};_t.useFormStatus=function(){return Rl.H.useHostTransitionStatus()};_t.version="19.2.4"});var If=Rt((RR,Tg)=>{"use strict";function Ng(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ng)}catch(e){console.error(e)}}Ng(),Tg.exports=Eg()});var Ub=Rt(oc=>{"use strict";var nt=xg(),F0=Zt(),SN=If();function V(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 J0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vr(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 W0(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 ey(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 Cg(e){if(vr(e)!==e)throw Error(V(188))}function xN(e){var t=e.alternate;if(!t){if(t=vr(e),t===null)throw Error(V(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 Cg(i),e;if(a===o)return Cg(i),t;a=a.sibling}throw Error(V(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(V(189))}}if(n.alternate!==o)throw Error(V(190))}if(n.tag!==3)throw Error(V(188));return n.stateNode.current===n?e:t}function ty(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=ty(e),t!==null)return t;e=e.sibling}return null}var Be=Object.assign,_N=Symbol.for("react.element"),zu=Symbol.for("react.transitional.element"),Vl=Symbol.for("react.portal"),ya=Symbol.for("react.fragment"),ny=Symbol.for("react.strict_mode"),_d=Symbol.for("react.profiler"),oy=Symbol.for("react.consumer"),to=Symbol.for("react.context"),yp=Symbol.for("react.forward_ref"),Ed=Symbol.for("react.suspense"),Nd=Symbol.for("react.suspense_list"),vp=Symbol.for("react.memo"),Oo=Symbol.for("react.lazy"),Td=Symbol.for("react.activity"),EN=Symbol.for("react.memo_cache_sentinel"),wg=Symbol.iterator;function zl(e){return e===null||typeof e!="object"?null:(e=wg&&e[wg]||e["@@iterator"],typeof e=="function"?e:null)}var NN=Symbol.for("react.client.reference");function Cd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===NN?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ya:return"Fragment";case _d:return"Profiler";case ny:return"StrictMode";case Ed:return"Suspense";case Nd:return"SuspenseList";case Td:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Vl:return"Portal";case to:return e.displayName||"Context";case oy:return(e._context.displayName||"Context")+".Consumer";case yp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vp:return t=e.displayName||null,t!==null?t:Cd(e.type)||"Memo";case Oo:t=e._payload,e=e._init;try{return Cd(e(t))}catch{}}return null}var Pl=Array.isArray,re=F0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=SN.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_i={pending:!1,data:null,method:null,action:null},wd=[],va=-1;function Gn(e){return{current:e}}function rt(e){0>va||(e.current=wd[va],wd[va]=null,va--)}function Oe(e,t){va++,wd[va]=e.current,e.current=t}var Un=Gn(null),ir=Gn(null),Io=Gn(null),ds=Gn(null);function ps(e,t){switch(Oe(Io,t),Oe(ir,e),Oe(Un,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?L0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=L0(t),e=Eb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}rt(Un),Oe(Un,e)}function Ha(){rt(Un),rt(ir),rt(Io)}function Ad(e){e.memoizedState!==null&&Oe(ds,e);var t=Un.current,n=Eb(t,e.type);t!==n&&(Oe(ir,e),Oe(Un,n))}function ms(e){ir.current===e&&(rt(Un),rt(ir)),ds.current===e&&(rt(ds),hr._currentValue=_i)}var Yf,Ag;function vi(e){if(Yf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Yf=t&&t[1]||"",Ag=-1<n.stack.indexOf(`
+"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`
-`+Yf+e+Ag}var Xf=!1;function qf(e,t){if(!e||Xf)return"";Xf=!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(`
+`+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{Xf=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?vi(n):""}function TN(e,t){switch(e.tag){case 26:case 27:case 5:return vi(e.type);case 16:return vi("Lazy");case 13:return e.child!==t&&t!==null?vi("Suspense Fallback"):vi("Suspense");case 19:return vi("SuspenseList");case 0:case 15:return qf(e.type,!1);case 11:return qf(e.type.render,!1);case 1:return qf(e.type,!0);case 31:return vi("Activity");default:return""}}function Mg(e){try{var t="",n=null;do t+=TN(e,n),n=e,e=e.return;while(e);return t}catch(o){return`
+`+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 Md=Object.prototype.hasOwnProperty,bp=nt.unstable_scheduleCallback,Zf=nt.unstable_cancelCallback,CN=nt.unstable_shouldYield,wN=nt.unstable_requestPaint,Ft=nt.unstable_now,AN=nt.unstable_getCurrentPriorityLevel,iy=nt.unstable_ImmediatePriority,ay=nt.unstable_UserBlockingPriority,hs=nt.unstable_NormalPriority,MN=nt.unstable_LowPriority,ly=nt.unstable_IdlePriority,DN=nt.log,ON=nt.unstable_setDisableYieldValue,br=null,Jt=null;function Uo(e){if(typeof DN=="function"&&ON(e),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(br,e)}catch{}}var Wt=Math.clz32?Math.clz32:LN,RN=Math.log,zN=Math.LN2;function LN(e){return e>>>=0,e===0?32:31-(RN(e)/zN|0)|0}var Lu=256,Bu=262144,Hu=4194304;function bi(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 Ps(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=bi(o):(l&=r,l!==0?i=bi(l):n||(n=r&~e,n!==0&&(i=bi(n))))):(r=o&~a,r!==0?i=bi(r):l!==0?i=bi(l):n||(n=o&~e,n!==0&&(i=bi(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 Sr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function BN(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 ry(){var e=Hu;return Hu<<=1,(Hu&62914560)===0&&(Hu=4194304),e}function Qf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function HN(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-Wt(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&&uy(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(l&~t))}function uy(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-Wt(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function sy(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-Wt(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function cy(e,t){var n=t&-t;return n=(n&42)!==0?1:Sp(n),(n&(e.suspendedLanes|t))!==0?0:n}function Sp(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 xp(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function fy(){var e=Ee.p;return e!==0?e:(e=window.event,e===void 0?32:Lb(e.type))}function Dg(e,t){var n=Ee.p;try{return Ee.p=e,t()}finally{Ee.p=n}}var ti=Math.random().toString(36).slice(2),ct="__reactFiber$"+ti,Gt="__reactProps$"+ti,Qa="__reactContainer$"+ti,Dd="__reactEvents$"+ti,UN="__reactListeners$"+ti,GN="__reactHandles$"+ti,Og="__reactResources$"+ti,_r="__reactMarker$"+ti;function _p(e){delete e[ct],delete e[Gt],delete e[Dd],delete e[UN],delete e[GN]}function ba(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qa]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=k0(e);e!==null;){if(n=e[ct])return n;e=k0(e)}return t}e=n,n=e.parentNode}return null}function ja(e){if(e=e[ct]||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 Il(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(V(33))}function Ma(e){var t=e[Og];return t||(t=e[Og]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function lt(e){e[_r]=!0}var dy=new Set,py={};function Ri(e,t){Ua(e,t),Ua(e+"Capture",t)}function Ua(e,t){for(py[e]=t,e=0;e<t.length;e++)dy.add(t[e])}var kN=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]*$"),Rg={},zg={};function VN(e){return Md.call(zg,e)?!0:Md.call(Rg,e)?!1:kN.test(e)?zg[e]=!0:(Rg[e]=!0,!1)}function Fu(e,t,n){if(VN(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 jn(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 fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function my(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function PN(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 Od(e){if(!e._valueTracker){var t=my(e)?"checked":"value";e._valueTracker=PN(e,t,""+e[t])}}function hy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=my(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function gs(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 IN=/[\n"\\]/g;function mn(e){return e.replace(IN,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Rd(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=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?zd(e,l,fn(t)):n!=null?zd(e,l,fn(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=""+fn(r):e.removeAttribute("name")}function gy(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)){Od(e);return}n=n!=null?""+fn(n):"",t=t!=null?""+fn(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),Od(e)}function zd(e,t,n){t==="number"&&gs(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Da(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=""+fn(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 yy(e,t,n){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+fn(n):""}function vy(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(V(92));if(Pl(o)){if(1<o.length)throw Error(V(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=fn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),Od(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 YN=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 Lg(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||YN.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function by(e,t,n){if(t!=null&&typeof t!="object")throw Error(V(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&&Lg(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&Lg(e,a,t[a])}function Ep(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 XN=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"]]),qN=/^[\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 Ju(e){return qN.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function no(){}var Ld=null;function Np(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sa=null,Oa=null;function Bg(e){var t=ja(e);if(t&&(e=t.stateNode)){var n=e[Gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Rd(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="'+mn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[Gt]||null;if(!i)throw Error(V(90));Rd(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&&hy(o)}break e;case"textarea":yy(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Da(e,!!n.multiple,t,!1)}}}var jf=!1;function Sy(e,t,n){if(jf)return e(t,n);jf=!0;try{var o=e(t);return o}finally{if(jf=!1,(Sa!==null||Oa!==null)&&(Ws(),Sa&&(t=Sa,e=Oa,Oa=Sa=null,Bg(t),e)))for(t=0;t<e.length;t++)Bg(e[t])}}function ar(e,t){var n=e.stateNode;if(n===null)return null;var o=n[Gt]||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(V(231,t,typeof n));return n}var ro=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bd=!1;if(ro)try{da={},Object.defineProperty(da,"passive",{get:function(){Bd=!0}}),window.addEventListener("test",da,da),window.removeEventListener("test",da,da)}catch{Bd=!1}var da,Go=null,Tp=null,Wu=null;function xy(){if(Wu)return Wu;var e,t=Tp,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 Wu=i.slice(e,1<o?1-o:void 0)}function es(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 Hg(){return!1}function kt(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:Hg,this.isPropagationStopped=Hg,this}return Be(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 zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Is=kt(zi),Er=Be({},zi,{view:0,detail:0}),ZN=kt(Er),Kf,$f,Ll,Ys=Be({},Er,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cp,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!==Ll&&(Ll&&e.type==="mousemove"?(Kf=e.screenX-Ll.screenX,$f=e.screenY-Ll.screenY):$f=Kf=0,Ll=e),Kf)},movementY:function(e){return"movementY"in e?e.movementY:$f}}),Ug=kt(Ys),QN=Be({},Ys,{dataTransfer:0}),jN=kt(QN),KN=Be({},Er,{relatedTarget:0}),Ff=kt(KN),$N=Be({},zi,{animationName:0,elapsedTime:0,pseudoElement:0}),FN=kt($N),JN=Be({},zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),WN=kt(JN),eT=Be({},zi,{data:0}),Gg=kt(eT),tT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nT={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"},oT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=oT[e])?!!t[e]:!1}function Cp(){return iT}var aT=Be({},Er,{key:function(e){if(e.key){var t=tT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?nT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cp,charCode:function(e){return e.type==="keypress"?es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lT=kt(aT),rT=Be({},Ys,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kg=kt(rT),uT=Be({},Er,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cp}),sT=kt(uT),cT=Be({},zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),fT=kt(cT),dT=Be({},Ys,{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}),pT=kt(dT),mT=Be({},zi,{newState:0,oldState:0}),hT=kt(mT),gT=[9,13,27,32],wp=ro&&"CompositionEvent"in window,ql=null;ro&&"documentMode"in document&&(ql=document.documentMode);var yT=ro&&"TextEvent"in window&&!ql,_y=ro&&(!wp||ql&&8<ql&&11>=ql),Vg=" ",Pg=!1;function Ey(e,t){switch(e){case"keyup":return gT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ny(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xa=!1;function vT(e,t){switch(e){case"compositionend":return Ny(t);case"keypress":return t.which!==32?null:(Pg=!0,Vg);case"textInput":return e=t.data,e===Vg&&Pg?null:e;default:return null}}function bT(e,t){if(xa)return e==="compositionend"||!wp&&Ey(e,t)?(e=xy(),Wu=Tp=Go=null,xa=!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 _y&&t.locale!=="ko"?null:t.data;default:return null}}var ST={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 Ig(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ST[e.type]:t==="textarea"}function Ty(e,t,n,o){Sa?Oa?Oa.push(o):Oa=[o]:Sa=o,t=Ls(t,"onChange"),0<t.length&&(n=new Is("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Zl=null,lr=null;function xT(e){Sb(e,0)}function Xs(e){var t=Il(e);if(hy(t))return e}function Yg(e,t){if(e==="change")return t}var Cy=!1;ro&&(ro?(Vu="oninput"in document,Vu||(Jf=document.createElement("div"),Jf.setAttribute("oninput","return;"),Vu=typeof Jf.oninput=="function"),ku=Vu):ku=!1,Cy=ku&&(!document.documentMode||9<document.documentMode));var ku,Vu,Jf;function Xg(){Zl&&(Zl.detachEvent("onpropertychange",wy),lr=Zl=null)}function wy(e){if(e.propertyName==="value"&&Xs(lr)){var t=[];Ty(t,lr,e,Np(e)),Sy(xT,t)}}function _T(e,t,n){e==="focusin"?(Xg(),Zl=t,lr=n,Zl.attachEvent("onpropertychange",wy)):e==="focusout"&&Xg()}function ET(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xs(lr)}function NT(e,t){if(e==="click")return Xs(t)}function TT(e,t){if(e==="input"||e==="change")return Xs(t)}function CT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tn=typeof Object.is=="function"?Object.is:CT;function rr(e,t){if(tn(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(!Md.call(t,i)||!tn(e[i],t[i]))return!1}return!0}function qg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zg(e,t){var n=qg(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=qg(n)}}function Ay(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ay(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function My(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=gs(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=gs(e.document)}return t}function Ap(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 wT=ro&&"documentMode"in document&&11>=document.documentMode,_a=null,Hd=null,Ql=null,Ud=!1;function Qg(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ud||_a==null||_a!==gs(o)||(o=_a,"selectionStart"in o&&Ap(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}),Ql&&rr(Ql,o)||(Ql=o,o=Ls(Hd,"onSelect"),0<o.length&&(t=new Is("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=_a)))}function yi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ea={animationend:yi("Animation","AnimationEnd"),animationiteration:yi("Animation","AnimationIteration"),animationstart:yi("Animation","AnimationStart"),transitionrun:yi("Transition","TransitionRun"),transitionstart:yi("Transition","TransitionStart"),transitioncancel:yi("Transition","TransitionCancel"),transitionend:yi("Transition","TransitionEnd")},Wf={},Dy={};ro&&(Dy=document.createElement("div").style,"AnimationEvent"in window||(delete Ea.animationend.animation,delete Ea.animationiteration.animation,delete Ea.animationstart.animation),"TransitionEvent"in window||delete Ea.transitionend.transition);function Li(e){if(Wf[e])return Wf[e];if(!Ea[e])return e;var t=Ea[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Dy)return Wf[e]=t[n];return e}var Oy=Li("animationend"),Ry=Li("animationiteration"),zy=Li("animationstart"),AT=Li("transitionrun"),MT=Li("transitionstart"),DT=Li("transitioncancel"),Ly=Li("transitionend"),By=new Map,Gd="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(" ");Gd.push("scrollEnd");function An(e,t){By.set(e,t),Ri(t,[e])}var ys=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)},cn=[],Na=0,Mp=0;function qs(){for(var e=Na,t=Mp=Na=0;t<e;){var n=cn[t];cn[t++]=null;var o=cn[t];cn[t++]=null;var i=cn[t];cn[t++]=null;var a=cn[t];if(cn[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&&Hy(n,i,a)}}function Zs(e,t,n,o){cn[Na++]=e,cn[Na++]=t,cn[Na++]=n,cn[Na++]=o,Mp|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Dp(e,t,n,o){return Zs(e,t,n,o),vs(e)}function Bi(e,t){return Zs(e,null,null,t),vs(e)}function Hy(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-Wt(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function vs(e){if(50<nr)throw nr=0,ap=null,Error(V(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ta={};function OT(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 Kt(e,t,n,o){return new OT(e,t,n,o)}function Op(e){return e=e.prototype,!(!e||!e.isReactComponent)}function io(e,t){var n=e.alternate;return n===null?(n=Kt(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 Uy(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 ts(e,t,n,o,i,a){var l=0;if(o=e,typeof e=="function")Op(e)&&(l=1);else if(typeof e=="string")l=LC(e,n,Un.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Td:return e=Kt(31,n,t,i),e.elementType=Td,e.lanes=a,e;case ya:return Ei(n.children,i,a,t);case ny:l=8,i|=24;break;case _d:return e=Kt(12,n,t,i|2),e.elementType=_d,e.lanes=a,e;case Ed:return e=Kt(13,n,t,i),e.elementType=Ed,e.lanes=a,e;case Nd:return e=Kt(19,n,t,i),e.elementType=Nd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case to:l=10;break e;case oy:l=9;break e;case yp:l=11;break e;case vp:l=14;break e;case Oo:l=16,o=null;break e}l=29,n=Error(V(130,e===null?"null":typeof e,"")),o=null}return t=Kt(l,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function Ei(e,t,n,o){return e=Kt(7,e,o,t),e.lanes=n,e}function ed(e,t,n){return e=Kt(6,e,null,t),e.lanes=n,e}function Gy(e){var t=Kt(18,null,null,0);return t.stateNode=e,t}function td(e,t,n){return t=Kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var jg=new WeakMap;function hn(e,t){if(typeof e=="object"&&e!==null){var n=jg.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Mg(t)},jg.set(e,t),t)}return{value:e,source:t,stack:Mg(t)}}var Ca=[],wa=0,bs=null,ur=0,dn=[],pn=0,Fo=null,Ln=1,Bn="";function Wn(e,t){Ca[wa++]=ur,Ca[wa++]=bs,bs=e,ur=t}function ky(e,t,n){dn[pn++]=Ln,dn[pn++]=Bn,dn[pn++]=Fo,Fo=e;var o=Ln;e=Bn;var i=32-Wt(o)-1;o&=~(1<<i),n+=1;var a=32-Wt(t)+i;if(30<a){var l=i-i%5;a=(o&(1<<l)-1).toString(32),o>>=l,i-=l,Ln=1<<32-Wt(t)+i|n<<i|o,Bn=a+e}else Ln=1<<a|n<<i|o,Bn=e}function Rp(e){e.return!==null&&(Wn(e,1),ky(e,1,0))}function zp(e){for(;e===bs;)bs=Ca[--wa],Ca[wa]=null,ur=Ca[--wa],Ca[wa]=null;for(;e===Fo;)Fo=dn[--pn],dn[pn]=null,Bn=dn[--pn],dn[pn]=null,Ln=dn[--pn],dn[pn]=null}function Vy(e,t){dn[pn++]=Ln,dn[pn++]=Bn,dn[pn++]=Fo,Ln=t.id,Bn=t.overflow,Fo=e}var ft=null,Le=null,be=!1,Yo=null,gn=!1,kd=Error(V(519));function Jo(e){var t=Error(V(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw sr(hn(t,e)),kd}function Kg(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[ct]=e,t[Gt]=o,n){case"dialog":pe("cancel",t),pe("close",t);break;case"iframe":case"object":case"embed":pe("load",t);break;case"video":case"audio":for(n=0;n<pr.length;n++)pe(pr[n],t);break;case"source":pe("error",t);break;case"img":case"image":case"link":pe("error",t),pe("load",t);break;case"details":pe("toggle",t);break;case"input":pe("invalid",t),gy(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":pe("invalid",t);break;case"textarea":pe("invalid",t),vy(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||_b(t.textContent,n)?(o.popover!=null&&(pe("beforetoggle",t),pe("toggle",t)),o.onScroll!=null&&pe("scroll",t),o.onScrollEnd!=null&&pe("scrollend",t),o.onClick!=null&&(t.onclick=no),t=!0):t=!1,t||Jo(e,!0)}function $g(e){for(ft=e.return;ft;)switch(ft.tag){case 5:case 31:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:ft=ft.return}}function pa(e){if(e!==ft)return!1;if(!be)return $g(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")||cp(e.type,e.memoizedProps)),n=!n),n&&Le&&Jo(e),$g(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));Le=G0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));Le=G0(e)}else t===27?(t=Le,ni(e.type)?(e=mp,mp=null,Le=e):Le=t):Le=ft?vn(e.stateNode.nextSibling):null;return!0}function wi(){Le=ft=null,be=!1}function nd(){var e=Yo;return e!==null&&(Ht===null?Ht=e:Ht.push.apply(Ht,e),Yo=null),e}function sr(e){Yo===null?Yo=[e]:Yo.push(e)}var Vd=Gn(null),Hi=null,oo=null;function zo(e,t,n){Oe(Vd,t._currentValue),t._currentValue=n}function ao(e){e._currentValue=Vd.current,rt(Vd)}function Pd(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 Id(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),Pd(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(V(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),Pd(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 Ka(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(V(387));if(l=l.memoizedProps,l!==null){var r=i.type;tn(i.pendingProps.value,l.value)||(e!==null?e.push(r):e=[r])}}else if(i===ds.current){if(l=i.alternate,l===null)throw Error(V(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(hr):e=[hr])}i=i.return}e!==null&&Id(t,e,n,o),t.flags|=262144}function Ss(e){for(e=e.firstContext;e!==null;){if(!tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ai(e){Hi=e,oo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function dt(e){return Py(Hi,e)}function Pu(e,t){return Hi===null&&Ai(e),Py(e,t)}function Py(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},oo===null){if(e===null)throw Error(V(308));oo=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else oo=oo.next=t;return n}var RT=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()})}},zT=nt.unstable_scheduleCallback,LT=nt.unstable_NormalPriority,Je={$$typeof:to,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lp(){return{controller:new RT,data:new Map,refCount:0}}function Nr(e){e.refCount--,e.refCount===0&&zT(LT,function(){e.controller.abort()})}var jl=null,Yd=0,ka=0,Ra=null;function BT(e,t){if(jl===null){var n=jl=[];Yd=0,ka=am(),Ra={status:"pending",value:void 0,then:function(o){n.push(o)}}}return Yd++,t.then(Fg,Fg),t}function Fg(){if(--Yd===0&&jl!==null){Ra!==null&&(Ra.status="fulfilled");var e=jl;jl=null,ka=0,Ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function HT(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 Jg=re.S;re.S=function(e,t){tb=Ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&BT(e,t),Jg!==null&&Jg(e,t)};var Ni=Gn(null);function Bp(){var e=Ni.current;return e!==null?e:De.pooledCache}function ns(e,t){t===null?Oe(Ni,Ni.current):Oe(Ni,t.pool)}function Iy(){var e=Bp();return e===null?null:{parent:Je._currentValue,pool:e}}var $a=Error(V(460)),Hp=Error(V(474)),Qs=Error(V(542)),xs={then:function(){}};function Wg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yy(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(no,no),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,t0(e),e;default:if(typeof t.status=="string")t.then(no,no);else{if(e=De,e!==null&&100<e.shellSuspendCounter)throw Error(V(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,t0(e),e}throw Ti=t,$a}}function Si(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ti=n,$a):n}}var Ti=null;function e0(){if(Ti===null)throw Error(V(459));var e=Ti;return Ti=null,e}function t0(e){if(e===$a||e===Qs)throw Error(V(483))}var za=null,cr=0;function Iu(e){var t=cr;return cr+=1,za===null&&(za=[]),Yy(za,e,t)}function Bl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Yu(e,t){throw t.$$typeof===_N?Error(V(525)):(e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xy(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=io(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=ed(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===ya?c(h,y,p.props.children,v,p.key):y!==null&&(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Oo&&Si(x)===y.type)?(y=i(y,p.props),Bl(y,p),y.return=h,y):(y=ts(p.type,p.key,p.props,null,h.mode,v),Bl(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=td(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=Ei(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=ed(""+y,h.mode,p),y.return=h,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case zu:return p=ts(y.type,y.key,y.props,null,h.mode,p),Bl(p,y),p.return=h,p;case Vl:return y=td(y,h.mode,p),y.return=h,y;case Oo:return y=Si(y),d(h,y,p)}if(Pl(y)||zl(y))return y=Ei(y,h.mode,p,null),y.return=h,y;if(typeof y.then=="function")return d(h,Iu(y),p);if(y.$$typeof===to)return d(h,Pu(h,y),p);Yu(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 zu:return p.key===x?u(h,y,p,v):null;case Vl:return p.key===x?s(h,y,p,v):null;case Oo:return p=Si(p),f(h,y,p,v)}if(Pl(p)||zl(p))return x!==null?null:c(h,y,p,v,null);if(typeof p.then=="function")return f(h,y,Iu(p),v);if(p.$$typeof===to)return f(h,y,Pu(h,p),v);Yu(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 zu: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 Oo:return v=Si(v),m(h,y,p,v,x)}if(Pl(v)||zl(v))return h=h.get(p)||null,c(y,h,v,x,null);if(typeof v.then=="function")return m(h,y,p,Iu(v),x);if(v.$$typeof===to)return m(h,y,p,Pu(y,v),x);Yu(y,v)}return null}function g(h,y,p,v){for(var x=null,N=null,_=y,T=y=0,w=null;_!==null&&T<p.length;T++){_.index>T?(w=_,_=null):w=_.sibling;var G=f(h,_,p[T],v);if(G===null){_===null&&(_=w);break}e&&_&&G.alternate===null&&t(h,_),y=a(G,y,T),N===null?x=G:N.sibling=G,N=G,_=w}if(T===p.length)return n(h,_),be&&Wn(h,T),x;if(_===null){for(;T<p.length;T++)_=d(h,p[T],v),_!==null&&(y=a(_,y,T),N===null?x=_:N.sibling=_,N=_);return be&&Wn(h,T),x}for(_=o(_);T<p.length;T++)w=m(_,h,T,p[T],v),w!==null&&(e&&w.alternate!==null&&_.delete(w.key===null?T:w.key),y=a(w,y,T),N===null?x=w:N.sibling=w,N=w);return e&&_.forEach(function(A){return t(h,A)}),be&&Wn(h,T),x}function b(h,y,p,v){if(p==null)throw Error(V(151));for(var x=null,N=null,_=y,T=y=0,w=null,G=p.next();_!==null&&!G.done;T++,G=p.next()){_.index>T?(w=_,_=null):w=_.sibling;var A=f(h,_,G.value,v);if(A===null){_===null&&(_=w);break}e&&_&&A.alternate===null&&t(h,_),y=a(A,y,T),N===null?x=A:N.sibling=A,N=A,_=w}if(G.done)return n(h,_),be&&Wn(h,T),x;if(_===null){for(;!G.done;T++,G=p.next())G=d(h,G.value,v),G!==null&&(y=a(G,y,T),N===null?x=G:N.sibling=G,N=G);return be&&Wn(h,T),x}for(_=o(_);!G.done;T++,G=p.next())G=m(_,h,T,G.value,v),G!==null&&(e&&G.alternate!==null&&_.delete(G.key===null?T:G.key),y=a(G,y,T),N===null?x=G:N.sibling=G,N=G);return e&&_.forEach(function(L){return t(h,L)}),be&&Wn(h,T),x}function S(h,y,p,v){if(typeof p=="object"&&p!==null&&p.type===ya&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case zu:e:{for(var x=p.key;y!==null;){if(y.key===x){if(x=p.type,x===ya){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===Oo&&Si(x)===y.type){n(h,y.sibling),v=i(y,p.props),Bl(v,p),v.return=h,h=v;break e}n(h,y);break}else t(h,y);y=y.sibling}p.type===ya?(v=Ei(p.props.children,h.mode,v,p.key),v.return=h,h=v):(v=ts(p.type,p.key,p.props,null,h.mode,v),Bl(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=td(p,h.mode,v),v.return=h,h=v}return l(h);case Oo:return p=Si(p),S(h,y,p,v)}if(Pl(p))return g(h,y,p,v);if(zl(p)){if(x=zl(p),typeof x!="function")throw Error(V(150));return p=x.call(p),b(h,y,p,v)}if(typeof p.then=="function")return S(h,y,Iu(p),v);if(p.$$typeof===to)return S(h,y,Pu(h,p),v);Yu(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=ed(p,h.mode,v),v.return=h,h=v),l(h)):n(h,y)}return function(h,y,p,v){try{cr=0;var x=S(h,y,p,v);return za=null,x}catch(_){if(_===$a||_===Qs)throw _;var N=Kt(29,_,null,h.mode);return N.lanes=v,N.return=h,N}}}var Mi=Xy(!0),qy=Xy(!1),Ro=!1;function Up(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xd(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 Xo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qo(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=vs(e),Hy(e,null,n),t}return Zs(e,o,t,n),vs(e)}function Kl(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,sy(e,n)}}function od(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 qd=!1;function $l(){if(qd){var e=Ra;if(e!==null)throw e}}function Fl(e,t,n,o){qd=!1;var i=e.updateQueue;Ro=!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?(ge&f)===f:(o&f)===f){f!==0&&f===ka&&(qd=!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=Be({},d,f);break e;case 2:Ro=!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),ei|=l,e.lanes=l,e.memoizedState=d}}function Zy(e,t){if(typeof e!="function")throw Error(V(191,e));e.call(t)}function Qy(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Zy(n[e],t)}var Va=Gn(null),_s=Gn(0);function n0(e,t){e=fo,Oe(_s,e),Oe(Va,t),fo=e|t.baseLanes}function Zd(){Oe(_s,fo),Oe(Va,Va.current)}function Gp(){fo=_s.current,rt(Va),rt(_s)}var nn=Gn(null),yn=null;function Lo(e){var t=e.alternate;Oe(Qe,Qe.current&1),Oe(nn,e),yn===null&&(t===null||Va.current!==null||t.memoizedState!==null)&&(yn=e)}function Qd(e){Oe(Qe,Qe.current),Oe(nn,e),yn===null&&(yn=e)}function jy(e){e.tag===22?(Oe(Qe,Qe.current),Oe(nn,e),yn===null&&(yn=e)):Bo(e)}function Bo(){Oe(Qe,Qe.current),Oe(nn,nn.current)}function jt(e){rt(nn),yn===e&&(yn=null),rt(Qe)}var Qe=Gn(0);function Es(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||dp(n)||pp(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 uo=0,se=null,we=null,$e=null,Ns=!1,La=!1,Di=!1,Ts=0,fr=0,Ba=null,UT=0;function Pe(){throw Error(V(321))}function kp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tn(e[n],t[n]))return!1;return!0}function Vp(e,t,n,o,i,a){return uo=a,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?Tv:Fp,Di=!1,a=n(o,i),Di=!1,La&&(a=$y(t,n,o,i)),Ky(e),a}function Ky(e){re.H=dr;var t=we!==null&&we.next!==null;if(uo=0,$e=we=se=null,Ns=!1,fr=0,Ba=null,t)throw Error(V(300));e===null||We||(e=e.dependencies,e!==null&&Ss(e)&&(We=!0))}function $y(e,t,n,o){se=e;var i=0;do{if(La&&(Ba=null),fr=0,La=!1,25<=i)throw Error(V(301));if(i+=1,$e=we=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}re.H=Cv,a=t(n,o)}while(La);return a}function GT(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?Tr(t):t,e=e.useState()[0],(we!==null?we.memoizedState:null)!==e&&(se.flags|=1024),t}function Pp(){var e=Ts!==0;return Ts=0,e}function Ip(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Yp(e){if(Ns){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ns=!1}uo=0,$e=we=se=null,La=!1,fr=Ts=0,Ba=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?se.memoizedState=$e=e:$e=$e.next=e,$e}function je(){if(we===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=we.next;var t=$e===null?se.memoizedState:$e.next;if(t!==null)$e=t,we=e;else{if(e===null)throw se.alternate===null?Error(V(467)):Error(V(310));we=e,e={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},$e===null?se.memoizedState=$e=e:$e=$e.next=e}return $e}function js(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tr(e){var t=fr;return fr+=1,Ba===null&&(Ba=[]),e=Yy(Ba,e,t),t=se,($e===null?t.memoizedState:$e.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?Tv:Fp),e}function Ks(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Tr(e);if(e.$$typeof===to)return dt(e)}throw Error(V(438,String(e)))}function Xp(e){var t=null,n=se.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=se.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=js(),se.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]=EN;return t.index++,n}function so(e,t){return typeof t=="function"?t(e):t}function os(e){var t=je();return qp(t,we,e)}function qp(e,t,n){var o=e.queue;if(o===null)throw Error(V(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?(ge&d)===d:(uo&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===ka&&(c=!0);else if((uo&f)===f){s=s.next,f===ka&&(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,se.lanes|=f,ei|=f;d=s.action,Di&&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,se.lanes|=d,ei|=d;s=s.next}while(s!==null&&s!==t);if(u===null?l=a:u.next=r,!tn(a,e.memoizedState)&&(We=!0,c&&(n=Ra,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 id(e){var t=je(),n=t.queue;if(n===null)throw Error(V(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);tn(a,t.memoizedState)||(We=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function Fy(e,t,n){var o=se,i=je(),a=be;if(a){if(n===void 0)throw Error(V(407));n=n()}else n=t();var l=!tn((we||i).memoizedState,n);if(l&&(i.memoizedState=n,We=!0),i=i.queue,Zp(ev.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||$e!==null&&$e.memoizedState.tag&1){if(o.flags|=2048,Pa(9,{destroy:void 0},Wy.bind(null,o,i,n,t),null),De===null)throw Error(V(349));a||(uo&127)!==0||Jy(o,t,n)}return n}function Jy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=se.updateQueue,t===null?(t=js(),se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wy(e,t,n,o){t.value=n,t.getSnapshot=o,tv(t)&&nv(e)}function ev(e,t,n){return n(function(){tv(t)&&nv(e)})}function tv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tn(e,n)}catch{return!0}}function nv(e){var t=Bi(e,2);t!==null&&Ut(t,e,2)}function jd(e){var t=Et();if(typeof e=="function"){var n=e;if(e=n(),Di){Uo(!0);try{n()}finally{Uo(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:so,lastRenderedState:e},t}function ov(e,t,n,o){return e.baseState=n,qp(e,we,typeof o=="function"?o:so)}function kT(e,t,n,o,i){if(Fs(e))throw Error(V(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)}};re.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,iv(t,a)):(a.next=n.next,t.pending=n.next=a)}}function iv(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=re.T,l={};re.T=l;try{var r=n(i,o),u=re.S;u!==null&&u(l,r),o0(e,t,r)}catch(s){Kd(e,t,s)}finally{a!==null&&l.types!==null&&(a.types=l.types),re.T=a}}else try{a=n(i,o),o0(e,t,a)}catch(s){Kd(e,t,s)}}function o0(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){i0(e,t,o)},function(o){return Kd(e,t,o)}):i0(e,t,n)}function i0(e,t,n){t.status="fulfilled",t.value=n,av(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,iv(e,n)))}function Kd(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,av(t),t=t.next;while(t!==o)}e.action=null}function av(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function lv(e,t){return t}function a0(e,t){if(be){var n=De.formState;if(n!==null){e:{var o=se;if(be){if(Le){t:{for(var i=Le,a=gn;i.nodeType!==8;){if(!a){i=null;break t}if(i=vn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){Le=vn(i.nextSibling),o=i.data==="F!";break e}}Jo(o)}o=!1}o&&(t=n[0])}}return n=Et(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lv,lastRenderedState:t},n.queue=o,n=_v.bind(null,se,o),o.dispatch=n,o=jd(!1),a=$p.bind(null,se,!1,o.queue),o=Et(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=kT.bind(null,se,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function l0(e){var t=je();return rv(t,we,e)}function rv(e,t,n){if(t=qp(e,t,lv)[0],e=os(so)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=Tr(t)}catch(l){throw l===$a?Qs:l}else o=t;t=je();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(se.flags|=2048,Pa(9,{destroy:void 0},VT.bind(null,i,n),null)),[o,a,e]}function VT(e,t){e.action=t}function r0(e){var t=je(),n=we;if(n!==null)return rv(t,n,e);je(),t=t.memoizedState,n=je();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function Pa(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=se.updateQueue,t===null&&(t=js(),se.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 uv(){return je().memoizedState}function is(e,t,n,o){var i=Et();se.flags|=e,i.memoizedState=Pa(1|t,{destroy:void 0},n,o===void 0?null:o)}function $s(e,t,n,o){var i=je();o=o===void 0?null:o;var a=i.memoizedState.inst;we!==null&&o!==null&&kp(o,we.memoizedState.deps)?i.memoizedState=Pa(t,a,n,o):(se.flags|=e,i.memoizedState=Pa(1|t,a,n,o))}function u0(e,t){is(8390656,8,e,t)}function Zp(e,t){$s(2048,8,e,t)}function PT(e){se.flags|=4;var t=se.updateQueue;if(t===null)t=js(),se.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function sv(e){var t=je().memoizedState;return PT({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(V(440));return t.impl.apply(void 0,arguments)}}function cv(e,t){return $s(4,2,e,t)}function fv(e,t){return $s(4,4,e,t)}function dv(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 pv(e,t,n){n=n!=null?n.concat([e]):null,$s(4,4,dv.bind(null,t,e),n)}function Qp(){}function mv(e,t){var n=je();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&kp(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function hv(e,t){var n=je();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&kp(t,o[1]))return o[0];if(o=e(),Di){Uo(!0);try{e()}finally{Uo(!1)}}return n.memoizedState=[o,t],o}function jp(e,t,n){return n===void 0||(uo&1073741824)!==0&&(ge&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=ob(),se.lanes|=e,ei|=e,n)}function gv(e,t,n,o){return tn(n,t)?n:Va.current!==null?(e=jp(e,n,o),tn(e,t)||(We=!0),e):(uo&42)===0||(uo&1073741824)!==0&&(ge&261930)===0?(We=!0,e.memoizedState=n):(e=ob(),se.lanes|=e,ei|=e,t)}function yv(e,t,n,o,i){var a=Ee.p;Ee.p=a!==0&&8>a?a:8;var l=re.T,r={};re.T=r,$p(e,!1,t,n);try{var u=i(),s=re.S;if(s!==null&&s(r,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=HT(u,o);Jl(e,t,c,en(e))}else Jl(e,t,o,en(e))}catch(d){Jl(e,t,{then:function(){},status:"rejected",reason:d},en())}finally{Ee.p=a,l!==null&&r.types!==null&&(l.types=r.types),re.T=l}}function IT(){}function $d(e,t,n,o){if(e.tag!==5)throw Error(V(476));var i=vv(e).queue;yv(e,i,t,_i,n===null?IT:function(){return bv(e),n(o)})}function vv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:_i,baseState:_i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:so,lastRenderedState:_i},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:so,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bv(e){var t=vv(e);t.next===null&&(t=e.alternate.memoizedState),Jl(e,t.next.queue,{},en())}function Kp(){return dt(hr)}function Sv(){return je().memoizedState}function xv(){return je().memoizedState}function YT(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=en();e=Xo(n);var o=qo(t,e,n);o!==null&&(Ut(o,t,n),Kl(o,t,n)),t={cache:Lp()},e.payload=t;return}t=t.return}}function XT(e,t,n){var o=en();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Ev(t,n):(n=Dp(e,t,n,o),n!==null&&(Ut(n,e,o),Nv(n,t,o)))}function _v(e,t,n){var o=en();Jl(e,t,n,o)}function Jl(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Ev(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,tn(r,l))return Zs(e,t,i,0),De===null&&qs(),!1}catch{}if(n=Dp(e,t,i,o),n!==null)return Ut(n,e,o),Nv(n,t,o),!0}return!1}function $p(e,t,n,o){if(o={lane:2,revertLane:am(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(V(479))}else t=Dp(e,n,o,2),t!==null&&Ut(t,e,2)}function Fs(e){var t=e.alternate;return e===se||t!==null&&t===se}function Ev(e,t){La=Ns=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Nv(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,sy(e,n)}}var dr={readContext:dt,use:Ks,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe};dr.useEffectEvent=Pe;var Tv={readContext:dt,use:Ks,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:dt,useEffect:u0,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,is(4194308,4,dv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){is(4,2,e,t)},useMemo:function(e,t){var n=Et();t=t===void 0?null:t;var o=e();if(Di){Uo(!0);try{e()}finally{Uo(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=Et();if(n!==void 0){var i=n(t);if(Di){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=XT.bind(null,se,e),[o.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:function(e){e=jd(e);var t=e.queue,n=_v.bind(null,se,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qp,useDeferredValue:function(e,t){var n=Et();return jp(n,e,t)},useTransition:function(){var e=jd(!1);return e=yv.bind(null,se,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=se,i=Et();if(be){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),De===null)throw Error(V(349));(ge&127)!==0||Jy(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,u0(ev.bind(null,o,a,e),[e]),o.flags|=2048,Pa(9,{destroy:void 0},Wy.bind(null,o,a,n,t),null),n},useId:function(){var e=Et(),t=De.identifierPrefix;if(be){var n=Bn,o=Ln;n=(o&~(1<<32-Wt(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ts++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=UT++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Kp,useFormState:a0,useActionState:a0,useOptimistic:function(e){var t=Et();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=$p.bind(null,se,!0,n),n.dispatch=t,[e,t]},useMemoCache:Xp,useCacheRefresh:function(){return Et().memoizedState=YT.bind(null,se)},useEffectEvent:function(e){var t=Et(),n={impl:e};return t.memoizedState=n,function(){if((_e&2)!==0)throw Error(V(440));return n.impl.apply(void 0,arguments)}}},Fp={readContext:dt,use:Ks,useCallback:mv,useContext:dt,useEffect:Zp,useImperativeHandle:pv,useInsertionEffect:cv,useLayoutEffect:fv,useMemo:hv,useReducer:os,useRef:uv,useState:function(){return os(so)},useDebugValue:Qp,useDeferredValue:function(e,t){var n=je();return gv(n,we.memoizedState,e,t)},useTransition:function(){var e=os(so)[0],t=je().memoizedState;return[typeof e=="boolean"?e:Tr(e),t]},useSyncExternalStore:Fy,useId:Sv,useHostTransitionStatus:Kp,useFormState:l0,useActionState:l0,useOptimistic:function(e,t){var n=je();return ov(n,we,e,t)},useMemoCache:Xp,useCacheRefresh:xv};Fp.useEffectEvent=sv;var Cv={readContext:dt,use:Ks,useCallback:mv,useContext:dt,useEffect:Zp,useImperativeHandle:pv,useInsertionEffect:cv,useLayoutEffect:fv,useMemo:hv,useReducer:id,useRef:uv,useState:function(){return id(so)},useDebugValue:Qp,useDeferredValue:function(e,t){var n=je();return we===null?jp(n,e,t):gv(n,we.memoizedState,e,t)},useTransition:function(){var e=id(so)[0],t=je().memoizedState;return[typeof e=="boolean"?e:Tr(e),t]},useSyncExternalStore:Fy,useId:Sv,useHostTransitionStatus:Kp,useFormState:r0,useActionState:r0,useOptimistic:function(e,t){var n=je();return we!==null?ov(n,we,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Xp,useCacheRefresh:xv};Cv.useEffectEvent=sv;function ad(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:Be({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fd={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=en(),i=Xo(o);i.payload=t,n!=null&&(i.callback=n),t=qo(e,i,o),t!==null&&(Ut(t,e,o),Kl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=en(),i=Xo(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=qo(e,i,o),t!==null&&(Ut(t,e,o),Kl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=en(),o=Xo(n);o.tag=2,t!=null&&(o.callback=t),t=qo(e,o,n),t!==null&&(Ut(t,e,n),Kl(t,e,n))}};function s0(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?!rr(n,o)||!rr(i,a):!0}function c0(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&&Fd.enqueueReplaceState(t,t.state,null)}function Oi(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=Be({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function wv(e){ys(e)}function Av(e){console.error(e)}function Mv(e){ys(e)}function Cs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function f0(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 Jd(e,t,n){return n=Xo(n),n.tag=3,n.payload={element:null},n.callback=function(){Cs(e,t)},n}function Dv(e){return e=Xo(e),e.tag=3,e}function Ov(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(){f0(t,n,o)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){f0(t,n,o),typeof i!="function"&&(Zo===null?Zo=new Set([this]):Zo.add(this));var r=o.stack;this.componentDidCatch(o.value,{componentStack:r!==null?r:""})})}function qT(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&Ka(t,n,i,!0),n=nn.current,n!==null){switch(n.tag){case 31:case 13:return yn===null?Os():n.alternate===null&&Ie===0&&(Ie=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===xs?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),gd(e,o,i)),!1;case 22:return n.flags|=65536,o===xs?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)),gd(e,o,i)),!1}throw Error(V(435,n.tag))}return gd(e,o,i),Os(),!1}if(be)return t=nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==kd&&(e=Error(V(422),{cause:o}),sr(hn(e,n)))):(o!==kd&&(t=Error(V(423),{cause:o}),sr(hn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=hn(o,n),i=Jd(e.stateNode,o,i),od(e,i),Ie!==4&&(Ie=2)),!1;var a=Error(V(520),{cause:o});if(a=hn(a,n),tr===null?tr=[a]:tr.push(a),Ie!==4&&(Ie=2),t===null)return!0;o=hn(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Jd(n.stateNode,o,e),od(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"&&(Zo===null||!Zo.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Dv(i),Ov(i,e,n,o),od(n,i),!1}n=n.return}while(n!==null);return!1}var Jp=Error(V(461)),We=!1;function st(e,t,n,o){t.child=e===null?qy(t,null,n,o):Mi(t,e.child,n,o)}function d0(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 Ai(t),o=Vp(e,t,n,l,a,i),r=Pp(),e!==null&&!We?(Ip(e,t,i),co(e,t,i)):(be&&r&&Rp(t),t.flags|=1,st(e,t,o,i),t.child)}function p0(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!Op(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Rv(e,t,a,o,i)):(e=ts(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Wp(e,i)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:rr,n(l,o)&&e.ref===t.ref)return co(e,t,i)}return t.flags|=1,e=io(a,o),e.ref=t.ref,e.return=t,t.child=e}function Rv(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(rr(a,o)&&e.ref===t.ref)if(We=!1,t.pendingProps=o=a,Wp(e,i))(e.flags&131072)!==0&&(We=!0);else return t.lanes=e.lanes,co(e,t,i)}return Wd(e,t,n,o,i)}function zv(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 m0(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ns(t,a!==null?a.cachePool:null),a!==null?n0(t,a):Zd(),jy(t);else return o=t.lanes=536870912,m0(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(ns(t,a.cachePool),n0(t,a),Bo(t),t.memoizedState=null):(e!==null&&ns(t,null),Zd(),Bo(t));return st(e,t,i,n),t.child}function Yl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function m0(e,t,n,o,i){var a=Bp();return a=a===null?null:{parent:Je._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ns(t,null),Zd(),jy(t),e!==null&&Ka(e,t,o,!0),t.childLanes=i,null}function as(e,t){return t=ws({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function h0(e,t,n){return Mi(t,e.child,null,n),e=as(t,t.pendingProps),e.flags|=2,jt(t),t.memoizedState=null,e}function ZT(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=as(t,o),t.lanes=536870912,Yl(null,e);if(Qd(t),(e=Le)?(e=Tb(e,gn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fo!==null?{id:Ln,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},n=Gy(e),n.return=t,t.child=n,ft=t,Le=null)):e=null,e===null)throw Jo(t);return t.lanes=536870912,null}return as(t,o)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(Qd(t),i)if(t.flags&256)t.flags&=-257,t=h0(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(V(558));else if(We||Ka(e,t,n,!1),i=(n&e.childLanes)!==0,We||i){if(o=De,o!==null&&(l=cy(o,n),l!==0&&l!==a.retryLane))throw a.retryLane=l,Bi(e,l),Ut(o,e,l),Jp;Os(),t=h0(e,t,n)}else e=a.treeContext,Le=vn(l.nextSibling),ft=t,be=!0,Yo=null,gn=!1,e!==null&&Vy(t,e),t=as(t,o),t.flags|=4096;return t}return e=io(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ls(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(V(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Wd(e,t,n,o,i){return Ai(t),n=Vp(e,t,n,o,void 0,i),o=Pp(),e!==null&&!We?(Ip(e,t,i),co(e,t,i)):(be&&o&&Rp(t),t.flags|=1,st(e,t,n,i),t.child)}function g0(e,t,n,o,i,a){return Ai(t),t.updateQueue=null,n=$y(t,o,n,i),Ky(e),o=Pp(),e!==null&&!We?(Ip(e,t,a),co(e,t,a)):(be&&o&&Rp(t),t.flags|=1,st(e,t,n,a),t.child)}function y0(e,t,n,o,i){if(Ai(t),t.stateNode===null){var a=Ta,l=n.contextType;typeof l=="object"&&l!==null&&(a=dt(l)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Fd,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},Up(t),l=n.contextType,a.context=typeof l=="object"&&l!==null?dt(l):Ta,a.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(ad(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&&Fd.enqueueReplaceState(a,a.state,null),Fl(t,o,a,i),$l(),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=Oi(n,r);a.props=u;var s=a.context,c=n.contextType;l=Ta,typeof c=="object"&&c!==null&&(l=dt(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)&&c0(t,a,o,l),Ro=!1;var f=t.memoizedState;a.state=f,Fl(t,o,a,i),$l(),s=t.memoizedState,r||f!==s||Ro?(typeof d=="function"&&(ad(t,n,d,o),s=t.memoizedState),(u=Ro||s0(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,Xd(e,t),l=t.memoizedProps,c=Oi(n,l),a.props=c,d=t.pendingProps,f=a.context,s=n.contextType,u=Ta,typeof s=="object"&&s!==null&&(u=dt(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)&&c0(t,a,o,u),Ro=!1,f=t.memoizedState,a.state=f,Fl(t,o,a,i),$l();var m=t.memoizedState;l!==d||f!==m||Ro||e!==null&&e.dependencies!==null&&Ss(e.dependencies)?(typeof r=="function"&&(ad(t,n,r,o),m=t.memoizedState),(c=Ro||s0(t,n,c,o,f,m,u)||e!==null&&e.dependencies!==null&&Ss(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,ls(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)):st(e,t,n,i),t.memoizedState=a.state,e=t.child):e=co(e,t,i),e}function v0(e,t,n,o){return wi(),t.flags|=256,st(e,t,n,o),t.child}var ld={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rd(e){return{baseLanes:e,cachePool:Iy()}}function ud(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=$t),e}function Lv(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:(Qe.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(be){if(i?Lo(t):Bo(t),(e=Le)?(e=Tb(e,gn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fo!==null?{id:Ln,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},n=Gy(e),n.return=t,t.child=n,ft=t,Le=null)):e=null,e===null)throw Jo(t);return pp(e)?t.lanes=32:t.lanes=536870912,null}var r=o.children;return o=o.fallback,i?(Bo(t),i=t.mode,r=ws({mode:"hidden",children:r},i),o=Ei(o,i,n,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=rd(n),o.childLanes=ud(e,l,n),t.memoizedState=ld,Yl(null,o)):(Lo(t),ep(t,r))}var u=e.memoizedState;if(u!==null&&(r=u.dehydrated,r!==null)){if(a)t.flags&256?(Lo(t),t.flags&=-257,t=sd(e,t,n)):t.memoizedState!==null?(Bo(t),t.child=e.child,t.flags|=128,t=null):(Bo(t),r=o.fallback,i=t.mode,o=ws({mode:"visible",children:o.children},i),r=Ei(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=rd(n),o.childLanes=ud(e,l,n),t.memoizedState=ld,t=Yl(null,o));else if(Lo(t),pp(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var s=l.dgst;l=s,o=Error(V(419)),o.stack="",o.digest=l,sr({value:o,source:null,stack:null}),t=sd(e,t,n)}else if(We||Ka(e,t,n,!1),l=(n&e.childLanes)!==0,We||l){if(l=De,l!==null&&(o=cy(l,n),o!==0&&o!==u.retryLane))throw u.retryLane=o,Bi(e,o),Ut(l,e,o),Jp;dp(r)||Os(),t=sd(e,t,n)}else dp(r)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,Le=vn(r.nextSibling),ft=t,be=!0,Yo=null,gn=!1,e!==null&&Vy(t,e),t=ep(t,o.children),t.flags|=4096);return t}return i?(Bo(t),r=o.fallback,i=t.mode,u=e.child,s=u.sibling,o=io(u,{mode:"hidden",children:o.children}),o.subtreeFlags=u.subtreeFlags&65011712,s!==null?r=io(s,r):(r=Ei(r,i,n,null),r.flags|=2),r.return=t,o.return=t,o.sibling=r,t.child=o,Yl(null,o),o=t.child,r=e.child.memoizedState,r===null?r=rd(n):(i=r.cachePool,i!==null?(u=Je._currentValue,i=i.parent!==u?{parent:u,pool:u}:i):i=Iy(),r={baseLanes:r.baseLanes|n,cachePool:i}),o.memoizedState=r,o.childLanes=ud(e,l,n),t.memoizedState=ld,Yl(e.child,o)):(Lo(t),n=e.child,e=n.sibling,n=io(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 ep(e,t){return t=ws({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ws(e,t){return e=Kt(22,e,null,t),e.lanes=0,e}function sd(e,t,n){return Mi(t,e.child,null,n),e=ep(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function b0(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Pd(e.return,t,n)}function cd(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 Bv(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var l=Qe.current,r=(l&2)!==0;if(r?(l=l&1|2,t.flags|=128):l&=1,Oe(Qe,l),st(e,t,o,n),o=be?ur:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&b0(e,n,t);else if(e.tag===19)b0(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&&Es(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),cd(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&&Es(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}cd(t,!0,n,null,a,o);break;case"together":cd(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function co(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ei|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ka(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,n=io(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=io(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Wp(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ss(e)))}function QT(e,t,n){switch(t.tag){case 3:ps(t,t.stateNode.containerInfo),zo(t,Je,e.memoizedState.cache),wi();break;case 27:case 5:Ad(t);break;case 4:ps(t,t.stateNode.containerInfo);break;case 10:zo(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qd(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(Lo(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Lv(e,t,n):(Lo(t),e=co(e,t,n),e!==null?e.sibling:null);Lo(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(Ka(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return Bv(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Oe(Qe,Qe.current),o)break;return null;case 22:return t.lanes=0,zv(e,t,n,t.pendingProps);case 24:zo(t,Je,e.memoizedState.cache)}return co(e,t,n)}function Hv(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)We=!0;else{if(!Wp(e,n)&&(t.flags&128)===0)return We=!1,QT(e,t,n);We=(e.flags&131072)!==0}else We=!1,be&&(t.flags&1048576)!==0&&ky(t,ur,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Si(t.elementType),t.type=e,typeof e=="function")Op(e)?(o=Oi(e,o),t.tag=1,t=y0(null,t,e,o,n)):(t.tag=0,t=Wd(null,t,e,o,n));else{if(e!=null){var i=e.$$typeof;if(i===yp){t.tag=11,t=d0(null,t,e,o,n);break e}else if(i===vp){t.tag=14,t=p0(null,t,e,o,n);break e}}throw t=Cd(e)||e,Error(V(306,t,""))}}return t;case 0:return Wd(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=Oi(o,t.pendingProps),y0(e,t,o,i,n);case 3:e:{if(ps(t,t.stateNode.containerInfo),e===null)throw Error(V(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,Xd(e,t),Fl(t,o,null,n);var l=t.memoizedState;if(o=l.cache,zo(t,Je,o),o!==a.cache&&Id(t,[Je],n,!0),$l(),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=v0(e,t,o,n);break e}else if(o!==i){i=hn(Error(V(424)),t),sr(i),t=v0(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,Le=vn(e.firstChild),ft=t,be=!0,Yo=null,gn=!0,n=qy(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wi(),o===i){t=co(e,t,n);break e}st(e,t,o,n)}t=t.child}return t;case 26:return ls(e,t),e===null?(n=P0(t.type,null,t.pendingProps,null))?t.memoizedState=n:be||(n=t.type,e=t.pendingProps,o=Bs(Io.current).createElement(n),o[ct]=t,o[Gt]=e,pt(o,n,e),lt(o),t.stateNode=o):t.memoizedState=P0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ad(t),e===null&&be&&(o=t.stateNode=Cb(t.type,t.pendingProps,Io.current),ft=t,gn=!0,i=Le,ni(t.type)?(mp=i,Le=vn(o.firstChild)):Le=i),st(e,t,t.pendingProps.children,n),ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&be&&((i=o=Le)&&(o=xC(o,t.type,t.pendingProps,gn),o!==null?(t.stateNode=o,ft=t,Le=vn(o.firstChild),gn=!1,i=!0):i=!1),i||Jo(t)),Ad(t),i=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,o=a.children,cp(i,a)?o=null:l!==null&&cp(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=Vp(e,t,GT,null,null,n),hr._currentValue=i),ls(e,t),st(e,t,o,n),t.child;case 6:return e===null&&be&&((e=n=Le)&&(n=_C(n,t.pendingProps,gn),n!==null?(t.stateNode=n,ft=t,Le=null,e=!0):e=!1),e||Jo(t)),null;case 13:return Lv(e,t,n);case 4:return ps(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Mi(t,null,o,n):st(e,t,o,n),t.child;case 11:return d0(e,t,t.type,t.pendingProps,n);case 7:return st(e,t,t.pendingProps,n),t.child;case 8:return st(e,t,t.pendingProps.children,n),t.child;case 12:return st(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,zo(t,t.type,o.value),st(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,Ai(t),i=dt(i),o=o(i),t.flags|=1,st(e,t,o,n),t.child;case 14:return p0(e,t,t.type,t.pendingProps,n);case 15:return Rv(e,t,t.type,t.pendingProps,n);case 19:return Bv(e,t,n);case 31:return ZT(e,t,n);case 22:return zv(e,t,n,t.pendingProps);case 24:return Ai(t),o=dt(Je),e===null?(i=Bp(),i===null&&(i=De,a=Lp(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},Up(t),zo(t,Je,i)):((e.lanes&n)!==0&&(Xd(e,t),Fl(t,null,null,n),$l()),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),zo(t,Je,o)):(o=a.cache,zo(t,Je,o),o!==i.cache&&Id(t,[Je],n,!0))),st(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(V(156,t.tag))}function Kn(e){e.flags|=4}function fd(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(lb())e.flags|=8192;else throw Ti=xs,Hp}else e.flags&=-16777217}function S0(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Mb(t))if(lb())e.flags|=8192;else throw Ti=xs,Hp}function Xu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ry():536870912,e.lanes|=t,Ia|=t)}function Hl(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 ze(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 jT(e,t,n){var o=t.pendingProps;switch(zp(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),ao(Je),Ha(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(pa(t)?Kn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,nd())),ze(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Kn(t),a!==null?(ze(t),S0(t,a)):(ze(t),fd(t,i,null,o,n))):a?a!==e.memoizedState?(Kn(t),ze(t),S0(t,a)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&Kn(t),ze(t),fd(t,i,e,o,n)),null;case 27:if(ms(t),n=Io.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Kn(t);else{if(!o){if(t.stateNode===null)throw Error(V(166));return ze(t),null}e=Un.current,pa(t)?Kg(t,e):(e=Cb(i,o,n),t.stateNode=e,Kn(t))}return ze(t),null;case 5:if(ms(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Kn(t);else{if(!o){if(t.stateNode===null)throw Error(V(166));return ze(t),null}if(a=Un.current,pa(t))Kg(t,a);else{var l=Bs(Io.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[ct]=t,a[Gt]=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(pt(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&&Kn(t)}}return ze(t),fd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&Kn(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(V(166));if(e=Io.current,pa(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=ft,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||_b(e.nodeValue,n)),e||Jo(t,!0)}else e=Bs(e).createTextNode(o),e[ct]=t,t.stateNode=e}return ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=pa(t),n!==null){if(e===null){if(!o)throw Error(V(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(557));e[ct]=t}else wi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else n=nd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(jt(t),t):(jt(t),null);if((t.flags&128)!==0)throw Error(V(558))}return ze(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=pa(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(V(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(V(317));i[ct]=t}else wi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),i=!1}else i=nd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(jt(t),t):(jt(t),null)}return jt(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),Xu(t,t.updateQueue),ze(t),null);case 4:return Ha(),e===null&&lm(t.stateNode.containerInfo),ze(t),null;case 10:return ao(t.type),ze(t),null;case 19:if(rt(Qe),o=t.memoizedState,o===null)return ze(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)Hl(o,!1);else{if(Ie!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Es(e),a!==null){for(t.flags|=128,Hl(o,!1),e=a.updateQueue,t.updateQueue=e,Xu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Uy(n,e),n=n.sibling;return Oe(Qe,Qe.current&1|2),be&&Wn(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&Ft()>Ms&&(t.flags|=128,i=!0,Hl(o,!1),t.lanes=4194304)}else{if(!i)if(e=Es(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Xu(t,e),Hl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!be)return ze(t),null}else 2*Ft()-o.renderingStartTime>Ms&&n!==536870912&&(t.flags|=128,i=!0,Hl(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=Ft(),e.sibling=null,n=Qe.current,Oe(Qe,i?n&1|2:n&1),be&&Wn(t,o.treeForkCount),e):(ze(t),null);case 22:case 23:return jt(t),Gp(),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&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),n=t.updateQueue,n!==null&&Xu(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&&rt(Ni),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ao(Je),ze(t),null;case 25:return null;case 30:return null}throw Error(V(156,t.tag))}function KT(e,t){switch(zp(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ao(Je),Ha(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ms(t),null;case 31:if(t.memoizedState!==null){if(jt(t),t.alternate===null)throw Error(V(340));wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(Qe),null;case 4:return Ha(),null;case 10:return ao(t.type),null;case 22:case 23:return jt(t),Gp(),e!==null&&rt(Ni),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ao(Je),null;case 25:return null;default:return null}}function Uv(e,t){switch(zp(t),t.tag){case 3:ao(Je),Ha();break;case 26:case 27:case 5:ms(t);break;case 4:Ha();break;case 31:t.memoizedState!==null&&jt(t);break;case 13:jt(t);break;case 19:rt(Qe);break;case 10:ao(t.type);break;case 22:case 23:jt(t),Gp(),e!==null&&rt(Ni);break;case 24:ao(Je)}}function Cr(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){Te(t,t.return,r)}}function Wo(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){Te(i,u,c)}}}o=o.next}while(o!==a)}}catch(c){Te(t,t.return,c)}}function Gv(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qy(t,n)}catch(o){Te(e,e.return,o)}}}function kv(e,t,n){n.props=Oi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){Te(e,t,o)}}function Wl(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){Te(e,t,i)}}function Hn(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){Te(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){Te(e,t,i)}else n.current=null}function Vv(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){Te(e,e.return,i)}}function dd(e,t,n){try{var o=e.stateNode;hC(o,e.type,n,t),o[Gt]=t}catch(i){Te(e,e.return,i)}}function Pv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ni(e.type)||e.tag===4}function pd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pv(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&&ni(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 tp(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=no));else if(o!==4&&(o===27&&ni(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(tp(e,t,n),e=e.sibling;e!==null;)tp(e,t,n),e=e.sibling}function As(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&&ni(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(As(e,t,n),e=e.sibling;e!==null;)As(e,t,n),e=e.sibling}function Iv(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);pt(t,o,n),t[ct]=e,t[Gt]=n}catch(a){Te(e,e.return,a)}}var eo=!1,Fe=!1,md=!1,x0=typeof WeakSet=="function"?WeakSet:Set,at=null;function $T(e,t){if(e=e.containerInfo,up=ks,e=My(e),Ap(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(sp={focusedElem:e,selectionRange:n},ks=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){switch(t=at,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=Oi(n.type,i);e=o.getSnapshotBeforeUpdate(g,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){Te(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)fp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":fp(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(V(163))}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}}function Yv(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Fn(e,n),o&4&&Cr(5,n);break;case 1:if(Fn(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Te(n,n.return,l)}else{var i=Oi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Te(n,n.return,l)}}o&64&&Gv(n),o&512&&Wl(n,n.return);break;case 3:if(Fn(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{Qy(e,t)}catch(l){Te(n,n.return,l)}}break;case 27:t===null&&o&4&&Iv(n);case 26:case 5:Fn(e,n),t===null&&o&4&&Vv(n),o&512&&Wl(n,n.return);break;case 12:Fn(e,n);break;case 31:Fn(e,n),o&4&&Zv(e,n);break;case 13:Fn(e,n),o&4&&Qv(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=aC.bind(null,n),EC(e,n))));break;case 22:if(o=n.memoizedState!==null||eo,!o){t=t!==null&&t.memoizedState!==null||Fe,i=eo;var a=Fe;eo=o,(Fe=t)&&!a?Jn(e,n,(n.subtreeFlags&8772)!==0):Fn(e,n),eo=i,Fe=a}break;case 30:break;default:Fn(e,n)}}function Xv(e){var t=e.alternate;t!==null&&(e.alternate=null,Xv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_p(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 Ge=null,Bt=!1;function $n(e,t,n){for(n=n.child;n!==null;)qv(e,t,n),n=n.sibling}function qv(e,t,n){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(br,n)}catch{}switch(n.tag){case 26:Fe||Hn(n,t),$n(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Fe||Hn(n,t);var o=Ge,i=Bt;ni(n.type)&&(Ge=n.stateNode,Bt=!1),$n(e,t,n),or(n.stateNode),Ge=o,Bt=i;break;case 5:Fe||Hn(n,t);case 6:if(o=Ge,i=Bt,Ge=null,$n(e,t,n),Ge=o,Bt=i,Ge!==null)if(Bt)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(n.stateNode)}catch(a){Te(n,t,a)}else try{Ge.removeChild(n.stateNode)}catch(a){Te(n,t,a)}break;case 18:Ge!==null&&(Bt?(e=Ge,H0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Za(e)):H0(Ge,n.stateNode));break;case 4:o=Ge,i=Bt,Ge=n.stateNode.containerInfo,Bt=!0,$n(e,t,n),Ge=o,Bt=i;break;case 0:case 11:case 14:case 15:Wo(2,n,t),Fe||Wo(4,n,t),$n(e,t,n);break;case 1:Fe||(Hn(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&kv(n,t,o)),$n(e,t,n);break;case 21:$n(e,t,n);break;case 22:Fe=(o=Fe)||n.memoizedState!==null,$n(e,t,n),Fe=o;break;default:$n(e,t,n)}}function Zv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Za(e)}catch(n){Te(t,t.return,n)}}}function Qv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Za(e)}catch(n){Te(t,t.return,n)}}function FT(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new x0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new x0),t;default:throw Error(V(435,e.tag))}}function qu(e,t){var n=FT(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=lC.bind(null,e,o);o.then(i,i)}})}function zt(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(ni(r.type)){Ge=r.stateNode,Bt=!1;break e}break;case 5:Ge=r.stateNode,Bt=!1;break e;case 3:case 4:Ge=r.stateNode.containerInfo,Bt=!0;break e}r=r.return}if(Ge===null)throw Error(V(160));qv(a,l,i),Ge=null,Bt=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jv(t,e),t=t.sibling}var wn=null;function jv(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:zt(t,e),Lt(e),o&4&&(Wo(3,e,e.return),Cr(3,e),Wo(5,e,e.return));break;case 1:zt(t,e),Lt(e),o&512&&(Fe||n===null||Hn(n,n.return)),o&64&&eo&&(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=wn;if(zt(t,e),Lt(e),o&512&&(Fe||n===null||Hn(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[_r]||a[ct]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),pt(a,o,n),a[ct]=e,lt(a),o=a;break e;case"link":var l=Y0("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),pt(a,o,n),i.head.appendChild(a);break;case"meta":if(l=Y0("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),pt(a,o,n),i.head.appendChild(a);break;default:throw Error(V(468,o))}a[ct]=e,lt(a),o=a}e.stateNode=o}else X0(i,e.type,e.stateNode);else e.stateNode=I0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?X0(i,e.type,e.stateNode):I0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&dd(e,e.memoizedProps,n.memoizedProps)}break;case 27:zt(t,e),Lt(e),o&512&&(Fe||n===null||Hn(n,n.return)),n!==null&&o&4&&dd(e,e.memoizedProps,n.memoizedProps);break;case 5:if(zt(t,e),Lt(e),o&512&&(Fe||n===null||Hn(n,n.return)),e.flags&32){i=e.stateNode;try{Ga(i,"")}catch(g){Te(e,e.return,g)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,dd(e,i,n!==null?n.memoizedProps:i)),o&1024&&(md=!0);break;case 6:if(zt(t,e),Lt(e),o&4){if(e.stateNode===null)throw Error(V(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(g){Te(e,e.return,g)}}break;case 3:if(ss=null,i=wn,wn=Hs(t.containerInfo),zt(t,e),wn=i,Lt(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{Za(t.containerInfo)}catch(g){Te(e,e.return,g)}md&&(md=!1,Kv(e));break;case 4:o=wn,wn=Hs(e.stateNode.containerInfo),zt(t,e),Lt(e),wn=o;break;case 12:zt(t,e),Lt(e);break;case 31:zt(t,e),Lt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,qu(e,o)));break;case 13:zt(t,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Js=Ft()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,qu(e,o)));break;case 22:i=e.memoizedState!==null;var u=n!==null&&n.memoizedState!==null,s=eo,c=Fe;if(eo=s||i,Fe=c||u,zt(t,e),Fe=c,eo=s,Lt(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||u||eo||Fe||xi(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){Te(u,u.return,g)}}}else if(t.tag===6){if(n===null){u=t;try{u.stateNode.nodeValue=i?"":u.memoizedProps}catch(g){Te(u,u.return,g)}}}else if(t.tag===18){if(n===null){u=t;try{var m=u.stateNode;i?U0(m,!0):U0(u.stateNode,!1)}catch(g){Te(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,qu(e,n))));break;case 19:zt(t,e),Lt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,qu(e,o)));break;case 30:break;case 21:break;default:zt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(Pv(o)){n=o;break}o=o.return}if(n==null)throw Error(V(160));switch(n.tag){case 27:var i=n.stateNode,a=pd(e);As(e,a,i);break;case 5:var l=n.stateNode;n.flags&32&&(Ga(l,""),n.flags&=-33);var r=pd(e);As(e,r,l);break;case 3:case 4:var u=n.stateNode.containerInfo,s=pd(e);tp(e,s,u);break;default:throw Error(V(161))}}catch(c){Te(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kv(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Kv(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Fn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Yv(e,t.alternate,t),t=t.sibling}function xi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wo(4,t,t.return),xi(t);break;case 1:Hn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&kv(t,t.return,n),xi(t);break;case 27:or(t.stateNode);case 26:case 5:Hn(t,t.return),xi(t);break;case 22:t.memoizedState===null&&xi(t);break;case 30:xi(t);break;default:xi(t)}e=e.sibling}}function Jn(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:Jn(i,a,n),Cr(4,a);break;case 1:if(Jn(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(s){Te(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++)Zy(u[i],r)}catch(s){Te(o,o.return,s)}}n&&l&64&&Gv(a),Wl(a,a.return);break;case 27:Iv(a);case 26:case 5:Jn(i,a,n),n&&o===null&&l&4&&Vv(a),Wl(a,a.return);break;case 12:Jn(i,a,n);break;case 31:Jn(i,a,n),n&&l&4&&Zv(i,a);break;case 13:Jn(i,a,n),n&&l&4&&Qv(i,a);break;case 22:a.memoizedState===null&&Jn(i,a,n),Wl(a,a.return);break;case 30:break;default:Jn(i,a,n)}t=t.sibling}}function em(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&&Nr(n))}function tm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Nr(e))}function Cn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$v(e,t,n,o),t=t.sibling}function $v(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cn(e,t,n,o),i&2048&&Cr(9,t);break;case 1:Cn(e,t,n,o);break;case 3:Cn(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&&Nr(e)));break;case 12:if(i&2048){Cn(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){Te(t,t.return,u)}}else Cn(e,t,n,o);break;case 31:Cn(e,t,n,o);break;case 13:Cn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?a._visibility&2?Cn(e,t,n,o):er(e,t):a._visibility&2?Cn(e,t,n,o):(a._visibility|=2,ha(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&em(l,t);break;case 24:Cn(e,t,n,o),i&2048&&tm(t.alternate,t);break;default:Cn(e,t,n,o)}}function ha(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:ha(a,l,r,u,i),Cr(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?ha(a,l,r,u,i):er(a,l):(c._visibility|=2,ha(a,l,r,u,i)),i&&s&2048&&em(l.alternate,l);break;case 24:ha(a,l,r,u,i),i&&s&2048&&tm(l.alternate,l);break;default:ha(a,l,r,u,i)}t=t.sibling}}function er(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:er(n,o),i&2048&&em(o.alternate,o);break;case 24:er(n,o),i&2048&&tm(o.alternate,o);break;default:er(n,o)}t=t.sibling}}var Xl=8192;function ma(e,t,n){if(e.subtreeFlags&Xl)for(e=e.child;e!==null;)Fv(e,t,n),e=e.sibling}function Fv(e,t,n){switch(e.tag){case 26:ma(e,t,n),e.flags&Xl&&e.memoizedState!==null&&BC(n,wn,e.memoizedState,e.memoizedProps);break;case 5:ma(e,t,n);break;case 3:case 4:var o=wn;wn=Hs(e.stateNode.containerInfo),ma(e,t,n),wn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Xl,Xl=16777216,ma(e,t,n),Xl=o):ma(e,t,n));break;default:ma(e,t,n)}}function Jv(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 Ul(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];at=o,eb(o,e)}Jv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wv(e),e=e.sibling}function Wv(e){switch(e.tag){case 0:case 11:case 15:Ul(e),e.flags&2048&&Wo(9,e,e.return);break;case 3:Ul(e);break;case 12:Ul(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,rs(e)):Ul(e);break;default:Ul(e)}}function rs(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];at=o,eb(o,e)}Jv(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wo(8,t,t.return),rs(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,rs(t));break;default:rs(t)}e=e.sibling}}function eb(e,t){for(;at!==null;){var n=at;switch(n.tag){case 0:case 11:case 15:Wo(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:Nr(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,at=o;else e:for(n=e;at!==null;){o=at;var i=o.sibling,a=o.return;if(Xv(o),o===n){at=null;break e}if(i!==null){i.return=a,at=i;break e}at=a}}}var JT={getCacheForType:function(e){var t=dt(Je),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return dt(Je).controller.signal}},WT=typeof WeakMap=="function"?WeakMap:Map,_e=0,De=null,me=null,ge=0,Ne=0,Qt=null,ko=!1,Fa=!1,nm=!1,fo=0,Ie=0,ei=0,Ci=0,om=0,$t=0,Ia=0,tr=null,Ht=null,np=!1,Js=0,tb=0,Ms=1/0,Ds=null,Zo=null,tt=0,Qo=null,Ya=null,lo=0,op=0,ip=null,nb=null,nr=0,ap=null;function en(){return(_e&2)!==0&&ge!==0?ge&-ge:re.T!==null?am():fy()}function ob(){if($t===0)if((ge&536870912)===0||be){var e=Bu;Bu<<=1,(Bu&3932160)===0&&(Bu=262144),$t=e}else $t=536870912;return e=nn.current,e!==null&&(e.flags|=32),$t}function Ut(e,t,n){(e===De&&(Ne===2||Ne===9)||e.cancelPendingCommit!==null)&&(Xa(e,0),Vo(e,ge,$t,!1)),xr(e,n),((_e&2)===0||e!==De)&&(e===De&&((_e&2)===0&&(Ci|=n),Ie===4&&Vo(e,ge,$t,!1)),kn(e))}function ib(e,t,n){if((_e&6)!==0)throw Error(V(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Sr(e,t),i=o?nC(e,t):hd(e,t,!0),a=o;do{if(i===0){Fa&&!o&&Vo(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!eC(n)){i=hd(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=tr;var u=r.current.memoizedState.isDehydrated;if(u&&(Xa(r,l).flags|=256),l=hd(r,l,!1),l!==2){if(nm&&!u){r.errorRecoveryDisabledLanes|=a,Ci|=a,i=4;break e}a=Ht,Ht=i,a!==null&&(Ht===null?Ht=a:Ht.push.apply(Ht,a))}i=l}if(a=!1,i!==2)continue}}if(i===1){Xa(e,0),Vo(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(V(345));case 4:if((t&4194048)!==t)break;case 6:Vo(o,t,$t,!ko);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(V(329))}if((t&62914560)===t&&(i=Js+300-Ft(),10<i)){if(Vo(o,t,$t,!ko),Ps(o,0,!0)!==0)break e;lo=t,o.timeoutHandle=Nb(_0.bind(null,o,n,Ht,Ds,np,t,$t,Ci,Ia,ko,a,"Throttled",-0,0),i);break e}_0(o,n,Ht,Ds,np,t,$t,Ci,Ia,ko,a,null,-0,0)}}break}while(!0);kn(e)}function _0(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:no},Fv(t,a,d);var g=(a&62914560)===a?Js-Ft():(a&4194048)===a?tb-Ft():0;if(g=HC(d,g),g!==null){lo=a,e.cancelPendingCommit=g(N0.bind(null,e,t,a,n,o,i,l,r,u,c,d,null,f,m)),Vo(e,a,l,!s);return}}N0(e,t,a,n,o,i,l,r,u)}function eC(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(!tn(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 Vo(e,t,n,o){t&=~om,t&=~Ci,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-Wt(i),l=1<<a;o[a]=-1,i&=~l}n!==0&&uy(e,n,t)}function Ws(){return(_e&6)===0?(wr(0,!1),!1):!0}function im(){if(me!==null){if(Ne===0)var e=me.return;else e=me,oo=Hi=null,Yp(e),za=null,cr=0,e=me;for(;e!==null;)Uv(e.alternate,e),e=e.return;me=null}}function Xa(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,vC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),lo=0,im(),De=e,me=n=io(e.current,null),ge=t,Ne=0,Qt=null,ko=!1,Fa=Sr(e,t),nm=!1,Ia=$t=om=Ci=ei=Ie=0,Ht=tr=null,np=!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-Wt(o),a=1<<i;t|=e[i],o&=~a}return fo=t,qs(),n}function ab(e,t){se=null,re.H=dr,t===$a||t===Qs?(t=e0(),Ne=3):t===Hp?(t=e0(),Ne=4):Ne=t===Jp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Qt=t,me===null&&(Ie=1,Cs(e,hn(t,e.current)))}function lb(){var e=nn.current;return e===null?!0:(ge&4194048)===ge?yn===null:(ge&62914560)===ge||(ge&536870912)!==0?e===yn:!1}function rb(){var e=re.H;return re.H=dr,e===null?dr:e}function ub(){var e=re.A;return re.A=JT,e}function Os(){Ie=4,ko||(ge&4194048)!==ge&&nn.current!==null||(Fa=!0),(ei&134217727)===0&&(Ci&134217727)===0||De===null||Vo(De,ge,$t,!1)}function hd(e,t,n){var o=_e;_e|=2;var i=rb(),a=ub();(De!==e||ge!==t)&&(Ds=null,Xa(e,t)),t=!1;var l=Ie;e:do try{if(Ne!==0&&me!==null){var r=me,u=Qt;switch(Ne){case 8:im(),l=6;break e;case 3:case 2:case 9:case 6:nn.current===null&&(t=!0);var s=Ne;if(Ne=0,Qt=null,Aa(e,r,u,s),n&&Fa){l=0;break e}break;default:s=Ne,Ne=0,Qt=null,Aa(e,r,u,s)}}tC(),l=Ie;break}catch(c){ab(e,c)}while(!0);return t&&e.shellSuspendCounter++,oo=Hi=null,_e=o,re.H=i,re.A=a,me===null&&(De=null,ge=0,qs()),l}function tC(){for(;me!==null;)sb(me)}function nC(e,t){var n=_e;_e|=2;var o=rb(),i=ub();De!==e||ge!==t?(Ds=null,Ms=Ft()+500,Xa(e,t)):Fa=Sr(e,t);e:do try{if(Ne!==0&&me!==null){t=me;var a=Qt;t:switch(Ne){case 1:Ne=0,Qt=null,Aa(e,t,a,1);break;case 2:case 9:if(Wg(a)){Ne=0,Qt=null,E0(t);break}t=function(){Ne!==2&&Ne!==9||De!==e||(Ne=7),kn(e)},a.then(t,t);break e;case 3:Ne=7;break e;case 4:Ne=5;break e;case 7:Wg(a)?(Ne=0,Qt=null,E0(t)):(Ne=0,Qt=null,Aa(e,t,a,7));break;case 5:var l=null;switch(me.tag){case 26:l=me.memoizedState;case 5:case 27:var r=me;if(l?Mb(l):r.stateNode.complete){Ne=0,Qt=null;var u=r.sibling;if(u!==null)me=u;else{var s=r.return;s!==null?(me=s,ec(s)):me=null}break t}}Ne=0,Qt=null,Aa(e,t,a,5);break;case 6:Ne=0,Qt=null,Aa(e,t,a,6);break;case 8:im(),Ie=6;break e;default:throw Error(V(462))}}oC();break}catch(c){ab(e,c)}while(!0);return oo=Hi=null,re.H=o,re.A=i,_e=n,me!==null?0:(De=null,ge=0,qs(),Ie)}function oC(){for(;me!==null&&!CN();)sb(me)}function sb(e){var t=Hv(e.alternate,e,fo);e.memoizedProps=e.pendingProps,t===null?ec(e):me=t}function E0(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=g0(n,t,t.pendingProps,t.type,void 0,ge);break;case 11:t=g0(n,t,t.pendingProps,t.type.render,t.ref,ge);break;case 5:Yp(t);default:Uv(n,t),t=me=Uy(t,fo),t=Hv(n,t,fo)}e.memoizedProps=e.pendingProps,t===null?ec(e):me=t}function Aa(e,t,n,o){oo=Hi=null,Yp(t),za=null,cr=0;var i=t.return;try{if(qT(e,i,t,n,ge)){Ie=1,Cs(e,hn(n,e.current)),me=null;return}}catch(a){if(i!==null)throw me=i,a;Ie=1,Cs(e,hn(n,e.current)),me=null;return}t.flags&32768?(be||o===1?e=!0:Fa||(ge&536870912)!==0?e=!1:(ko=e=!0,(o===2||o===9||o===3||o===6)&&(o=nn.current,o!==null&&o.tag===13&&(o.flags|=16384))),cb(t,e)):ec(t)}function ec(e){var t=e;do{if((t.flags&32768)!==0){cb(t,ko);return}e=t.return;var n=jT(t.alternate,t,fo);if(n!==null){me=n;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);Ie===0&&(Ie=5)}function cb(e,t){do{var n=KT(e.alternate,e);if(n!==null){n.flags&=32767,me=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=n}while(e!==null);Ie=6,me=null}function N0(e,t,n,o,i,a,l,r,u){e.cancelPendingCommit=null;do tc();while(tt!==0);if((_e&6)!==0)throw Error(V(327));if(t!==null){if(t===e.current)throw Error(V(177));if(a=t.lanes|t.childLanes,a|=Mp,HN(e,n,a,l,r,u),e===De&&(me=De=null,ge=0),Ya=t,Qo=e,lo=n,op=a,ip=i,nb=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,rC(hs,function(){return hb(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=re.T,re.T=null,i=Ee.p,Ee.p=2,l=_e,_e|=4;try{$T(e,t,n)}finally{_e=l,Ee.p=i,re.T=o}}tt=1,fb(),db(),pb()}}function fb(){if(tt===1){tt=0;var e=Qo,t=Ya,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=re.T,re.T=null;var o=Ee.p;Ee.p=2;var i=_e;_e|=4;try{jv(t,e);var a=sp,l=My(e.containerInfo),r=a.focusedElem,u=a.selectionRange;if(l!==r&&r&&r.ownerDocument&&Ay(r.ownerDocument.documentElement,r)){if(u!==null&&Ap(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=Zg(r,b),y=Zg(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}}ks=!!up,sp=up=null}finally{_e=i,Ee.p=o,re.T=n}}e.current=t,tt=2}}function db(){if(tt===2){tt=0;var e=Qo,t=Ya,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=re.T,re.T=null;var o=Ee.p;Ee.p=2;var i=_e;_e|=4;try{Yv(e,t.alternate,t)}finally{_e=i,Ee.p=o,re.T=n}}tt=3}}function pb(){if(tt===4||tt===3){tt=0,wN();var e=Qo,t=Ya,n=lo,o=nb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?tt=5:(tt=0,Ya=Qo=null,mb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Zo=null),xp(n),t=t.stateNode,Jt&&typeof Jt.onCommitFiberRoot=="function")try{Jt.onCommitFiberRoot(br,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=re.T,i=Ee.p,Ee.p=2,re.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{re.T=t,Ee.p=i}}(lo&3)!==0&&tc(),kn(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===ap?nr++:(nr=0,ap=e):nr=0,wr(0,!1)}}function mb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Nr(t)))}function tc(){return fb(),db(),pb(),hb()}function hb(){if(tt!==5)return!1;var e=Qo,t=op;op=0;var n=xp(lo),o=re.T,i=Ee.p;try{Ee.p=32>n?32:n,re.T=null,n=ip,ip=null;var a=Qo,l=lo;if(tt=0,Ya=Qo=null,lo=0,(_e&6)!==0)throw Error(V(331));var r=_e;if(_e|=4,Wv(a.current),$v(a,a.current,l,n),_e=r,wr(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(br,a)}catch{}return!0}finally{Ee.p=i,re.T=o,mb(e,t)}}function T0(e,t,n){t=hn(n,t),t=Jd(e.stateNode,t,2),e=qo(e,t,2),e!==null&&(xr(e,2),kn(e))}function Te(e,t,n){if(e.tag===3)T0(e,e,n);else for(;t!==null;){if(t.tag===3){T0(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Zo===null||!Zo.has(o))){e=hn(n,e),n=Dv(2),o=qo(t,n,2),o!==null&&(Ov(n,o,t,e),xr(o,2),kn(o));break}}t=t.return}}function gd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new WT;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)||(nm=!0,i.add(n),e=iC.bind(null,e,t,n),t.then(e,e))}function iC(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,De===e&&(ge&n)===n&&(Ie===4||Ie===3&&(ge&62914560)===ge&&300>Ft()-Js?(_e&2)===0&&Xa(e,0):om|=n,Ia===ge&&(Ia=0)),kn(e)}function gb(e,t){t===0&&(t=ry()),e=Bi(e,t),e!==null&&(xr(e,t),kn(e))}function aC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gb(e,n)}function lC(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(V(314))}o!==null&&o.delete(t),gb(e,n)}function rC(e,t){return bp(e,t)}var Rs=null,ga=null,lp=!1,zs=!1,yd=!1,Po=0;function kn(e){e!==ga&&e.next===null&&(ga===null?Rs=ga=e:ga=ga.next=e),zs=!0,lp||(lp=!0,sC())}function wr(e,t){if(!yd&&zs){yd=!0;do for(var n=!1,o=Rs;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-Wt(42|e)+1)-1,a&=i&~(l&~r),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,C0(o,a))}else a=ge,a=Ps(o,o===De?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||Sr(o,a)||(n=!0,C0(o,a));o=o.next}while(n);yd=!1}}function uC(){yb()}function yb(){zs=lp=!1;var e=0;Po!==0&&yC()&&(e=Po);for(var t=Ft(),n=null,o=Rs;o!==null;){var i=o.next,a=vb(o,t);a===0?(o.next=null,n===null?Rs=i:n.next=i,i===null&&(ga=n)):(n=o,(e!==0||(a&3)!==0)&&(zs=!0)),o=i}tt!==0&&tt!==5||wr(e,!1),Po!==0&&(Po=0)}function vb(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var l=31-Wt(a),r=1<<l,u=i[l];u===-1?((r&n)===0||(r&o)!==0)&&(i[l]=BN(r,t)):u<=t&&(e.expiredLanes|=r),a&=~r}if(t=De,n=ge,n=Ps(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Ne===2||Ne===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Zf(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Sr(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&Zf(o),xp(n)){case 2:case 8:n=ay;break;case 32:n=hs;break;case 268435456:n=ly;break;default:n=hs}return o=bb.bind(null,e),n=bp(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&Zf(o),e.callbackPriority=2,e.callbackNode=null,2}function bb(e,t){if(tt!==0&&tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(tc()&&e.callbackNode!==n)return null;var o=ge;return o=Ps(e,e===De?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(ib(e,o,t),vb(e,Ft()),e.callbackNode!=null&&e.callbackNode===n?bb.bind(null,e):null)}function C0(e,t){if(tc())return null;ib(e,t,!0)}function sC(){bC(function(){(_e&6)!==0?bp(iy,uC):yb()})}function am(){if(Po===0){var e=ka;e===0&&(e=Lu,Lu<<=1,(Lu&261888)===0&&(Lu=256)),Po=e}return Po}function w0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ju(""+e)}function A0(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 cC(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=w0((i[Gt]||null).action),l=o.submitter;l&&(t=(t=l[Gt]||null)?w0(t.formAction):l.getAttribute("formAction"),t!==null&&(a=t,l=null));var r=new Is("action","action",null,o,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Po!==0){var u=l?A0(i,l):new FormData(i);$d(n,{pending:!0,data:u,method:i.method,action:a},null,u)}}else typeof a=="function"&&(r.preventDefault(),u=l?A0(i,l):new FormData(i),$d(n,{pending:!0,data:u,method:i.method,action:a},a,u))},currentTarget:i}]})}}for(Zu=0;Zu<Gd.length;Zu++)Qu=Gd[Zu],M0=Qu.toLowerCase(),D0=Qu[0].toUpperCase()+Qu.slice(1),An(M0,"on"+D0);var Qu,M0,D0,Zu;An(Oy,"onAnimationEnd");An(Ry,"onAnimationIteration");An(zy,"onAnimationStart");An("dblclick","onDoubleClick");An("focusin","onFocus");An("focusout","onBlur");An(AT,"onTransitionRun");An(MT,"onTransitionStart");An(DT,"onTransitionCancel");An(Ly,"onTransitionEnd");Ua("onMouseEnter",["mouseout","mouseover"]);Ua("onMouseLeave",["mouseout","mouseover"]);Ua("onPointerEnter",["pointerout","pointerover"]);Ua("onPointerLeave",["pointerout","pointerover"]);Ri("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ri("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ri("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ri("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ri("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ri("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pr="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(" "),fC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pr));function Sb(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){ys(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){ys(c)}i.currentTarget=null,a=u}}}}function pe(e,t){var n=t[Dd];n===void 0&&(n=t[Dd]=new Set);var o=e+"__bubble";n.has(o)||(xb(t,e,2,!1),n.add(o))}function vd(e,t,n){var o=0;t&&(o|=4),xb(n,e,o,t)}var ju="_reactListening"+Math.random().toString(36).slice(2);function lm(e){if(!e[ju]){e[ju]=!0,dy.forEach(function(n){n!=="selectionchange"&&(fC.has(n)||vd(n,!1,e),vd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ju]||(t[ju]=!0,vd("selectionchange",!1,t))}}function xb(e,t,n,o){switch(Lb(t)){case 2:var i=kC;break;case 8:i=VC;break;default:i=cm}n=i.bind(null,t,n,e),i=void 0,!Bd||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 bd(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=ba(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}Sy(function(){var s=a,c=Np(n),d=[];e:{var f=By.get(e);if(f!==void 0){var m=Is,g=e;switch(e){case"keypress":if(es(n)===0)break e;case"keydown":case"keyup":m=lT;break;case"focusin":g="focus",m=Ff;break;case"focusout":g="blur",m=Ff;break;case"beforeblur":case"afterblur":m=Ff;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=Ug;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=jN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=sT;break;case Oy:case Ry:case zy:m=FN;break;case Ly:m=fT;break;case"scroll":case"scrollend":m=ZN;break;case"wheel":m=pT;break;case"copy":case"cut":case"paste":m=WN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=kg;break;case"toggle":case"beforetoggle":m=hT}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=ar(y,h),v!=null&&b.push(mr(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!==Ld&&(g=n.relatedTarget||n.fromElement)&&(ba(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?ba(g):null,g!==null&&(S=vr(g),b=g.tag,g!==S||b!==5&&b!==27&&b!==6)&&(g=null)):(m=null,g=s),m!==g)){if(b=Ug,v="onMouseLeave",h="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(b=kg,v="onPointerLeave",h="onPointerEnter",y="pointer"),S=m==null?f:Il(m),p=g==null?f:Il(g),f=new b(v,y+"leave",m,n,c),f.target=S,f.relatedTarget=p,v=null,ba(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=dC,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&&O0(d,f,m,b,!1),g!==null&&S!==null&&O0(d,S,g,b,!0)}}e:{if(f=s?Il(s):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var N=Yg;else if(Ig(f))if(Cy)N=TT;else{N=ET;var _=_T}else m=f.nodeName,!m||m.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?s&&Ep(s.elementType)&&(N=Yg):N=NT;if(N&&(N=N(e,s))){Ty(d,N,n,c);break e}_&&_(e,f,s),e==="focusout"&&s&&f.type==="number"&&s.memoizedProps.value!=null&&zd(f,"number",f.value)}switch(_=s?Il(s):window,e){case"focusin":(Ig(_)||_.contentEditable==="true")&&(_a=_,Hd=s,Ql=null);break;case"focusout":Ql=Hd=_a=null;break;case"mousedown":Ud=!0;break;case"contextmenu":case"mouseup":case"dragend":Ud=!1,Qg(d,n,c);break;case"selectionchange":if(wT)break;case"keydown":case"keyup":Qg(d,n,c)}var T;if(wp)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 xa?Ey(e,n)&&(w="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(w="onCompositionStart");w&&(_y&&n.locale!=="ko"&&(xa||w!=="onCompositionStart"?w==="onCompositionEnd"&&xa&&(T=xy()):(Go=c,Tp="value"in Go?Go.value:Go.textContent,xa=!0)),_=Ls(s,w),0<_.length&&(w=new Gg(w,e,null,n,c),d.push({event:w,listeners:_}),T?w.data=T:(T=Ny(n),T!==null&&(w.data=T)))),(T=yT?vT(e,n):bT(e,n))&&(w=Ls(s,"onBeforeInput"),0<w.length&&(_=new Gg("onBeforeInput","beforeinput",null,n,c),d.push({event:_,listeners:w}),_.data=T)),cC(d,e,s,n,c)}Sb(d,t)})}function mr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ls(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=ar(e,n),i!=null&&o.unshift(mr(e,i,a)),i=ar(e,t),i!=null&&o.push(mr(e,i,a))),e.tag===3)return o;e=e.return}return[]}function dC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function O0(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=ar(n,a),s!=null&&l.unshift(mr(n,s,u))):i||(s=ar(n,a),s!=null&&l.push(mr(n,s,u)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var pC=/\r\n?/g,mC=/\u0000|\uFFFD/g;function R0(e){return(typeof e=="string"?e:""+e).replace(pC,`
-`).replace(mC,"")}function _b(e,t){return t=R0(t),R0(e)===t}function Ce(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":by(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=Ju(""+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"&&Ce(e,t,"name",i.name,i,null),Ce(e,t,"formEncType",i.formEncType,i,null),Ce(e,t,"formMethod",i.formMethod,i,null),Ce(e,t,"formTarget",i.formTarget,i,null)):(Ce(e,t,"encType",i.encType,i,null),Ce(e,t,"method",i.method,i,null),Ce(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Ju(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=no);break;case"onScroll":o!=null&&pe("scroll",e);break;case"onScrollEnd":o!=null&&pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(V(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(V(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=Ju(""+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":pe("beforetoggle",e),pe("toggle",e),Fu(e,"popover",o);break;case"xlinkActuate":jn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":jn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":jn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":jn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":jn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":jn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":jn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":jn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":jn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Fu(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=XN.get(n)||n,Fu(e,n,o))}}function rp(e,t,n,o,i,a){switch(n){case"style":by(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(V(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(V(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&&pe("scroll",e);break;case"onScrollEnd":o!=null&&pe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=no);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!py.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[Gt]||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,""):Fu(e,n,o)}}}function pt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":pe("error",e),pe("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(V(137,t));default:Ce(e,t,a,l,n,null)}}i&&Ce(e,t,"srcSet",n.srcSet,n,null),o&&Ce(e,t,"src",n.src,n,null);return;case"input":pe("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(V(137,t));break;default:Ce(e,t,o,c,n,null)}}gy(e,a,r,u,s,l,i,!1);return;case"select":pe("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:Ce(e,t,i,r,n,null)}t=a,n=l,e.multiple=!!o,t!=null?Da(e,!!o,t,!1):n!=null&&Da(e,!!o,n,!0);return;case"textarea":pe("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(V(91));break;default:Ce(e,t,l,r,n,null)}vy(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":Ce(e,t,u,o,n,null));return;case"dialog":pe("beforetoggle",e),pe("toggle",e),pe("cancel",e),pe("close",e);break;case"iframe":case"object":pe("load",e);break;case"video":case"audio":for(o=0;o<pr.length;o++)pe(pr[o],e);break;case"image":pe("error",e),pe("load",e);break;case"details":pe("toggle",e);break;case"embed":case"source":case"link":pe("error",e),pe("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(V(137,t));default:Ce(e,t,s,o,n,null)}return;default:if(Ep(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&rp(e,t,c,o,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(o=n[r],o!=null&&Ce(e,t,r,o,n,null))}function hC(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)||Ce(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(V(137,t));break;default:m!==d&&Ce(e,t,f,m,o,d)}}Rd(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)||Ce(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&&Ce(e,t,i,a,o,u)}t=r,n=l,o=m,f!=null?Da(e,!!n,f,!1):!!o!=!!n&&(t!=null?Da(e,!!n,t,!0):Da(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:Ce(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(V(91));break;default:i!==a&&Ce(e,t,l,i,o,a)}yy(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:Ce(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":Ce(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)&&Ce(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(V(137,t));break;default:Ce(e,t,s,f,o,m)}return;default:if(Ep(t)){for(var S in n)f=n[S],n.hasOwnProperty(S)&&f!==void 0&&!o.hasOwnProperty(S)&&rp(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||rp(e,t,c,f,o,m);return}}for(var h in n)f=n[h],n.hasOwnProperty(h)&&f!=null&&!o.hasOwnProperty(h)&&Ce(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||Ce(e,t,d,f,o,m)}function z0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gC(){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&&z0(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&&z0(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 up=null,sp=null;function Bs(e){return e.nodeType===9?e:e.ownerDocument}function L0(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 Eb(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 cp(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 Sd=null;function yC(){var e=window.event;return e&&e.type==="popstate"?e===Sd?!1:(Sd=e,!0):(Sd=null,!1)}var Nb=typeof setTimeout=="function"?setTimeout:void 0,vC=typeof clearTimeout=="function"?clearTimeout:void 0,B0=typeof Promise=="function"?Promise:void 0,bC=typeof queueMicrotask=="function"?queueMicrotask:typeof B0<"u"?function(e){return B0.resolve(null).then(e).catch(SC)}:Nb;function SC(e){setTimeout(function(){throw e})}function ni(e){return e==="head"}function H0(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),Za(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")or(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,or(n);for(var a=n.firstChild;a;){var l=a.nextSibling,r=a.nodeName;a[_r]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=l}}else n==="body"&&or(e.ownerDocument.body);n=i}while(n);Za(t)}function U0(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 fp(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":fp(n),_p(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function xC(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[_r])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=vn(e.nextSibling),e===null)break}return null}function _C(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=vn(e.nextSibling),e===null))return null;return e}function Tb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=vn(e.nextSibling),e===null))return null;return e}function dp(e){return e.data==="$?"||e.data==="$~"}function pp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function EC(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 vn(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 mp=null;function G0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return vn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function k0(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 Cb(e,t,n){switch(t=Bs(n),e){case"html":if(e=t.documentElement,!e)throw Error(V(452));return e;case"head":if(e=t.head,!e)throw Error(V(453));return e;case"body":if(e=t.body,!e)throw Error(V(454));return e;default:throw Error(V(451))}}function or(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_p(e)}var bn=new Map,V0=new Set;function Hs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var po=Ee.d;Ee.d={f:NC,r:TC,D:CC,C:wC,L:AC,m:MC,X:OC,S:DC,M:RC};function NC(){var e=po.f(),t=Ws();return e||t}function TC(e){var t=ja(e);t!==null&&t.tag===5&&t.type==="form"?bv(t):po.r(e)}var Ja=typeof document>"u"?null:document;function wb(e,t,n){var o=Ja;if(o&&typeof t=="string"&&t){var i=mn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),V0.has(i)||(V0.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),pt(t,"link",e),lt(t),o.head.appendChild(t)))}}function CC(e){po.D(e),wb("dns-prefetch",e,null)}function wC(e,t){po.C(e,t),wb("preconnect",e,t)}function AC(e,t,n){po.L(e,t,n);var o=Ja;if(o&&e&&t){var i='link[rel="preload"][as="'+mn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+mn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+mn(n.imageSizes)+'"]')):i+='[href="'+mn(e)+'"]';var a=i;switch(t){case"style":a=qa(e);break;case"script":a=Wa(e)}bn.has(a)||(e=Be({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),bn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(Ar(a))||t==="script"&&o.querySelector(Mr(a))||(t=o.createElement("link"),pt(t,"link",e),lt(t),o.head.appendChild(t)))}}function MC(e,t){po.m(e,t);var n=Ja;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+mn(o)+'"][href="'+mn(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Wa(e)}if(!bn.has(a)&&(e=Be({rel:"modulepreload",href:e},t),bn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Mr(a)))return}o=n.createElement("link"),pt(o,"link",e),lt(o),n.head.appendChild(o)}}}function DC(e,t,n){po.S(e,t,n);var o=Ja;if(o&&e){var i=Ma(o).hoistableStyles,a=qa(e);t=t||"default";var l=i.get(a);if(!l){var r={loading:0,preload:null};if(l=o.querySelector(Ar(a)))r.loading=5;else{e=Be({rel:"stylesheet",href:e,"data-precedence":t},n),(n=bn.get(a))&&rm(e,n);var u=l=o.createElement("link");lt(u),pt(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,us(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:r},i.set(a,l)}}}function OC(e,t){po.X(e,t);var n=Ja;if(n&&e){var o=Ma(n).hoistableScripts,i=Wa(e),a=o.get(i);a||(a=n.querySelector(Mr(i)),a||(e=Be({src:e,async:!0},t),(t=bn.get(i))&&um(e,t),a=n.createElement("script"),lt(a),pt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function RC(e,t){po.M(e,t);var n=Ja;if(n&&e){var o=Ma(n).hoistableScripts,i=Wa(e),a=o.get(i);a||(a=n.querySelector(Mr(i)),a||(e=Be({src:e,async:!0,type:"module"},t),(t=bn.get(i))&&um(e,t),a=n.createElement("script"),lt(a),pt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function P0(e,t,n,o){var i=(i=Io.current)?Hs(i):null;if(!i)throw Error(V(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=qa(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=qa(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(Ar(e)))&&!a._p&&(l.instance=a,l.state.loading=5),bn.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},bn.set(e,n),a||zC(i,e,n,l.state))),t&&o===null)throw Error(V(528,""));return l}if(t&&o!==null)throw Error(V(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Wa(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(V(444,e))}}function qa(e){return'href="'+mn(e)+'"'}function Ar(e){return'link[rel="stylesheet"]['+e+"]"}function Ab(e){return Be({},e,{"data-precedence":e.precedence,precedence:null})}function zC(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}),pt(t,"link",n),lt(t),e.head.appendChild(t))}function Wa(e){return'[src="'+mn(e)+'"]'}function Mr(e){return"script[async]"+e}function I0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+mn(n.href)+'"]');if(o)return t.instance=o,lt(o),o;var i=Be({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),lt(o),pt(o,"style",i),us(o,n.precedence,e),t.instance=o;case"stylesheet":i=qa(n.href);var a=e.querySelector(Ar(i));if(a)return t.state.loading|=4,t.instance=a,lt(a),a;o=Ab(n),(i=bn.get(i))&&rm(o,i),a=(e.ownerDocument||e).createElement("link"),lt(a);var l=a;return l._p=new Promise(function(r,u){l.onload=r,l.onerror=u}),pt(a,"link",o),t.state.loading|=4,us(a,n.precedence,e),t.instance=a;case"script":return a=Wa(n.src),(i=e.querySelector(Mr(a)))?(t.instance=i,lt(i),i):(o=n,(i=bn.get(a))&&(o=Be({},n),um(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),lt(i),pt(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(V(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,us(o,n.precedence,e));return t.instance}function us(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 rm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function um(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ss=null;function Y0(e,t,n){if(ss===null){var o=new Map,i=ss=new Map;i.set(n,o)}else i=ss,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[_r]||a[ct]||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 X0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function LC(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 Mb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function BC(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=qa(o.href),a=t.querySelector(Ar(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,lt(a);return}a=t.ownerDocument||t,o=Ab(o),(i=bn.get(i))&&rm(o,i),a=a.createElement("link"),lt(a);var l=a;l._p=new Promise(function(r,u){l.onload=r,l.onerror=u}),pt(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 xd=0;function HC(e,t){return e.stylesheets&&e.count===0&&cs(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&cs(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&xd===0&&(xd=62500*gC());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cs(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>xd?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)cs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Gs=null;function cs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Gs=new Map,t.forEach(UC,e),Gs=null,Us.call(e))}function UC(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 hr={$$typeof:to,Provider:null,Consumer:null,_currentValue:_i,_currentValue2:_i,_threadCount:0};function GC(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=Qf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qf(0),this.hiddenUpdates=Qf(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 Db(e,t,n,o,i,a,l,r,u,s,c,d){return e=new GC(e,t,n,l,u,s,c,d,r),t=1,a===!0&&(t|=24),a=Kt(3,null,null,t),e.current=a,a.stateNode=e,t=Lp(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},Up(a),e}function Ob(e){return e?(e=Ta,e):Ta}function Rb(e,t,n,o,i,a){i=Ob(i),o.context===null?o.context=i:o.pendingContext=i,o=Xo(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=qo(e,o,t),n!==null&&(Ut(n,e,t),Kl(n,e,t))}function q0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sm(e,t){q0(e,t),(e=e.alternate)&&q0(e,t)}function zb(e){if(e.tag===13||e.tag===31){var t=Bi(e,67108864);t!==null&&Ut(t,e,67108864),sm(e,67108864)}}function Z0(e){if(e.tag===13||e.tag===31){var t=en();t=Sp(t);var n=Bi(e,t);n!==null&&Ut(n,e,t),sm(e,t)}}var ks=!0;function kC(e,t,n,o){var i=re.T;re.T=null;var a=Ee.p;try{Ee.p=2,cm(e,t,n,o)}finally{Ee.p=a,re.T=i}}function VC(e,t,n,o){var i=re.T;re.T=null;var a=Ee.p;try{Ee.p=8,cm(e,t,n,o)}finally{Ee.p=a,re.T=i}}function cm(e,t,n,o){if(ks){var i=hp(o);if(i===null)bd(e,t,o,Vs,n),Q0(e,o);else if(IC(i,e,t,n,o))o.stopPropagation();else if(Q0(e,o),t&4&&-1<PC.indexOf(e)){for(;i!==null;){var a=ja(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var l=bi(a.pendingLanes);if(l!==0){var r=a;for(r.pendingLanes|=2,r.entangledLanes|=2;l;){var u=1<<31-Wt(l);r.entanglements[1]|=u,l&=~u}kn(a),(_e&6)===0&&(Ms=Ft()+500,wr(0,!1))}}break;case 31:case 13:r=Bi(a,2),r!==null&&Ut(r,a,2),Ws(),sm(a,2)}if(a=hp(o),a===null&&bd(e,t,o,Vs,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else bd(e,t,o,null,n)}}function hp(e){return e=Np(e),fm(e)}var Vs=null;function fm(e){if(Vs=null,e=ba(e),e!==null){var t=vr(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=W0(t),e!==null)return e;e=null}else if(n===31){if(e=ey(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 Vs=e,null}function Lb(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(AN()){case iy:return 2;case ay:return 8;case hs:case MN:return 32;case ly:return 268435456;default:return 32}default:return 32}}var gp=!1,jo=null,Ko=null,$o=null,gr=new Map,yr=new Map,Ho=[],PC="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 Q0(e,t){switch(e){case"focusin":case"focusout":jo=null;break;case"dragenter":case"dragleave":Ko=null;break;case"mouseover":case"mouseout":$o=null;break;case"pointerover":case"pointerout":gr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yr.delete(t.pointerId)}}function Gl(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=ja(t),t!==null&&zb(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function IC(e,t,n,o,i){switch(t){case"focusin":return jo=Gl(jo,e,t,n,o,i),!0;case"dragenter":return Ko=Gl(Ko,e,t,n,o,i),!0;case"mouseover":return $o=Gl($o,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return gr.set(a,Gl(gr.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,yr.set(a,Gl(yr.get(a)||null,e,t,n,o,i)),!0}return!1}function Bb(e){var t=ba(e.target);if(t!==null){var n=vr(t);if(n!==null){if(t=n.tag,t===13){if(t=W0(n),t!==null){e.blockedOn=t,Dg(e.priority,function(){Z0(n)});return}}else if(t===31){if(t=ey(n),t!==null){e.blockedOn=t,Dg(e.priority,function(){Z0(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 fs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hp(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);Ld=o,n.target.dispatchEvent(o),Ld=null}else return t=ja(n),t!==null&&zb(t),e.blockedOn=n,!1;t.shift()}return!0}function j0(e,t,n){fs(e)&&n.delete(t)}function YC(){gp=!1,jo!==null&&fs(jo)&&(jo=null),Ko!==null&&fs(Ko)&&(Ko=null),$o!==null&&fs($o)&&($o=null),gr.forEach(j0),yr.forEach(j0)}function Ku(e,t){e.blockedOn===t&&(e.blockedOn=null,gp||(gp=!0,nt.unstable_scheduleCallback(nt.unstable_NormalPriority,YC)))}var $u=null;function K0(e){$u!==e&&($u=e,nt.unstable_scheduleCallback(nt.unstable_NormalPriority,function(){$u===e&&($u=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(fm(o||n)===null)continue;break}var a=ja(n);a!==null&&(e.splice(t,3),t-=3,$d(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function Za(e){function t(u){return Ku(u,e)}jo!==null&&Ku(jo,e),Ko!==null&&Ku(Ko,e),$o!==null&&Ku($o,e),gr.forEach(t),yr.forEach(t);for(var n=0;n<Ho.length;n++){var o=Ho[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Ho.length&&(n=Ho[0],n.blockedOn===null);)Bb(n),n.blockedOn===null&&Ho.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[Gt]||null;if(typeof a=="function")l||K0(n);else if(l){var r=null;if(a&&a.hasAttribute("formAction")){if(i=a,l=a[Gt]||null)r=l.formAction;else if(fm(i)!==null)continue}else r=l.action;typeof r=="function"?n[o+1]=r:(n.splice(o,3),o-=3),K0(n)}}}function Hb(){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 dm(e){this._internalRoot=e}nc.prototype.render=dm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));var n=t.current,o=en();Rb(n,o,e,t,null,null)};nc.prototype.unmount=dm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rb(e.current,2,null,e,null,null),Ws(),t[Qa]=null}};function nc(e){this._internalRoot=e}nc.prototype.unstable_scheduleHydration=function(e){if(e){var t=fy();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ho.length&&t!==0&&t<Ho[n].priority;n++);Ho.splice(n,0,e),n===0&&Bb(e)}};var $0=F0.version;if($0!=="19.2.4")throw Error(V(527,$0,"19.2.4"));Ee.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=xN(t),e=e!==null?ty(e):null,e=e===null?null:e.stateNode,e};var XC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(kl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!kl.isDisabled&&kl.supportsFiber))try{br=kl.inject(XC),Jt=kl}catch{}var kl;oc.createRoot=function(e,t){if(!J0(e))throw Error(V(299));var n=!1,o="",i=wv,a=Av,l=Mv;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=Db(e,1,!1,null,null,n,o,null,i,a,l,Hb),e[Qa]=t.current,lm(e),new dm(t)};oc.hydrateRoot=function(e,t,n){if(!J0(e))throw Error(V(299));var o=!1,i="",a=wv,l=Av,r=Mv,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=Db(e,1,!0,t,n??null,o,i,u,a,l,r,Hb),t.context=Ob(null),n=t.current,o=en(),o=Sp(o),i=Xo(o),i.callback=null,qo(n,i,o),n=o,t.current.lanes=n,xr(t,n),kn(t),e[Qa]=t.current,lm(e),new nc(t)};oc.version="19.2.4"});var Vb=Rt((LR,kb)=>{"use strict";function Gb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gb)}catch(e){console.error(e)}}Gb(),kb.exports=Ub()});var Ib=Rt(ic=>{"use strict";var qC=Symbol.for("react.transitional.element"),ZC=Symbol.for("react.fragment");function Pb(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:qC,type:e,key:o,ref:t!==void 0?t:null,props:n}}ic.Fragment=ZC;ic.jsx=Pb;ic.jsxs=Pb});var fe=Rt((HR,Yb)=>{"use strict";Yb.exports=Ib()});var Cx=Rt(Tx=>{"use strict";var gl=Zt();function PA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var IA=typeof Object.is=="function"?Object.is:PA,YA=gl.useState,XA=gl.useEffect,qA=gl.useLayoutEffect,ZA=gl.useDebugValue;function QA(e,t){var n=t(),o=YA({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return qA(function(){i.value=n,i.getSnapshot=t,th(i)&&a({inst:i})},[e,n,t]),XA(function(){return th(i)&&a({inst:i}),e(function(){th(i)&&a({inst:i})})},[e]),ZA(n),n}function th(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!IA(e,n)}catch{return!0}}function jA(e,t){return t()}var KA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?jA:QA;Tx.useSyncExternalStore=gl.useSyncExternalStore!==void 0?gl.useSyncExternalStore:KA});var Ax=Rt((MB,wx)=>{"use strict";wx.exports=Cx()});var Dx=Rt(Mx=>{"use strict";var Kc=Zt(),$A=Ax();function FA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var JA=typeof Object.is=="function"?Object.is:FA,WA=$A.useSyncExternalStore,eM=Kc.useRef,tM=Kc.useEffect,nM=Kc.useMemo,oM=Kc.useDebugValue;Mx.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=eM(null);if(a.current===null){var l={hasValue:!1,value:null};a.current=l}else l=a.current;a=nM(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,JA(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=WA(e,a[0],a[1]);return tM(function(){l.hasValue=!0,l.value=r},[r]),oM(r),r}});var Rx=Rt((OB,Ox)=>{"use strict";Ox.exports=Dx()});var Qh=ae(Zt(),1),zE=ae(Vb(),1);var Ae=ae(Zt(),1);var B=ae(fe()),H=ae(Zt());function Ye(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=Ye(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var QC={value:()=>{}};function qb(){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 ac(n)}function ac(e){this._=e}function jC(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}})}ac.prototype=qb.prototype={constructor:ac,on:function(e,t){var n=this._,o=jC(e+"",n),i,a=-1,l=o.length;if(arguments.length<2){for(;++a<l;)if((i=(e=o[a]).type)&&(i=KC(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]=Xb(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Xb(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 ac(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 KC(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function Xb(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=QC,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ui=qb;var lc="http://www.w3.org/1999/xhtml",pm={svg:"http://www.w3.org/2000/svg",xhtml:lc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function mo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),pm.hasOwnProperty(t)?{space:pm[t],local:e}:e}function $C(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===lc&&t.documentElement.namespaceURI===lc?t.createElement(e):t.createElementNS(n,e)}}function FC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rc(e){var t=mo(e);return(t.local?FC:$C)(t)}function JC(){}function Gi(e){return e==null?JC:function(){return this.querySelector(e)}}function Zb(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 Xe(o,this._parents)}function mm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function WC(){return[]}function Dr(e){return e==null?WC:function(){return this.querySelectorAll(e)}}function ew(e){return function(){return mm(e.apply(this,arguments))}}function Qb(e){typeof e=="function"?e=ew(e):e=Dr(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 Xe(o,i)}function Or(e){return function(){return this.matches(e)}}function uc(e){return function(t){return t.matches(e)}}var tw=Array.prototype.find;function nw(e){return function(){return tw.call(this.children,e)}}function ow(){return this.firstElementChild}function jb(e){return this.select(e==null?ow:nw(typeof e=="function"?e:uc(e)))}var iw=Array.prototype.filter;function aw(){return Array.from(this.children)}function lw(e){return function(){return iw.call(this.children,e)}}function Kb(e){return this.selectAll(e==null?aw:lw(typeof e=="function"?e:uc(e)))}function $b(e){typeof e!="function"&&(e=Or(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 Xe(o,this._parents)}function sc(e){return new Array(e.length)}function Fb(){return new Xe(this._enter||this._groups.map(sc),this._parents)}function Rr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Rr.prototype={constructor:Rr,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 Jb(e){return function(){return e}}function rw(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 Rr(e,a[l]);for(;l<u;++l)(r=t[l])&&(i[l]=r)}function uw(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 Rr(e,a[r]);for(r=0;r<c;++r)(u=t[r])&&s.get(f[r])===u&&(i[r]=u)}function sw(e){return e.__data__}function Wb(e,t){if(!arguments.length)return Array.from(this,sw);var n=t?uw:rw,o=this._parents,i=this._groups;typeof e!="function"&&(e=Jb(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=cw(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 Xe(l,o),l._enter=r,l._exit=u,l}function cw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function e1(){return new Xe(this._exit||this._groups.map(sc),this._parents)}function t1(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 n1(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 Xe(r,this._parents)}function o1(){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 i1(e){e||(e=fw);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 Xe(i,this._parents).order()}function fw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function a1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function l1(){return Array.from(this)}function r1(){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 u1(){let e=0;for(let t of this)++e;return e}function s1(){return!this.node()}function c1(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 dw(e){return function(){this.removeAttribute(e)}}function pw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mw(e,t){return function(){this.setAttribute(e,t)}}function hw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function gw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function yw(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 f1(e,t){var n=mo(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?pw:dw:typeof t=="function"?n.local?yw:gw:n.local?hw:mw)(n,t))}function cc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function vw(e){return function(){this.style.removeProperty(e)}}function bw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Sw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function d1(e,t,n){return arguments.length>1?this.each((t==null?vw:typeof t=="function"?Sw:bw)(e,t,n??"")):oi(this.node(),e)}function oi(e,t){return e.style.getPropertyValue(t)||cc(e).getComputedStyle(e,null).getPropertyValue(t)}function xw(e){return function(){delete this[e]}}function _w(e,t){return function(){this[e]=t}}function Ew(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function p1(e,t){return arguments.length>1?this.each((t==null?xw:typeof t=="function"?Ew:_w)(e,t)):this.node()[e]}function m1(e){return e.trim().split(/^|\s+/)}function hm(e){return e.classList||new h1(e)}function h1(e){this._node=e,this._names=m1(e.getAttribute("class")||"")}h1.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 g1(e,t){for(var n=hm(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function y1(e,t){for(var n=hm(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Nw(e){return function(){g1(this,e)}}function Tw(e){return function(){y1(this,e)}}function Cw(e,t){return function(){(t.apply(this,arguments)?g1:y1)(this,e)}}function v1(e,t){var n=m1(e+"");if(arguments.length<2){for(var o=hm(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Cw:t?Nw:Tw)(n,t))}function ww(){this.textContent=""}function Aw(e){return function(){this.textContent=e}}function Mw(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function b1(e){return arguments.length?this.each(e==null?ww:(typeof e=="function"?Mw:Aw)(e)):this.node().textContent}function Dw(){this.innerHTML=""}function Ow(e){return function(){this.innerHTML=e}}function Rw(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function S1(e){return arguments.length?this.each(e==null?Dw:(typeof e=="function"?Rw:Ow)(e)):this.node().innerHTML}function zw(){this.nextSibling&&this.parentNode.appendChild(this)}function x1(){return this.each(zw)}function Lw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _1(){return this.each(Lw)}function E1(e){var t=typeof e=="function"?e:rc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Bw(){return null}function N1(e,t){var n=typeof e=="function"?e:rc(e),o=t==null?Bw:typeof t=="function"?t:Gi(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Hw(){var e=this.parentNode;e&&e.removeChild(this)}function T1(){return this.each(Hw)}function Uw(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gw(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function C1(e){return this.select(e?Gw:Uw)}function w1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function kw(e){return function(t){e.call(this,t,this.__data__)}}function Vw(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 Pw(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 Iw(e,t,n){return function(){var o=this.__on,i,a=kw(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 A1(e,t,n){var o=Vw(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?Iw:Pw,i=0;i<a;++i)this.each(r(o[i],t,n));return this}function M1(e,t,n){var o=cc(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 Yw(e,t){return function(){return M1(this,e,t)}}function Xw(e,t){return function(){return M1(this,e,t.apply(this,arguments))}}function D1(e,t){return this.each((typeof t=="function"?Xw:Yw)(e,t))}function*O1(){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 gm=[null];function Xe(e,t){this._groups=e,this._parents=t}function R1(){return new Xe([[document.documentElement]],gm)}function qw(){return this}Xe.prototype=R1.prototype={constructor:Xe,select:Zb,selectAll:Qb,selectChild:jb,selectChildren:Kb,filter:$b,data:Wb,enter:Fb,exit:e1,join:t1,merge:n1,selection:qw,order:o1,sort:i1,call:a1,nodes:l1,node:r1,size:u1,empty:s1,each:c1,attr:f1,style:d1,property:p1,classed:v1,text:b1,html:S1,raise:x1,lower:_1,append:E1,insert:N1,remove:T1,clone:C1,datum:w1,on:A1,dispatch:D1,[Symbol.iterator]:O1};var ho=R1;function ut(e){return typeof e=="string"?new Xe([[document.querySelector(e)]],[document.documentElement]):new Xe([[e]],gm)}function z1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Nt(e,t){if(e=z1(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 L1={passive:!1},ki={capture:!0,passive:!1};function fc(e){e.stopImmediatePropagation()}function ii(e){e.preventDefault(),e.stopImmediatePropagation()}function zr(e){var t=e.document.documentElement,n=ut(e).on("dragstart.drag",ii,ki);"onselectstart"in t?n.on("selectstart.drag",ii,ki):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Lr(e,t){var n=e.document.documentElement,o=ut(e).on("dragstart.drag",null);t&&(o.on("click.drag",ii,ki),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 Br=e=>()=>e;function Hr(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}})}Hr.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Zw(e){return!e.ctrlKey&&!e.button}function Qw(){return this.parentNode}function jw(e,t){return t??{x:e.x,y:e.y}}function Kw(){return navigator.maxTouchPoints||"ontouchstart"in this}function dc(){var e=Zw,t=Qw,n=jw,o=Kw,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,L1).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 N=p(this,t.call(this,v,x),v,x,"mouse");N&&(ut(v.view).on("mousemove.drag",g,ki).on("mouseup.drag",b,ki),zr(v.view),fc(v),s=!1,r=v.clientX,u=v.clientY,N("start",v))}}function g(v){if(ii(v),!s){var x=v.clientX-r,N=v.clientY-u;s=x*x+N*N>d}i.mouse("drag",v)}function b(v){ut(v.view).on("mousemove.drag mouseup.drag",null),Lr(v.view,s),ii(v),i.mouse("end",v)}function S(v,x){if(e.call(this,v,x)){var N=v.changedTouches,_=t.call(this,v,x),T=N.length,w,G;for(w=0;w<T;++w)(G=p(this,_,v,x,N[w].identifier,N[w]))&&(fc(v),G("start",v,N[w]))}}function h(v){var x=v.changedTouches,N=x.length,_,T;for(_=0;_<N;++_)(T=i[x[_].identifier])&&(ii(v),T("drag",v,x[_]))}function y(v){var x=v.changedTouches,N=x.length,_,T;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),_=0;_<N;++_)(T=i[x[_].identifier])&&(fc(v),T("end",v,x[_]))}function p(v,x,N,_,T,w){var G=a.copy(),A=Nt(w||N,x),L,P,E;if((E=n.call(v,new Hr("beforestart",{sourceEvent:N,target:f,identifier:T,active:l,x:A[0],y:A[1],dx:0,dy:0,dispatch:G}),_))!=null)return L=E.x-A[0]||0,P=E.y-A[1]||0,function D(M,R,O){var z=A,I;switch(M){case"start":i[T]=D,I=l++;break;case"end":delete i[T],--l;case"drag":A=Nt(O||R,x),I=l;break}G.call(M,v,new Hr(M,{sourceEvent:R,subject:E,target:f,identifier:T,active:I,x:A[0]+L,y:A[1]+P,dx:A[0]-z[0],dy:A[1]-z[1],dispatch:G}),_)}}return f.filter=function(v){return arguments.length?(e=typeof v=="function"?v:Br(!!v),f):e},f.container=function(v){return arguments.length?(t=typeof v=="function"?v:Br(v),f):t},f.subject=function(v){return arguments.length?(n=typeof v=="function"?v:Br(v),f):n},f.touchable=function(v){return arguments.length?(o=typeof v=="function"?v:Br(!!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 pc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ym(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function kr(){}var Ur=.7,gc=1/Ur,el="\\s*([+-]?\\d+)\\s*",Gr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$w=/^#([0-9a-f]{3,8})$/,Fw=new RegExp(`^rgb\\(${el},${el},${el}\\)$`),Jw=new RegExp(`^rgb\\(${Vn},${Vn},${Vn}\\)$`),Ww=new RegExp(`^rgba\\(${el},${el},${el},${Gr}\\)$`),e2=new RegExp(`^rgba\\(${Vn},${Vn},${Vn},${Gr}\\)$`),t2=new RegExp(`^hsl\\(${Gr},${Vn},${Vn}\\)$`),n2=new RegExp(`^hsla\\(${Gr},${Vn},${Vn},${Gr}\\)$`),B1={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};pc(kr,Dn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:H1,formatHex:H1,formatHex8:o2,formatHsl:i2,formatRgb:U1,toString:U1});function H1(){return this.rgb().formatHex()}function o2(){return this.rgb().formatHex8()}function i2(){return Y1(this).formatHsl()}function U1(){return this.rgb().formatRgb()}function Dn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=$w.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?G1(t):n===3?new Vt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?mc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?mc(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=Fw.exec(e))?new Vt(t[1],t[2],t[3],1):(t=Jw.exec(e))?new Vt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ww.exec(e))?mc(t[1],t[2],t[3],t[4]):(t=e2.exec(e))?mc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=t2.exec(e))?P1(t[1],t[2]/100,t[3]/100,1):(t=n2.exec(e))?P1(t[1],t[2]/100,t[3]/100,t[4]):B1.hasOwnProperty(e)?G1(B1[e]):e==="transparent"?new Vt(NaN,NaN,NaN,0):null}function G1(e){return new Vt(e>>16&255,e>>8&255,e&255,1)}function mc(e,t,n,o){return o<=0&&(e=t=n=NaN),new Vt(e,t,n,o)}function a2(e){return e instanceof kr||(e=Dn(e)),e?(e=e.rgb(),new Vt(e.r,e.g,e.b,e.opacity)):new Vt}function tl(e,t,n,o){return arguments.length===1?a2(e):new Vt(e,t,n,o??1)}function Vt(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}pc(Vt,tl,ym(kr,{brighter(e){return e=e==null?gc:Math.pow(gc,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ur:Math.pow(Ur,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vt(Pi(this.r),Pi(this.g),Pi(this.b),yc(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:k1,formatHex:k1,formatHex8:l2,formatRgb:V1,toString:V1}));function k1(){return`#${Vi(this.r)}${Vi(this.g)}${Vi(this.b)}`}function l2(){return`#${Vi(this.r)}${Vi(this.g)}${Vi(this.b)}${Vi((isNaN(this.opacity)?1:this.opacity)*255)}`}function V1(){let e=yc(this.opacity);return`${e===1?"rgb(":"rgba("}${Pi(this.r)}, ${Pi(this.g)}, ${Pi(this.b)}${e===1?")":`, ${e})`}`}function yc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Pi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vi(e){return e=Pi(e),(e<16?"0":"")+e.toString(16)}function P1(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 Y1(e){if(e instanceof Mn)return new Mn(e.h,e.s,e.l,e.opacity);if(e instanceof kr||(e=Dn(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 X1(e,t,n,o){return arguments.length===1?Y1(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}pc(Mn,X1,ym(kr,{brighter(e){return e=e==null?gc:Math.pow(gc,e),new Mn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ur:Math.pow(Ur,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 Vt(vm(e>=240?e-240:e+120,i,o),vm(e,i,o),vm(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Mn(I1(this.h),hc(this.s),hc(this.l),yc(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=yc(this.opacity);return`${e===1?"hsl(":"hsla("}${I1(this.h)}, ${hc(this.s)*100}%, ${hc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function I1(e){return e=(e||0)%360,e<0?e+360:e}function hc(e){return Math.max(0,Math.min(1,e||0))}function vm(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 bm(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 q1(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 bm((n-o/t)*t,l,i,a,r)}}function Z1(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 bm((n-o/t)*t,i,a,l,r)}}var Vr=e=>()=>e;function r2(e,t){return function(n){return e+n*t}}function u2(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 Q1(e){return(e=+e)==1?vc:function(t,n){return n-t?u2(t,n,e):Vr(isNaN(t)?n:t)}}function vc(e,t){var n=t-e;return n?r2(e,n):Vr(isNaN(e)?t:e)}var Ii=(function e(t){var n=Q1(t);function o(i,a){var l=n((i=tl(i)).r,(a=tl(a)).r),r=n(i.g,a.g),u=n(i.b,a.b),s=vc(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 j1(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=tl(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 s2=j1(q1),c2=j1(Z1);function K1(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 $1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function F1(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]=go(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 J1(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Tt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function W1(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]=go(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var xm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sm=new RegExp(xm.source,"g");function f2(e){return function(){return e}}function d2(e){return function(t){return e(t)+""}}function Pr(e,t){var n=xm.lastIndex=Sm.lastIndex=0,o,i,a,l=-1,r=[],u=[];for(e=e+"",t=t+"";(o=xm.exec(e))&&(i=Sm.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:Tt(o,i)})),n=Sm.lastIndex;return n<t.length&&(a=t.slice(n),r[l]?r[l]+=a:r[++l]=a),r.length<2?u[0]?d2(u[0].x):f2(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 go(e,t){var n=typeof t,o;return t==null||n==="boolean"?Vr(t):(n==="number"?Tt:n==="string"?(o=Dn(t))?(t=o,Ii):Pr:t instanceof Dn?Ii:t instanceof Date?J1:$1(t)?K1:Array.isArray(t)?F1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?W1:Tt)(e,t)}var eS=180/Math.PI,bc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _m(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)*eS,skewX:Math.atan(u)*eS,scaleX:l,scaleY:r}}var Sc;function tS(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?bc:_m(t.a,t.b,t.c,t.d,t.e,t.f)}function nS(e){return e==null?bc:(Sc||(Sc=document.createElementNS("http://www.w3.org/2000/svg","g")),Sc.setAttribute("transform",e),(e=Sc.transform.baseVal.consolidate())?(e=e.matrix,_m(e.a,e.b,e.c,e.d,e.e,e.f)):bc)}function oS(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:Tt(s,d)},{i:b-2,x:Tt(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:Tt(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:Tt(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:Tt(s,d)},{i:b-2,x:Tt(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 Em=oS(tS,"px, ","px)","deg)"),Nm=oS(nS,", ",")",")");var p2=1e-12;function iS(e){return((e=Math.exp(e))+1/e)/2}function m2(e){return((e=Math.exp(e))-1/e)/2}function h2(e){return((e=Math.exp(2*e))-1)/(e+1)}var Yi=(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<p2)h=Math.log(f/s)/t,S=function(_){return[r+_*m,u+_*g,s*Math.exp(t*_*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),N=Math.log(Math.sqrt(v*v+1)-v);h=(N-x)/t,S=function(_){var T=_*h,w=iS(x),G=s/(n*y)*(w*h2(t*T+x)-m2(x));return[r+G*m,u+G*g,s*w/iS(t*T+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 nl=0,Yr=0,Ir=0,lS=1e3,xc,Xr,_c=0,Xi=0,Ec=0,qr=typeof performance=="object"&&performance.now?performance:Date,rS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Qr(){return Xi||(rS(g2),Xi=qr.now()+Ec)}function g2(){Xi=0}function Zr(){this._call=this._time=this._next=null}Zr.prototype=Nc.prototype={constructor:Zr,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Qr():+n)+(t==null?0:+t),!this._next&&Xr!==this&&(Xr?Xr._next=this:xc=this,Xr=this),this._call=e,this._time=n,Tm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Tm())}};function Nc(e,t,n){var o=new Zr;return o.restart(e,t,n),o}function uS(){Qr(),++nl;for(var e=xc,t;e;)(t=Xi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--nl}function aS(){Xi=(_c=qr.now())+Ec,nl=Yr=0;try{uS()}finally{nl=0,v2(),Xi=0}}function y2(){var e=qr.now(),t=e-_c;t>lS&&(Ec-=t,_c=e)}function v2(){for(var e,t=xc,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:xc=n);Xr=e,Tm(o)}function Tm(e){if(!nl){Yr&&(Yr=clearTimeout(Yr));var t=e-Xi;t>24?(e<1/0&&(Yr=setTimeout(aS,e-qr.now()-Ec)),Ir&&(Ir=clearInterval(Ir))):(Ir||(_c=qr.now(),Ir=setInterval(y2,lS)),nl=1,rS(aS))}}function Tc(e,t,n){var o=new Zr;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var b2=Ui("start","end","cancel","interrupt"),S2=[],fS=0,sS=1,wc=2,Cc=3,cS=4,Ac=5,jr=6;function ai(e,t,n,o,i,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;x2(e,n,{name:t,index:o,group:i,on:b2,tween:S2,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:fS})}function Kr(e,t){var n=ot(e,t);if(n.state>fS)throw new Error("too late; already scheduled");return n}function mt(e,t){var n=ot(e,t);if(n.state>Cc)throw new Error("too late; already running");return n}function ot(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function x2(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Nc(a,0,n.time);function a(s){n.state=sS,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!==sS)return u();for(c in o)if(m=o[c],m.name===n.name){if(m.state===Cc)return Tc(l);m.state===cS?(m.state=jr,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete o[c]):+c<t&&(m.state=jr,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete o[c])}if(Tc(function(){n.state===Cc&&(n.state=cS,n.timer.restart(r,n.delay,n.time),r(s))}),n.state=wc,n.on.call("start",e,e.__data__,n.index,n.group),n.state===wc){for(n.state=Cc,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=Ac,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===Ac&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=jr,n.timer.stop(),delete o[t];for(var s in o)return;delete e.__transition}}function qi(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>wc&&o.state<Ac,o.state=jr,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}a&&delete e.__transition}}function dS(e){return this.each(function(){qi(this,e)})}function _2(e,t){var n,o;return function(){var i=mt(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 E2(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=mt(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 pS(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=ot(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?_2:E2)(n,e,t))}function ol(e,t,n){var o=e._id;return e.each(function(){var i=mt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return ot(i,o).value[t]}}function Mc(e,t){var n;return(typeof t=="number"?Tt:t instanceof Dn?Ii:(n=Dn(t))?(t=n,Ii):Pr)(e,t)}function N2(e){return function(){this.removeAttribute(e)}}function T2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function C2(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 w2(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 A2(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 M2(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 mS(e,t){var n=mo(e),o=n==="transform"?Nm:Mc;return this.attrTween(e,typeof t=="function"?(n.local?M2:A2)(n,o,ol(this,"attr."+e,t)):t==null?(n.local?T2:N2)(n):(n.local?w2:C2)(n,o,t))}function D2(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function O2(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function R2(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&O2(e,a)),n}return i._value=t,i}function z2(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&D2(e,a)),n}return i._value=t,i}function hS(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=mo(e);return this.tween(n,(o.local?R2:z2)(o,t))}function L2(e,t){return function(){Kr(this,e).delay=+t.apply(this,arguments)}}function B2(e,t){return t=+t,function(){Kr(this,e).delay=t}}function gS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?L2:B2)(t,e)):ot(this.node(),t).delay}function H2(e,t){return function(){mt(this,e).duration=+t.apply(this,arguments)}}function U2(e,t){return t=+t,function(){mt(this,e).duration=t}}function yS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?H2:U2)(t,e)):ot(this.node(),t).duration}function G2(e,t){if(typeof t!="function")throw new Error;return function(){mt(this,e).ease=t}}function vS(e){var t=this._id;return arguments.length?this.each(G2(t,e)):ot(this.node(),t).ease}function k2(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;mt(this,e).ease=n}}function bS(e){if(typeof e!="function")throw new Error;return this.each(k2(this._id,e))}function SS(e){typeof e!="function"&&(e=Or(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 Ct(o,this._parents,this._name,this._id)}function xS(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 Ct(l,this._parents,this._name,this._id)}function V2(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 P2(e,t,n){var o,i,a=V2(t)?Kr:mt;return function(){var l=a(this,e),r=l.on;r!==o&&(i=(o=r).copy()).on(t,n),l.on=i}}function _S(e,t){var n=this._id;return arguments.length<2?ot(this.node(),n).on.on(e):this.each(P2(n,e,t))}function I2(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ES(){return this.on("end.remove",I2(this._id))}function NS(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,ai(s[f],t,n,f,s,ot(c,n)));return new Ct(a,this._parents,t,n)}function TS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Dr(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=ot(c,n),b=0,S=f.length;b<S;++b)(m=f[b])&&ai(m,t,n,b,f,g);a.push(f),l.push(c)}return new Ct(a,l,t,n)}var Y2=ho.prototype.constructor;function CS(){return new Y2(this._groups,this._parents)}function X2(e,t){var n,o,i;return function(){var a=oi(this,e),l=(this.style.removeProperty(e),oi(this,e));return a===l?null:a===n&&l===o?i:i=t(n=a,o=l)}}function wS(e){return function(){this.style.removeProperty(e)}}function q2(e,t,n){var o,i=n+"",a;return function(){var l=oi(this,e);return l===i?null:l===o?a:a=t(o=l,n)}}function Z2(e,t,n){var o,i,a;return function(){var l=oi(this,e),r=n(this),u=r+"";return r==null&&(u=r=(this.style.removeProperty(e),oi(this,e))),l===u?null:l===o&&u===i?a:(i=u,a=t(o=l,r))}}function Q2(e,t){var n,o,i,a="style."+t,l="end."+a,r;return function(){var u=mt(this,e),s=u.on,c=u.value[a]==null?r||(r=wS(t)):void 0;(s!==n||i!==c)&&(o=(n=s).copy()).on(l,i=c),u.on=o}}function AS(e,t,n){var o=(e+="")=="transform"?Em:Mc;return t==null?this.styleTween(e,X2(e,o)).on("end.style."+e,wS(e)):typeof t=="function"?this.styleTween(e,Z2(e,o,ol(this,"style."+e,t))).each(Q2(this._id,e)):this.styleTween(e,q2(e,o,t),n).on("end.style."+e,null)}function j2(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function K2(e,t,n){var o,i;function a(){var l=t.apply(this,arguments);return l!==i&&(o=(i=l)&&j2(e,l,n)),o}return a._value=t,a}function MS(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,K2(e,t,n??""))}function $2(e){return function(){this.textContent=e}}function F2(e){return function(){var t=e(this);this.textContent=t??""}}function DS(e){return this.tween("text",typeof e=="function"?F2(ol(this,"text",e)):$2(e==null?"":e+""))}function J2(e){return function(t){this.textContent=e.call(this,t)}}function W2(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&J2(i)),t}return o._value=e,o}function OS(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,W2(e))}function RS(){for(var e=this._name,t=this._id,n=Dc(),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=ot(u,t);ai(u,e,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ct(o,this._parents,e,n)}function zS(){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=mt(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 eA=0;function Ct(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function LS(e){return ho().transition(e)}function Dc(){return++eA}var yo=ho.prototype;Ct.prototype=LS.prototype={constructor:Ct,select:NS,selectAll:TS,selectChild:yo.selectChild,selectChildren:yo.selectChildren,filter:SS,merge:xS,selection:CS,transition:RS,call:yo.call,nodes:yo.nodes,node:yo.node,size:yo.size,empty:yo.empty,each:yo.each,on:_S,attr:mS,attrTween:hS,style:AS,styleTween:MS,text:DS,textTween:OS,remove:ES,tween:pS,delay:gS,duration:yS,ease:vS,easeVarying:bS,end:zS,[Symbol.iterator]:yo[Symbol.iterator]};function Oc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var tA={time:null,delay:0,duration:250,ease:Oc};function nA(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 BS(e){var t,n;e instanceof Ct?(t=e._id,e=e._name):(t=Dc(),(n=tA).time=Qr(),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])&&ai(u,e,t,s,l,n||nA(u,t));return new Ct(o,this._parents,e,t)}ho.prototype.interrupt=dS;ho.prototype.transition=BS;var $r=e=>()=>e;function Cm(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 On(e,t,n){this.k=e,this.x=t,this.y=n}On.prototype={constructor:On,scale:function(e){return e===1?this:new On(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new On(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 Zi=new On(1,0,0);Fr.prototype=On.prototype;function Fr(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Zi;return e.__zoom}function Rc(e){e.stopImmediatePropagation()}function il(e){e.preventDefault(),e.stopImmediatePropagation()}function oA(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function iA(){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 HS(){return this.__zoom||Zi}function aA(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function lA(){return navigator.maxTouchPoints||"ontouchstart"in this}function rA(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 zc(){var e=oA,t=iA,n=rA,o=aA,i=lA,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],r=250,u=Yi,s=Ui("start","zoom","end"),c,d,f,m=500,g=150,b=0,S=10;function h(E){E.property("__zoom",HS).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",G).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}h.transform=function(E,D,M,R){var O=E.selection?E.selection():E;O.property("__zoom",HS),E!==O?x(E,D,M,R):O.interrupt().each(function(){N(this,arguments).event(R).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},h.scaleBy=function(E,D,M,R){h.scaleTo(E,function(){var O=this.__zoom.k,z=typeof D=="function"?D.apply(this,arguments):D;return O*z},M,R)},h.scaleTo=function(E,D,M,R){h.transform(E,function(){var O=t.apply(this,arguments),z=this.__zoom,I=M==null?v(O):typeof M=="function"?M.apply(this,arguments):M,U=z.invert(I),Y=typeof D=="function"?D.apply(this,arguments):D;return n(p(y(z,Y),I,U),O,l)},M,R)},h.translateBy=function(E,D,M,R){h.transform(E,function(){return n(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),l)},null,R)},h.translateTo=function(E,D,M,R,O){h.transform(E,function(){var z=t.apply(this,arguments),I=this.__zoom,U=R==null?v(z):typeof R=="function"?R.apply(this,arguments):R;return n(Zi.translate(U[0],U[1]).scale(I.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof M=="function"?-M.apply(this,arguments):-M),z,l)},R,O)};function y(E,D){return D=Math.max(a[0],Math.min(a[1],D)),D===E.k?E:new On(D,E.x,E.y)}function p(E,D,M){var R=D[0]-M[0]*E.k,O=D[1]-M[1]*E.k;return R===E.x&&O===E.y?E:new On(E.k,R,O)}function v(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function x(E,D,M,R){E.on("start.zoom",function(){N(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(R).end()}).tween("zoom",function(){var O=this,z=arguments,I=N(O,z).event(R),U=t.apply(O,z),Y=M==null?v(U):typeof M=="function"?M.apply(O,z):M,Z=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),K=O.__zoom,j=typeof D=="function"?D.apply(O,z):D,le=u(K.invert(Y).concat(Z/K.k),j.invert(Y).concat(Z/j.k));return function(ee){if(ee===1)ee=j;else{var k=le(ee),X=Z/k[2];ee=new On(X,Y[0]-k[0]*X,Y[1]-k[1]*X)}I.zoom(null,ee)}})}function N(E,D,M){return!M&&E.__zooming||new _(E,D)}function _(E,D){this.that=E,this.args=D,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,D),this.taps=0}_.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,D){return this.mouse&&E!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var D=ut(this.that).datum();s.call(E,this.that,new Cm(E,{sourceEvent:this.sourceEvent,target:h,type:E,transform:this.that.__zoom,dispatch:s}),D)}};function T(E,...D){if(!e.apply(this,arguments))return;var M=N(this,D).event(E),R=this.__zoom,O=Math.max(a[0],Math.min(a[1],R.k*Math.pow(2,o.apply(this,arguments)))),z=Nt(E);if(M.wheel)(M.mouse[0][0]!==z[0]||M.mouse[0][1]!==z[1])&&(M.mouse[1]=R.invert(M.mouse[0]=z)),clearTimeout(M.wheel);else{if(R.k===O)return;M.mouse=[z,R.invert(z)],qi(this),M.start()}il(E),M.wheel=setTimeout(I,g),M.zoom("mouse",n(p(y(R,O),M.mouse[0],M.mouse[1]),M.extent,l));function I(){M.wheel=null,M.end()}}function w(E,...D){if(f||!e.apply(this,arguments))return;var M=E.currentTarget,R=N(this,D,!0).event(E),O=ut(E.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",Z,!0),z=Nt(E,M),I=E.clientX,U=E.clientY;zr(E.view),Rc(E),R.mouse=[z,this.__zoom.invert(z)],qi(this),R.start();function Y(K){if(il(K),!R.moved){var j=K.clientX-I,le=K.clientY-U;R.moved=j*j+le*le>b}R.event(K).zoom("mouse",n(p(R.that.__zoom,R.mouse[0]=Nt(K,M),R.mouse[1]),R.extent,l))}function Z(K){O.on("mousemove.zoom mouseup.zoom",null),Lr(K.view,R.moved),il(K),R.event(K).end()}}function G(E,...D){if(e.apply(this,arguments)){var M=this.__zoom,R=Nt(E.changedTouches?E.changedTouches[0]:E,this),O=M.invert(R),z=M.k*(E.shiftKey?.5:2),I=n(p(y(M,z),R,O),t.apply(this,D),l);il(E),r>0?ut(this).transition().duration(r).call(x,I,R,E):ut(this).call(h.transform,I,R,E)}}function A(E,...D){if(e.apply(this,arguments)){var M=E.touches,R=M.length,O=N(this,D,E.changedTouches.length===R).event(E),z,I,U,Y;for(Rc(E),I=0;I<R;++I)U=M[I],Y=Nt(U,this),Y=[Y,this.__zoom.invert(Y),U.identifier],O.touch0?!O.touch1&&O.touch0[2]!==Y[2]&&(O.touch1=Y,O.taps=0):(O.touch0=Y,z=!0,O.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(O.taps<2&&(d=Y[0],c=setTimeout(function(){c=null},m)),qi(this),O.start())}}function L(E,...D){if(this.__zooming){var M=N(this,D).event(E),R=E.changedTouches,O=R.length,z,I,U,Y;for(il(E),z=0;z<O;++z)I=R[z],U=Nt(I,this),M.touch0&&M.touch0[2]===I.identifier?M.touch0[0]=U:M.touch1&&M.touch1[2]===I.identifier&&(M.touch1[0]=U);if(I=M.that.__zoom,M.touch1){var Z=M.touch0[0],K=M.touch0[1],j=M.touch1[0],le=M.touch1[1],ee=(ee=j[0]-Z[0])*ee+(ee=j[1]-Z[1])*ee,k=(k=le[0]-K[0])*k+(k=le[1]-K[1])*k;I=y(I,Math.sqrt(ee/k)),U=[(Z[0]+j[0])/2,(Z[1]+j[1])/2],Y=[(K[0]+le[0])/2,(K[1]+le[1])/2]}else if(M.touch0)U=M.touch0[0],Y=M.touch0[1];else return;M.zoom("touch",n(p(I,U,Y),M.extent,l))}}function P(E,...D){if(this.__zooming){var M=N(this,D).event(E),R=E.changedTouches,O=R.length,z,I;for(Rc(E),f&&clearTimeout(f),f=setTimeout(function(){f=null},m),z=0;z<O;++z)I=R[z],M.touch0&&M.touch0[2]===I.identifier?delete M.touch0:M.touch1&&M.touch1[2]===I.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(I=Nt(I,this),Math.hypot(d[0]-I[0],d[1]-I[1])<S)){var U=ut(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return h.wheelDelta=function(E){return arguments.length?(o=typeof E=="function"?E:$r(+E),h):o},h.filter=function(E){return arguments.length?(e=typeof E=="function"?E:$r(!!E),h):e},h.touchable=function(E){return arguments.length?(i=typeof E=="function"?E:$r(!!E),h):i},h.extent=function(E){return arguments.length?(t=typeof E=="function"?E:$r([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),h):t},h.scaleExtent=function(E){return arguments.length?(a[0]=+E[0],a[1]=+E[1],h):[a[0],a[1]]},h.translateExtent=function(E){return arguments.length?(l[0][0]=+E[0][0],l[1][0]=+E[1][0],l[0][1]=+E[0][1],l[1][1]=+E[1][1],h):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},h.constrain=function(E){return arguments.length?(n=E,h):n},h.duration=function(E){return arguments.length?(r=+E,h):r},h.interpolate=function(E){return arguments.length?(u=E,h):u},h.on=function(){var E=s.on.apply(s,arguments);return E===s?h:E},h.clickDistance=function(E){return arguments.length?(b=(E=+E)*E,h):Math.sqrt(b)},h.tapDistance=function(E){return arguments.length?(S=+E,h):S},h}var on={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."},cl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Om=["Enter"," ","Escape"],Rm={"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"},ui;(function(e){e.Strict="strict",e.Loose="loose"})(ui||(ui={}));var vo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(vo||(vo={}));var Qi;(function(e){e.Partial="partial",e.Full="full"})(Qi||(Qi={}));var zm={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},Pn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Pn||(Pn={}));var rl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(rl||(rl={}));var W;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(W||(W={}));var US={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top};function Lm(e){return e===null?null:e?"valid":"invalid"}var Bm=e=>"id"in e&&"source"in e&&"target"in e,$S=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Hm=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var eu=(e,t=[0,0])=>{let{width:n,height:o}=In(e),i=e.origin??t,a=n*i[0],l=o*i[1];return{x:e.position.x-a,y:e.position.y-l}},Um=(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):Hm(i)?i:t.nodeLookup.get(i.id));let r=l?Hc(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 kc(n)},fl=(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,Hc(i)),o=!0)}),o?kc(n):{x:0,y:0,width:0,height:0}},Uc=(e,t,[n,o,i]=[0,0,1],a=!1,l=!1)=>{let r={...ml(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=dl(r,Ki(s)),S=(m??0)*(g??0),h=a&&b>0;(!s.internals.handleBounds||h||b>=S||s.dragging)&&u.push(s)}return u},FS=(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 uA(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 JS({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},l){if(e.size===0)return Promise.resolve(!0);let r=uA(e,l),u=fl(r),s=tu(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 Gm({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",on.error005());else{let m=r.measured.width,g=r.measured.height;m&&g&&(d=[[u,s],[u+m,s+g]])}else r&&sl(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=sl(d)?ji(t,d,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&a?.("015",on.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 WS({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=FS(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 ul=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ji=(e={x:0,y:0},t,n)=>({x:ul(e.x,t[0][0],t[1][0]-(n?.width??0)),y:ul(e.y,t[0][1],t[1][1]-(n?.height??0))});function ex(e,t,n){let{width:o,height:i}=In(n),{x:a,y:l}=n.internals.positionAbsolute;return ji(e,[[a,l],[a+o,l+i]],t)}var GS=(e,t,n)=>e<t?ul(Math.abs(e-t),1,t)/t:e>n?-ul(Math.abs(e-n),1,t)/t:0,tx=(e,t,n=15,o=40)=>{let i=GS(e.x,o,t.width-o)*n,a=GS(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)}),Dm=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),kc=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),Ki=(e,t=[0,0])=>{let{x:n,y:o}=Hm(e)?e.internals.positionAbsolute:eu(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}},Hc=(e,t=[0,0])=>{let{x:n,y:o}=Hm(e)?e.internals.positionAbsolute:eu(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)}},km=(e,t)=>kc(Gc(Dm(e),Dm(t))),dl=(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)},Vm=e=>Sn(e.width)&&Sn(e.height)&&Sn(e.x)&&Sn(e.y),Sn=e=>!isNaN(e)&&isFinite(e),Pm=(e,t)=>{},pl=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),ml=({x:e,y:t},[n,o,i],a=!1,l=[1,1])=>{let r={x:(e-n)/i,y:(t-o)/i};return a?pl(r,l):r},Wr=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function al(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 sA(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=al(e,n),i=al(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=al(e.top??e.y??0,n),i=al(e.bottom??e.y??0,n),a=al(e.left??e.x??0,t),l=al(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 cA(e,t,n,o,i,a){let{x:l,y:r}=Wr(e,[t,n,o]),{x:u,y:s}=Wr({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 tu=(e,t,n,o,i,a)=>{let l=sA(a,t,n),r=(t-l.x)/e.width,u=(n-l.y)/e.height,s=Math.min(r,u),c=ul(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=cA(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}},hl=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function sl(e){return e!=null&&e!=="parent"}function In(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Im(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function Ym(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 Xm(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function nx(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function ox(e){return{...Rm,...e||{}}}function Jr(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:l}=xn(e),r=ml({x:a-(i?.left??0),y:l-(i?.top??0)},o),{x:u,y:s}=n?pl(r,t):r;return{xSnapped:u,ySnapped:s,...r}}var Vc=e=>({width:e.offsetWidth,height:e.offsetHeight}),qm=e=>e?.getRootNode?.()||window?.document,fA=["INPUT","SELECT","TEXTAREA"];function Zm(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:fA.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var Qm=e=>"clientX"in e,xn=(e,t)=>{let n=Qm(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)}},kS=(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,...Vc(l)}})};function Pc({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 Lc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function VS({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case W.Left:return[t-Lc(t-o,a),n];case W.Right:return[t+Lc(o-t,a),n];case W.Top:return[t,n-Lc(n-i,a)];case W.Bottom:return[t,n+Lc(i-n,a)]}}function Ic({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,curvature:l=.25}){let[r,u]=VS({pos:n,x1:e,y1:t,x2:o,y2:i,c:l}),[s,c]=VS({pos:a,x1:o,y1:i,x2:e,y2:t,c:l}),[d,f,m,g]=Pc({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 ix({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 ax({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=Gc(Hc(e),Hc(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 dl(l,kc(a))>0}var dA=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,pA=(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)),Km=(e,t,n={})=>{if(!e.source||!e.target)return Pm("006",on.error006()),t;let o=n.getEdgeId||dA,i;return Bm(e)?i={...e}:i={...e,id:o(e)},pA(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Yc({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 PS={[W.Left]:{x:-1,y:0},[W.Right]:{x:1,y:0},[W.Top]:{x:0,y:-1},[W.Bottom]:{x:0,y:1}},mA=({source:e,sourcePosition:t=W.Bottom,target:n})=>t===W.Left||t===W.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},IS=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function hA({source:e,sourcePosition:t=W.Bottom,target:n,targetPosition:o=W.Top,center:i,offset:a,stepPosition:l}){let r=PS[t],u=PS[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=mA({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 N=[{x:b,y:s.y},{x:b,y:c.y}],_=[{x:s.x,y:S},{x:c.x,y:S}];r[f]===m?g=f==="x"?N:_:g=f==="x"?_:N}else{let N=[{x:s.x,y:c.y}],_=[{x:c.x,y:s.y}];if(f==="x"?g=r.x===m?_:N:g=r.y===m?N:_,t===o){let L=Math.abs(e[f]-n[f]);if(L<=a){let P=Math.min(a-1,a-L);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 L=f==="x"?"y":"x",P=r[f]===u[L],E=s[L]>c[L],D=s[L]<c[L];(r[f]===1&&(!P&&E||P&&D)||r[f]!==1&&(!P&&D||P&&E))&&(g=f==="x"?N:_)}let T={x:s.x+h.x,y:s.y+h.y},w={x:c.x+y.x,y:c.y+y.y},G=Math.max(Math.abs(T.x-g[0].x),Math.abs(w.x-g[0].x)),A=Math.max(Math.abs(T.y-g[0].y),Math.abs(w.y-g[0].y));G>=A?(b=(T.x+w.x)/2,S=g[0].y):(b=g[0].x,S=(T.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 gA(e,t,n,o){let i=Math.min(IS(e,t)/2,IS(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 nu({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,borderRadius:l=5,centerX:r,centerY:u,offset:s=20,stepPosition:c=.5}){let[d,f,m,g,b]=hA({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=gA(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 YS(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function lx(e){let{sourceNode:t,targetNode:n}=e;if(!YS(t)||!YS(n))return null;let o=t.internals.handleBounds||XS(t.handles),i=n.internals.handleBounds||XS(n.handles),a=qS(o?.source??[],e.sourceHandle),l=qS(e.connectionMode===ui.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!l)return e.onError?.("008",on.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let r=a?.position||W.Bottom,u=l?.position||W.Top,s=si(t,a,r),c=si(n,l,u);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y,sourcePosition:r,targetPosition:u}}function XS(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 si(e,t,n=W.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??In(e);if(o)return{x:i+l/2,y:a+r/2};switch(t?.position??n){case W.Top:return{x:i+l/2,y:a};case W.Right:return{x:i+l,y:a+r/2};case W.Bottom:return{x:i+l/2,y:a+r};case W.Left:return{x:i,y:a+r/2}}}function qS(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Xc(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function rx(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=Xc(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 ux=1e3,yA=10,$m={nodeOrigin:[0,0],nodeExtent:cl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},vA={...$m,checkEquality:!0};function Fm(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function sx(e,t,n){let o=Fm($m,n);for(let i of e.values())if(i.parentId)Wm(i,e,t,o);else{let a=eu(i,o.nodeOrigin),l=sl(i.extent)?i.extent:o.nodeExtent,r=ji(a,l,In(i));i.internals.positionAbsolute=r}}function bA(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 Jm(e){return e==="manual"}function qc(e,t,n,o={}){let i=Fm(vA,o),a={i:0},l=new Map(t),r=i?.elevateNodesOnSelect&&!Jm(i.zIndexMode)?ux: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=eu(s,i.nodeOrigin),f=sl(s.extent)?s.extent:i.nodeExtent,m=ji(d,f,In(s));c={...i.defaults,...s,measured:{width:s.measured?.width,height:s.measured?.height},internals:{positionAbsolute:m,handleBounds:bA(s,c),z:cx(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&&Wm(c,t,n,o,a)}return u}function SA(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 Wm(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:r,zIndexMode:u}=Fm($m,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}SA(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*yA),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!Jm(u)?ux:0,{x:f,y:m,z:g}=xA(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 cx(e,t,n){let o=Sn(e.zIndex)?e.zIndex:0;return Jm(n)?o:o+(e.selected?t:0)}function xA(e,t,n,o,i,a){let{x:l,y:r}=t.internals.positionAbsolute,u=In(e),s=eu(e,n),c=sl(e.extent)?ji(s,e.extent,u):s,d=ji({x:l+c.x,y:r+c.y},o,u);e.extent==="parent"&&(d=ex(d,u,t));let f=cx(e,i,a),m=t.internals.z??0;return{x:d.x,y:d.y,z:m>=f?m+1:f}}function Zc(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??Ki(r),s=km(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=In(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 fx(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=Vc(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=sl(g.extent)?g.extent:a,{positionAbsolute:v}=g.internals;g.parentId&&g.extent==="parent"?v=ex(v,b,t.get(g.parentId)):p&&(v=ji(v,p,b));let x={...g,measured:b,internals:{...g.internals,positionAbsolute:v,handleBounds:{source:kS("source",m.nodeElement,y,d,g.id),target:kS("target",m.nodeElement,y,d,g.id)}}};t.set(g.id,x),g.parentId&&Wm(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:Ki(x,i)}))}}if(f.length>0){let m=Zc(f,t,n,i);s.push(...m)}return{changes:s,updatedInternals:u}}async function dx({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 ZS(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 eh(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}`;ZS("source",u,c,e,i,l),ZS("target",u,s,e,a,r),t.set(o.id,o)}}function px(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:px(n,t):!1}function QS(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 _A(e,t,n,o){let i=new Map;for(let[a,l]of e)if((l.selected||l.id===o)&&(!l.parentId||!px(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 wm({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 EA({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=pl(a,t);return{x:l.x-a.x,y:l.y-a.y}}function mx({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:N,nodeClickDistance:_=0}){f=ut(v);function T({x:L,y:P}){let{nodeLookup:E,nodeExtent:D,snapGrid:M,snapToGrid:R,nodeOrigin:O,onNodeDrag:z,onSelectionDrag:I,onError:U,updateNodePositions:Y}=t();a={x:L,y:P};let Z=!1,K=r.size>1,j=K&&D?Dm(fl(r)):null,le=K&&R?EA({dragItems:r,snapGrid:M,x:L,y:P}):null;for(let[ee,k]of r){if(!E.has(ee))continue;let X={x:L-k.distance.x,y:P-k.distance.y};R&&(X=le?{x:Math.round(X.x+le.x),y:Math.round(X.y+le.y)}:pl(X,M));let Q=null;if(K&&D&&!k.extent&&j){let{positionAbsolute:ie}=k.internals,ce=ie.x-j.x+D[0][0],ve=ie.x+k.measured.width-j.x2+D[1][0],he=ie.y-j.y+D[0][1],Ke=ie.y+k.measured.height-j.y2+D[1][1];Q=[[ce,he],[ve,Ke]]}let{position:te,positionAbsolute:J}=Gm({nodeId:ee,nextPosition:X,nodeLookup:E,nodeExtent:Q||D,nodeOrigin:O,onError:U});Z=Z||k.position.x!==te.x||k.position.y!==te.y,k.position=te,k.internals.positionAbsolute=J}if(g=g||Z,!!Z&&(Y(r,!0),b&&(o||z||!N&&I))){let[ee,k]=wm({nodeId:N,dragItems:r,nodeLookup:E});o?.(b,r,ee,k),z?.(b,ee,k),N||I?.(b,k)}}async function w(){if(!c)return;let{transform:L,panBy:P,autoPanSpeed:E,autoPanOnNodeDrag:D}=t();if(!D){u=!1,cancelAnimationFrame(l);return}let[M,R]=tx(s,c,E);(M!==0||R!==0)&&(a.x=(a.x??0)-M/L[2],a.y=(a.y??0)-R/L[2],await P({x:M,y:R})&&T(a)),l=requestAnimationFrame(w)}function G(L){let{nodeLookup:P,multiSelectionActive:E,nodesDraggable:D,transform:M,snapGrid:R,snapToGrid:O,selectNodesOnDrag:z,onNodeDragStart:I,onSelectionDragStart:U,unselectNodesAndEdges:Y}=t();d=!0,(!z||!x)&&!E&&N&&(P.get(N)?.selected||Y()),x&&z&&N&&e?.(N);let Z=Jr(L.sourceEvent,{transform:M,snapGrid:R,snapToGrid:O,containerBounds:c});if(a=Z,r=_A(P,D,Z,N),r.size>0&&(n||I||!N&&U)){let[K,j]=wm({nodeId:N,dragItems:r,nodeLookup:P});n?.(L.sourceEvent,r,K,j),I?.(L.sourceEvent,K,j),N||U?.(L.sourceEvent,j)}}let A=dc().clickDistance(_).on("start",L=>{let{domNode:P,nodeDragThreshold:E,transform:D,snapGrid:M,snapToGrid:R}=t();c=P?.getBoundingClientRect()||null,m=!1,g=!1,b=L.sourceEvent,E===0&&G(L),a=Jr(L.sourceEvent,{transform:D,snapGrid:M,snapToGrid:R,containerBounds:c}),s=xn(L.sourceEvent,c)}).on("drag",L=>{let{autoPanOnNodeDrag:P,transform:E,snapGrid:D,snapToGrid:M,nodeDragThreshold:R,nodeLookup:O}=t(),z=Jr(L.sourceEvent,{transform:E,snapGrid:D,snapToGrid:M,containerBounds:c});if(b=L.sourceEvent,(L.sourceEvent.type==="touchmove"&&L.sourceEvent.touches.length>1||N&&!O.has(N))&&(m=!0),!m){if(!u&&P&&d&&(u=!0,w()),!d){let I=xn(L.sourceEvent,c),U=I.x-s.x,Y=I.y-s.y;Math.sqrt(U*U+Y*Y)>R&&G(L)}(a.x!==z.xSnapped||a.y!==z.ySnapped)&&r&&d&&(s=xn(L.sourceEvent,c),T(z))}}).on("end",L=>{if(!(!d||m)&&(u=!1,d=!1,cancelAnimationFrame(l),r.size>0)){let{nodeLookup:P,updateNodePositions:E,onNodeDragStop:D,onSelectionDragStop:M}=t();if(g&&(E(r,!1),g=!1),i||D||!N&&M){let[R,O]=wm({nodeId:N,dragItems:r,nodeLookup:P,dragging:!1});i?.(L.sourceEvent,r,R,O),D?.(L.sourceEvent,R,O),N||M?.(L.sourceEvent,O)}}}).filter(L=>{let P=L.target;return!L.button&&(!y||!QS(P,`.${y}`,v))&&(!p||QS(P,p,v))});f.call(A)}function h(){f?.on(".drag",null)}return{update:S,destroy:h}}function NA(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())dl(i,Ki(a))>0&&o.push(a);return o}var TA=250;function CA(e,t,n,o){let i=[],a=1/0,l=NA(e,n,t+TA);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}=si(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 hx(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,...si(l,u,u.position,!0)}:u}function gx(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function wA(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var yx=()=>!0;function AA(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=yx,onReconnectEnd:y,updateConnection:p,getTransform:v,getFromHandle:x,autoPanSpeed:N,dragThreshold:_=1,handleDomNode:T}){let w=qm(e.target),G=0,A,{x:L,y:P}=xn(e),E=gx(a,T),D=r?.getBoundingClientRect(),M=!1;if(!D||!E)return;let R=hx(i,E,o,u,t);if(!R)return;let O=xn(e,D),z=!1,I=null,U=!1,Y=null;function Z(){if(!c||!D)return;let[te,J]=tx(O,D,N);f({x:te,y:J}),G=requestAnimationFrame(Z)}let K={...R,nodeId:i,type:E,position:R.position},j=u.get(i),ee={inProgress:!0,isValid:null,from:si(j,K,W.Left,!0),fromHandle:K,fromPosition:K.position,fromNode:j,to:O,toHandle:null,toPosition:US[K.position],toNode:null,pointer:O};function k(){M=!0,p(ee),g?.(e,{nodeId:i,handleId:o,handleType:E})}_===0&&k();function X(te){if(!M){let{x:Ke,y:St}=xn(te),Ot=Ke-L,rn=St-P;if(!(Ot*Ot+rn*rn>_*_))return;k()}if(!x()||!K){Q(te);return}let J=v();O=xn(te,D),A=CA(ml(O,J,!1,[1,1]),n,u,K),z||(Z(),z=!0);let ie=vx(te,{handle:A,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:l?"target":"source",isValidConnection:h,doc:w,lib:s,flowId:d,nodeLookup:u});Y=ie.handleDomNode,I=ie.connection,U=wA(!!A,ie.isValid);let ce=u.get(i),ve=ce?si(ce,K,W.Left,!0):ee.from,he={...ee,from:ve,isValid:U,to:ie.toHandle&&U?Wr({x:ie.toHandle.x,y:ie.toHandle.y},J):O,toHandle:ie.toHandle,toPosition:U&&ie.toHandle?ie.toHandle.position:US[K.position],toNode:ie.toHandle?u.get(ie.toHandle.nodeId):null,pointer:O};p(he),ee=he}function Q(te){if(!("touches"in te&&te.touches.length>0)){if(M){(A||Y)&&I&&U&&b?.(I);let{inProgress:J,...ie}=ee,ce={...ie,toPosition:ee.toHandle?ee.toPosition:null};S?.(te,ce),a&&y?.(te,ce)}m(),cancelAnimationFrame(G),z=!1,U=!1,I=null,Y=null,w.removeEventListener("mousemove",X),w.removeEventListener("mouseup",Q),w.removeEventListener("touchmove",X),w.removeEventListener("touchend",Q)}}w.addEventListener("mousemove",X),w.addEventListener("mouseup",Q),w.addEventListener("touchmove",X),w.addEventListener("touchend",Q)}function vx(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:l,lib:r,flowId:u,isValidConnection:s=yx,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}=xn(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=gx(void 0,S),p=S.getAttribute("data-nodeid"),v=S.getAttribute("data-handleid"),x=S.classList.contains("connectable"),N=S.classList.contains("connectableend");if(!p||!y)return h;let _={source:d?p:o,sourceHandle:d?v:i,target:d?o:p,targetHandle:d?i:v};h.connection=_;let w=x&&N&&(n===ui.Strict?d&&y==="source"||!d&&y==="target":p!==o||v!==i);h.isValid=w&&s(_),h.toHandle=hx(p,y,v,c,n,!0)}return h}var Qc={onPointerDown:AA,isValid:vx};function bx({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=ut(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&&hl()?10:1,N=-p.sourceEvent.deltaY*(p.sourceEvent.deltaMode===1?.05:p.sourceEvent.deltaMode?1:.002)*c,_=v[2]*Math.pow(2,N*x);t.scaleTo(_)},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],N=[x[0]-b[0],x[1]-b[1]];b=x;let _=o()*Math.max(v[2],Math.log(v[2]))*(m?-1:1),T={x:v[0]-N[0]*_,y:v[1]-N[1]*_},w=[[0,0],[u,s]];t.setViewportConstrained({x:T.x,y:T.y,zoom:v[2]},w,r)},y=zc().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:Nt}}var jc=e=>({x:e.x,y:e.y,zoom:e.k}),Am=({x:e,y:t,zoom:n})=>Zi.translate(e,t).scale(n),ll=(e,t)=>e.target.closest(`.${t}`),Sx=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),MA=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Mm=(e,t=0,n=MA,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},xx=e=>{let t=e.ctrlKey&&hl()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function DA({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:r,onPanZoom:u,onPanZoomEnd:s}){return c=>{if(ll(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=Nt(c),h=xx(c),y=d*Math.pow(2,h);o.scaleTo(n,y,S,c);return}let f=c.deltaMode===1?20:1,m=i===vo.Vertical?0:c.deltaX*f,g=i===vo.Horizontal?0:c.deltaY*f;!hl()&&c.shiftKey&&i!==vo.Vertical&&(m=c.deltaY*f,g=0),o.translateBy(n,-(m/d)*a,-(g/d)*a,{internal:!0});let b=jc(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 OA({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",l=!t&&a&&!o.ctrlKey,r=ll(o,e);if(o.ctrlKey&&a&&r&&o.preventDefault(),l||r)return null;o.preventDefault(),n.call(this,o,i)}}function RA({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=jc(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 zA({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&Sx(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,jc(a.transform))}}function LA({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&Sx(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let r=jc(l.transform);e.prevViewport=r,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(l.sourceEvent,r)},n?150:0)}}}function BA({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"&&(ll(d,`${s}-flow__node`)||ll(d,`${s}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||l||c&&!g||ll(d,r)&&g||ll(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 _x({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=zc().scaleExtent([t,n]).translateExtent(o),f=ut(e).call(d);y({x:i.x,y:i.y,zoom:ul(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let m=f.on("wheel.zoom"),g=f.on("dblclick.zoom");d.wheelDelta(xx);function b(A,L){return f?new Promise(P=>{d?.interpolate(L?.interpolate==="linear"?go:Yi).transform(Mm(f,L?.duration,L?.ease,()=>P(!0)),A)}):Promise.resolve(!1)}function S({noWheelClassName:A,noPanClassName:L,onPaneContextMenu:P,userSelectionActive:E,panOnScroll:D,panOnDrag:M,panOnScrollMode:R,panOnScrollSpeed:O,preventScrolling:z,zoomOnPinch:I,zoomOnScroll:U,zoomOnDoubleClick:Y,zoomActivationKeyPressed:Z,lib:K,onTransformChange:j,connectionInProgress:le,paneClickDistance:ee,selectionOnDrag:k}){E&&!s.isZoomingOrPanning&&h();let X=D&&!Z&&!E;d.clickDistance(k?1/0:!Sn(ee)||ee<0?0:ee);let Q=X?DA({zoomPanValues:s,noWheelClassName:A,d3Selection:f,d3Zoom:d,panOnScrollMode:R,panOnScrollSpeed:O,zoomOnPinch:I,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:r}):OA({noWheelClassName:A,preventScrolling:z,d3ZoomHandler:m});if(f.on("wheel.zoom",Q,{passive:!1}),!E){let J=RA({zoomPanValues:s,onDraggingChange:u,onPanZoomStart:l});d.on("start",J);let ie=zA({zoomPanValues:s,panOnDrag:M,onPaneContextMenu:!!P,onPanZoom:a,onTransformChange:j});d.on("zoom",ie);let ce=LA({zoomPanValues:s,panOnDrag:M,panOnScroll:D,onPaneContextMenu:P,onPanZoomEnd:r,onDraggingChange:u});d.on("end",ce)}let te=BA({zoomActivationKeyPressed:Z,panOnDrag:M,zoomOnScroll:U,panOnScroll:D,zoomOnDoubleClick:Y,zoomOnPinch:I,userSelectionActive:E,noPanClassName:L,noWheelClassName:A,lib:K,connectionInProgress:le});d.filter(te),Y?f.on("dblclick.zoom",g):f.on("dblclick.zoom",null)}function h(){d.on("zoom",null)}async function y(A,L,P){let E=Am(A),D=d?.constrain()(E,L,P);return D&&await b(D),new Promise(M=>M(D))}async function p(A,L){let P=Am(A);return await b(P,L),new Promise(E=>E(P))}function v(A){if(f){let L=Am(A),P=f.property("__zoom");(P.k!==A.zoom||P.x!==A.x||P.y!==A.y)&&d?.transform(f,L,null,{sync:!0})}}function x(){let A=f?Fr(f.node()):{x:0,y:0,k:1};return{x:A.x,y:A.y,zoom:A.k}}function N(A,L){return f?new Promise(P=>{d?.interpolate(L?.interpolate==="linear"?go:Yi).scaleTo(Mm(f,L?.duration,L?.ease,()=>P(!0)),A)}):Promise.resolve(!1)}function _(A,L){return f?new Promise(P=>{d?.interpolate(L?.interpolate==="linear"?go:Yi).scaleBy(Mm(f,L?.duration,L?.ease,()=>P(!0)),A)}):Promise.resolve(!1)}function T(A){d?.scaleExtent(A)}function w(A){d?.translateExtent(A)}function G(A){let L=!Sn(A)||A<0?0:A;d?.clickDistance(L)}return{update:S,destroy:h,setViewport:p,setViewportConstrained:y,getViewport:x,scaleTo:N,scaleBy:_,setScaleExtent:T,setTranslateExtent:w,syncViewport:v,setClickDistance:G}}var ci;(function(e){e.Line="line",e.Handle="handle"})(ci||(ci={}));function HA({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 jS(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 li(e,t){return Math.max(0,t-e)}function ri(e,t){return Math.max(0,e-t)}function Bc(e,t,n){return Math.max(0,t-e,e-n)}function KS(e,t){return e?!t:t}function UA(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:N,aspectRatio:_}=e,T=Math.floor(c?m-e.pointerX:0),w=Math.floor(d?g-e.pointerY:0),G=x+(u?-T:T),A=N+(s?-w:w),L=-a[0]*x,P=-a[1]*N,E=Bc(G,b,S),D=Bc(A,h,y);if(l){let O=0,z=0;u&&T<0?O=li(p+T+L,l[0][0]):!u&&T>0&&(O=ri(p+G+L,l[1][0])),s&&w<0?z=li(v+w+P,l[0][1]):!s&&w>0&&(z=ri(v+A+P,l[1][1])),E=Math.max(E,O),D=Math.max(D,z)}if(r){let O=0,z=0;u&&T>0?O=ri(p+T,r[0][0]):!u&&T<0&&(O=li(p+G,r[1][0])),s&&w>0?z=ri(v+w,r[0][1]):!s&&w<0&&(z=li(v+A,r[1][1])),E=Math.max(E,O),D=Math.max(D,z)}if(i){if(c){let O=Bc(G/_,h,y)*_;if(E=Math.max(E,O),l){let z=0;!u&&!s||u&&!s&&f?z=ri(v+P+G/_,l[1][1])*_:z=li(v+P+(u?T:-T)/_,l[0][1])*_,E=Math.max(E,z)}if(r){let z=0;!u&&!s||u&&!s&&f?z=li(v+G/_,r[1][1])*_:z=ri(v+(u?T:-T)/_,r[0][1])*_,E=Math.max(E,z)}}if(d){let O=Bc(A*_,b,S)/_;if(D=Math.max(D,O),l){let z=0;!u&&!s||s&&!u&&f?z=ri(p+A*_+L,l[1][0])/_:z=li(p+(s?w:-w)*_+L,l[0][0])/_,D=Math.max(D,z)}if(r){let z=0;!u&&!s||s&&!u&&f?z=li(p+A*_,r[1][0])/_:z=ri(p+(s?w:-w)*_,r[0][0])/_,D=Math.max(D,z)}}}w=w+(w<0?D:-D),T=T+(T<0?E:-E),i&&(f?G>A*_?w=(KS(u,s)?-T:T)/_:T=(KS(u,s)?-w:w)*_:c?(w=T/_,s=u):(T=w*_,u=s));let M=u?p+T:p,R=s?v+w:v;return{width:x+(u?-T:T),height:N+(s?-w:w),x:a[0]*T*(u?-1:1)+M,y:a[1]*w*(s?-1:1)+R}}var Ex={width:0,height:0,x:0,y:0},GA={...Ex,pointerX:0,pointerY:0,aspectRatio:1};function kA(e){return[[0,0],[e.measured.width,e.measured.height]]}function VA(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 Nx({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=ut(e),l={controlDirection:jS("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={...Ex},y={...GA};l={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:jS(s)};let p,v=null,x=[],N,_,T,w=!1,G=dc().on("start",A=>{let{nodeLookup:L,transform:P,snapGrid:E,snapToGrid:D,nodeOrigin:M,paneDomNode:R}=n();if(p=L.get(t),!p)return;v=R?.getBoundingClientRect()??null;let{xSnapped:O,ySnapped:z}=Jr(A.sourceEvent,{transform:P,snapGrid:E,snapToGrid:D,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:z,aspectRatio:h.width/h.height},N=void 0,p.parentId&&(p.extent==="parent"||p.expandParent)&&(N=L.get(p.parentId),_=N&&p.extent==="parent"?kA(N):void 0),x=[],T=void 0;for(let[I,U]of L)if(U.parentId===t&&(x.push({id:I,position:{...U.position},extent:U.extent}),U.extent==="parent"||U.expandParent)){let Y=VA(U,p,U.origin??M);T?T=[[Math.min(Y[0][0],T[0][0]),Math.min(Y[0][1],T[0][1])],[Math.max(Y[1][0],T[1][0]),Math.max(Y[1][1],T[1][1])]]:T=Y}m?.(A,{...h})}).on("drag",A=>{let{transform:L,snapGrid:P,snapToGrid:E,nodeOrigin:D}=n(),M=Jr(A.sourceEvent,{transform:L,snapGrid:P,snapToGrid:E,containerBounds:v}),R=[];if(!p)return;let{x:O,y:z,width:I,height:U}=h,Y={},Z=p.origin??D,{width:K,height:j,x:le,y:ee}=UA(y,l.controlDirection,M,l.boundaries,l.keepAspectRatio,Z,_,T),k=K!==I,X=j!==U,Q=le!==O&&k,te=ee!==z&&X;if(!Q&&!te&&!k&&!X)return;if((Q||te||Z[0]===1||Z[1]===1)&&(Y.x=Q?le:h.x,Y.y=te?ee:h.y,h.x=Y.x,h.y=Y.y,x.length>0)){let ve=le-O,he=ee-z;for(let Ke of x)Ke.position={x:Ke.position.x-ve+Z[0]*(K-I),y:Ke.position.y-he+Z[1]*(j-U)},R.push(Ke)}if((k||X)&&(Y.width=k&&(!l.resizeDirection||l.resizeDirection==="horizontal")?K:h.width,Y.height=X&&(!l.resizeDirection||l.resizeDirection==="vertical")?j:h.height,h.width=Y.width,h.height=Y.height),N&&p.expandParent){let ve=Z[0]*(Y.width??0);Y.x&&Y.x<ve&&(h.x=ve,y.x=y.x-(Y.x-ve));let he=Z[1]*(Y.height??0);Y.y&&Y.y<he&&(h.y=he,y.y=y.y-(Y.y-he))}let J=HA({width:h.width,prevWidth:I,height:h.height,prevHeight:U,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),ie={...h,direction:J};S?.(A,ie)!==!1&&(w=!0,g?.(A,ie),o(Y,R))}).on("end",A=>{w&&(b?.(A,{...h}),i?.({...h}),w=!1)});a.call(G)}function u(){a.on(".drag",null)}return{update:r,destroy:u}}var Ux=ae(Zt(),1),Gx=ae(Rx(),1);var Lx={},zx=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:()=>{(Lx.env?Lx.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},Bx=e=>e?zx(e):zx;var{useDebugValue:iM}=Ux.default,{useSyncExternalStoreWithSelector:aM}=Gx.default,lM=e=>e;function nh(e,t=lM,n){let o=aM(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return iM(o),o}var Hx=(e,t)=>{let n=Bx(e),o=(i,a=t)=>nh(n,i,a);return Object.assign(o,n),o},kx=(e,t)=>e?Hx(e,t):Hx;function He(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 rM=ae(If()),Wc=(0,H.createContext)(null),uM=Wc.Provider,s_=on.error001();function Se(e,t){let n=(0,H.useContext)(Wc);if(n===null)throw new Error(s_);return nh(n,e,t)}function ke(){let e=(0,H.useContext)(Wc);if(e===null)throw new Error(s_);return(0,H.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var Vx={display:"none"},sM={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},c_="react-flow__node-desc",f_="react-flow__edge-desc",cM="react-flow__aria-live",fM=e=>e.ariaLiveMessage,dM=e=>e.ariaLabelConfig;function pM({rfId:e}){let t=Se(fM);return(0,B.jsx)("div",{id:`${cM}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:sM,children:t})}function mM({rfId:e,disableKeyboardA11y:t}){let n=Se(dM);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{id:`${c_}-${e}`,style:Vx,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,B.jsx)("div",{id:`${f_}-${e}`,style:Vx,children:n["edge.a11yDescription.default"]}),!t&&(0,B.jsx)(pM,{rfId:e})]})}var ef=(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:Ye(["react-flow__panel",n,...l]),style:o,ref:a,...i,children:t})});ef.displayName="Panel";function hM({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,B.jsx)(ef,{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 gM=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}},$c=e=>e.id;function yM(e,t){return He(e.selectedNodes.map($c),t.selectedNodes.map($c))&&He(e.selectedEdges.map($c),t.selectedEdges.map($c))}function vM({onSelectionChange:e}){let t=ke(),{selectedNodes:n,selectedEdges:o}=Se(gM,yM);return(0,H.useEffect)(()=>{let i={nodes:n,edges:o};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,o,e]),null}var bM=e=>!!e.onSelectionChangeHandlers;function SM({onSelectionChange:e}){let t=Se(bM);return e||t?(0,B.jsx)(vM,{onSelectionChange:e}):null}var d_=[0,0],xM={x:0,y:0,zoom:1},_M=["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"],Px=[..._M,"rfId"],EM=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}),Ix={translateExtent:cl,nodeOrigin:d_,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function NM(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:l,reset:r,setDefaultNodesAndEdges:u}=Se(EM,He),s=ke();(0,H.useEffect)(()=>(u(e.defaultNodes,e.defaultEdges),()=>{c.current=Ix,r()}),[]);let c=(0,H.useRef)(Ix);return(0,H.useEffect)(()=>{for(let d of Px){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:ox(f)}):d==="fitView"?s.setState({fitViewQueued:f}):d==="fitViewOptions"?s.setState({fitViewOptions:f}):s.setState({[d]:f})))}c.current=e},Px.map(d=>e[d])),null}function Yx(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function TM(e){let[t,n]=(0,H.useState)(e==="system"?null:e);return(0,H.useEffect)(()=>{if(e!=="system"){n(e);return}let o=Yx(),i=()=>n(o?.matches?"dark":"light");return i(),o?.addEventListener("change",i),()=>{o?.removeEventListener("change",i)}},[e]),t!==null?t:Yx()?.matches?"dark":"light"}var Xx=typeof document<"u"?document:null;function ou(e=null,t={target:Xx,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("+",`
+`+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??Xx,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)&&Zm(m))return!1;let b=Zx(m.code,r);if(a.current.add(m[b]),qx(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=Zx(m.code,r);qx(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 qx(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(i=>t.has(i)))}function Zx(e,t){return t.includes(e)?"code":"key"}var CM=()=>{let e=ke();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=tu(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 ml(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=Wr(t,n);return{x:l.x+i,y:l.y+a}}}),[])};function p_(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)wM(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 wM(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 m_(e,t){return p_(e,t)}function h_(e,t){return p_(e,t)}function $i(e,t){return{id:e,type:"select",selected:t}}function yl(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($i(a.id,l)))}return o}function Qx({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 jx(e){return{id:e.id,type:"remove"}}var Kx=e=>$S(e),AM=e=>Bm(e);function g_(e){return(0,H.forwardRef)(e)}var MM=typeof window<"u"?H.useLayoutEffect:H.useEffect;function $x(e){let[t,n]=(0,H.useState)(BigInt(0)),[o]=(0,H.useState)(()=>DM(()=>n(i=>i+BigInt(1))));return MM(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function DM(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var y_=(0,H.createContext)(null);function OM({children:e}){let t=ke(),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=Qx({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=$x(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(Qx({items:m,lookup:f}))},[]),a=$x(i),l=(0,H.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,B.jsx)(y_.Provider,{value:l,children:e})}function RM(){let e=(0,H.useContext)(y_);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var zM=e=>!!e.panZoom;function lh(){let e=CM(),t=ke(),n=RM(),o=Se(zM),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=Kx(d)?d:f.get(d.id),b=g.parentId?Ym(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 Ki(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&&Kx(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&&AM(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:N}=await WS({nodesToRemove:d,edgesToRemove:f,nodes:m,edges:g,onBeforeDelete:v}),_=N.length>0,T=x.length>0;if(_){let w=N.map(jx);S?.(N),y(w)}if(T){let w=x.map(jx);b?.(x),h(w)}return(T||_)&&p?.({nodes:x,edges:N}),{deletedNodes:x,deletedEdges:N}},getIntersectingNodes:(d,f=!0,m)=>{let g=Vm(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=Ki(S?h:y),v=dl(p,b);return f&&v>0||v>=p.width*p.height||v>=b.width*b.height}):[]},isNodeIntersecting:(d,f,m=!0)=>{let b=Vm(d)?d:u(d);if(!b)return!1;let S=dl(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 Um(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??nx();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 Fx=e=>e.selected,LM=typeof window<"u"?window:void 0;function BM({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=ke(),{deleteElements:o}=lh(),i=ou(e,{actInsideInputWithModifier:!1}),a=ou(t,{target:LM});(0,H.useEffect)(()=>{if(i){let{edges:l,nodes:r}=n.getState();o({nodes:r.filter(Fx),edges:l.filter(Fx)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,H.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function HM(e){let t=ke();(0,H.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=Vc(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",on.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 tf={position:"absolute",width:"100%",height:"100%",top:0,left:0},UM=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function GM({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=vo.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=ke(),N=(0,H.useRef)(null),{userSelectionActive:_,lib:T,connectionInProgress:w}=Se(UM,He),G=ou(f),A=(0,H.useRef)();HM(N);let L=(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(N.current){A.current=_x({domNode:N.current,minZoom:c,maxZoom:d,translateExtent:s,viewport:u,onDraggingChange:M=>x.setState(R=>R.paneDragging===M?R:{paneDragging:M}),onPanZoomStart:(M,R)=>{let{onViewportChangeStart:O,onMoveStart:z}=x.getState();z?.(M,R),O?.(R)},onPanZoom:(M,R)=>{let{onViewportChange:O,onMove:z}=x.getState();z?.(M,R),O?.(R)},onPanZoomEnd:(M,R)=>{let{onViewportChangeEnd:O,onMoveEnd:z}=x.getState();z?.(M,R),O?.(R)}});let{x:P,y:E,zoom:D}=A.current.getViewport();return x.setState({panZoom:A.current,transform:[P,E,D],domNode:N.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:G,preventScrolling:m,noPanClassName:S,userSelectionActive:_,noWheelClassName:b,lib:T,onTransformChange:L,connectionInProgress:w,selectionOnDrag:v,paneClickDistance:p})},[e,t,n,o,i,a,l,r,G,m,S,_,b,T,L,w,v,p]),(0,B.jsx)("div",{className:"react-flow__renderer",ref:N,style:tf,children:g})}var kM=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function VM(){let{userSelectionActive:e,userSelectionRect:t}=Se(kM,He);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 oh=(e,t)=>n=>{n.target===t.current&&e?.(n)},PM=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function IM({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=ke(),{userSelectionActive:S,elementsSelectable:h,dragging:y,connectionInProgress:p}=Se(PM,He),v=h&&(e||S),x=(0,H.useRef)(null),N=(0,H.useRef)(),_=(0,H.useRef)(new Set),T=(0,H.useRef)(new Set),w=(0,H.useRef)(!1),G=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)},L=c?O=>c(O):void 0,P=O=>{w.current&&(O.stopPropagation(),w.current=!1)},E=O=>{let{domNode:z}=b.getState();if(N.current=z?.getBoundingClientRect(),!N.current)return;let I=O.target===x.current;if(!I&&!!O.target.closest(".nokey")||!e||!(a&&I||t)||O.button!==0||!O.isPrimary)return;O.target?.setPointerCapture?.(O.pointerId),w.current=!1;let{x:Z,y:K}=xn(O.nativeEvent,N.current);b.setState({userSelectionRect:{width:0,height:0,startX:Z,startY:K,x:Z,y:K}}),I||(O.stopPropagation(),O.preventDefault())},D=O=>{let{userSelectionRect:z,transform:I,nodeLookup:U,edgeLookup:Y,connectionLookup:Z,triggerNodeChanges:K,triggerEdgeChanges:j,defaultEdgeOptions:le,resetSelectedElements:ee}=b.getState();if(!N.current||!z)return;let{x:k,y:X}=xn(O.nativeEvent,N.current),{startX:Q,startY:te}=z;if(!w.current){let he=t?0:i;if(Math.hypot(k-Q,X-te)<=he)return;ee(),l?.(O)}w.current=!0;let J={startX:Q,startY:te,x:k<Q?k:Q,y:X<te?X:te,width:Math.abs(k-Q),height:Math.abs(X-te)},ie=_.current,ce=T.current;_.current=new Set(Uc(U,J,I,n===Qi.Partial,!0).map(he=>he.id)),T.current=new Set;let ve=le?.selectable??!0;for(let he of _.current){let Ke=Z.get(he);if(Ke)for(let{edgeId:St}of Ke.values()){let Ot=Y.get(St);Ot&&(Ot.selectable??ve)&&T.current.add(St)}}if(!Xm(ie,_.current)){let he=yl(U,_.current,!0);K(he)}if(!Xm(ce,T.current)){let he=yl(Y,T.current);j(he)}b.setState({userSelectionRect:J,userSelectionActive:!0,nodesSelectionActive:!1})},M=O=>{O.button===0&&(O.target?.releasePointerCapture?.(O.pointerId),!S&&O.target===x.current&&b.getState().userSelectionRect&&G?.(O),b.setState({userSelectionActive:!1,userSelectionRect:null}),w.current&&(r?.(O),b.setState({nodesSelectionActive:_.current.size>0})))},R=o===!0||Array.isArray(o)&&o.includes(0);return(0,B.jsxs)("div",{className:Ye(["react-flow__pane",{draggable:R,dragging:y,selection:e}]),onClick:v?void 0:oh(G,x),onContextMenu:oh(A,x),onWheel:oh(L,x),onPointerEnter:v?void 0:d,onPointerMove:v?D:f,onPointerUp:v?M:void 0,onPointerDownCapture:v?E:void 0,onClickCapture:v?P:void 0,onPointerLeave:m,ref:x,style:tf,children:[g,(0,B.jsx)(VM,{})]})}function ah({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",on.error012(e));return}t.setState({nodesSelectionActive:!1}),s.selected?(n||s.selected&&l)&&(a({nodes:[s],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function v_({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:l}){let r=ke(),[u,s]=(0,H.useState)(!1),c=(0,H.useRef)();return(0,H.useEffect)(()=>{c.current=mx({getStoreItems:()=>r.getState(),onNodeMouseDown:d=>{ah({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 YM=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function b_(){let e=ke();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=YM(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=pl(y,a));let{position:p,positionAbsolute:v}=Gm({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 rh=(0,H.createContext)(null),XM=rh.Provider;rh.Consumer;var S_=()=>(0,H.useContext)(rh),qM=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),ZM=(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===ui.Strict?r?.type!==n:e!==r?.nodeId||t!==r?.id,connectionInProcess:!!r,clickConnectionInProcess:!!i,valid:c&&s}};function QM({type:e="source",position:t=W.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=ke(),h=S_(),{connectOnClick:y,noPanClassName:p,rfId:v}=Se(qM,He),{connectingFrom:x,connectingTo:N,clickConnecting:_,isPossibleEndHandle:T,connectionInProcess:w,clickConnectionInProcess:G,valid:A}=Se(ZM(h,g,e),He);h||S.getState().onError?.("010",on.error010());let L=D=>{let{defaultEdgeOptions:M,onConnect:R,hasDefaultEdges:O}=S.getState(),z={...M,...D};if(O){let{edges:I,setEdges:U}=S.getState();U(Km(z,I))}R?.(z),r?.(z)},P=D=>{if(!h)return;let M=Qm(D.nativeEvent);if(i&&(M&&D.button===0||!M)){let R=S.getState();Qc.onPointerDown(D.nativeEvent,{handleDomNode:D.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:L,isValidConnection:n||((...O)=>S.getState().isValidConnection?.(...O)??!0),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:R.autoPanSpeed,dragThreshold:R.connectionDragThreshold})}M?c?.(D):d?.(D)},E=D=>{let{onClickConnectStart:M,onClickConnectEnd:R,connectionClickStartHandle:O,connectionMode:z,isValidConnection:I,lib:U,rfId:Y,nodeLookup:Z,connection:K}=S.getState();if(!h||!O&&!i)return;if(!O){M?.(D.nativeEvent,{nodeId:h,handleId:g,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:h,type:e,id:g}});return}let j=qm(D.target),le=n||I,{connection:ee,isValid:k}=Qc.isValid(D.nativeEvent,{handle:{nodeId:h,id:g,type:e},connectionMode:z,fromNodeId:O.nodeId,fromHandleId:O.id||null,fromType:O.type,isValidConnection:le,flowId:Y,doc:j,lib:U,nodeLookup:Z});k&&ee&&L(ee);let X=structuredClone(K);delete X.inProgress,X.toPosition=X.toHandle?X.toHandle.position:null,R?.(D,X),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:Ye(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",p,s,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:a,clickconnecting:_,connectingfrom:x,connectingto:N,valid:A,connectionindicator:o&&(!w||T)&&(w||G?a:i)}]),onMouseDown:P,onTouchStart:P,onClick:y?E:void 0,ref:m,...f,children:u})}var Fi=(0,H.memo)(g_(QM));function jM({data:e,isConnectable:t,sourcePosition:n=W.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[e?.label,(0,B.jsx)(Fi,{type:"source",position:n,isConnectable:t})]})}function KM({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:o=W.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Fi,{type:"target",position:n,isConnectable:t}),e?.label,(0,B.jsx)(Fi,{type:"source",position:o,isConnectable:t})]})}function $M(){return null}function FM({data:e,isConnectable:t,targetPosition:n=W.Top}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Fi,{type:"target",position:n,isConnectable:t}),e?.label]})}var Jc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Jx={input:jM,default:KM,output:FM,group:$M};function JM(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 WM=e=>{let{width:t,height:n,x:o,y:i}=fl(e.nodeLookup,{filter:a=>!!a.selected});return{width:Sn(t)?t:null,height:Sn(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 eD({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=ke(),{width:i,height:a,transformString:l,userSelectionActive:r}=Se(WM,He),u=b_(),s=(0,H.useRef)(null);(0,H.useEffect)(()=>{n||s.current?.focus({preventScroll:!0})},[n]);let c=!r&&i!==null&&a!==null;if(v_({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(Jc,m.key)&&(m.preventDefault(),u({direction:Jc[m.key],factor:m.shiftKey?4:1}))};return(0,B.jsx)("div",{className:Ye(["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 Wx=typeof window<"u"?window:void 0,tD=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function x_({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:N,zoomOnDoubleClick:_,panOnDrag:T,defaultViewport:w,translateExtent:G,minZoom:A,maxZoom:L,preventScrolling:P,onSelectionContextMenu:E,noWheelClassName:D,noPanClassName:M,disableKeyboardA11y:R,onViewportChange:O,isControlledViewport:z}){let{nodesSelectionActive:I,userSelectionActive:U}=Se(tD,He),Y=ou(s,{target:Wx}),Z=ou(b,{target:Wx}),K=Z||T,j=Z||v,le=c&&K!==!0,ee=Y||U||le;return BM({deleteKeyCode:u,multiSelectionKeyCode:g}),(0,B.jsx)(GM,{onPaneContextMenu:a,elementsSelectable:h,zoomOnScroll:y,zoomOnPinch:p,panOnScroll:j,panOnScrollSpeed:x,panOnScrollMode:N,zoomOnDoubleClick:_,panOnDrag:!Y&&K,defaultViewport:w,translateExtent:G,minZoom:A,maxZoom:L,zoomActivationKeyCode:S,preventScrolling:P,noWheelClassName:D,noPanClassName:M,onViewportChange:O,isControlledViewport:z,paneClickDistance:r,selectionOnDrag:le,children:(0,B.jsxs)(IM,{onSelectionStart:f,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:K,isSelecting:!!ee,selectionMode:d,selectionKeyPressed:Y,paneClickDistance:r,selectionOnDrag:le,children:[e,I&&(0,B.jsx)(eD,{onSelectionContextMenu:E,noPanClassName:M,disableKeyboardA11y:R})]})})}x_.displayName="FlowRenderer";var nD=(0,H.memo)(x_),oD=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 iD(e){return Se((0,H.useCallback)(oD(e),[e]),He)}var aD=e=>e.updateNodeInternals;function lD(){let e=Se(aD),[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 rD({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=ke(),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 uD({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(k=>{let X=k.nodeLookup.get(e),Q=k.parentLookup.has(e);return{node:X,internals:X.internals,isParent:Q}},He),N=p.type||"default",_=S?.[N]||Jx[N];_===void 0&&(y?.("003",on.error003(N)),N="default",_=S?.default||Jx.default);let T=!!(p.draggable||r&&typeof p.draggable>"u"),w=!!(p.selectable||u&&typeof p.selectable>"u"),G=!!(p.connectable||s&&typeof p.connectable>"u"),A=!!(p.focusable||c&&typeof p.focusable>"u"),L=ke(),P=Im(p),E=rD({node:p,nodeType:N,hasDimensions:P,resizeObserver:d}),D=v_({nodeRef:E,disabled:p.hidden||!T,noDragClassName:f,handleSelector:p.dragHandle,nodeId:e,isSelectable:w,nodeClickDistance:h}),M=b_();if(p.hidden)return null;let R=In(p),O=JM(p),z=w||T||t||n||o||i,I=n?k=>n(k,{...v.userNode}):void 0,U=o?k=>o(k,{...v.userNode}):void 0,Y=i?k=>i(k,{...v.userNode}):void 0,Z=a?k=>a(k,{...v.userNode}):void 0,K=l?k=>l(k,{...v.userNode}):void 0,j=k=>{let{selectNodesOnDrag:X,nodeDragThreshold:Q}=L.getState();w&&(!X||!T||Q>0)&&ah({id:e,store:L,nodeRef:E}),t&&t(k,{...v.userNode})},le=k=>{if(!(Zm(k.nativeEvent)||g)){if(Om.includes(k.key)&&w){let X=k.key==="Escape";ah({id:e,store:L,unselect:X,nodeRef:E})}else if(T&&p.selected&&Object.prototype.hasOwnProperty.call(Jc,k.key)){k.preventDefault();let{ariaLabelConfig:X}=L.getState();L.setState({ariaLiveMessage:X["node.a11yDescription.ariaLiveMessage"]({direction:k.key.replace("Arrow","").toLowerCase(),x:~~v.positionAbsolute.x,y:~~v.positionAbsolute.y})}),M({direction:Jc[k.key],factor:k.shiftKey?4:1})}}},ee=()=>{if(g||!E.current?.matches(":focus-visible"))return;let{transform:k,width:X,height:Q,autoPanOnNodeFocus:te,setCenter:J}=L.getState();if(!te)return;Uc(new Map([[e,p]]),{x:0,y:0,width:X,height:Q},k,!0).length>0||J(p.position.x+R.width/2,p.position.y+R.height/2,{zoom:k[2]})};return(0,B.jsx)("div",{className:Ye(["react-flow__node",`react-flow__node-${N}`,{[m]:T},p.className,{selected:p.selected,selectable:w,parent:x,draggable:T,dragging:D}]),ref:E,style:{zIndex:v.z,transform:`translate(${v.positionAbsolute.x}px,${v.positionAbsolute.y}px)`,pointerEvents:z?"all":"none",visibility:P?"visible":"hidden",...p.style,...O},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:U,onMouseLeave:Y,onContextMenu:Z,onClick:j,onDoubleClick:K,onKeyDown:A?le:void 0,tabIndex:A?0:void 0,onFocus:A?ee:void 0,role:p.ariaRole??(A?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${c_}-${b}`,"aria-label":p.ariaLabel,...p.domAttributes,children:(0,B.jsx)(XM,{value:e,children:(0,B.jsx)(_,{id:e,data:p.data,type:N,positionAbsoluteX:v.positionAbsolute.x,positionAbsoluteY:v.positionAbsolute.y,selected:p.selected??!1,selectable:w,draggable:T,deletable:p.deletable??!0,isConnectable:G,sourcePosition:p.sourcePosition,targetPosition:p.targetPosition,dragging:D,dragHandle:p.dragHandle,zIndex:v.z,parentId:p.parentId,...R})})})}var sD=(0,H.memo)(uD),cD=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function __(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=Se(cD,He),l=iD(e.onlyRenderVisibleElements),r=lD();return(0,B.jsx)("div",{className:"react-flow__nodes",style:tf,children:l.map(u=>(0,B.jsx)(sD,{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))})}__.displayName="NodeRenderer";var fD=(0,H.memo)(__);function dD(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&&ax({sourceNode:a,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),He)}var pD=({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"})},mD=({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"})},e_={[rl.Arrow]:pD,[rl.ArrowClosed]:mD};function hD(e){let t=ke();return(0,H.useMemo)(()=>Object.prototype.hasOwnProperty.call(e_,e)?e_[e]:(t.getState().onError?.("009",on.error009(e)),null),[e])}var gD=({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=hD(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},E_=({defaultColor:e,rfId:t})=>{let n=Se(a=>a.edges),o=Se(a=>a.defaultEdgeOptions),i=(0,H.useMemo)(()=>rx(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)(gD,{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};E_.displayName="MarkerDefinitions";var yD=(0,H.memo)(E_);function N_({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=Ye(["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}N_.displayName="EdgeText";var vD=(0,H.memo)(N_);function nf({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:Ye(["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&&Sn(t)&&Sn(n)?(0,B.jsx)(vD,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:u}):null]})}function t_({pos:e,x1:t,y1:n,x2:o,y2:i}){return e===W.Left||e===W.Right?[.5*(t+o),n]:[t,.5*(n+i)]}function T_({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top}){let[l,r]=t_({pos:n,x1:e,y1:t,x2:o,y2:i}),[u,s]=t_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,m]=Pc({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 C_(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]=T_({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r}),x=e.isInternal?void 0:t;return(0,B.jsx)(nf,{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 bD=C_({isInternal:!1}),w_=C_({isInternal:!0});bD.displayName="SimpleBezierEdge";w_.displayName="SimpleBezierEdgeInternal";function A_(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=W.Bottom,targetPosition:g=W.Top,markerEnd:b,markerStart:S,pathOptions:h,interactionWidth:y})=>{let[p,v,x]=nu({sourceX:n,sourceY:o,sourcePosition:m,targetX:i,targetY:a,targetPosition:g,borderRadius:h?.borderRadius,offset:h?.offset,stepPosition:h?.stepPosition}),N=e.isInternal?void 0:t;return(0,B.jsx)(nf,{id:N,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 M_=A_({isInternal:!1}),D_=A_({isInternal:!0});M_.displayName="SmoothStepEdge";D_.displayName="SmoothStepEdgeInternal";function O_(e){return(0,H.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,B.jsx)(M_,{...n,id:o,pathOptions:(0,H.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var SD=O_({isInternal:!1}),R_=O_({isInternal:!0});SD.displayName="StepEdge";R_.displayName="StepEdgeInternal";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,markerEnd:m,markerStart:g,interactionWidth:b})=>{let[S,h,y]=Yc({sourceX:n,sourceY:o,targetX:i,targetY:a}),p=e.isInternal?void 0:t;return(0,B.jsx)(nf,{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 xD=z_({isInternal:!1}),L_=z_({isInternal:!0});xD.displayName="StraightEdge";L_.displayName="StraightEdgeInternal";function B_(e){return(0,H.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l=W.Bottom,targetPosition:r=W.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]=Ic({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r,curvature:h?.curvature}),N=e.isInternal?void 0:t;return(0,B.jsx)(nf,{id:N,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 _D=B_({isInternal:!1}),H_=B_({isInternal:!0});_D.displayName="BezierEdge";H_.displayName="BezierEdgeInternal";var n_={default:H_,straight:L_,step:R_,smoothstep:D_,simplebezier:w_},o_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},ED=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,ND=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,i_="react-flow__edgeupdater";function a_({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:Ye([i_,`${i_}-${r}`]),cx:ED(t,o,e),cy:ND(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function TD({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=ke(),b=(v,x)=>{if(v.button!==0)return;let{autoPanOnConnect:N,domNode:_,connectionMode:T,connectionRadius:w,lib:G,onConnectStart:A,cancelConnection:L,nodeLookup:P,rfId:E,panBy:D,updateConnection:M}=g.getState(),R=x.type==="target",O=(U,Y)=>{f(!1),d?.(U,n,x.type,Y)},z=U=>s?.(n,U),I=(U,Y)=>{f(!0),c?.(v,n,x.type),A?.(U,Y)};Qc.onPointerDown(v.nativeEvent,{autoPanOnConnect:N,connectionMode:T,connectionRadius:w,domNode:_,handleId:x.id,nodeId:x.nodeId,nodeLookup:P,isTarget:R,edgeUpdaterType:x.type,lib:G,flowId:E,cancelConnection:L,panBy:D,isValidConnection:(...U)=>g.getState().isValidConnection?.(...U)??!0,onConnect:z,onConnectStart:I,onConnectEnd:(...U)=>g.getState().onConnectEnd?.(...U),onReconnectEnd:O,updateConnection:M,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)(a_,{position:r,centerX:o,centerY:i,radius:t,onMouseDown:S,onMouseEnter:y,onMouseOut:p,type:"source"}),(e===!0||e==="target")&&(0,B.jsx)(a_,{position:u,centerX:a,centerY:l,radius:t,onMouseDown:h,onMouseEnter:y,onMouseOut:p,type:"target"})]})}function CD({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",N=b?.[x]||n_[x];N===void 0&&(h?.("011",on.error011(x)),x="default",N=b?.default||n_.default);let _=!!(p.focusable||t&&typeof p.focusable>"u"),T=typeof d<"u"&&(p.reconnectable||n&&typeof p.reconnectable>"u"),w=!!(p.selectable||o&&typeof p.selectable>"u"),G=(0,H.useRef)(null),[A,L]=(0,H.useState)(!1),[P,E]=(0,H.useState)(!1),D=ke(),{zIndex:M,sourceX:R,sourceY:O,targetX:z,targetY:I,sourcePosition:U,targetPosition:Y}=Se((0,H.useCallback)(J=>{let ie=J.nodeLookup.get(p.source),ce=J.nodeLookup.get(p.target);if(!ie||!ce)return{zIndex:p.zIndex,...o_};let ve=lx({id:e,sourceNode:ie,targetNode:ce,sourceHandle:p.sourceHandle||null,targetHandle:p.targetHandle||null,connectionMode:J.connectionMode,onError:h});return{zIndex:ix({selected:p.selected,zIndex:p.zIndex,sourceNode:ie,targetNode:ce,elevateOnSelect:J.elevateEdgesOnSelect,zIndexMode:J.zIndexMode}),...ve||o_}},[p.source,p.target,p.sourceHandle,p.targetHandle,p.selected,p.zIndex]),He),Z=(0,H.useMemo)(()=>p.markerStart?`url('#${Xc(p.markerStart,g)}')`:void 0,[p.markerStart,g]),K=(0,H.useMemo)(()=>p.markerEnd?`url('#${Xc(p.markerEnd,g)}')`:void 0,[p.markerEnd,g]);if(p.hidden||R===null||O===null||z===null||I===null)return null;let j=J=>{let{addSelectedEdges:ie,unselectNodesAndEdges:ce,multiSelectionActive:ve}=D.getState();w&&(D.setState({nodesSelectionActive:!1}),p.selected&&ve?(ce({nodes:[],edges:[p]}),G.current?.blur()):ie([e])),i&&i(J,p)},le=a?J=>{a(J,{...p})}:void 0,ee=l?J=>{l(J,{...p})}:void 0,k=r?J=>{r(J,{...p})}:void 0,X=u?J=>{u(J,{...p})}:void 0,Q=s?J=>{s(J,{...p})}:void 0,te=J=>{if(!y&&Om.includes(J.key)&&w){let{unselectNodesAndEdges:ie,addSelectedEdges:ce}=D.getState();J.key==="Escape"?(G.current?.blur(),ie({edges:[p]})):ce([e])}};return(0,B.jsx)("svg",{style:{zIndex:M},children:(0,B.jsxs)("g",{className:Ye(["react-flow__edge",`react-flow__edge-${x}`,p.className,S,{selected:p.selected,animated:p.animated,inactive:!w&&!i,updating:A,selectable:w}]),onClick:j,onDoubleClick:le,onContextMenu:ee,onMouseEnter:k,onMouseMove:X,onMouseLeave:Q,onKeyDown:_?te:void 0,tabIndex:_?0:void 0,role:p.ariaRole??(_?"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":_?`${f_}-${g}`:void 0,ref:G,...p.domAttributes,children:[!P&&(0,B.jsx)(N,{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:z,targetY:I,sourcePosition:U,targetPosition:Y,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}),T&&(0,B.jsx)(TD,{edge:p,isReconnectable:T,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:m,sourceX:R,sourceY:O,targetX:z,targetY:I,sourcePosition:U,targetPosition:Y,setUpdateHover:L,setReconnecting:E})]})})}var wD=(0,H.memo)(CD),AD=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function U_({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(AD,He),v=dD(t);return(0,B.jsxs)("div",{className:"react-flow__edges",children:[(0,B.jsx)(yD,{defaultColor:e,rfId:n}),v.map(x=>(0,B.jsx)(wD,{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))]})}U_.displayName="EdgeRenderer";var MD=(0,H.memo)(U_),DD=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function OD({children:e}){let t=Se(DD);return(0,B.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function RD(e){let t=lh(),n=(0,H.useRef)(!1);(0,H.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var zD=e=>e.panZoom?.syncViewport;function LD(e){let t=Se(zD),n=ke();return(0,H.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function l_(e){return e.connection.inProgress?{...e.connection,to:ml(e.connection.to,e.transform)}:{...e.connection}}function BD(e){return e?n=>{let o=l_(n);return e(o)}:l_}function HD(e){let t=BD(e);return Se(t,He)}var UD=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function GD({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:l,isValid:r,inProgress:u}=Se(UD,He);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:Ye(["react-flow__connection",Lm(r)]),children:(0,B.jsx)(G_,{style:t,type:n,CustomComponent:o,isValid:r})})})}var G_=({style:e,type:t=Pn.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}=HD();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:Lm(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 Pn.Bezier:[g]=Ic(b);break;case Pn.SimpleBezier:[g]=T_(b);break;case Pn.Step:[g]=nu({...b,borderRadius:0});break;case Pn.SmoothStep:[g]=nu(b);break;default:[g]=Yc(b)}return(0,B.jsx)("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};G_.displayName="ConnectionLine";var kD={};function r_(e=kD){let t=(0,H.useRef)(e),n=ke();(0,H.useEffect)(()=>{},[e])}function VD(){let e=ke(),t=(0,H.useRef)(!1);(0,H.useEffect)(()=>{},[])}function k_({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:N,zoomActivationKeyCode:_,deleteKeyCode:T,onlyRenderVisibleElements:w,elementsSelectable:G,defaultViewport:A,translateExtent:L,minZoom:P,maxZoom:E,preventScrolling:D,defaultMarkerColor:M,zoomOnScroll:R,zoomOnPinch:O,panOnScroll:z,panOnScrollSpeed:I,panOnScrollMode:U,zoomOnDoubleClick:Y,panOnDrag:Z,onPaneClick:K,onPaneMouseEnter:j,onPaneMouseMove:le,onPaneMouseLeave:ee,onPaneScroll:k,onPaneContextMenu:X,paneClickDistance:Q,nodeClickDistance:te,onEdgeContextMenu:J,onEdgeMouseEnter:ie,onEdgeMouseMove:ce,onEdgeMouseLeave:ve,reconnectRadius:he,onReconnect:Ke,onReconnectStart:St,onReconnectEnd:Ot,noDragClassName:rn,noWheelClassName:No,noPanClassName:To,disableKeyboardA11y:mi,nodeExtent:hi,rfId:Rn,viewport:qt,onViewportChange:gt}){return r_(e),r_(t),VD(),RD(n),LD(qt),(0,B.jsx)(nD,{onPaneClick:K,onPaneMouseEnter:j,onPaneMouseMove:le,onPaneMouseLeave:ee,onPaneContextMenu:X,onPaneScroll:k,paneClickDistance:Q,deleteKeyCode:T,selectionKeyCode:y,selectionOnDrag:p,selectionMode:v,onSelectionStart:f,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:N,zoomActivationKeyCode:_,elementsSelectable:G,zoomOnScroll:R,zoomOnPinch:O,zoomOnDoubleClick:Y,panOnScroll:z,panOnScrollSpeed:I,panOnScrollMode:U,panOnDrag:Z,defaultViewport:A,translateExtent:L,minZoom:P,maxZoom:E,onSelectionContextMenu:d,preventScrolling:D,noDragClassName:rn,noWheelClassName:No,noPanClassName:To,disableKeyboardA11y:mi,onViewportChange:gt,isControlledViewport:!!qt,children:(0,B.jsxs)(OD,{children:[(0,B.jsx)(MD,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Ke,onReconnectStart:St,onReconnectEnd:Ot,onlyRenderVisibleElements:w,onEdgeContextMenu:J,onEdgeMouseEnter:ie,onEdgeMouseMove:ce,onEdgeMouseLeave:ve,reconnectRadius:he,defaultMarkerColor:M,noPanClassName:To,disableKeyboardA11y:mi,rfId:Rn}),(0,B.jsx)(GD,{style:b,type:g,component:S,containerStyle:h}),(0,B.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,B.jsx)(fD,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:r,onNodeMouseMove:u,onNodeMouseLeave:s,onNodeContextMenu:c,nodeClickDistance:te,onlyRenderVisibleElements:w,noPanClassName:To,noDragClassName:rn,disableKeyboardA11y:mi,nodeExtent:hi,rfId:Rn}),(0,B.jsx)("div",{className:"react-flow__viewport-portal"})]})})}k_.displayName="GraphView";var PD=(0,H.memo)(k_),u_=({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??cl;eh(b,S,h);let x=qc(y,m,g,{nodeOrigin:p,nodeExtent:v,zIndexMode:f}),N=[0,0,1];if(l&&i&&a){let _=fl(m,{filter:A=>!!((A.width||A.initialWidth)&&(A.height||A.initialHeight))}),{x:T,y:w,zoom:G}=tu(_,i,a,u,s,r?.padding??.1);N=[T,w,G]}return{rfId:"1",width:i??0,height:a??0,transform:N,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:cl,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ui.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:{...zm},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Pm,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Rm,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},ID=({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})=>kx((m,g)=>{async function b(){let{nodeLookup:S,panZoom:h,fitViewOptions:y,fitViewResolver:p,width:v,height:x,minZoom:N,maxZoom:_}=g();h&&(await JS({nodes:S,width:v,height:x,panZoom:h,minZoom:N,maxZoom:_},y),p?.resolve(!0),m({fitViewResolver:null}))}return{...u_({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:N}=g(),_=qc(S,h,y,{nodeOrigin:p,nodeExtent:d,elevateNodesOnSelect:v,checkEquality:!0,zIndexMode:N});x&&_?(b(),m({nodes:S,nodesInitialized:_,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:S,nodesInitialized:_})},setEdges:S=>{let{connectionLookup:h,edgeLookup:y}=g();eh(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:N,debug:_,fitViewQueued:T,zIndexMode:w}=g(),{changes:G,updatedInternals:A}=fx(S,y,p,v,x,N,w);A&&(sx(y,p,{nodeOrigin:x,nodeExtent:N,zIndexMode:w}),T?(b(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),G?.length>0&&(_&&console.log("React Flow: trigger node changes",G),h?.(G)))},updateNodePositions:(S,h=!1)=>{let y=[],p=[],{nodeLookup:v,triggerNodeChanges:x,connection:N,updateConnection:_,onNodesChangeMiddlewareMap:T}=g();for(let[w,G]of S){let A=v.get(w),L=!!(A?.expandParent&&A?.parentId&&G?.position),P={id:w,type:"position",position:L?{x:Math.max(0,G.position.x),y:Math.max(0,G.position.y)}:G.position,dragging:h};if(A&&N.inProgress&&N.fromNode.id===A.id){let E=si(A,N.fromHandle,W.Left,!0);_({...N,from:E})}L&&A.parentId&&y.push({id:w,parentId:A.parentId,rect:{...G.internals.positionAbsolute,width:G.measured.width??0,height:G.measured.height??0}}),p.push(P)}if(y.length>0){let{parentLookup:w,nodeOrigin:G}=g(),A=Zc(y,v,w,G);p.push(...A)}for(let w of T.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 N=m_(S,p);y(N)}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 N=h_(S,p);y(N)}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 N=S.map(_=>$i(_,!0));v(N);return}v(yl(p,new Set([...S]),!0)),x(yl(y))},addSelectedEdges:S=>{let{multiSelectionActive:h,edgeLookup:y,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:x}=g();if(h){let N=S.map(_=>$i(_,!0));x(N);return}x(yl(y,new Set([...S]))),v(yl(p,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:h}={})=>{let{edges:y,nodes:p,nodeLookup:v,triggerNodeChanges:x,triggerEdgeChanges:N}=g(),_=S||p,T=h||y,w=[];for(let A of _){if(!A.selected)continue;let L=v.get(A.id);L&&(L.selected=!1),w.push($i(A.id,!1))}let G=[];for(let A of T)A.selected&&G.push($i(A.id,!1));x(w),N(G)},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((_,T)=>T.selected?[..._,$i(T.id,!1)]:_,[]),N=S.reduce((_,T)=>T.selected?[..._,$i(T.id,!1)]:_,[]);y(x),p(N)},setNodeExtent:S=>{let{nodes:h,nodeLookup:y,parentLookup:p,nodeOrigin:v,elevateNodesOnSelect:x,nodeExtent:N,zIndexMode:_}=g();S[0][0]===N[0][0]&&S[0][1]===N[0][1]&&S[1][0]===N[1][0]&&S[1][1]===N[1][1]||(qc(h,y,p,{nodeOrigin:v,nodeExtent:S,elevateNodesOnSelect:x,checkEquality:!1,zIndexMode:_}),m({nodeExtent:S}))},panBy:S=>{let{transform:h,width:y,height:p,panZoom:v,translateExtent:x}=g();return dx({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:N}=g();if(!N)return Promise.resolve(!1);let _=typeof y?.zoom<"u"?y.zoom:x;return await N.setViewport({x:p/2-S*_,y:v/2-h*_,zoom:_},{duration:y?.duration,ease:y?.ease,interpolate:y?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...zm}})},updateConnection:S=>{m({connection:S})},reset:()=>m({...u_()})}},Object.is);function YD({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)(()=>ID({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)(uM,{value:g,children:(0,B.jsx)(OM,{children:m})})}function XD({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)(Wc)?(0,B.jsx)(B.Fragment,{children:e}):(0,B.jsx)(YD,{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 qD={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function ZD({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:N,onNodeDragStart:_,onNodeDrag:T,onNodeDragStop:w,onNodesDelete:G,onEdgesDelete:A,onDelete:L,onSelectionChange:P,onSelectionDragStart:E,onSelectionDrag:D,onSelectionDragStop:M,onSelectionContextMenu:R,onSelectionStart:O,onSelectionEnd:z,onBeforeDelete:I,connectionMode:U,connectionLineType:Y=Pn.Bezier,connectionLineStyle:Z,connectionLineComponent:K,connectionLineContainerStyle:j,deleteKeyCode:le="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:k=!1,selectionMode:X=Qi.Full,panActivationKeyCode:Q="Space",multiSelectionKeyCode:te=hl()?"Meta":"Control",zoomActivationKeyCode:J=hl()?"Meta":"Control",snapToGrid:ie,snapGrid:ce,onlyRenderVisibleElements:ve=!1,selectNodesOnDrag:he,nodesDraggable:Ke,autoPanOnNodeFocus:St,nodesConnectable:Ot,nodesFocusable:rn,nodeOrigin:No=d_,edgesFocusable:To,edgesReconnectable:mi,elementsSelectable:hi=!0,defaultViewport:Rn=xM,minZoom:qt=.5,maxZoom:gt=2,translateExtent:na=cl,preventScrolling:vu=!0,nodeExtent:oa,defaultMarkerColor:bl="#b1b1b7",zoomOnScroll:bu=!0,zoomOnPinch:ia=!0,panOnScroll:aa=!1,panOnScrollSpeed:En=.5,panOnScrollMode:Co=vo.Free,zoomOnDoubleClick:Sl=!0,panOnDrag:xl=!0,onPaneClick:bf,onPaneMouseEnter:la,onPaneMouseMove:ra,onPaneMouseLeave:Sf,onPaneScroll:gi,onPaneContextMenu:xf,paneClickDistance:_f=1,nodeClickDistance:Ze=0,children:wo,onReconnect:Ef,onReconnectStart:Su,onReconnectEnd:_l,onEdgeContextMenu:xu,onEdgeDoubleClick:_u,onEdgeMouseEnter:Nf,onEdgeMouseMove:un,onEdgeMouseLeave:Zn,reconnectRadius:Eu=10,onNodesChange:Nu,onEdgesChange:El,noDragClassName:Tu="nodrag",noWheelClassName:Nn="nowheel",noPanClassName:Nl="nopan",fitView:Tl,fitViewOptions:Cl,connectOnClick:Cu,attributionPosition:Tf,proOptions:ne,defaultEdgeOptions:C,elevateNodesOnSelect:q=!0,elevateEdgesOnSelect:F=!1,disableKeyboardA11y:Me=!1,autoPanOnConnect:it,autoPanOnNodeDrag:Ve,autoPanSpeed:yt,connectionRadius:Tn,isValidConnection:Ao,onError:wl,style:et,id:Al,nodeDragThreshold:wu,connectionDragThreshold:HE,viewport:UE,onViewportChange:GE,width:kE,height:VE,colorMode:PE="light",debug:IE,onScroll:jh,ariaLabelConfig:YE,zIndexMode:Kh="basic",...XE},qE){let Cf=Al||"1",ZE=TM(PE),QE=(0,H.useCallback)($h=>{$h.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),jh?.($h)},[jh]);return(0,B.jsx)("div",{"data-testid":"rf__wrapper",...XE,onScroll:QE,style:{...et,...qD},ref:qE,className:Ye(["react-flow",i,ZE]),id:Al,role:"application",children:(0,B.jsxs)(XD,{nodes:e,edges:t,width:kE,height:VE,fitView:Tl,fitViewOptions:Cl,minZoom:qt,maxZoom:gt,nodeOrigin:No,nodeExtent:oa,zIndexMode:Kh,children:[(0,B.jsx)(PD,{onInit:s,onNodeClick:r,onEdgeClick:u,onNodeMouseEnter:y,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:x,onNodeDoubleClick:N,nodeTypes:a,edgeTypes:l,connectionLineType:Y,connectionLineStyle:Z,connectionLineComponent:K,connectionLineContainerStyle:j,selectionKeyCode:ee,selectionOnDrag:k,selectionMode:X,deleteKeyCode:le,multiSelectionKeyCode:te,panActivationKeyCode:Q,zoomActivationKeyCode:J,onlyRenderVisibleElements:ve,defaultViewport:Rn,translateExtent:na,minZoom:qt,maxZoom:gt,preventScrolling:vu,zoomOnScroll:bu,zoomOnPinch:ia,zoomOnDoubleClick:Sl,panOnScroll:aa,panOnScrollSpeed:En,panOnScrollMode:Co,panOnDrag:xl,onPaneClick:bf,onPaneMouseEnter:la,onPaneMouseMove:ra,onPaneMouseLeave:Sf,onPaneScroll:gi,onPaneContextMenu:xf,paneClickDistance:_f,nodeClickDistance:Ze,onSelectionContextMenu:R,onSelectionStart:O,onSelectionEnd:z,onReconnect:Ef,onReconnectStart:Su,onReconnectEnd:_l,onEdgeContextMenu:xu,onEdgeDoubleClick:_u,onEdgeMouseEnter:Nf,onEdgeMouseMove:un,onEdgeMouseLeave:Zn,reconnectRadius:Eu,defaultMarkerColor:bl,noDragClassName:Tu,noWheelClassName:Nn,noPanClassName:Nl,rfId:Cf,disableKeyboardA11y:Me,nodeExtent:oa,viewport:UE,onViewportChange:GE}),(0,B.jsx)(NM,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:m,onConnectStart:g,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:h,nodesDraggable:Ke,autoPanOnNodeFocus:St,nodesConnectable:Ot,nodesFocusable:rn,edgesFocusable:To,edgesReconnectable:mi,elementsSelectable:hi,elevateNodesOnSelect:q,elevateEdgesOnSelect:F,minZoom:qt,maxZoom:gt,nodeExtent:oa,onNodesChange:Nu,onEdgesChange:El,snapToGrid:ie,snapGrid:ce,connectionMode:U,translateExtent:na,connectOnClick:Cu,defaultEdgeOptions:C,fitView:Tl,fitViewOptions:Cl,onNodesDelete:G,onEdgesDelete:A,onDelete:L,onNodeDragStart:_,onNodeDrag:T,onNodeDragStop:w,onSelectionDrag:D,onSelectionDragStart:E,onSelectionDragStop:M,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:Nl,nodeOrigin:No,rfId:Cf,autoPanOnConnect:it,autoPanOnNodeDrag:Ve,autoPanSpeed:yt,onError:wl,connectionRadius:Tn,isValidConnection:Ao,selectNodesOnDrag:he,nodeDragThreshold:wu,connectionDragThreshold:HE,onBeforeDelete:I,debug:IE,ariaLabelConfig:YE,zIndexMode:Kh}),(0,B.jsx)(SM,{onSelectionChange:P}),wo,(0,B.jsx)(hM,{proOptions:ne,position:Tf}),(0,B.jsx)(mM,{rfId:Cf,disableKeyboardA11y:Me})]})})}var V_=g_(ZD);function P_(e){let[t,n]=(0,H.useState)(e),o=(0,H.useCallback)(i=>n(a=>m_(i,a)),[]);return[t,n,o]}function I_(e){let[t,n]=(0,H.useState)(e),o=(0,H.useCallback)(i=>n(a=>h_(i,a)),[]);return[t,n,o]}var $B=on.error014();function QD({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:Ye(["react-flow__background-pattern",n,o])})}function jD({radius:e,className:t}){return(0,B.jsx)("circle",{cx:e,cy:e,r:e,className:Ye(["react-flow__background-pattern","dots",t])})}var Yn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Yn||(Yn={}));var KD={[Yn.Dots]:1,[Yn.Lines]:1,[Yn.Cross]:6},$D=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Y_({id:e,variant:t=Yn.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($D,He),g=o||KD[t],b=t===Yn.Dots,S=t===Yn.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,N=[v[0]*f[2]||1+x[0]/2,v[1]*f[2]||1+x[1]/2],_=`${m}${e||""}`;return(0,B.jsxs)("svg",{className:Ye(["react-flow__background",s]),style:{...u,...tf,"--xy-background-color-props":r,"--xy-background-pattern-color-props":l},ref:d,"data-testid":"rf__background",children:[(0,B.jsx)("pattern",{id:_,x:f[0]%y[0],y:f[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${N[0]},-${N[1]})`,children:b?(0,B.jsx)(jD,{radius:p/2,className:c}):(0,B.jsx)(QD,{dimensions:x,lineWidth:i,variant:t,className:c})}),(0,B.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${_})`})]})}Y_.displayName="Background";var X_=(0,H.memo)(Y_);function FD(){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 JD(){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 WD(){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 eO(){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 tO(){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 Fc({children:e,className:t,...n}){return(0,B.jsx)("button",{type:"button",className:Ye(["react-flow__controls-button",t]),...n,children:e})}var nO=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function q_({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=ke(),{isInteractive:b,minZoomReached:S,maxZoomReached:h,ariaLabelConfig:y}=Se(nO,He),{zoomIn:p,zoomOut:v,fitView:x}=lh(),N=()=>{p(),a?.()},_=()=>{v(),l?.()},T=()=>{x(i),r?.()},w=()=>{g.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),u?.(!b)};return(0,B.jsxs)(ef,{className:Ye(["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)(Fc,{onClick:N,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:h,children:(0,B.jsx)(FD,{})}),(0,B.jsx)(Fc,{onClick:_,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:S,children:(0,B.jsx)(JD,{})})]}),n&&(0,B.jsx)(Fc,{className:"react-flow__controls-fitview",onClick:T,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:(0,B.jsx)(WD,{})}),o&&(0,B.jsx)(Fc,{className:"react-flow__controls-interactive",onClick:w,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:b?(0,B.jsx)(tO,{}):(0,B.jsx)(eO,{})}),c]})}q_.displayName="Controls";var FB=(0,H.memo)(q_);function oO({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:Ye(["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 iO=(0,H.memo)(oO),aO=e=>e.nodes.map(t=>t.id),ih=e=>e instanceof Function?e:()=>e;function lO({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=iO,onClick:l}){let r=Se(aO,He),u=ih(t),s=ih(e),c=ih(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,B.jsx)(B.Fragment,{children:r.map(f=>(0,B.jsx)(uO,{id:f,nodeColorFunc:u,nodeStrokeColorFunc:s,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:l,shapeRendering:d},f))})}function rO({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}=In(S);return{node:S,x:h,y,width:p,height:v}},He);return!s||s.hidden||!Im(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 uO=(0,H.memo)(rO),sO=(0,H.memo)(lO),cO=200,fO=150,dO=e=>!e.hidden,pO=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?km(fl(e.nodeLookup,{filter:dO}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},mO="react-flow__minimap-desc";function Z_({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=ke(),N=(0,H.useRef)(null),{boundingRect:_,viewBB:T,rfId:w,panZoom:G,translateExtent:A,flowWidth:L,flowHeight:P,ariaLabelConfig:E}=Se(pO,He),D=e?.width??cO,M=e?.height??fO,R=_.width/D,O=_.height/M,z=Math.max(R,O),I=z*D,U=z*M,Y=v*z,Z=_.x-(I-_.width)/2-Y,K=_.y-(U-_.height)/2-Y,j=I+Y*2,le=U+Y*2,ee=`${mO}-${w}`,k=(0,H.useRef)(0),X=(0,H.useRef)();k.current=z,(0,H.useEffect)(()=>{if(N.current&&G)return X.current=bx({domNode:N.current,panZoom:G,getTransform:()=>x.getState().transform,getViewScale:()=>k.current}),()=>{X.current?.destroy()}},[G]),(0,H.useEffect)(()=>{X.current?.update({translateExtent:A,width:L,height:P,inversePan:y,pannable:b,zoomStep:p,zoomable:S})},[b,S,y,p,A,L,P]);let Q=m?ie=>{let[ce,ve]=X.current?.pointer(ie)||[0,0];m(ie,{x:ce,y:ve})}:void 0,te=g?(0,H.useCallback)((ie,ce)=>{let ve=x.getState().nodeLookup.get(ce).internals.userNode;g(ie,ve)},[]):void 0,J=h??E["minimap.ariaLabel"];return(0,B.jsx)(ef,{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*z: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:Ye(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,B.jsxs)("svg",{width:D,height:M,viewBox:`${Z} ${K} ${j} ${le}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:N,onClick:Q,children:[J&&(0,B.jsx)("title",{id:ee,children:J}),(0,B.jsx)(sO,{onClick:te,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:r}),(0,B.jsx)("path",{className:"react-flow__minimap-mask",d:`M${Z-Y},${K-Y}h${j+Y*2}v${le+Y*2}h${-j-Y*2}z
- M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Z_.displayName="MiniMap";var JB=(0,H.memo)(Z_),hO=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,gO={[ci.Line]:"right",[ci.Handle]:"bottom-right"};function yO({nodeId:e,position:t,variant:n=ci.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=S_(),p=typeof e=="string"?e:y,v=ke(),x=(0,H.useRef)(null),N=n===ci.Handle,_=Se((0,H.useCallback)(hO(N&&m),[N,m]),He),T=(0,H.useRef)(null),w=t??gO[n];(0,H.useEffect)(()=>{if(!(!x.current||!p))return T.current||(T.current=Nx({domNode:x.current,nodeId:p,getStoreItems:()=>{let{nodeLookup:A,transform:L,snapGrid:P,snapToGrid:E,nodeOrigin:D,domNode:M}=v.getState();return{nodeLookup:A,transform:L,snapGrid:P,snapToGrid:E,nodeOrigin:D,paneDomNode:M}},onChange:(A,L)=>{let{triggerNodeChanges:P,nodeLookup:E,parentLookup:D,nodeOrigin:M}=v.getState(),R=[],O={x:A.x,y:A.y},z=E.get(p);if(z&&z.expandParent&&z.parentId){let I=z.origin??M,U=A.width??z.measured.width??0,Y=A.height??z.measured.height??0,Z={id:z.id,parentId:z.parentId,rect:{width:U,height:Y,...Ym({x:A.x??z.position.x,y:A.y??z.position.y},{width:U,height:Y},z.parentId,E,I)}},K=Zc([Z],E,D,M);R.push(...K),O.x=A.x?Math.max(I[0]*U,A.x):void 0,O.y=A.y?Math.max(I[1]*Y,A.y):void 0}if(O.x!==void 0&&O.y!==void 0){let I={id:p,type:"position",position:{...O}};R.push(I)}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 I of L){let U={...I,type:"position"};R.push(U)}P(R)},onEnd:({width:A,height:L})=>{let P={id:p,type:"dimensions",resizing:!1,dimensions:{width:A,height:L}};v.getState().triggerNodeChanges([P])}})),T.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}),()=>{T.current?.destroy()}},[w,r,u,s,c,d,b,S,h,g]);let G=w.split("-");return(0,B.jsx)("div",{className:Ye(["react-flow__resize-control","nodrag",...G,n,o]),ref:x,style:{...i,scale:_,...l&&{[N?"backgroundColor":"borderColor"]:l}},children:a})}var WB=(0,H.memo)(yO);var of="pipeCard",Q_="default",j_="controllerGroup",uh="stuff_";function fi(e){return uh+e}function af(e){return e.startsWith(uh)}function sh(e){return e.slice(uh.length)}var lf=40,rf=48,uf=20,iu="arrowclosed";function K_(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 $_(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 F_(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 Ji(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=>vO(m,c,n)))break;let f=n[u];f?(n[l]=f,u=f):(delete n[l],u=void 0)}}return n}function vO(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function J_(e,t){return e.pipe_registry?.[t]}function ch(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 W_(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")}function eE(e){if(!e)return null;if(typeof e=="string")return W_(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(W_(o))return o;return null}function tE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function fh(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 Wi=ae(Zt(),1);var{entries:cE,setPrototypeOf:nE,isFrozen:bO,getPrototypeOf:SO,getOwnPropertyDescriptor:xO}=Object,{freeze:At,seal:_n,create:ff}=Object,{apply:vh,construct:bh}=typeof Reflect<"u"&&Reflect;At||(At=function(t){return t});_n||(_n=function(t){return t});vh||(vh=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)});bh||(bh=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 sf=Mt(Array.prototype.forEach),_O=Mt(Array.prototype.lastIndexOf),oE=Mt(Array.prototype.pop),au=Mt(Array.prototype.push),EO=Mt(Array.prototype.splice),df=Mt(String.prototype.toLowerCase),dh=Mt(String.prototype.toString),ph=Mt(String.prototype.match),lu=Mt(String.prototype.replace),NO=Mt(String.prototype.indexOf),TO=Mt(String.prototype.trim),an=Mt(Object.prototype.hasOwnProperty),wt=Mt(RegExp.prototype.test),ru=CO(TypeError);function Mt(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 vh(e,t,o)}}function CO(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return bh(e,n)}}function de(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:df;nE&&nE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(bO(t)||(t[o]=a),i=a)}e[i]=!0}return e}function wO(e){for(let t=0;t<e.length;t++)an(e,t)||(e[t]=null);return e}function Xn(e){let t=ff(null);for(let[n,o]of cE(e))an(e,n)&&(Array.isArray(o)?t[n]=wO(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Xn(o):t[n]=o);return t}function uu(e,t){for(;e!==null;){let o=xO(e,t);if(o){if(o.get)return Mt(o.get);if(typeof o.value=="function")return Mt(o.value)}e=SO(e)}function n(){return null}return n}var iE=At(["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"]),mh=At(["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"]),hh=At(["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"]),AO=At(["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"]),gh=At(["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"]),MO=At(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),aE=At(["#text"]),lE=At(["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"]),yh=At(["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"]),rE=At(["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"]),cf=At(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),DO=_n(/\{\{[\w\W]*|[\w\W]*\}\}/gm),OO=_n(/<%[\w\W]*|[\w\W]*%>/gm),RO=_n(/\$\{[\w\W]*/gm),zO=_n(/^data-[\-\w.\u00B7-\uFFFF]+$/),LO=_n(/^aria-[\-\w]+$/),fE=_n(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),BO=_n(/^(?:\w+script|data):/i),HO=_n(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),dE=_n(/^html$/i),UO=_n(/^[a-z][.\w]*(-[.\w]+)+$/i),uE=Object.freeze({__proto__:null,ARIA_ATTR:LO,ATTR_WHITESPACE:HO,CUSTOM_ELEMENT:UO,DATA_ATTR:zO,DOCTYPE_NAME:dE,ERB_EXPR:OO,IS_ALLOWED_URI:fE,IS_SCRIPT_OR_DATA:BO,MUSTACHE_EXPR:DO,TMPLIT_EXPR:RO}),su={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},GO=function(){return typeof window>"u"?null:window},kO=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}},sE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:GO(),t=ne=>pE(ne);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==su.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=uu(g,"cloneNode"),S=uu(g,"remove"),h=uu(g,"nextSibling"),y=uu(g,"childNodes"),p=uu(g,"parentNode");if(typeof l=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let v,x="",{implementation:N,createNodeIterator:_,createDocumentFragment:T,getElementsByTagName:w}=n,{importNode:G}=o,A=sE();t.isSupported=typeof cE=="function"&&typeof p=="function"&&N&&N.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:L,ERB_EXPR:P,TMPLIT_EXPR:E,DATA_ATTR:D,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:z}=uE,{IS_ALLOWED_URI:I}=uE,U=null,Y=de({},[...iE,...mh,...hh,...gh,...aE]),Z=null,K=de({},[...lE,...yh,...rE,...cf]),j=Object.seal(ff(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}})),le=null,ee=null,k=Object.seal(ff(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),X=!0,Q=!0,te=!1,J=!0,ie=!1,ce=!0,ve=!1,he=!1,Ke=!1,St=!1,Ot=!1,rn=!1,No=!0,To=!1,mi="user-content-",hi=!0,Rn=!1,qt={},gt=null,na=de({},["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"]),vu=null,oa=de({},["audio","video","img","source","image","track"]),bl=null,bu=de({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ia="http://www.w3.org/1998/Math/MathML",aa="http://www.w3.org/2000/svg",En="http://www.w3.org/1999/xhtml",Co=En,Sl=!1,xl=null,bf=de({},[ia,aa,En],dh),la=de({},["mi","mo","mn","ms","mtext"]),ra=de({},["annotation-xml"]),Sf=de({},["title","style","font","a","script"]),gi=null,xf=["application/xhtml+xml","text/html"],_f="text/html",Ze=null,wo=null,Ef=n.createElement("form"),Su=function(C){return C instanceof RegExp||C instanceof Function},_l=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wo&&wo===C)){if((!C||typeof C!="object")&&(C={}),C=Xn(C),gi=xf.indexOf(C.PARSER_MEDIA_TYPE)===-1?_f:C.PARSER_MEDIA_TYPE,Ze=gi==="application/xhtml+xml"?dh:df,U=an(C,"ALLOWED_TAGS")?de({},C.ALLOWED_TAGS,Ze):Y,Z=an(C,"ALLOWED_ATTR")?de({},C.ALLOWED_ATTR,Ze):K,xl=an(C,"ALLOWED_NAMESPACES")?de({},C.ALLOWED_NAMESPACES,dh):bf,bl=an(C,"ADD_URI_SAFE_ATTR")?de(Xn(bu),C.ADD_URI_SAFE_ATTR,Ze):bu,vu=an(C,"ADD_DATA_URI_TAGS")?de(Xn(oa),C.ADD_DATA_URI_TAGS,Ze):oa,gt=an(C,"FORBID_CONTENTS")?de({},C.FORBID_CONTENTS,Ze):na,le=an(C,"FORBID_TAGS")?de({},C.FORBID_TAGS,Ze):Xn({}),ee=an(C,"FORBID_ATTR")?de({},C.FORBID_ATTR,Ze):Xn({}),qt=an(C,"USE_PROFILES")?C.USE_PROFILES:!1,X=C.ALLOW_ARIA_ATTR!==!1,Q=C.ALLOW_DATA_ATTR!==!1,te=C.ALLOW_UNKNOWN_PROTOCOLS||!1,J=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ie=C.SAFE_FOR_TEMPLATES||!1,ce=C.SAFE_FOR_XML!==!1,ve=C.WHOLE_DOCUMENT||!1,St=C.RETURN_DOM||!1,Ot=C.RETURN_DOM_FRAGMENT||!1,rn=C.RETURN_TRUSTED_TYPE||!1,Ke=C.FORCE_BODY||!1,No=C.SANITIZE_DOM!==!1,To=C.SANITIZE_NAMED_PROPS||!1,hi=C.KEEP_CONTENT!==!1,Rn=C.IN_PLACE||!1,I=C.ALLOWED_URI_REGEXP||fE,Co=C.NAMESPACE||En,la=C.MATHML_TEXT_INTEGRATION_POINTS||la,ra=C.HTML_INTEGRATION_POINTS||ra,j=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&Su(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&Su(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ie&&(Q=!1),Ot&&(St=!0),qt&&(U=de({},aE),Z=ff(null),qt.html===!0&&(de(U,iE),de(Z,lE)),qt.svg===!0&&(de(U,mh),de(Z,yh),de(Z,cf)),qt.svgFilters===!0&&(de(U,hh),de(Z,yh),de(Z,cf)),qt.mathMl===!0&&(de(U,gh),de(Z,rE),de(Z,cf))),an(C,"ADD_TAGS")||(k.tagCheck=null),an(C,"ADD_ATTR")||(k.attributeCheck=null),C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?k.tagCheck=C.ADD_TAGS:(U===Y&&(U=Xn(U)),de(U,C.ADD_TAGS,Ze))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?k.attributeCheck=C.ADD_ATTR:(Z===K&&(Z=Xn(Z)),de(Z,C.ADD_ATTR,Ze))),C.ADD_URI_SAFE_ATTR&&de(bl,C.ADD_URI_SAFE_ATTR,Ze),C.FORBID_CONTENTS&&(gt===na&&(gt=Xn(gt)),de(gt,C.FORBID_CONTENTS,Ze)),C.ADD_FORBID_CONTENTS&&(gt===na&&(gt=Xn(gt)),de(gt,C.ADD_FORBID_CONTENTS,Ze)),hi&&(U["#text"]=!0),ve&&de(U,["html","head","body"]),U.table&&(de(U,["tbody"]),delete le.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw ru('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ru('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=C.TRUSTED_TYPES_POLICY,x=v.createHTML("")}else v===void 0&&(v=kO(m,i)),v!==null&&typeof x=="string"&&(x=v.createHTML(""));At&&At(C),wo=C}},xu=de({},[...mh,...hh,...AO]),_u=de({},[...gh,...MO]),Nf=function(C){let q=p(C);(!q||!q.tagName)&&(q={namespaceURI:Co,tagName:"template"});let F=df(C.tagName),Me=df(q.tagName);return xl[C.namespaceURI]?C.namespaceURI===aa?q.namespaceURI===En?F==="svg":q.namespaceURI===ia?F==="svg"&&(Me==="annotation-xml"||la[Me]):!!xu[F]:C.namespaceURI===ia?q.namespaceURI===En?F==="math":q.namespaceURI===aa?F==="math"&&ra[Me]:!!_u[F]:C.namespaceURI===En?q.namespaceURI===aa&&!ra[Me]||q.namespaceURI===ia&&!la[Me]?!1:!_u[F]&&(Sf[F]||!xu[F]):!!(gi==="application/xhtml+xml"&&xl[C.namespaceURI]):!1},un=function(C){au(t.removed,{element:C});try{p(C).removeChild(C)}catch{S(C)}},Zn=function(C,q){try{au(t.removed,{attribute:q.getAttributeNode(C),from:q})}catch{au(t.removed,{attribute:null,from:q})}if(q.removeAttribute(C),C==="is")if(St||Ot)try{un(q)}catch{}else try{q.setAttribute(C,"")}catch{}},Eu=function(C){let q=null,F=null;if(Ke)C="<remove></remove>"+C;else{let Ve=ph(C,/^[\r\n\t ]+/);F=Ve&&Ve[0]}gi==="application/xhtml+xml"&&Co===En&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");let Me=v?v.createHTML(C):C;if(Co===En)try{q=new f().parseFromString(Me,gi)}catch{}if(!q||!q.documentElement){q=N.createDocument(Co,"template",null);try{q.documentElement.innerHTML=Sl?x:Me}catch{}}let it=q.body||q.documentElement;return C&&F&&it.insertBefore(n.createTextNode(F),it.childNodes[0]||null),Co===En?w.call(q,ve?"html":"body")[0]:ve?q.documentElement:it},Nu=function(C){return _.call(C.ownerDocument||C,C,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},El=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")},Tu=function(C){return typeof r=="function"&&C instanceof r};function Nn(ne,C,q){sf(ne,F=>{F.call(t,C,q,wo)})}let Nl=function(C){let q=null;if(Nn(A.beforeSanitizeElements,C,null),El(C))return un(C),!0;let F=Ze(C.nodeName);if(Nn(A.uponSanitizeElement,C,{tagName:F,allowedTags:U}),ce&&C.hasChildNodes()&&!Tu(C.firstElementChild)&&wt(/<[/\w!]/g,C.innerHTML)&&wt(/<[/\w!]/g,C.textContent)||C.nodeType===su.progressingInstruction||ce&&C.nodeType===su.comment&&wt(/<[/\w]/g,C.data))return un(C),!0;if(!(k.tagCheck instanceof Function&&k.tagCheck(F))&&(!U[F]||le[F])){if(!le[F]&&Cl(F)&&(j.tagNameCheck instanceof RegExp&&wt(j.tagNameCheck,F)||j.tagNameCheck instanceof Function&&j.tagNameCheck(F)))return!1;if(hi&&!gt[F]){let Me=p(C)||C.parentNode,it=y(C)||C.childNodes;if(it&&Me){let Ve=it.length;for(let yt=Ve-1;yt>=0;--yt){let Tn=b(it[yt],!0);Tn.__removalCount=(C.__removalCount||0)+1,Me.insertBefore(Tn,h(C))}}}return un(C),!0}return C instanceof u&&!Nf(C)||(F==="noscript"||F==="noembed"||F==="noframes")&&wt(/<\/no(script|embed|frames)/i,C.innerHTML)?(un(C),!0):(ie&&C.nodeType===su.text&&(q=C.textContent,sf([L,P,E],Me=>{q=lu(q,Me," ")}),C.textContent!==q&&(au(t.removed,{element:C.cloneNode()}),C.textContent=q)),Nn(A.afterSanitizeElements,C,null),!1)},Tl=function(C,q,F){if(ee[q]||No&&(q==="id"||q==="name")&&(F in n||F in Ef))return!1;if(!(Q&&!ee[q]&&wt(D,q))){if(!(X&&wt(M,q))){if(!(k.attributeCheck instanceof Function&&k.attributeCheck(q,C))){if(!Z[q]||ee[q]){if(!(Cl(C)&&(j.tagNameCheck instanceof RegExp&&wt(j.tagNameCheck,C)||j.tagNameCheck instanceof Function&&j.tagNameCheck(C))&&(j.attributeNameCheck instanceof RegExp&&wt(j.attributeNameCheck,q)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(q,C))||q==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&wt(j.tagNameCheck,F)||j.tagNameCheck instanceof Function&&j.tagNameCheck(F))))return!1}else if(!bl[q]){if(!wt(I,lu(F,O,""))){if(!((q==="src"||q==="xlink:href"||q==="href")&&C!=="script"&&NO(F,"data:")===0&&vu[C])){if(!(te&&!wt(R,lu(F,O,"")))){if(F)return!1}}}}}}}return!0},Cl=function(C){return C!=="annotation-xml"&&ph(C,z)},Cu=function(C){Nn(A.beforeSanitizeAttributes,C,null);let{attributes:q}=C;if(!q||El(C))return;let F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0},Me=q.length;for(;Me--;){let it=q[Me],{name:Ve,namespaceURI:yt,value:Tn}=it,Ao=Ze(Ve),wl=Tn,et=Ve==="value"?wl:TO(wl);if(F.attrName=Ao,F.attrValue=et,F.keepAttr=!0,F.forceKeepAttr=void 0,Nn(A.uponSanitizeAttribute,C,F),et=F.attrValue,To&&(Ao==="id"||Ao==="name")&&(Zn(Ve,C),et=mi+et),ce&&wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,et)){Zn(Ve,C);continue}if(Ao==="attributename"&&ph(et,"href")){Zn(Ve,C);continue}if(F.forceKeepAttr)continue;if(!F.keepAttr){Zn(Ve,C);continue}if(!J&&wt(/\/>/i,et)){Zn(Ve,C);continue}ie&&sf([L,P,E],wu=>{et=lu(et,wu," ")});let Al=Ze(C.nodeName);if(!Tl(Al,Ao,et)){Zn(Ve,C);continue}if(v&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!yt)switch(m.getAttributeType(Al,Ao)){case"TrustedHTML":{et=v.createHTML(et);break}case"TrustedScriptURL":{et=v.createScriptURL(et);break}}if(et!==wl)try{yt?C.setAttributeNS(yt,Ve,et):C.setAttribute(Ve,et),El(C)?un(C):oE(t.removed)}catch{Zn(Ve,C)}}Nn(A.afterSanitizeAttributes,C,null)},Tf=function ne(C){let q=null,F=Nu(C);for(Nn(A.beforeSanitizeShadowDOM,C,null);q=F.nextNode();)Nn(A.uponSanitizeShadowNode,q,null),Nl(q),Cu(q),q.content instanceof a&&ne(q.content);Nn(A.afterSanitizeShadowDOM,C,null)};return t.sanitize=function(ne){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,F=null,Me=null,it=null;if(Sl=!ne,Sl&&(ne="<!-->"),typeof ne!="string"&&!Tu(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw ru("dirty is not a string, aborting")}else throw ru("toString is not a function");if(!t.isSupported)return ne;if(he||_l(C),t.removed=[],typeof ne=="string"&&(Rn=!1),Rn){if(ne.nodeName){let Tn=Ze(ne.nodeName);if(!U[Tn]||le[Tn])throw ru("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof r)q=Eu("<!---->"),F=q.ownerDocument.importNode(ne,!0),F.nodeType===su.element&&F.nodeName==="BODY"||F.nodeName==="HTML"?q=F:q.appendChild(F);else{if(!St&&!ie&&!ve&&ne.indexOf("<")===-1)return v&&rn?v.createHTML(ne):ne;if(q=Eu(ne),!q)return St?null:rn?x:""}q&&Ke&&un(q.firstChild);let Ve=Nu(Rn?ne:q);for(;Me=Ve.nextNode();)Nl(Me),Cu(Me),Me.content instanceof a&&Tf(Me.content);if(Rn)return ne;if(St){if(Ot)for(it=T.call(q.ownerDocument);q.firstChild;)it.appendChild(q.firstChild);else it=q;return(Z.shadowroot||Z.shadowrootmode)&&(it=G.call(o,it,!0)),it}let yt=ve?q.outerHTML:q.innerHTML;return ve&&U["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&wt(dE,q.ownerDocument.doctype.name)&&(yt="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
-`+yt),ie&&sf([L,P,E],Tn=>{yt=lu(yt,Tn," ")}),v&&rn?v.createHTML(yt):yt},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_l(ne),he=!0},t.clearConfig=function(){wo=null,he=!1},t.isValidAttribute=function(ne,C,q){wo||_l({});let F=Ze(ne),Me=Ze(C);return Tl(F,Me,q)},t.addHook=function(ne,C){typeof C=="function"&&au(A[ne],C)},t.removeHook=function(ne,C){if(C!==void 0){let q=_O(A[ne],C);return q===-1?void 0:EO(A[ne],q,1)[0]}return oE(A[ne])},t.removeHooks=function(ne){A[ne]=[]},t.removeAllHooks=function(){A=sE()},t}var mE=pE();var ye=ae(fe(),1),VO=(0,ye.jsx)("svg",{viewBox:"0 0 24 24",children:(0,ye.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"})}),PO=(0,ye.jsx)("svg",{viewBox:"0 0 24 24",children:(0,ye.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),IO=(0,ye.jsx)("svg",{viewBox:"0 0 24 24",children:(0,ye.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),YO=(0,ye.jsx)("svg",{viewBox:"0 0 24 24",children:(0,ye.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"})});function pf(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Sh(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 hE(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function mf({stuff:e,className:t}){let[n,o]=Wi.default.useState("html"),[i,a]=Wi.default.useState(!1),l=Wi.default.useRef(null),r=Wi.default.useMemo(()=>eE(e.data),[e.data]),u=tE(e.contentType),s=Wi.default.useMemo(()=>{if(e.data==null)return null;try{return JSON.stringify(e.data,null,2)}catch{return"[Unable to serialize data]"}},[e.data]);Wi.default.useEffect(()=>{n!=="html"||!l.current||l.current.querySelectorAll("a").forEach(b=>{b.setAttribute("target","_blank"),b.setAttribute("rel","noopener noreferrer")})},[n,e.dataHtml]);function c(){if(n==="html"){if(e.contentType==="application/pdf"){let b=r;return b?(0,ye.jsx)("div",{className:"stuff-viewer-pdf",children:(0,ye.jsx)("embed",{src:b,type:"application/pdf"})}):(0,ye.jsx)("div",{className:"stuff-viewer-placeholder",children:"PDF content (no URL available)"})}if(e.contentType?.startsWith("image/")){let b=r;return b?(0,ye.jsx)("div",{className:"stuff-viewer-image",children:(0,ye.jsx)("img",{src:b,alt:e.name||"Image content"})}):(0,ye.jsx)("div",{className:"stuff-viewer-placeholder",children:"Image content (no URL available)"})}return e.dataHtml?(0,ye.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:mE.sanitize(e.dataHtml)}}):s?(0,ye.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:pf(s)}}):(0,ye.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return n==="json"?s?(0,ye.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:pf(s)}}):(0,ye.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,ye.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:pf(e.dataText)}}):s?(0,ye.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:pf(s)}}):(0,ye.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function d(){let b;n==="json"?b=s||"":n==="text"?b=e.dataText||s||"":b=e.dataText||e.dataHtml||s||"",b&&navigator.clipboard&&navigator.clipboard.writeText(b).then(()=>{a(!0),setTimeout(()=>a(!1),1500)}).catch(()=>{})}function f(){if(e.contentType?.startsWith("image/")&&r){let b=e.contentType.split("/")[1]||"png";hE(r,`${e.name||"stuff"}.${b}`);return}if(e.contentType==="application/pdf"&&r){hE(r,`${e.name||"stuff"}.pdf`);return}n==="json"?Sh(s||"{}",`${e.name||"stuff"}.json`,"application/json"):n==="text"?Sh(e.dataText||s||"",`${e.name||"stuff"}.txt`,"text/plain"):Sh(e.dataHtml||s||"",`${e.name||"stuff"}.html`,"text/html")}function m(){r&&window.open(r,"_blank","noopener,noreferrer")}let g=["stuff-viewer",t].filter(Boolean).join(" ");return(0,ye.jsxs)("div",{className:g,children:[(0,ye.jsxs)("div",{className:"stuff-viewer-header",children:[(0,ye.jsx)("h3",{className:"stuff-viewer-title",children:e.name||"Data"}),e.concept&&(0,ye.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,ye.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,ye.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(b=>(0,ye.jsx)("button",{type:"button",className:`stuff-viewer-tab${n===b?" stuff-viewer-tab--active":""}`,onClick:()=>o(b),children:b==="html"?u:b==="json"?"JSON":"Pretty"},b))}),(0,ye.jsxs)("div",{className:"stuff-viewer-actions",children:[r&&(0,ye.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:m,title:"Open in new window","aria-label":"Open in new window",children:YO}),(0,ye.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${i?" stuff-viewer-action-btn--copied":""}`,onClick:d,title:"Copy","aria-label":"Copy",children:i?PO:VO}),(0,ye.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:f,title:"Download","aria-label":"Download",children:IO})]})]}),(0,ye.jsx)("div",{className:"stuff-viewer-content",ref:l,children:c()})]})}var cu=ae(fe(),1);function gE({isOpen:e,onClose:t,children:n}){return(0,cu.jsxs)("div",{className:`detail-panel ${e?"":"detail-panel--closed"}`,children:[(0,cu.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"}),(0,cu.jsx)("div",{className:"detail-panel-content",children:n})]})}var vE=ae(Zt(),1);var yE=ae(Zt(),1),Dt=ae(fe(),1);function xh(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function oe({label:e,value:t}){return t==null?null:(0,Dt.jsxs)("div",{className:"detail-kv-row",children:[(0,Dt.jsx)("span",{className:"detail-kv-key",children:e}),(0,Dt.jsx)("span",{className:"detail-kv-value",children:String(t)})]})}function _h({label:e,text:t}){return t?(0,Dt.jsxs)("div",{children:[(0,Dt.jsx)("div",{className:"detail-section-label",children:e}),(0,Dt.jsx)("div",{className:"detail-prompt-block",children:t})]}):null}function qn({label:e,templateText:t,renderedText:n}){let o=!!t,i=!!n;if(!o&&!i)return null;let[a,l]=(0,yE.useState)(!1);return(0,Dt.jsxs)("div",{children:[(0,Dt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,Dt.jsx)("div",{className:"detail-section-label",style:{marginBottom:0},children:e}),o&&i&&(0,Dt.jsxs)("button",{onClick:()=>l(s=>!s),style:{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"},children:[(0,Dt.jsx)("span",{style:{width:22,height:12,borderRadius:6,background:a?"rgba(255,255,255,0.12)":"#50FA7B33",position:"relative",display:"inline-block",transition:"background 0.15s"},children:(0,Dt.jsx)("span",{style:{position:"absolute",top:2,left:a?2:12,width:8,height:8,borderRadius:"50%",background:a?"#94a3b8":"#50FA7B",transition:"left 0.15s, background 0.15s"}})}),a?"template":"rendered"]})]}),(0,Dt.jsx)("div",{className:"detail-prompt-block",style:{marginTop:6},children:a?t:n})]})}var ht=ae(fe(),1);function Eh({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,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)(oe,{label:"Model",value:m}),g&&g!==m&&(0,ht.jsx)(oe,{label:"Model (object)",value:g}),(0,ht.jsx)(qn,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:s}),(0,ht.jsx)(qn,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c}),(0,ht.jsx)(oe,{label:"Structuring",value:d||e.structuring_method}),(0,ht.jsx)(oe,{label:"Multiple Output",value:f}),(0,ht.jsx)(oe,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,ht.jsx)(oe,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,ht.jsx)(oe,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,ht.jsx)(oe,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,ht.jsx)(oe,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),l&&(0,ht.jsx)(oe,{label:"System Document Refs",value:`${n.system_document_references.length} references`})]})}function Nh(e){return null}var Pt=ae(fe(),1);function Th({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,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)(oe,{label:"Model",value:o||e.img_gen_choice}),(0,Pt.jsx)(qn,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,Pt.jsx)(qn,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,Pt.jsx)(oe,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,Pt.jsx)(oe,{label:"Output Format",value:e.output_format}),(0,Pt.jsx)(oe,{label:"Background",value:e.background}),(0,Pt.jsx)(oe,{label:"Is Raw",value:e.is_raw}),(0,Pt.jsx)(oe,{label:"Seed",value:e.seed}),(0,Pt.jsx)(oe,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}function Ch(e){return null}var It=ae(fe(),1);function wh({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,It.jsxs)(It.Fragment,{children:[(0,It.jsx)(oe,{label:"Model",value:n||e.extract_choice}),(0,It.jsx)(oe,{label:"Document Variable",value:e.document_stuff_name}),(0,It.jsx)(oe,{label:"Caption Images",value:e.should_caption_images}),(0,It.jsx)(oe,{label:"Max Page Images",value:e.max_page_images}),(0,It.jsx)(oe,{label:"Include Page Views",value:e.should_include_page_views}),(0,It.jsx)(oe,{label:"Page Views DPI",value:e.page_views_dpi}),(0,It.jsx)(oe,{label:"Render JS",value:e.render_js}),(0,It.jsx)(oe,{label:"Include Raw HTML",value:e.include_raw_html}),(0,It.jsx)(oe,{label:"Image Variable",value:e.image_stuff_name})]})}function Ah(e){return null}var Yt=ae(fe(),1);function Mh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)(oe,{label:"Model",value:n||e.search_choice}),(0,Yt.jsx)(qn,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,Yt.jsx)(oe,{label:"Max Results",value:e.max_results_override}),(0,Yt.jsx)(oe,{label:"Include Images",value:e.include_images_override}),(0,Yt.jsx)(oe,{label:"Structured Output",value:e.is_structured_output}),(0,Yt.jsx)(oe,{label:"From Date",value:e.from_date}),(0,Yt.jsx)(oe,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,Yt.jsx)(oe,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,Yt.jsx)(oe,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}function Dh(e){return null}var bo=ae(fe(),1);function Oh({blueprint:e,executionData:t}){let n=t?.rendered_text,o=t?.compose_mode;return(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)(oe,{label:"Mode",value:o||"template"}),(0,bo.jsx)(qn,{label:"Template",templateText:e.template,renderedText:n}),(0,bo.jsx)(oe,{label:"Category",value:e.category}),(0,bo.jsx)(oe,{label:"Templating Style",value:e.templating_style})]})}function Rh(e){return null}var bt=ae(fe(),1);function zh({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,bt.jsxs)(bt.Fragment,{children:[(0,bt.jsx)(_h,{label:"Expression",text:e.expression}),n&&(0,bt.jsx)(oe,{label:"Expression Result",value:n}),(0,bt.jsxs)("div",{children:[(0,bt.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,bt.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,bt.jsx)("span",{className:"detail-kv-key",children:i}),(0,bt.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,bt.jsxs)("div",{className:"detail-kv-row",children:[(0,bt.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,bt.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,bt.jsx)(oe,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}function Lh(e){return null}var So=ae(fe(),1);function Bh({blueprint:e}){return(0,So.jsxs)("div",{children:[(0,So.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,So.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,So.jsxs)("div",{className:"detail-step-item",children:[(0,So.jsx)("span",{className:"detail-step-index",children:n+1}),(0,So.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,So.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}function Hh(e){return null}var ln=ae(fe(),1);function Uh({blueprint:e}){return(0,ln.jsxs)(ln.Fragment,{children:[(0,ln.jsxs)("div",{children:[(0,ln.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,ln.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,ln.jsxs)("div",{className:"detail-step-item",children:[(0,ln.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,ln.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,ln.jsx)(oe,{label:"Add Each Output",value:e.add_each_output}),(0,ln.jsx)(oe,{label:"Combined Output",value:e.combined_output})]})}function Gh(e){return null}var xo=ae(fe(),1);function kh({blueprint:e,executionData:t}){let n=t?.item_count;return(0,xo.jsxs)(xo.Fragment,{children:[(0,xo.jsx)(oe,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,xo.jsx)(oe,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,xo.jsx)(oe,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,xo.jsx)(oe,{label:"Items Processed",value:n})]})}function Vh(e){return null}var $=ae(fe(),1),XO={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},qO=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),ZO={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4"};function bE({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type??"PipeFunc",i=qO.has(o),a=XO[o]??o,l=e.status??"scheduled",r=ZO[l]??"#6272a4",u=vE.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let f=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,m=J_(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,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:"detail-header",children:[(0,$.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:a}),(0,$.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code??"unknown"})]}),(0,$.jsxs)("div",{className:"detail-status",children:[(0,$.jsx)("span",{className:"detail-status-dot",style:{background:r}}),(0,$.jsx)("span",{className:"detail-status-label",style:{color:r},children:l}),e.timing?.duration!=null&&(0,$.jsx)("span",{className:"detail-duration",children:xh(e.timing.duration)})]}),d&&(0,$.jsx)("div",{className:"detail-description",children:d}),s.length>0&&(0,$.jsxs)("div",{children:[(0,$.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,$.jsx)("div",{className:"detail-io-list",children:s.map((f,m)=>(0,$.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,$.jsx)("span",{className:"detail-io-name",children:f.name??"unnamed"}),f.concept&&(0,$.jsx)("span",{className:"detail-io-concept",children:f.concept})]},m))})]}),c.length>0&&(0,$.jsxs)("div",{children:[(0,$.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,$.jsx)("div",{className:"detail-io-list",children:c.map((f,m)=>(0,$.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,$.jsx)("span",{className:"detail-io-name",children:f.name??"unnamed"}),f.concept&&(0,$.jsx)("span",{className:"detail-io-concept",children:f.concept})]},m))})]}),(s.length>0||c.length>0)&&(0,$.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}}),u&&(0,$.jsx)(QO,{blueprint:u,executionData:e.execution_data}),e.execution_data&&Object.keys(e.execution_data).length>0&&(0,$.jsx)(jO,{executionData:e.execution_data,pipeType:o}),e.error&&(0,$.jsxs)("div",{className:"detail-error",children:[(0,$.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,$.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,$.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),e.metrics&&Object.keys(e.metrics).length>0&&(0,$.jsxs)("div",{children:[(0,$.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([f,m])=>(0,$.jsx)(oe,{label:f,value:typeof m=="number"?m.toLocaleString():String(m)},f))]}),e.tags&&Object.keys(e.tags).length>0&&(0,$.jsxs)("div",{children:[(0,$.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,$.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([f,m])=>(0,$.jsxs)("span",{className:"detail-tag",children:[(0,$.jsxs)("span",{className:"detail-tag-key",children:[f,": "]}),(0,$.jsx)("span",{className:"detail-tag-value",children:m})]},f))})]}),!u&&(0,$.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function QO({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,$.jsx)(Eh,{blueprint:e,executionData:t});case"PipeImgGen":return(0,$.jsx)(Th,{blueprint:e,executionData:t});case"PipeCompose":return(0,$.jsx)(Oh,{blueprint:e,executionData:t});case"PipeExtract":return(0,$.jsx)(wh,{blueprint:e,executionData:t});case"PipeSearch":return(0,$.jsx)(Mh,{blueprint:e,executionData:t});case"PipeSequence":return(0,$.jsx)(Bh,{blueprint:e,executionData:t});case"PipeParallel":return(0,$.jsx)(Uh,{blueprint:e,executionData:t});case"PipeCondition":return(0,$.jsx)(zh,{blueprint:e,executionData:t});case"PipeBatch":return(0,$.jsx)(kh,{blueprint:e,executionData:t});case"PipeFunc":return null}}function jO({executionData:e,pipeType:t}){switch(t){case"PipeLLM":return(0,$.jsx)(Nh,{data:e});case"PipeImgGen":return(0,$.jsx)(Ch,{data:e});case"PipeExtract":return(0,$.jsx)(Ah,{data:e});case"PipeSearch":return(0,$.jsx)(Dh,{data:e});case"PipeCompose":return(0,$.jsx)(Rh,{data:e});case"PipeCondition":return(0,$.jsx)(Lh,{data:e});case"PipeSequence":return(0,$.jsx)(Hh,{data:e});case"PipeParallel":return(0,$.jsx)(Gh,{data:e});case"PipeBatch":return(0,$.jsx)(Vh,{data:e});default:return(0,$.jsx)(KO,{data:e})}}function KO({data:e}){let t=Object.entries(e);return t.length===0?null:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,$.jsx)(oe,{label:n,value:String(o)},n))]})}var xe=ae(fe(),1);function Ph({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)($O,{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)(mf,{stuff:JO(t)})]})]})}function $O({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:FO(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 FO(e){return e.type?String(e.type):e.anyOf?"union":e.allOf?"all":e.$ref?String(e.$ref).split("/").pop()??"ref":"unknown"}function JO(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 fu(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 du(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 WO(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 eR=7,tR=48,nR=140;function oR(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:of,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||WO(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=fi(u),d=s.name||"data",f=s.concept||"",m=Math.max(d.length,f.length)*eR+tR,g=Math.max(nR,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:Q_,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=fi(u);i.push({id:"edge_"+l++,source:s,target:c,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:iu,color:"var(--color-edge)"}})}for(let[u,s]of Object.entries(t.stuffConsumers)){let c=fi(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:iu,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=fi(u.source_stuff_digest),c=fi(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:iu,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=fi(u.source_stuff_digest),c=fi(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:iu,color:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let r=Ji(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 SE(e,t){if(e){let n=F_(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:oR(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}var iR=window.ELK,xE=iR;function aR(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var lR="_in",rR="_out";function Ih(e){return e+lR}function Yh(e){return e+rR}function uR(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:Ih(e),x:r,y:u,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:Yh(e),x:s,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}function vl(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===of,l=Math.max(180,Math.min(400,i.length*8+60)),r=t?180:280,u=t?240:400,s;o?s=Math.max(180,l):a&&n.pipeCardData?s=u:s=Math.max(a?r:200,l);let c;if(o)c=60;else if(a&&n.pipeCardData){let d=n.pipeCardData,f=d.inputs?.length??0,m=d.outputs?.length??0,b=44+(!!d.description||!!n.nodeData?.description?24:0),S=t?38:30,h=f>0?S:0,y=m>0?S:0,p=t?1:3,v=Math.min(f,4),x=Math.max(0,Math.ceil(v/p)-1),N=Math.max(0,Math.ceil(m/p)-1);c=Math.min(320,b+h+y+(x+N)*24)}else c=a?120:70;return{width:s,height:c}}function sR(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 hf(e,t,n){return{id:e,width:t.width,height:t.height,ports:uR(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function _E(e,t,n,o,i,a){let l=i==="LR"||i==="RL",r=a?.nodesep??80,u=a?.ranksep??70,s=aR(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={},N=e.map(T=>{let w=vl(T,l);return x[T.id]=w,hf(T.id,w,i)}),_=t.map(T=>({id:T.id,sources:[Yh(T.source)],targets:[Ih(T.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:N,edges:_},dimensionMap:x}}let f=Ji(n,o),m=sR(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,N)=>(m[x]??0)-(m[N]??0));for(let x of h){let _=1+(m[x]??0)*.15,T=Math.round(lf*_),w=Math.round(rf*_),G=Math.round(uf*_),A={"elk.padding":`[top=${w},left=${T},bottom=${G},right=${T}]`,"elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(u),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},L=[],P=o.containmentTree[x]||[];for(let E of P)if(o.controllerNodeIds.has(E)){let D=S[E];D&&L.push(D)}else{let D=b.get(E);if(D){let M=vl(D,l);g[E]=M,L.push(hf(E,M,i))}}for(let E of e)if(E.data.isStuff&&f[E.id]===x&&!L.some(D=>D.id===E.id)){let D=vl(E,l);g[E.id]=D,L.push(hf(E.id,D,i))}S[x]={id:x,layoutOptions:A,children:L}}let y=[];for(let x of h)if(!f[x]){let N=S[x];N&&y.push(N)}for(let x of e)if(!f[x.id]&&!o.controllerNodeIds.has(x.id)){let N=vl(x,l);g[x.id]=N,y.push(hf(x.id,N,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:[Yh(x.source)],targets:[Ih(x.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:y,edges:v},dimensionMap:g}}function EE(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 Xh=null;function cR(){return Xh||(Xh=new xE),Xh}async function qh(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}=_E(e,t,i??null,a??null,n,o),s=await cR().layout(r),c=EE(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]??vl(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 pu=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 dR(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=Ji(e,t),c={};for(let[g,b]of Object.entries(s))af(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,N,_=o?.[g];if(_)p=_.x,v=_.y,x=_.width,N=_.height;else{let A=1/0,L=1/0,P=-1/0,E=-1/0;for(let I of y){let U=i[I],Y=U.position,Z=K_(U),K=$_(U);A=Math.min(A,Y.x),L=Math.min(L,Y.y),P=Math.max(P,Y.x+Z),E=Math.max(E,Y.y+K)}let M=1+(l[g]??0)*.15,R=Math.round(lf*M),O=Math.round(rf*M),z=Math.round(uf*M);p=A-R,v=L-O,x=P-A+2*R,N=E-L+O+z}let T=a[g]||{},w=T.pipe_code||g.split(":").pop()||g,G={id:g,type:j_,data:{label:w,pipeType:T.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:w,labelText:w},position:{x:p,y:v},style:{width:x+"px",height:N+"px",padding:"0"}};f.push(G),i[g]=G;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 mu(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>pu&&!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 _=(o.containmentTree[x]||[]).slice(pu);for(let T of _)if(p.add(T),o.controllerNodeIds.has(T))for(let w of fR(T,o.containmentTree,o.controllerNodeIds))p.add(w)}let v=Ji(n,o);for(let x of e){if(!af(x.id)||p.has(x.id))continue;let N=v[x.id];if(!N||!s.has(N)&&!p.has(N))continue;let _=t.filter(T=>{if(T.source!==x.id&&T.target!==x.id)return!1;let w=T.source===x.id?T.target:T.source;return!af(w)});(_.length===0||_.every(T=>{let w=T.source===x.id?T.target:T.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=dR(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 N=p.id;p.data.onToggleCollapse=()=>l(N)}}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 hu={direction:"LR",showControllers:!1,nodesep:50,ranksep:100,edgeType:"bezier",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 ea=ae(fe(),1);function pR(e){return e.kind==="pipe"?(0,ea.jsx)("div",{style:{padding:"10px 14px",display:"flex",flexDirection:"column",gap:"2px",textAlign:"center"},children:(0,ea.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"13px",fontWeight:600,color:"var(--color-pipe-text)"},children:e.label})}):(0,ea.jsxs)("div",{style:{padding:"8px 24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"2px",textAlign:"center"},children:[(0,ea.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"12px",fontWeight:600,color:"var(--color-stuff-text)"},children:e.label}),e.concept&&(0,ea.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)"},children:e.concept})]})}function gu(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:pR(t.data.labelDescriptor)}}:t)}var di=ae(fe(),1),mR={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function hR(e){return e?mR[e]:{badge:"",icon:""}}function gR(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function yR({data:e}){let t=hR(e.pipeType),n=gR(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>pu,i=o?(e.childCount??0)-pu:0;return(0,di.jsxs)("div",{className:`controller-group-node ${n}`,children:[(0,di.jsxs)("div",{className:"controller-group-header",children:[(0,di.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,di.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,di.jsx)("span",{className:"controller-group-label",children:e.label})]}),o&&(0,di.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var NE={controllerGroup:yR};var CE=ae(Zt(),1),qe=ae(fe(),1),vR={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func"},TE={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"}},Zh=4;function bR(e){return vR[e]}function _o({data:e,children:t}){let n=bR(e.pipeType),o=TE[e.status]??TE.scheduled,i=e.status==="running",[a,l]=(0,CE.useState)(!1),r=e.inputs.length>Zh,u=r&&!a?e.inputs.slice(0,Zh):e.inputs,s=e.inputs.length-Zh,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 SR={PipeLLM:_o,PipeExtract:_o,PipeCompose:_o,PipeImgGen:_o,PipeSearch:_o,PipeFunc:_o};function wE(e){return SR[e]}var Eo=ae(fe(),1);function xR({data:e}){let t=wE(e.pipeType)??_o;return(0,Eo.jsx)(t,{data:e})}function AE({data:e,sourcePosition:t=W.Bottom,targetPosition:n=W.Top}){let o=e.pipeCardData;return o?(0,Eo.jsxs)(Eo.Fragment,{children:[(0,Eo.jsx)(Fi,{type:"target",position:n}),(0,Eo.jsx)(xR,{data:o}),(0,Eo.jsx)(Fi,{type:"source",position:t})]}):null}var Xt=ae(fe(),1),_R={...NE,pipeCard:AE};function ER({stuffData:e,graphspec:t}){let n=e.concept&&t?ch(t,e.concept):void 0;return(0,Xt.jsx)(Xt.Fragment,{children:n?(0,Xt.jsx)(Ph,{concept:n,ioData:e}):(0,Xt.jsx)(mf,{stuff:e})})}function gf(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function yf(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 ME(e){let{graphspec:t,config:n=hu,direction:o=n.direction??hu.direction??"TB",showControllers:i=n.showControllers??hu.showControllers??!1,onNavigateToPipe:a,onStuffNodeClick:l,onReactFlowInit:r,statusMap:u,onNodeSelect:s,onPaneClick:c}=e,d=Ae.default.useRef(null),[f,m]=Ae.default.useState(null),[g,b]=Ae.default.useState(null);Ae.default.useEffect(()=>{m(null),b(null)},[t]),Ae.default.useEffect(()=>{let k=d.current;if(!k)return;let X=n.paletteColors??hu.paletteColors;if(X){for(let[Q,te]of Object.entries(X))k.style.setProperty(Q,te);return()=>{for(let Q of Object.keys(X))k.style.removeProperty(Q)}}},[n.paletteColors]);let[S,h,y]=P_([]),[p,v,x]=I_([]),N=Ae.default.useRef(null),_=Ae.default.useRef(null),T=Ae.default.useRef(null),[w,G]=Ae.default.useState(new Set),A=Ae.default.useCallback(k=>{G(X=>{let Q=new Set(X);return Q.has(k)?Q.delete(k):Q.add(k),Q})},[]),L=n.edgeType||"bezier",P=Ae.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),E=Ae.default.useRef(i);E.current=i;let D=Ae.default.useRef(o);D.current=o;let M=Ae.default.useRef(P);M.current=P;let R=Ae.default.useRef(n.initialZoom);R.current=n.initialZoom;let O=Ae.default.useRef(n.panToTop);O.current=n.panToTop;let z=Ae.default.useRef(w);z.current=w;let I=Ae.default.useRef(A);I.current=A;let U=Ae.default.useRef(u);U.current=u,Ae.default.useEffect(()=>{if(!_.current)return;let k=!1;return(async()=>{try{let X=_.current;if(!X)return;let Q=await qh(X.nodes,X.edges,o,P,X._graphspec,X._analysis);if(k)return;T.current={nodes:Q.nodes,edges:Q.edges,controllerPositions:Q.controllerPositions};let te=mu(gf(Q.nodes),Q.edges,X._graphspec,X._analysis,E.current,z.current,I.current,Q.controllerPositions);h(yf(fu(gu(te.nodes)),U.current)),v(du(te.edges)),setTimeout(()=>{!k&&N.current&&N.current.fitView({padding:.1})},50)}catch(X){console.error("[GraphViewer] ELK layout failed:",X)}})(),()=>{k=!0}},[o,P]),Ae.default.useEffect(()=>{if(!T.current||!_.current)return;let k=gf(T.current.nodes),X=T.current.edges,Q=mu(k,X,_.current._graphspec,_.current._analysis,i,w,A,T.current.controllerPositions);h(yf(fu(gu(Q.nodes)),U.current)),v(du(Q.edges))},[i,w,A]),Ae.default.useEffect(()=>{if(!t){_.current=null,T.current=null,h([]),v([]);return}let k=!1;G(new Set);let{graphData:X,analysis:Q}=SE(t,L);return _.current={nodes:X.nodes,edges:X.edges,_analysis:Q,_graphspec:t},(async()=>{try{let te=D.current,J=M.current,ce=X.nodes.some(he=>!he.position||he.position.x===0&&he.position.y===0)?await qh(X.nodes,X.edges,te,J,t,Q):{...X,controllerPositions:{}};if(k)return;T.current={nodes:ce.nodes,edges:ce.edges,controllerPositions:ce.controllerPositions};let ve=mu(gf(ce.nodes),ce.edges,t,Q,E.current,z.current,I.current,ce.controllerPositions);h(yf(fu(gu(ve.nodes)),U.current)),v(du(ve.edges)),setTimeout(()=>{if(!k&&N.current&&(N.current.fitView({padding:.1}),R.current!==void 0&&R.current!==null&&N.current.zoomTo(R.current),O.current)){let he=N.current.getViewport();N.current.setViewport({x:he.x,y:20,zoom:he.zoom})}},100)}catch(te){console.error("[GraphViewer] ELK layout failed:",te)}})(),()=>{k=!0}},[t,L]),Ae.default.useEffect(()=>{if(!T.current||!_.current)return;let k=gf(T.current.nodes),X=T.current.edges,Q=mu(k,X,_.current._graphspec,_.current._analysis,E.current,z.current,I.current,T.current.controllerPositions);h(yf(fu(gu(Q.nodes)),u)),v(du(Q.edges))},[u]);let Y=Ae.default.useCallback((k,X)=>{let Q=X.data;if(s?.(X.id,Q,k),Q.isController||Q.isPipe){let te=Q.pipeCode||Q.labelText;te&&a&&a(te,Q.pipeCardData?.status)}else if(Q.isStuff&&l&&t){let te=sh(X.id),J=fh(t,te);J&&l(J)}if(b(null),f?.nodeId===X.id&&!g)m(null);else if(Q.isPipe||Q.isController)m({kind:"pipe",nodeId:X.id,nodeData:Q});else if(Q.isStuff&&t){let te=sh(X.id),J=fh(t,te);m({kind:"stuff",nodeId:X.id,nodeData:Q,stuffData:J??void 0})}h(te=>te.map(J=>({...J,selected:J.id===X.id})))},[h,a,s,l,t,f,g]),Z=Ae.default.useCallback(k=>{N.current=k,r&&r(k)},[r]),K=Ae.default.useCallback(()=>{m(null),b(null),c?.()},[c]),j=Ae.default.useCallback(k=>{if(!t)return;let X=ch(t,k);X&&b(X)},[t]),le=f?.kind==="pipe"&&t?t.nodes.find(k=>k.pipe_code===f.nodeData.pipeCode):void 0,ee=f!==null||g!==null;return(0,Xt.jsxs)("div",{ref:d,className:"react-flow-container",children:[(0,Xt.jsx)(V_,{nodes:S,edges:p,nodeTypes:_R,onNodesChange:y,onEdgesChange:x,onNodeClick:Y,onPaneClick:K,onInit:Z,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:L},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},children:(0,Xt.jsx)(X_,{variant:Yn.Dots,gap:20,size:1,color:"var(--color-bg-dots)"})}),(0,Xt.jsx)(gE,{isOpen:ee,onClose:K,children:g?(0,Xt.jsx)(Ph,{concept:g}):le&&t?(0,Xt.jsx)(bE,{node:le,spec:t,onConceptClick:j}):f?.stuffData?(0,Xt.jsx)(ER,{stuffData:f.stuffData,graphspec:t}):null})]})}var LE=null,BE={},ta="LR",yu=!1,vf=null,pi=null;function DE(e){let t=document.getElementById(e);if(!t?.textContent)return null;try{return JSON.parse(t.textContent)}catch{return null}}function OE(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 NR(e){vf=e}function TR(){return Qh.default.createElement(ME,{graphspec:LE,config:BE,direction:ta,showControllers:yu,onReactFlowInit:NR})}function RE(){let e=document.getElementById("root");if(!e)return;let t=(0,zE.createRoot)(e);pi=()=>{t.render(Qh.default.createElement(TR))},pi(),setTimeout(()=>{let n=DE("pipelex-config")||{};if(LE=DE("pipelex-graphspec"),ta=n.direction||"LR",yu=n.showControllers||!1,BE={direction:ta,showControllers:yu,nodesep:n.nodesep,ranksep:n.ranksep,edgeType:n.edgeType,initialZoom:n.initialZoom,panToTop:n.panToTop,paletteColors:n.paletteColors},OE(ta),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=yu),pi&&pi()},0),document.getElementById("direction-toggle")?.addEventListener("click",()=>{ta=ta==="LR"?"TB":"LR",OE(ta),pi&&pi()}),document.getElementById("controllers-toggle")?.addEventListener("change",n=>{yu=n.target.checked,pi&&pi()}),document.getElementById("zoom-in")?.addEventListener("click",()=>vf?.zoomIn()),document.getElementById("zoom-out")?.addEventListener("click",()=>vf?.zoomOut()),document.getElementById("zoom-fit")?.addEventListener("click",()=>vf?.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",RE):RE();})();
+`)),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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}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: