diff --git a/.github/workflows/redhat-certify.yml b/.github/workflows/redhat-certify.yml index c22136042..2b5b1a09d 100644 --- a/.github/workflows/redhat-certify.yml +++ b/.github/workflows/redhat-certify.yml @@ -4,9 +4,9 @@ on: workflow_dispatch: inputs: version: - description: "EDDI version (e.g. 6.1.0)" + description: "EDDI version (e.g. 6.1.1)" required: true - default: "6.1.0" + default: "6.1.1" release: description: "Release number (e.g. 1, 2, 3)" required: true diff --git a/docs/changelog.md b/docs/changelog.md index 7f74da30b..1088b9c08 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -4,6 +4,64 @@ --- +## Swagger UI Overhaul, Manager Update & Version 6.1.1 (2026-06-23) + +**Repo:** EDDI (`feat/swagger-ui-overhaul`) +**What changed:** Complete overhaul of Swagger UI, version bump to 6.1.1, Manager frontend asset update, and Docker base image bump. + +### Tag Taxonomy (40 tags, 9 categories) + +All `@Tag` annotations updated from flat names to category-based hierarchy (`Category / Subcategory`) for logical grouping in Swagger UI. The `@OpenAPIDefinition` tag array in `OpenApiConfig.java` defines the canonical taxonomy. + +- **Agents**: Setup, Agents, Administration, Agent Groups +- **Configuration**: Workflows, LLM, Behavior Rules, Dictionary, Output, API Calls, MCP Calls, Properties, Prompt Snippets, Global Variables +- **Conversations**: Conversations, Group Conversations, Conversation Store, Attachments +- **Integrations**: A2A Protocol, Capability Registry, Channel Integrations, Slack Webhook +- **Knowledge & Memory**: RAG Knowledge Bases, RAG Ingestion, User Memory +- **Security**: Authentication, Secrets Vault, Audit Trail, GDPR / Privacy, Tenant Quotas +- **Administration**: Backup, Schedules, Coordinator Admin, Orphan Admin, Log Admin, Descriptors +- **Tools**: Tool History, Template Preview, Standalone NLP +- **UI**: Chat UI + +All 49 REST interface `@Tag` annotations now include `description` attributes (SmallRye was silently dropping `@OpenAPIDefinition` descriptions when interface-level `@Tag` lacked one). + +4 previously untagged endpoints received new `@Tag` annotations: +- `ILogoutEndpoint` → `Security / Authentication` +- `RestSlackWebhook` → `Integrations / Slack Webhook` +- `RestToolHistory` → `Tools / Tool History` (+ added missing `@ApplicationScoped`) +- `RestA2AEndpoint` → `Integrations / A2A Protocol` (capability endpoints tagged `Integrations / Capability Registry`) + +### OpenApiTagSortFilter (new) + +New `OASFilter` implementation (`OpenApiTagSortFilter.java`) sorts tags alphabetically at build time, producing stable ordering. Fixed `UnsupportedOperationException` caused by sorting SmallRye's unmodifiable tag list. Swagger UI config: `quarkus.swagger-ui.tags-sorter=alpha`, `quarkus.swagger-ui.theme=original`. + +### Swagger UI Light/Dark Mode + +Complete rewrite of `META-INF/branding/style.css` with proper dual-theme support: +- **Light mode** (default): white backgrounds, dark text, amber-600 (`#d97706`) accents +- **Dark mode** (lamp toggle → `html.dark-mode`): EDDI Manager palette — zinc-950 bg, zinc-900 surfaces, amber-500 accents +- Topbar stays dark (`#18181b`) in both modes for brand consistency with logo +- EDDI amber accents on Authorize, Execute, Explore, and Try-it-out buttons +- Version badge `6.1.1` with WCAG AAA contrast; OAS 3.1 badge demoted to subtle gray +- HTTP verb tinted operation blocks (blue GET, green POST, amber PUT, red DELETE, purple PATCH) +- Logo renamed `eddi-logo.png` → `logo.png` (Quarkus auto-detection convention) + +### Version Bump → 6.1.1 + +Updated across: `pom.xml`, `application.properties` (×3 fields), `OpenApiConfig.java`, `Dockerfile`, `Chart.yaml`, `eddi-deployment.yaml`, `quickstart.yaml`, `redhat-certify.yml`. + +### Docker Base Image + +Bumped Red Hat UBI9 OpenJDK 25 runtime digest (`sha256:0f4e04...` → `sha256:2aed9f...`). + +### Manager Frontend + +Updated `manage.html` asset references to latest EDDI-Manager build. Removed old bundle artifacts (~4,000 lines of obsolete JS/CSS). + +**Files changed:** 100 files, +1,107 / −4,041 lines + +--- + ## 📦 Safe Dependency Bumps (2026-06-19) **Repo:** EDDI (`chore/bump-safe-deps`) diff --git a/helm/eddi/Chart.yaml b/helm/eddi/Chart.yaml index 2f50262cf..182468d83 100644 --- a/helm/eddi/Chart.yaml +++ b/helm/eddi/Chart.yaml @@ -6,7 +6,7 @@ description: >- and integrate with LLM providers via a unified REST API. type: application version: 1.0.0 -appVersion: "6.1.0" +appVersion: "6.1.1" home: https://eddi.labs.ai sources: - https://github.com/labsai/EDDI diff --git a/k8s/base/eddi-deployment.yaml b/k8s/base/eddi-deployment.yaml index 5bf674626..b78d94ee2 100644 --- a/k8s/base/eddi-deployment.yaml +++ b/k8s/base/eddi-deployment.yaml @@ -5,7 +5,7 @@ metadata: name: eddi labels: app.kubernetes.io/name: eddi - app.kubernetes.io/version: "6.1.0" + app.kubernetes.io/version: "6.1.1" app.kubernetes.io/component: server app.kubernetes.io/part-of: eddi spec: @@ -23,7 +23,7 @@ spec: metadata: labels: app.kubernetes.io/name: eddi - app.kubernetes.io/version: "6.1.0" + app.kubernetes.io/version: "6.1.1" app.kubernetes.io/component: server app.kubernetes.io/part-of: eddi annotations: diff --git a/k8s/quickstart.yaml b/k8s/quickstart.yaml index 4bf5d554d..19e663b86 100644 --- a/k8s/quickstart.yaml +++ b/k8s/quickstart.yaml @@ -169,7 +169,7 @@ metadata: namespace: eddi labels: app.kubernetes.io/name: eddi - app.kubernetes.io/version: "6.1.0" + app.kubernetes.io/version: "6.1.1" app.kubernetes.io/component: server app.kubernetes.io/part-of: eddi spec: @@ -187,7 +187,7 @@ spec: metadata: labels: app.kubernetes.io/name: eddi - app.kubernetes.io/version: "6.1.0" + app.kubernetes.io/version: "6.1.1" app.kubernetes.io/component: server app.kubernetes.io/part-of: eddi annotations: diff --git a/pom.xml b/pom.xml index 48354bb06..3bb31d4f7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 ai.labs eddi - 6.1.0 + 6.1.1 3.15.0 25 diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index 168d31066..4dd67c4ee 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -78,10 +78,10 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi9/openjdk-25-runtime:1.24@sha256:0f4e0418d97fdf5d825b26660f6609ca6760f98ba92a5a31f2208c89270a19d5 +FROM registry.access.redhat.com/ubi9/openjdk-25-runtime:1.24@sha256:2aed9f3a5fac4def355ac36d5c59c7a3067857da424adaa9c6929ff71310467e ### Red Hat Container Certification — required labels -ARG EDDI_VERSION=6.1.0 +ARG EDDI_VERSION=6.1.1 ARG EDDI_RELEASE=1 LABEL name="labsai/eddi" \ diff --git a/src/main/java/ai/labs/eddi/backup/IRestExportService.java b/src/main/java/ai/labs/eddi/backup/IRestExportService.java index 133334013..23d697573 100644 --- a/src/main/java/ai/labs/eddi/backup/IRestExportService.java +++ b/src/main/java/ai/labs/eddi/backup/IRestExportService.java @@ -17,7 +17,7 @@ * @author ginccc */ @Path("/backup/export") -@Tag(name = "Backup") +@Tag(name = "Operations / Backup", description = "Import and export agents as zip files") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestExportService { @GET diff --git a/src/main/java/ai/labs/eddi/backup/IRestImportService.java b/src/main/java/ai/labs/eddi/backup/IRestImportService.java index 153a44e51..2d0b0dffc 100644 --- a/src/main/java/ai/labs/eddi/backup/IRestImportService.java +++ b/src/main/java/ai/labs/eddi/backup/IRestImportService.java @@ -23,7 +23,7 @@ * @author ginccc */ @Path("backup/import") -@Tag(name = "Backup") +@Tag(name = "Operations / Backup", description = "Import and export agents as zip files") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestImportService { @POST diff --git a/src/main/java/ai/labs/eddi/configs/OpenApiConfig.java b/src/main/java/ai/labs/eddi/configs/OpenApiConfig.java index d4f95e081..295c45782 100644 --- a/src/main/java/ai/labs/eddi/configs/OpenApiConfig.java +++ b/src/main/java/ai/labs/eddi/configs/OpenApiConfig.java @@ -19,32 +19,55 @@ * * @since 6.0.0 */ -@OpenAPIDefinition(info = @Info(title = "EDDI API", version = "6.0.0"), tags = { - @Tag(name = "Agent Setup", description = "One-command agent creation and deployment"), - @Tag(name = "Conversations", description = "Start, talk to, stream, undo/redo, and manage conversations"), - @Tag(name = "Group Conversations", description = "Multi-agent group discussion orchestration"), - @Tag(name = "Conversation Store", description = "Query, delete, and manage conversation history"), +@OpenAPIDefinition(info = @Info(title = "EDDI API", version = "6.1.1"), tags = { + // ── Agents ─────────────────────────────────────────────────────── @Tag(name = "Agents", description = "Agent configuration CRUD"), - @Tag(name = "Agent Administration", description = "Deploy, undeploy, trigger, and monitor agents"), - @Tag(name = "Workflows", description = "Workflow pipeline configuration and available steps"), - @Tag(name = "LLM Configuration", description = "LLM provider and model settings"), - @Tag(name = "Behavior Rules", description = "Behavior rule evaluation configuration"), - @Tag(name = "Dictionary", description = "Dictionary, expressions, and actions for NLP"), - @Tag(name = "Output", description = "Output template configuration and action keys"), - @Tag(name = "API Calls", description = "HTTP API call definitions for tool use"), - @Tag(name = "Properties", description = "User property storage and setter configuration"), - @Tag(name = "Agent Groups", description = "Agent group configuration for multi-agent debates"), - @Tag(name = "Backup", description = "Import and export agents as zip files"), - @Tag(name = "Schedules", description = "Scheduled agent triggers (heartbeat, cron)"), - @Tag(name = "Secrets Vault", description = "Encrypted secret storage and management"), - @Tag(name = "Tenant Quotas", description = "Per-tenant rate limits and usage metering"), - @Tag(name = "Audit Trail", description = "Immutable audit ledger queries"), - @Tag(name = "GDPR / Privacy", description = "User data erasure and export for GDPR/CCPA compliance"), - @Tag(name = "Coordinator Admin", description = "Conversation coordinator monitoring and dead letters"), - @Tag(name = "Orphan Admin", description = "Detect and clean up orphaned resources"), - @Tag(name = "Log Admin", description = "Real-time log streaming and historical queries"), - @Tag(name = "Descriptors", description = "Cross-resource document descriptor management"), - @Tag(name = "Standalone NLP", description = "Standalone semantic parser"), - @Tag(name = "Chat UI", description = "Embedded responsive chat window")}) + @Tag(name = "Agents / Administration", description = "Deploy, undeploy, trigger, and monitor agents"), + @Tag(name = "Agents / Groups", description = "Agent group configuration for multi-agent debates"), + @Tag(name = "Agents / Setup", description = "One-command agent creation and deployment"), + // ── Configuration ─────────────────────────────────────────────── + @Tag(name = "Configuration / API Calls", description = "HTTP API call definitions for tool use"), + @Tag(name = "Configuration / Behavior Rules", description = "Behavior rule evaluation configuration"), + @Tag(name = "Configuration / Dictionary", description = "Dictionary, expressions, and actions for NLP"), + @Tag(name = "Configuration / Global Variables", description = "Deployment-wide configuration variables"), + @Tag(name = "Configuration / LLM", description = "LLM provider and model settings"), + @Tag(name = "Configuration / MCP Calls", description = "MCP server call definitions for tool use"), + @Tag(name = "Configuration / Output", description = "Output template configuration and action keys"), + @Tag(name = "Configuration / Prompt Snippets", description = "Reusable system prompt building blocks"), + @Tag(name = "Configuration / Properties", description = "User property storage and setter configuration"), + @Tag(name = "Configuration / Workflows", description = "Workflow pipeline configuration and available steps"), + // ── Conversations ─────────────────────────────────────────────── + @Tag(name = "Conversations", description = "Start, talk to, stream, undo/redo, and manage conversations"), + @Tag(name = "Conversations / Attachments", description = "Upload and manage binary conversation attachments"), + @Tag(name = "Conversations / Groups", description = "Multi-agent group discussion orchestration"), + @Tag(name = "Conversations / Store", description = "Query, delete, and manage conversation history"), + // ── Integrations ──────────────────────────────────────────────── + @Tag(name = "Integrations / A2A Protocol", description = "Agent-to-Agent protocol endpoints"), + @Tag(name = "Integrations / Capability Registry", description = "A2A agent capability discovery"), + @Tag(name = "Integrations / Channels", description = "Channel integration configuration (Slack, Teams, etc.)"), + @Tag(name = "Integrations / Slack Webhook", description = "Slack Events API webhook receiver"), + // ── Knowledge ─────────────────────────────────────────────────── + @Tag(name = "Knowledge / RAG Ingestion", description = "RAG document ingestion and indexing"), + @Tag(name = "Knowledge / RAG Stores", description = "RAG knowledge base configuration"), + @Tag(name = "Knowledge / User Memory", description = "Persistent user memory management"), + // ── Operations ────────────────────────────────────────────────── + @Tag(name = "Operations / Backup", description = "Import and export agents as zip files"), + @Tag(name = "Operations / Coordinator", description = "Conversation coordinator monitoring and dead letters"), + @Tag(name = "Operations / Descriptors", description = "Cross-resource document descriptor management"), + @Tag(name = "Operations / Logs", description = "Real-time log streaming and historical queries"), + @Tag(name = "Operations / Orphans", description = "Detect and clean up orphaned resources"), + @Tag(name = "Operations / Schedules", description = "Scheduled agent triggers (heartbeat, cron)"), + // ── Security ──────────────────────────────────────────────────── + @Tag(name = "Security / Audit Trail", description = "Immutable audit ledger queries"), + @Tag(name = "Security / Authentication", description = "Authentication status and session management"), + @Tag(name = "Security / GDPR / Privacy", description = "User data erasure and export for GDPR/CCPA compliance"), + @Tag(name = "Security / Secrets Vault", description = "Encrypted secret storage and management"), + @Tag(name = "Security / Tenant Quotas", description = "Per-tenant rate limits and usage metering"), + // ── Tools ─────────────────────────────────────────────────────── + @Tag(name = "Tools / NLP", description = "Standalone semantic parser"), + @Tag(name = "Tools / Template Preview", description = "Preview resolved system prompts with sample data"), + @Tag(name = "Tools / Tool History", description = "Tool execution history, cache, rate limits, and cost tracking"), + // ── UI ────────────────────────────────────────────────────────── + @Tag(name = "UI / Chat", description = "Embedded responsive chat window")}) public class OpenApiConfig { } diff --git a/src/main/java/ai/labs/eddi/configs/OpenApiTagSortFilter.java b/src/main/java/ai/labs/eddi/configs/OpenApiTagSortFilter.java new file mode 100644 index 000000000..fe15d9620 --- /dev/null +++ b/src/main/java/ai/labs/eddi/configs/OpenApiTagSortFilter.java @@ -0,0 +1,31 @@ +/* + * Copyright EDDI contributors + * SPDX-License-Identifier: Apache-2.0 + */ +package ai.labs.eddi.configs; + +import io.quarkus.smallrye.openapi.OpenApiFilter; +import org.eclipse.microprofile.openapi.OASFilter; +import org.eclipse.microprofile.openapi.models.OpenAPI; + +import java.util.Comparator; + +/** + * Sorts OpenAPI tags alphabetically at build time, producing a stable, + * logically grouped order in Swagger UI and all API consumers. + * + * @since 6.1.1 + */ +@OpenApiFilter(OpenApiFilter.RunStage.BUILD) +public class OpenApiTagSortFilter implements OASFilter { + + @Override + public void filterOpenAPI(OpenAPI openAPI) { + if (openAPI.getTags() != null) { + var sorted = new java.util.ArrayList<>(openAPI.getTags()); + sorted.sort(Comparator.comparing( + org.eclipse.microprofile.openapi.models.tags.Tag::getName)); + openAPI.setTags(sorted); + } + } +} diff --git a/src/main/java/ai/labs/eddi/configs/admin/IRestOrphanAdmin.java b/src/main/java/ai/labs/eddi/configs/admin/IRestOrphanAdmin.java index 665a5c3c3..b9519e8f0 100644 --- a/src/main/java/ai/labs/eddi/configs/admin/IRestOrphanAdmin.java +++ b/src/main/java/ai/labs/eddi/configs/admin/IRestOrphanAdmin.java @@ -26,7 +26,7 @@ * @since 6.0.0 */ @Path("/administration/orphans") -@Tag(name = "Orphan Admin") +@Tag(name = "Operations / Orphans", description = "Detect and clean up orphaned resources") @RolesAllowed("eddi-admin") public interface IRestOrphanAdmin { diff --git a/src/main/java/ai/labs/eddi/configs/agents/IRestAgentStore.java b/src/main/java/ai/labs/eddi/configs/agents/IRestAgentStore.java index 70db9833d..67d9b9f00 100644 --- a/src/main/java/ai/labs/eddi/configs/agents/IRestAgentStore.java +++ b/src/main/java/ai/labs/eddi/configs/agents/IRestAgentStore.java @@ -23,7 +23,7 @@ * @author ginccc */ @Path("/agentstore/agents") -@Tag(name = "Agents") +@Tag(name = "Agents", description = "Agent configuration CRUD") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestAgentStore extends IRestVersionInfo { String resourceURI = "eddi://ai.labs.agent/agentstore/agents/"; diff --git a/src/main/java/ai/labs/eddi/configs/agents/IRestCapabilityRegistry.java b/src/main/java/ai/labs/eddi/configs/agents/IRestCapabilityRegistry.java index 50c5038b7..9cec5238f 100644 --- a/src/main/java/ai/labs/eddi/configs/agents/IRestCapabilityRegistry.java +++ b/src/main/java/ai/labs/eddi/configs/agents/IRestCapabilityRegistry.java @@ -21,7 +21,7 @@ * @since 6.0.0 */ @Path("/capabilities") -@Tag(name = "06. Capability Registry", description = "A2A agent capability discovery") +@Tag(name = "Integrations / Capability Registry", description = "A2A agent capability discovery") public interface IRestCapabilityRegistry { @GET diff --git a/src/main/java/ai/labs/eddi/configs/apicalls/IRestApiCallsStore.java b/src/main/java/ai/labs/eddi/configs/apicalls/IRestApiCallsStore.java index ad6db555d..253217011 100644 --- a/src/main/java/ai/labs/eddi/configs/apicalls/IRestApiCallsStore.java +++ b/src/main/java/ai/labs/eddi/configs/apicalls/IRestApiCallsStore.java @@ -22,7 +22,7 @@ * @author ginccc */ @Path("/apicallstore/apicalls") -@Tag(name = "API Calls") +@Tag(name = "Configuration / API Calls", description = "HTTP API call definitions for tool use") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestApiCallsStore extends IRestVersionInfo { String resourceBaseType = "eddi://ai.labs.apicalls"; diff --git a/src/main/java/ai/labs/eddi/configs/channels/IRestChannelIntegrationStore.java b/src/main/java/ai/labs/eddi/configs/channels/IRestChannelIntegrationStore.java index 4d8471f5b..05e8e6fb4 100644 --- a/src/main/java/ai/labs/eddi/configs/channels/IRestChannelIntegrationStore.java +++ b/src/main/java/ai/labs/eddi/configs/channels/IRestChannelIntegrationStore.java @@ -26,7 +26,7 @@ * @since 6.1.0 */ @Path("/channelstore/channels") -@Tag(name = "Channel Integrations") +@Tag(name = "Integrations / Channels", description = "Channel integration configuration (Slack, Teams, etc.)") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestChannelIntegrationStore extends IRestVersionInfo { String resourceBaseType = "eddi://ai.labs.channel"; diff --git a/src/main/java/ai/labs/eddi/configs/deployment/IRestDeploymentStore.java b/src/main/java/ai/labs/eddi/configs/deployment/IRestDeploymentStore.java index 21d0f18fb..6e196db9e 100644 --- a/src/main/java/ai/labs/eddi/configs/deployment/IRestDeploymentStore.java +++ b/src/main/java/ai/labs/eddi/configs/deployment/IRestDeploymentStore.java @@ -19,7 +19,7 @@ * @author ginccc */ @Path("/deploymentstore/deployments") -@Tag(name = "Agent Administration") +@Tag(name = "Agents / Administration", description = "Deploy, undeploy, trigger, and monitor agents") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestDeploymentStore { @GET diff --git a/src/main/java/ai/labs/eddi/configs/descriptors/IRestDocumentDescriptorStore.java b/src/main/java/ai/labs/eddi/configs/descriptors/IRestDocumentDescriptorStore.java index 69e2debe4..7d3d7c757 100644 --- a/src/main/java/ai/labs/eddi/configs/descriptors/IRestDocumentDescriptorStore.java +++ b/src/main/java/ai/labs/eddi/configs/descriptors/IRestDocumentDescriptorStore.java @@ -20,7 +20,7 @@ * @author ginccc */ @Path("/descriptorstore/descriptors") -@Tag(name = "Descriptors") +@Tag(name = "Operations / Descriptors", description = "Cross-resource document descriptor management") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestDocumentDescriptorStore { String DESCRIPTOR_STORE_PATH = "/descriptorstore/descriptors/"; diff --git a/src/main/java/ai/labs/eddi/configs/dictionary/IRestAction.java b/src/main/java/ai/labs/eddi/configs/dictionary/IRestAction.java index 3a5eddd5a..f332eeaa4 100644 --- a/src/main/java/ai/labs/eddi/configs/dictionary/IRestAction.java +++ b/src/main/java/ai/labs/eddi/configs/dictionary/IRestAction.java @@ -15,7 +15,7 @@ * @author ginccc */ @Path("/actions") -@Tag(name = "Dictionary") +@Tag(name = "Configuration / Dictionary", description = "Dictionary, expressions, and actions for NLP") public interface IRestAction { @GET @Produces(MediaType.APPLICATION_JSON) diff --git a/src/main/java/ai/labs/eddi/configs/dictionary/IRestDictionaryStore.java b/src/main/java/ai/labs/eddi/configs/dictionary/IRestDictionaryStore.java index 77b64be5c..96827feec 100644 --- a/src/main/java/ai/labs/eddi/configs/dictionary/IRestDictionaryStore.java +++ b/src/main/java/ai/labs/eddi/configs/dictionary/IRestDictionaryStore.java @@ -23,7 +23,7 @@ * @author ginccc */ @Path("/dictionarystore/dictionaries") -@Tag(name = "Dictionary") +@Tag(name = "Configuration / Dictionary", description = "Dictionary, expressions, and actions for NLP") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestDictionaryStore extends IRestVersionInfo { String resourceURI = "eddi://ai.labs.dictionary/dictionarystore/dictionaries/"; diff --git a/src/main/java/ai/labs/eddi/configs/dictionary/IRestExpression.java b/src/main/java/ai/labs/eddi/configs/dictionary/IRestExpression.java index 4a8138545..fd4ed5f44 100644 --- a/src/main/java/ai/labs/eddi/configs/dictionary/IRestExpression.java +++ b/src/main/java/ai/labs/eddi/configs/dictionary/IRestExpression.java @@ -15,7 +15,7 @@ * @author ginccc */ @Path("/expressions") -@Tag(name = "Dictionary") +@Tag(name = "Configuration / Dictionary", description = "Dictionary, expressions, and actions for NLP") public interface IRestExpression { @GET @Produces(MediaType.APPLICATION_JSON) diff --git a/src/main/java/ai/labs/eddi/configs/groups/IRestAgentGroupStore.java b/src/main/java/ai/labs/eddi/configs/groups/IRestAgentGroupStore.java index aaf605d3d..eeed6a692 100644 --- a/src/main/java/ai/labs/eddi/configs/groups/IRestAgentGroupStore.java +++ b/src/main/java/ai/labs/eddi/configs/groups/IRestAgentGroupStore.java @@ -24,7 +24,7 @@ * @author ginccc */ @Path("/groupstore/groups") -@Tag(name = "Agent Groups") +@Tag(name = "Agents / Groups", description = "Agent group configuration for multi-agent debates") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestAgentGroupStore extends IRestVersionInfo { String resourceBaseType = "eddi://ai.labs.group"; diff --git a/src/main/java/ai/labs/eddi/configs/llm/IRestLlmStore.java b/src/main/java/ai/labs/eddi/configs/llm/IRestLlmStore.java index 114a8e8d4..b64308165 100644 --- a/src/main/java/ai/labs/eddi/configs/llm/IRestLlmStore.java +++ b/src/main/java/ai/labs/eddi/configs/llm/IRestLlmStore.java @@ -22,7 +22,7 @@ * @author ginccc */ @Path("/llmstore/llms") -@Tag(name = "LLM Configuration") +@Tag(name = "Configuration / LLM", description = "LLM provider and model settings") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestLlmStore extends IRestVersionInfo { String resourceBaseType = "eddi://ai.labs.llm"; diff --git a/src/main/java/ai/labs/eddi/configs/mcpcalls/IRestMcpCallsStore.java b/src/main/java/ai/labs/eddi/configs/mcpcalls/IRestMcpCallsStore.java index baf9a14ce..6d44e95bd 100644 --- a/src/main/java/ai/labs/eddi/configs/mcpcalls/IRestMcpCallsStore.java +++ b/src/main/java/ai/labs/eddi/configs/mcpcalls/IRestMcpCallsStore.java @@ -22,7 +22,7 @@ * JAX-RS interface for MCP Calls configuration store. */ @Path("/mcpcallsstore/mcpcalls") -@Tag(name = "MCP Calls") +@Tag(name = "Configuration / MCP Calls", description = "MCP server call definitions for tool use") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestMcpCallsStore extends IRestVersionInfo { String resourceBaseType = "eddi://ai.labs.mcpcalls"; diff --git a/src/main/java/ai/labs/eddi/configs/output/IRestOutputStore.java b/src/main/java/ai/labs/eddi/configs/output/IRestOutputStore.java index 7e7b8d65a..254e1b988 100644 --- a/src/main/java/ai/labs/eddi/configs/output/IRestOutputStore.java +++ b/src/main/java/ai/labs/eddi/configs/output/IRestOutputStore.java @@ -23,7 +23,7 @@ * @author ginccc */ @Path("/outputstore/outputsets") -@Tag(name = "Output") +@Tag(name = "Configuration / Output", description = "Output template configuration and action keys") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestOutputStore extends IRestVersionInfo { String resourceBaseType = "eddi://ai.labs.output"; diff --git a/src/main/java/ai/labs/eddi/configs/output/keys/IRestOutputActions.java b/src/main/java/ai/labs/eddi/configs/output/keys/IRestOutputActions.java index f49cb9222..0d4ceed4e 100644 --- a/src/main/java/ai/labs/eddi/configs/output/keys/IRestOutputActions.java +++ b/src/main/java/ai/labs/eddi/configs/output/keys/IRestOutputActions.java @@ -14,7 +14,7 @@ * @author ginccc */ @Path("/outputstore/actions") -@Tag(name = "Output") +@Tag(name = "Configuration / Output", description = "Output template configuration and action keys") public interface IRestOutputActions { @GET @Produces(MediaType.APPLICATION_JSON) diff --git a/src/main/java/ai/labs/eddi/configs/parser/IRestParserStore.java b/src/main/java/ai/labs/eddi/configs/parser/IRestParserStore.java index 613c42e59..d3bed3d3f 100644 --- a/src/main/java/ai/labs/eddi/configs/parser/IRestParserStore.java +++ b/src/main/java/ai/labs/eddi/configs/parser/IRestParserStore.java @@ -18,7 +18,7 @@ import java.util.List; @Path("/parserstore/parsers") -@Tag(name = "Standalone NLP") +@Tag(name = "Tools / NLP", description = "Standalone semantic parser") public interface IRestParserStore extends IRestVersionInfo { String resourceURI = "eddi://ai.labs.parser/parserstore/parsers/"; diff --git a/src/main/java/ai/labs/eddi/configs/properties/IRestPropertiesStore.java b/src/main/java/ai/labs/eddi/configs/properties/IRestPropertiesStore.java index 4d746a8dc..b05d1a002 100644 --- a/src/main/java/ai/labs/eddi/configs/properties/IRestPropertiesStore.java +++ b/src/main/java/ai/labs/eddi/configs/properties/IRestPropertiesStore.java @@ -13,7 +13,7 @@ import jakarta.ws.rs.core.Response; @Path("/propertiesstore/properties") -@Tag(name = "Properties") +@Tag(name = "Configuration / Properties", description = "User property storage and setter configuration") public interface IRestPropertiesStore { String resourceURI = "eddi://ai.labs.properties/propertiesstore/properties/"; diff --git a/src/main/java/ai/labs/eddi/configs/properties/IRestUserMemoryStore.java b/src/main/java/ai/labs/eddi/configs/properties/IRestUserMemoryStore.java index b68217924..cab01cd2c 100644 --- a/src/main/java/ai/labs/eddi/configs/properties/IRestUserMemoryStore.java +++ b/src/main/java/ai/labs/eddi/configs/properties/IRestUserMemoryStore.java @@ -22,7 +22,7 @@ * @since 6.0.0 */ @Path("/usermemorystore/memories") -@Tag(name = "User Memory", description = "Persistent user memory management") +@Tag(name = "Knowledge / User Memory", description = "Persistent user memory management") @RolesAllowed({"eddi-admin", "eddi-user"}) public interface IRestUserMemoryStore { diff --git a/src/main/java/ai/labs/eddi/configs/propertysetter/IRestPropertySetterStore.java b/src/main/java/ai/labs/eddi/configs/propertysetter/IRestPropertySetterStore.java index e63954fa1..5a7066195 100644 --- a/src/main/java/ai/labs/eddi/configs/propertysetter/IRestPropertySetterStore.java +++ b/src/main/java/ai/labs/eddi/configs/propertysetter/IRestPropertySetterStore.java @@ -22,7 +22,7 @@ * @author ginccc */ @Path("/propertysetterstore/propertysetters") -@Tag(name = "Properties") +@Tag(name = "Configuration / Properties", description = "User property storage and setter configuration") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestPropertySetterStore extends IRestVersionInfo { String resourceBaseType = "eddi://ai.labs.property"; diff --git a/src/main/java/ai/labs/eddi/configs/rag/IRestRagIngestion.java b/src/main/java/ai/labs/eddi/configs/rag/IRestRagIngestion.java index 82c6e1b8d..3e21cc7fa 100644 --- a/src/main/java/ai/labs/eddi/configs/rag/IRestRagIngestion.java +++ b/src/main/java/ai/labs/eddi/configs/rag/IRestRagIngestion.java @@ -18,7 +18,7 @@ * JAX-RS interface for RAG document ingestion. */ @Path("/ragstore/rags") -@Tag(name = "RAG Ingestion") +@Tag(name = "Knowledge / RAG Ingestion", description = "RAG document ingestion and indexing") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestRagIngestion { diff --git a/src/main/java/ai/labs/eddi/configs/rag/IRestRagStore.java b/src/main/java/ai/labs/eddi/configs/rag/IRestRagStore.java index 32f511558..205602ca5 100644 --- a/src/main/java/ai/labs/eddi/configs/rag/IRestRagStore.java +++ b/src/main/java/ai/labs/eddi/configs/rag/IRestRagStore.java @@ -22,7 +22,7 @@ * JAX-RS interface for RAG (Knowledge Base) configuration store. */ @Path("/ragstore/rags") -@Tag(name = "RAG Knowledge Bases") +@Tag(name = "Knowledge / RAG Stores", description = "RAG knowledge base configuration") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestRagStore extends IRestVersionInfo { String resourceBaseType = "eddi://ai.labs.rag"; diff --git a/src/main/java/ai/labs/eddi/configs/rules/IRestRuleSetStore.java b/src/main/java/ai/labs/eddi/configs/rules/IRestRuleSetStore.java index b08280164..e22dd439b 100644 --- a/src/main/java/ai/labs/eddi/configs/rules/IRestRuleSetStore.java +++ b/src/main/java/ai/labs/eddi/configs/rules/IRestRuleSetStore.java @@ -22,7 +22,7 @@ * @author ginccc */ @Path("/rulestore/rulesets") -@Tag(name = "Behavior Rules") +@Tag(name = "Configuration / Behavior Rules", description = "Behavior rule evaluation configuration") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestRuleSetStore extends IRestVersionInfo { String resourceBaseType = "eddi://ai.labs.rules"; diff --git a/src/main/java/ai/labs/eddi/configs/snippets/IRestPromptSnippetStore.java b/src/main/java/ai/labs/eddi/configs/snippets/IRestPromptSnippetStore.java index a0babdbd7..898e19261 100644 --- a/src/main/java/ai/labs/eddi/configs/snippets/IRestPromptSnippetStore.java +++ b/src/main/java/ai/labs/eddi/configs/snippets/IRestPromptSnippetStore.java @@ -28,7 +28,7 @@ * @since 6.0.0 */ @Path("/snippetstore/snippets") -@Tag(name = "Prompt Snippets") +@Tag(name = "Configuration / Prompt Snippets", description = "Reusable system prompt building blocks") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestPromptSnippetStore extends IRestVersionInfo { String resourceBaseType = "eddi://ai.labs.snippet"; diff --git a/src/main/java/ai/labs/eddi/configs/variables/rest/IRestGlobalVariableStore.java b/src/main/java/ai/labs/eddi/configs/variables/rest/IRestGlobalVariableStore.java index b175fc425..9ab33ba61 100644 --- a/src/main/java/ai/labs/eddi/configs/variables/rest/IRestGlobalVariableStore.java +++ b/src/main/java/ai/labs/eddi/configs/variables/rest/IRestGlobalVariableStore.java @@ -29,7 +29,7 @@ * @since 6.0.0 */ @Path("/variablestore/variables") -@Tag(name = "Global Variables") +@Tag(name = "Configuration / Global Variables", description = "Deployment-wide configuration variables") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestGlobalVariableStore { diff --git a/src/main/java/ai/labs/eddi/configs/workflows/IRestWorkflowStepStore.java b/src/main/java/ai/labs/eddi/configs/workflows/IRestWorkflowStepStore.java index e593cdb26..5685275db 100644 --- a/src/main/java/ai/labs/eddi/configs/workflows/IRestWorkflowStepStore.java +++ b/src/main/java/ai/labs/eddi/configs/workflows/IRestWorkflowStepStore.java @@ -15,7 +15,7 @@ * @author ginccc */ @Path("/extensionstore/extensions") -@Tag(name = "Workflows") +@Tag(name = "Configuration / Workflows", description = "Workflow pipeline configuration and available steps") public interface IRestWorkflowStepStore { @GET @Produces(MediaType.APPLICATION_JSON) diff --git a/src/main/java/ai/labs/eddi/configs/workflows/IRestWorkflowStore.java b/src/main/java/ai/labs/eddi/configs/workflows/IRestWorkflowStore.java index cbf375b82..7b37e0349 100644 --- a/src/main/java/ai/labs/eddi/configs/workflows/IRestWorkflowStore.java +++ b/src/main/java/ai/labs/eddi/configs/workflows/IRestWorkflowStore.java @@ -23,7 +23,7 @@ * @author ginccc */ @Path("/workflowstore/workflows") -@Tag(name = "Workflows") +@Tag(name = "Configuration / Workflows", description = "Workflow pipeline configuration and available steps") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestWorkflowStore extends IRestVersionInfo { String resourceURI = "eddi://ai.labs.workflow/workflowstore/workflows/"; diff --git a/src/main/java/ai/labs/eddi/engine/a2a/RestA2AEndpoint.java b/src/main/java/ai/labs/eddi/engine/a2a/RestA2AEndpoint.java index e5c5d0dcb..aa002a166 100644 --- a/src/main/java/ai/labs/eddi/engine/a2a/RestA2AEndpoint.java +++ b/src/main/java/ai/labs/eddi/engine/a2a/RestA2AEndpoint.java @@ -38,6 +38,7 @@ @Path("/") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) +@Tag(name = "Integrations / A2A Protocol", description = "Agent-to-Agent protocol endpoints") @jakarta.enterprise.context.ApplicationScoped public class RestA2AEndpoint { @@ -124,7 +125,7 @@ public Response listA2AAgents() { @PermitAll @GET @Path(".well-known/capabilities") - @Tag(name = "06. Capability Registry", description = "A2A agent capability discovery") + @Tag(name = "Integrations / Capability Registry", description = "A2A agent capability discovery") @Operation(operationId = "publicSearchCapabilities", description = "Public endpoint: find agents matching a skill. Requires eddi.a2a.capabilities.public=true.") public Response searchCapabilities(@QueryParam("skill") String skill, @@ -153,7 +154,7 @@ public Response searchCapabilities(@QueryParam("skill") String skill, @PermitAll @GET @Path(".well-known/capabilities/skills") - @Tag(name = "06. Capability Registry", description = "A2A agent capability discovery") + @Tag(name = "Integrations / Capability Registry", description = "A2A agent capability discovery") @Operation(operationId = "publicListSkills", description = "Public endpoint: list all registered skill names. Requires eddi.a2a.capabilities.public=true.") public Response listCapabilitySkills() { diff --git a/src/main/java/ai/labs/eddi/engine/api/ILogoutEndpoint.java b/src/main/java/ai/labs/eddi/engine/api/ILogoutEndpoint.java index 9d83b86e0..7738166f4 100644 --- a/src/main/java/ai/labs/eddi/engine/api/ILogoutEndpoint.java +++ b/src/main/java/ai/labs/eddi/engine/api/ILogoutEndpoint.java @@ -5,6 +5,7 @@ package ai.labs.eddi.engine.api; import org.eclipse.microprofile.openapi.annotations.Operation; +import org.eclipse.microprofile.openapi.annotations.tags.Tag; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; @@ -15,6 +16,7 @@ @Path("/user") @Produces(MediaType.TEXT_PLAIN) +@Tag(name = "Security / Authentication", description = "Authentication status and session management") public interface ILogoutEndpoint { @GET @Path("/isAuthenticated") diff --git a/src/main/java/ai/labs/eddi/engine/api/IRestAgentAdministration.java b/src/main/java/ai/labs/eddi/engine/api/IRestAgentAdministration.java index eee82c702..845b16d9c 100644 --- a/src/main/java/ai/labs/eddi/engine/api/IRestAgentAdministration.java +++ b/src/main/java/ai/labs/eddi/engine/api/IRestAgentAdministration.java @@ -23,7 +23,7 @@ * REST API for agent deployment lifecycle management. */ @Path("/administration") -@Tag(name = "Agent Administration") +@Tag(name = "Agents / Administration", description = "Deploy, undeploy, trigger, and monitor agents") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestAgentAdministration { @POST diff --git a/src/main/java/ai/labs/eddi/engine/api/IRestAgentEngine.java b/src/main/java/ai/labs/eddi/engine/api/IRestAgentEngine.java index 75955b527..0900bd54a 100644 --- a/src/main/java/ai/labs/eddi/engine/api/IRestAgentEngine.java +++ b/src/main/java/ai/labs/eddi/engine/api/IRestAgentEngine.java @@ -29,7 +29,7 @@ * only conversationId. */ @Path("/agents") -@Tag(name = "Conversations") +@Tag(name = "Conversations", description = "Start, talk to, stream, undo/redo, and manage conversations") @RolesAllowed({"eddi-admin", "eddi-editor", "eddi-user"}) public interface IRestAgentEngine { diff --git a/src/main/java/ai/labs/eddi/engine/api/IRestAgentEngineStreaming.java b/src/main/java/ai/labs/eddi/engine/api/IRestAgentEngineStreaming.java index ac34ee0db..43fb40f5b 100644 --- a/src/main/java/ai/labs/eddi/engine/api/IRestAgentEngineStreaming.java +++ b/src/main/java/ai/labs/eddi/engine/api/IRestAgentEngineStreaming.java @@ -29,7 +29,7 @@ * */ @Path("/agents") -@Tag(name = "Conversations") +@Tag(name = "Conversations", description = "Start, talk to, stream, undo/redo, and manage conversations") @RolesAllowed({"eddi-admin", "eddi-editor", "eddi-user"}) public interface IRestAgentEngineStreaming { diff --git a/src/main/java/ai/labs/eddi/engine/api/IRestAgentManagement.java b/src/main/java/ai/labs/eddi/engine/api/IRestAgentManagement.java index ce01750c0..c17704fb6 100644 --- a/src/main/java/ai/labs/eddi/engine/api/IRestAgentManagement.java +++ b/src/main/java/ai/labs/eddi/engine/api/IRestAgentManagement.java @@ -23,7 +23,7 @@ * given intent/userId pair. */ @Path("/agents/managed") -@Tag(name = "Conversations") +@Tag(name = "Conversations", description = "Start, talk to, stream, undo/redo, and manage conversations") @RolesAllowed({"eddi-admin", "eddi-editor", "eddi-user"}) public interface IRestAgentManagement { diff --git a/src/main/java/ai/labs/eddi/engine/api/IRestAgentSetup.java b/src/main/java/ai/labs/eddi/engine/api/IRestAgentSetup.java index 9c3f3ae3f..360be1b02 100644 --- a/src/main/java/ai/labs/eddi/engine/api/IRestAgentSetup.java +++ b/src/main/java/ai/labs/eddi/engine/api/IRestAgentSetup.java @@ -19,7 +19,7 @@ * {@link ai.labs.eddi.engine.setup.AgentSetupService}. */ @Path("/administration/agents") -@Tag(name = "Agent Setup") +@Tag(name = "Agents / Setup", description = "One-command agent creation and deployment") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("eddi-admin") diff --git a/src/main/java/ai/labs/eddi/engine/api/IRestCoordinatorAdmin.java b/src/main/java/ai/labs/eddi/engine/api/IRestCoordinatorAdmin.java index b5d9324f7..71deb6393 100644 --- a/src/main/java/ai/labs/eddi/engine/api/IRestCoordinatorAdmin.java +++ b/src/main/java/ai/labs/eddi/engine/api/IRestCoordinatorAdmin.java @@ -25,7 +25,7 @@ * @since 6.0.0 */ @Path("/administration/coordinator") -@Tag(name = "Coordinator Admin") +@Tag(name = "Operations / Coordinator", description = "Conversation coordinator monitoring and dead letters") @RolesAllowed("eddi-admin") public interface IRestCoordinatorAdmin { diff --git a/src/main/java/ai/labs/eddi/engine/api/IRestGroupConversation.java b/src/main/java/ai/labs/eddi/engine/api/IRestGroupConversation.java index 76246b33c..045cb5f79 100644 --- a/src/main/java/ai/labs/eddi/engine/api/IRestGroupConversation.java +++ b/src/main/java/ai/labs/eddi/engine/api/IRestGroupConversation.java @@ -24,7 +24,7 @@ * production environment. */ @Path("/groups/{groupId}/conversations") -@Tag(name = "Group Conversations") +@Tag(name = "Conversations / Groups", description = "Multi-agent group discussion orchestration") @RolesAllowed({"eddi-admin", "eddi-editor", "eddi-user"}) public interface IRestGroupConversation { diff --git a/src/main/java/ai/labs/eddi/engine/api/IRestLogAdmin.java b/src/main/java/ai/labs/eddi/engine/api/IRestLogAdmin.java index f1b40c2f7..bbdac59c5 100644 --- a/src/main/java/ai/labs/eddi/engine/api/IRestLogAdmin.java +++ b/src/main/java/ai/labs/eddi/engine/api/IRestLogAdmin.java @@ -27,7 +27,7 @@ * @since 6.0.0 */ @Path("/administration/logs") -@Tag(name = "Log Admin") +@Tag(name = "Operations / Logs", description = "Real-time log streaming and historical queries") @RolesAllowed("eddi-admin") public interface IRestLogAdmin { diff --git a/src/main/java/ai/labs/eddi/engine/audit/rest/IRestAuditStore.java b/src/main/java/ai/labs/eddi/engine/audit/rest/IRestAuditStore.java index 2c3faeec1..f43064212 100644 --- a/src/main/java/ai/labs/eddi/engine/audit/rest/IRestAuditStore.java +++ b/src/main/java/ai/labs/eddi/engine/audit/rest/IRestAuditStore.java @@ -19,7 +19,7 @@ */ @Path("/auditstore") @Produces(MediaType.APPLICATION_JSON) -@Tag(name = "Audit Trail") +@Tag(name = "Security / Audit Trail", description = "Immutable audit ledger queries") @RolesAllowed("eddi-admin") public interface IRestAuditStore { diff --git a/src/main/java/ai/labs/eddi/engine/gdpr/IRestGdprAdmin.java b/src/main/java/ai/labs/eddi/engine/gdpr/IRestGdprAdmin.java index 6a1fa395a..c98ae517d 100644 --- a/src/main/java/ai/labs/eddi/engine/gdpr/IRestGdprAdmin.java +++ b/src/main/java/ai/labs/eddi/engine/gdpr/IRestGdprAdmin.java @@ -22,7 +22,7 @@ * @since 6.0.0 */ @Path("/admin/gdpr") -@Tag(name = "GDPR / Privacy") +@Tag(name = "Security / GDPR / Privacy", description = "User data erasure and export for GDPR/CCPA compliance") @Produces(MediaType.APPLICATION_JSON) @RolesAllowed("eddi-admin") public interface IRestGdprAdmin { diff --git a/src/main/java/ai/labs/eddi/engine/memory/rest/IRestConversationStore.java b/src/main/java/ai/labs/eddi/engine/memory/rest/IRestConversationStore.java index 4fdedc3cd..db223f9dd 100644 --- a/src/main/java/ai/labs/eddi/engine/memory/rest/IRestConversationStore.java +++ b/src/main/java/ai/labs/eddi/engine/memory/rest/IRestConversationStore.java @@ -23,7 +23,7 @@ * @author ginccc */ @Path("/conversationstore/conversations") -@Tag(name = "Conversation Store") +@Tag(name = "Conversations / Store", description = "Query, delete, and manage conversation history") public interface IRestConversationStore { @GET @Produces(MediaType.APPLICATION_JSON) diff --git a/src/main/java/ai/labs/eddi/engine/memory/rest/RestAttachmentUpload.java b/src/main/java/ai/labs/eddi/engine/memory/rest/RestAttachmentUpload.java index 3d269f47b..d89a05e91 100644 --- a/src/main/java/ai/labs/eddi/engine/memory/rest/RestAttachmentUpload.java +++ b/src/main/java/ai/labs/eddi/engine/memory/rest/RestAttachmentUpload.java @@ -42,7 +42,7 @@ * @since 6.0.0 */ @Path("/conversations") -@Tag(name = "Attachments") +@Tag(name = "Conversations / Attachments", description = "Upload and manage binary conversation attachments") public class RestAttachmentUpload { private static final Logger LOGGER = Logger.getLogger(RestAttachmentUpload.class); diff --git a/src/main/java/ai/labs/eddi/engine/schedule/IRestScheduleStore.java b/src/main/java/ai/labs/eddi/engine/schedule/IRestScheduleStore.java index dd81d8037..86e66eafb 100644 --- a/src/main/java/ai/labs/eddi/engine/schedule/IRestScheduleStore.java +++ b/src/main/java/ai/labs/eddi/engine/schedule/IRestScheduleStore.java @@ -26,7 +26,7 @@ * @since 6.0.0 */ @Path("/schedulestore/schedules") -@Tag(name = "Schedules") +@Tag(name = "Operations / Schedules", description = "Scheduled agent triggers (heartbeat, cron)") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestScheduleStore { diff --git a/src/main/java/ai/labs/eddi/engine/tenancy/rest/IRestTenantQuota.java b/src/main/java/ai/labs/eddi/engine/tenancy/rest/IRestTenantQuota.java index 1c0d9a46f..513b770d1 100644 --- a/src/main/java/ai/labs/eddi/engine/tenancy/rest/IRestTenantQuota.java +++ b/src/main/java/ai/labs/eddi/engine/tenancy/rest/IRestTenantQuota.java @@ -20,7 +20,7 @@ @Path("/administration/quotas") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) -@Tag(name = "Tenant Quotas") +@Tag(name = "Security / Tenant Quotas", description = "Per-tenant rate limits and usage metering") @RolesAllowed("eddi-admin") public interface IRestTenantQuota { diff --git a/src/main/java/ai/labs/eddi/engine/triggermanagement/IRestAgentTriggerStore.java b/src/main/java/ai/labs/eddi/engine/triggermanagement/IRestAgentTriggerStore.java index 5ef986521..e473a691a 100644 --- a/src/main/java/ai/labs/eddi/engine/triggermanagement/IRestAgentTriggerStore.java +++ b/src/main/java/ai/labs/eddi/engine/triggermanagement/IRestAgentTriggerStore.java @@ -15,7 +15,7 @@ import java.util.List; @Path("/AgentTriggerStore/agenttriggers") -@Tag(name = "Agent Administration") +@Tag(name = "Agents / Administration", description = "Deploy, undeploy, trigger, and monitor agents") @RolesAllowed({"eddi-admin", "eddi-editor"}) public interface IRestAgentTriggerStore { String resourceURI = "eddi://ai.labs.agentTrigger/AgentTriggerStore/agenttriggers/"; diff --git a/src/main/java/ai/labs/eddi/engine/triggermanagement/IRestUserConversationStore.java b/src/main/java/ai/labs/eddi/engine/triggermanagement/IRestUserConversationStore.java index 3fb16b5b6..13d08546f 100644 --- a/src/main/java/ai/labs/eddi/engine/triggermanagement/IRestUserConversationStore.java +++ b/src/main/java/ai/labs/eddi/engine/triggermanagement/IRestUserConversationStore.java @@ -12,7 +12,7 @@ import jakarta.ws.rs.core.Response; @Path("/userconversationstore/userconversations") -@Tag(name = "Conversation Store") +@Tag(name = "Conversations / Store", description = "Query, delete, and manage conversation history") public interface IRestUserConversationStore { String resourceURI = "eddi://ai.labs.userconversation/userconversationstore/userconversations/"; diff --git a/src/main/java/ai/labs/eddi/integrations/slack/rest/RestSlackWebhook.java b/src/main/java/ai/labs/eddi/integrations/slack/rest/RestSlackWebhook.java index f0e67ab20..876d8baf5 100644 --- a/src/main/java/ai/labs/eddi/integrations/slack/rest/RestSlackWebhook.java +++ b/src/main/java/ai/labs/eddi/integrations/slack/rest/RestSlackWebhook.java @@ -14,6 +14,7 @@ import jakarta.ws.rs.*; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; +import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.jboss.logging.Logger; import static ai.labs.eddi.utils.LogSanitizer.sanitize; @@ -43,6 +44,7 @@ @ApplicationScoped @Path("/integrations/slack") @Produces(MediaType.APPLICATION_JSON) +@Tag(name = "Integrations / Slack Webhook", description = "Slack Events API webhook receiver") public class RestSlackWebhook { private static final Logger LOGGER = Logger.getLogger(RestSlackWebhook.class); diff --git a/src/main/java/ai/labs/eddi/modules/llm/rest/RestToolHistory.java b/src/main/java/ai/labs/eddi/modules/llm/rest/RestToolHistory.java index 9f0ece5dd..fa88a9a59 100644 --- a/src/main/java/ai/labs/eddi/modules/llm/rest/RestToolHistory.java +++ b/src/main/java/ai/labs/eddi/modules/llm/rest/RestToolHistory.java @@ -14,10 +14,12 @@ import ai.labs.eddi.modules.llm.tools.ToolCacheService; import ai.labs.eddi.modules.llm.tools.ToolCostTracker; import ai.labs.eddi.modules.llm.tools.ToolRateLimiter; +import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.ws.rs.*; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; +import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.jboss.logging.Logger; import java.util.ArrayList; @@ -32,6 +34,8 @@ @Path("/llm/tools") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) +@Tag(name = "Tools / Tool History", description = "Tool execution history, cache, rate limits, and cost tracking") +@ApplicationScoped public class RestToolHistory { private static final Logger LOGGER = Logger.getLogger(RestToolHistory.class); diff --git a/src/main/java/ai/labs/eddi/modules/nlp/IRestSemanticParser.java b/src/main/java/ai/labs/eddi/modules/nlp/IRestSemanticParser.java index fe3b9cf2b..897efa2c7 100644 --- a/src/main/java/ai/labs/eddi/modules/nlp/IRestSemanticParser.java +++ b/src/main/java/ai/labs/eddi/modules/nlp/IRestSemanticParser.java @@ -18,7 +18,7 @@ * Standalone semantic parser endpoint for NLP evaluation. */ @Path("/parser") -@Tag(name = "Standalone NLP") +@Tag(name = "Tools / NLP", description = "Standalone semantic parser") public interface IRestSemanticParser { @POST diff --git a/src/main/java/ai/labs/eddi/modules/templating/rest/IRestTemplatePreview.java b/src/main/java/ai/labs/eddi/modules/templating/rest/IRestTemplatePreview.java index 674c69751..e05f2432f 100644 --- a/src/main/java/ai/labs/eddi/modules/templating/rest/IRestTemplatePreview.java +++ b/src/main/java/ai/labs/eddi/modules/templating/rest/IRestTemplatePreview.java @@ -21,7 +21,7 @@ * @since 6.0.0 */ @Path("/administration/preview") -@Tag(name = "Template Preview") +@Tag(name = "Tools / Template Preview", description = "Preview resolved system prompts with sample data") public interface IRestTemplatePreview { @POST diff --git a/src/main/java/ai/labs/eddi/secrets/rest/IRestSecretStore.java b/src/main/java/ai/labs/eddi/secrets/rest/IRestSecretStore.java index ffee3c775..e65c9c92a 100644 --- a/src/main/java/ai/labs/eddi/secrets/rest/IRestSecretStore.java +++ b/src/main/java/ai/labs/eddi/secrets/rest/IRestSecretStore.java @@ -25,7 +25,7 @@ * @since 6.0.0 */ @Path("/secretstore/secrets") -@Tag(name = "Secrets Vault") +@Tag(name = "Security / Secrets Vault", description = "Encrypted secret storage and management") @RolesAllowed("eddi-admin") public interface IRestSecretStore { diff --git a/src/main/java/ai/labs/eddi/ui/IRestHtmlChatResource.java b/src/main/java/ai/labs/eddi/ui/IRestHtmlChatResource.java index 17f938ab6..fe749aed6 100644 --- a/src/main/java/ai/labs/eddi/ui/IRestHtmlChatResource.java +++ b/src/main/java/ai/labs/eddi/ui/IRestHtmlChatResource.java @@ -20,7 +20,7 @@ @Path("/chat") @Produces(MediaType.TEXT_HTML) -@Tag(name = "Chat UI") +@Tag(name = "UI / Chat", description = "Embedded responsive chat window") public interface IRestHtmlChatResource { @GET diff --git a/src/main/resources/META-INF/branding/eddi-logo.png b/src/main/resources/META-INF/branding/logo.png similarity index 100% rename from src/main/resources/META-INF/branding/eddi-logo.png rename to src/main/resources/META-INF/branding/logo.png diff --git a/src/main/resources/META-INF/branding/style.css b/src/main/resources/META-INF/branding/style.css index 13d73fd68..12f4fc88a 100644 --- a/src/main/resources/META-INF/branding/style.css +++ b/src/main/resources/META-INF/branding/style.css @@ -1,6 +1,27 @@ +/* ═══════════════════════════════════════════════════════════════════════════ + * EDDI Swagger UI Theme + * Dual light/dark mode with EDDI brand accents (zinc + amber). + * + * Dark palette (EDDI Manager): + * Primary: #f59e0b (amber-500) + * Background: #09090b (zinc-950) + * Surface/Card: #18181b (zinc-900) + * Border: #27272a (zinc-800) + * Foreground: #fafaf9 (stone-50) + * Muted text: #a1a1aa (zinc-400) + * + * Light palette: + * Primary: #d97706 (amber-600, darker for contrast) + * Background: #ffffff + * Surface/Card: #fafaf9 (stone-50) + * Border: #e4e4e7 (zinc-200) + * Foreground: #18181b (zinc-900) + * Muted text: #71717a (zinc-500) + * ═══════════════════════════════════════════════════════════════════════════ */ + +/* ── Reset (both modes) ────────────────────────────────────────────────── */ html { box-sizing: border-box; - overflow: -moz-scrollbars-vertical; overflow-y: scroll; } @@ -12,139 +33,960 @@ html { body { margin: 0; - background: #000; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; +} + +/* ══════════════════════════════════════════════════════════════════════════ + * BRAND ACCENTS — shared between both modes + * ══════════════════════════════════════════════════════════════════════════ */ + +/* ── Logo ──────────────────────────────────────────────────────────────── */ +#swaggerUiLogoLink { + max-width: none; +} + +#swaggerUiLogoLink img { + max-height: 36px; +} + +#swaggerUiTitleLink { + display: none; +} + +/* ── Wrapper max-width ─────────────────────────────────────────────────── */ +.swagger-ui .wrapper { + max-width: 1460px; +} + +/* ── Tag Group styling ─────────────────────────────────────────────────── */ +.swagger-ui .opblock-tag-section { + margin-bottom: 2px; +} + +.swagger-ui .opblock-tag { + text-transform: uppercase; + letter-spacing: 0.08em; + font-size: 13px; + padding: 12px 20px; + transition: background-color 0.15s; +} + +.swagger-ui .opblock-tag small { + text-transform: none; + letter-spacing: normal; + font-size: 12px; +} + +/* ── Operation block styling ───────────────────────────────────────────── */ +.swagger-ui .opblock { + border-radius: 6px; + margin: 0 0 4px; +} + +.swagger-ui .opblock .opblock-summary-method { + border-radius: 4px; + font-weight: 700; + font-size: 12px; + min-width: 70px; + text-align: center; +} + +/* ── HTTP method colors (both modes) ───────────────────────────────────── */ +.swagger-ui .opblock.opblock-get .opblock-summary-method { background: #3b82f6; } +.swagger-ui .opblock.opblock-post .opblock-summary-method { background: #22c55e; } +.swagger-ui .opblock.opblock-put .opblock-summary-method { background: #f59e0b; } +.swagger-ui .opblock.opblock-delete .opblock-summary-method { background: #ef4444; } +.swagger-ui .opblock.opblock-patch .opblock-summary-method { background: #a855f7; } + +/* ── Input focus accent (both modes) ───────────────────────────────────── */ +.swagger-ui input[type=text]:focus, +.swagger-ui textarea:focus, +.swagger-ui select:focus { + border-color: #f59e0b; + outline: none; + box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); +} + +/* ── Button shared styling ─────────────────────────────────────────────── */ +.swagger-ui .btn { + border-radius: 6px; + transition: all 0.2s; +} + +.swagger-ui .btn.cancel { + border-color: #ef4444; + color: #ef4444; +} + +/* ── Required parameter indicator ──────────────────────────────────────── */ +.swagger-ui .parameter__name.required::after { + color: #ef4444; +} + +/* ── Expand arrow hover ────────────────────────────────────────────────── */ +.swagger-ui .expand-methods:hover svg, +.swagger-ui .expand-operation:hover svg { + fill: #f59e0b; +} + +/* ── Errors (both modes) ───────────────────────────────────────────────── */ +.swagger-ui .errors-wrapper { + background-color: rgba(239, 68, 68, 0.1); + border: 1px solid #ef4444; + border-radius: 6px; +} + +.swagger-ui .errors-wrapper h4 { + color: #ef4444; +} + +/* ══════════════════════════════════════════════════════════════════════════ + * LIGHT MODE (default when .dark-mode is NOT set) + * ══════════════════════════════════════════════════════════════════════════ */ + +body { + background: #ffffff; + color: #18181b; } .swagger-ui { - color: #fff; + color: #18181b; } +/* ── Topbar (light) ────────────────────────────────────────────────────── */ .swagger-ui .topbar { - background-color: #000; + background-color: #18181b !important; + border-bottom: 1px solid #27272a !important; + padding: 8px 0; } -#footer { - background-color: #000; - font-family: sans-serif; - color: #fff; - font-size: 70%; - text-align: center; +.swagger-ui .topbar .download-url-wrapper .select-label { + color: #d4d4d8; } -#swaggerUiLogoLink { - max-width: none; +.swagger-ui .topbar .download-url-wrapper .select-label select { + border-color: #3f3f46; + background: #27272a; + color: #fafaf9; } -#swaggerUiTitleLink { - display: none; +.swagger-ui .topbar .download-url-wrapper input[type=text] { + border-color: #3f3f46 !important; + background: #27272a !important; + color: #fafaf9 !important; + border-radius: 6px; } -.swagger-ui .info { - background-color: black; - padding: 50px; - border-agenttom: 5px solid white; - color: white; +.swagger-ui .topbar .download-url-wrapper .download-url-button { + background-color: #f59e0b !important; + color: #09090b !important; + border: 1px solid #f59e0b !important; + border-radius: 6px; + font-weight: 600; } -.swagger-ui .info .description p { - color: white; +.swagger-ui .topbar .download-url-wrapper .download-url-button:hover { + background-color: #d97706 !important; + border-color: #d97706 !important; } -.swagger-ui .info .description .markdown { - color: white; +.swagger-ui .topbar select { + background: #27272a !important; + border: 1px solid #3f3f46 !important; + color: #fafaf9 !important; } -.swagger-ui .scheme-container { - background-color: rgba(1, 1, 1, 0); - box-shadow: 0 0 0 0; +.swagger-ui .topbar input[type=text]:focus { + border-color: #f59e0b !important; + box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2) !important; +} + +/* ── Info Section (light) ──────────────────────────────────────────────── */ +.swagger-ui .info { + background-color: #fafaf9; + padding: 36px 48px; + border-bottom: 3px solid #d97706; + border-radius: 8px; + margin: 20px 0 30px; } .swagger-ui .info .title { - color: white; - letter-spacing: .1em; + color: #18181b; + letter-spacing: 0.03em; } -.swagger-ui .url { - color: white; - letter-spacing: .1em; +.swagger-ui .info .title small { + background-color: #d97706 !important; + border: none !important; + color: #ffffff !important; + border-radius: 4px; + font-weight: 700; +} + +.swagger-ui .info .title small.version-stamp { + background-color: #e4e4e7 !important; + color: #71717a !important; + border: 1px solid #d4d4d8 !important; + font-weight: 400; +} + +.swagger-ui .info .title small pre { + color: #ffffff !important; +} + +.swagger-ui .info .title small.version-stamp pre { + color: #71717a !important; +} + +.swagger-ui .info .description, +.swagger-ui .info .description p, +.swagger-ui .info .description .markdown, +.swagger-ui .info .description .markdown p { + color: #52525b; } .swagger-ui .info a { - color: white; + color: #b45309; + text-decoration: none; + letter-spacing: 0.02em; + transition: color 0.2s; +} + +.swagger-ui .info a:hover { + color: #d97706; text-decoration: underline; - letter-spacing: .1em; } -.swagger-ui .schemes-title { - color: white; - letter-spacing: .1em; +.swagger-ui .info .base-url { + color: #a1a1aa; +} + +/* ── Scheme Container (light) ──────────────────────────────────────────── */ +.swagger-ui .scheme-container { + background-color: transparent !important; + box-shadow: none !important; + border-bottom: 1px solid #e4e4e7; + padding: 15px 0; +} + +/* ── Authorize button (light) ──────────────────────────────────────────── */ +.swagger-ui .btn.authorize { + color: #d97706 !important; + border-color: #d97706 !important; + background: transparent !important; +} + +.swagger-ui .btn.authorize:hover { + background: rgba(217, 119, 6, 0.08) !important; } +.swagger-ui .btn.authorize svg { + fill: #d97706 !important; +} + +/* ── Execute button (light) ────────────────────────────────────────────── */ +.swagger-ui .btn.execute { + background-color: #d97706 !important; + color: #ffffff !important; + border-color: #d97706 !important; + font-weight: 600; +} + +.swagger-ui .btn.execute:hover { + background-color: #b45309 !important; + border-color: #b45309 !important; +} + +/* ── Try-It-Out (light) ────────────────────────────────────────────────── */ +.swagger-ui .try-out__btn { + border-color: #d97706; + color: #d97706; +} + +.swagger-ui .try-out__btn:hover { + background-color: rgba(217, 119, 6, 0.08); +} + +/* ── Tag Groups (light) ────────────────────────────────────────────────── */ .swagger-ui .opblock-tag { - color: white; - text-transform: uppercase; - letter-spacing: .1em; - border-agenttom: 1px solid #D4BE7D; + color: #18181b; + border-bottom: 1px solid #e4e4e7 !important; +} + +.swagger-ui .opblock-tag:hover { + background-color: rgba(217, 119, 6, 0.04); } .swagger-ui .opblock-tag small { - color: white; + color: #71717a; +} + +.swagger-ui .opblock-tag a.nostyle { + color: #18181b; +} + +.swagger-ui .opblock-tag svg { + fill: #a1a1aa; +} + +/* ── Operations (light) ────────────────────────────────────────────────── */ +.swagger-ui .opblock { + border: 1px solid #e4e4e7 !important; + background: #ffffff !important; } -.swagger-ui .op-block { - border-radius: 0; +.swagger-ui .opblock .opblock-summary { + border-color: #e4e4e7 !important; } .swagger-ui .opblock .opblock-summary-path { - color: white; + color: #18181b; } .swagger-ui .opblock .opblock-summary-description { - color: white; + color: #71717a; } -.swagger-ui .markdown { - color: white; +.swagger-ui .opblock.opblock-get { background: rgba(59, 130, 246, 0.03) !important; border-color: rgba(59, 130, 246, 0.15) !important; } +.swagger-ui .opblock.opblock-post { background: rgba(34, 197, 94, 0.03) !important; border-color: rgba(34, 197, 94, 0.15) !important; } +.swagger-ui .opblock.opblock-put { background: rgba(245, 158, 11, 0.03) !important; border-color: rgba(245, 158, 11, 0.15) !important; } +.swagger-ui .opblock.opblock-delete { background: rgba(239, 68, 68, 0.03) !important; border-color: rgba(239, 68, 68, 0.15) !important; } +.swagger-ui .opblock.opblock-patch { background: rgba(168, 85, 247, 0.03) !important; border-color: rgba(168, 85, 247, 0.15) !important; } + +/* ── Operation Body (light) ────────────────────────────────────────────── */ +.swagger-ui .opblock-body { + background: #ffffff; +} + +.swagger-ui .opblock .opblock-section-header { + background: #fafaf9; + border-bottom: 1px solid #e4e4e7; +} + +.swagger-ui .opblock .opblock-section-header h4 { + color: #18181b; } -.swagger-ui .markdown p { - color: white; +.swagger-ui .opblock .opblock-section-header label { + color: #71717a; } -.swagger-ui .table-container { - color: white; +/* ── Parameters (light) ────────────────────────────────────────────────── */ +.swagger-ui .parameters-col_name, +.swagger-ui .parameter__name { + color: #18181b; } +.swagger-ui .parameter__type, +.swagger-ui .parameter__in { + color: #a1a1aa; +} + +.swagger-ui table thead tr td, +.swagger-ui table thead tr th { + color: #71717a !important; + border-bottom: 1px solid #e4e4e7 !important; +} + +/* ── Responses (light) ─────────────────────────────────────────────────── */ .swagger-ui .response-col_status { - color: white; + color: #18181b !important; } -.swagger-ui .responses-header td { - color: white; +.swagger-ui .response-col_description, +.swagger-ui .responses-header td, +.swagger-ui .response-col_links { + color: #71717a; } -.swagger-ui .table-container th { - color: white; +.swagger-ui .responses-inner { + background: transparent; } -.swagger-ui .table-container .parameter__name { - color: white; +.swagger-ui .response-control-media-type__accept-message { + color: #22c55e; } +/* ── Models (light) ────────────────────────────────────────────────────── */ .swagger-ui section.models { - border: 1px solid #D4BE7D; - border-radius: 0; + border: 1px solid #e4e4e7 !important; + border-radius: 6px; + background: #fafaf9 !important; } .swagger-ui section.models h4 { - color: white; + color: #18181b; + border-bottom: 1px solid #e4e4e7; +} + +.swagger-ui section.models h4 svg { + fill: #a1a1aa; } .swagger-ui section.models .model-container { - background-color: white; - border-radius: 0; + background-color: #ffffff; + border-radius: 6px; + margin: 4px 0; + border: 1px solid #e4e4e7; } .swagger-ui section.models .model-container:hover { - background-color: whitesmoke; -} \ No newline at end of file + background-color: #fafaf9; +} + +.swagger-ui .model { color: #71717a; } +.swagger-ui .model-title { color: #18181b; } +.swagger-ui .model .property { color: #18181b; } +.swagger-ui .model .property.primitive { color: #a1a1aa; } + +/* ── Inputs (light) ────────────────────────────────────────────────────── */ +.swagger-ui input[type=text], +.swagger-ui input[type=password], +.swagger-ui input[type=search], +.swagger-ui input[type=email], +.swagger-ui input[type=file], +.swagger-ui textarea, +.swagger-ui select { + background: #ffffff; + color: #18181b; + border: 1px solid #d4d4d8; + border-radius: 6px; +} + +/* ── Code blocks (light) ───────────────────────────────────────────────── */ +.swagger-ui .opblock-body pre, +.swagger-ui .highlight-code { + background: #fafaf9; + color: #18181b; + border: 1px solid #e4e4e7; + border-radius: 6px; +} + +.swagger-ui .microlight { + background: #fafaf9 !important; + color: #18181b !important; + border-radius: 6px; +} + +.swagger-ui .opblock-body pre.microlight, +.swagger-ui pre.microlight { + background: #fafaf9 !important; + color: #18181b !important; + border: 1px solid #e4e4e7 !important; +} + +/* ── Markdown (light) ──────────────────────────────────────────────────── */ +.swagger-ui .markdown code, +.swagger-ui .renderedMarkdown code { + background: #e4e4e7; + color: #b45309; + padding: 2px 6px; + border-radius: 4px; +} + +.swagger-ui .opblock-description-wrapper, +.swagger-ui .opblock-description-wrapper p { + color: #71717a; +} + +/* ── Misc (light) ──────────────────────────────────────────────────────── */ +.swagger-ui .copy-to-clipboard { + background: #e4e4e7; + border: 1px solid #d4d4d8; + border-radius: 4px; +} + +.swagger-ui .prop-type { color: #3b82f6; } +.swagger-ui .prop-format { color: #a1a1aa; } + +.swagger-ui .tab li { color: #71717a; } +.swagger-ui .tab li.active { color: #18181b; } +.swagger-ui .tab li:first-child::after { background: #e4e4e7; } + +.swagger-ui .loading-container .loading::after { color: #71717a; } + +.swagger-ui .btn-group .btn { + border-color: #d4d4d8; + color: #71717a; +} + +.swagger-ui .url { + color: #a1a1aa; + letter-spacing: 0.02em; +} + +.swagger-ui .content-type { + background: #ffffff; + color: #18181b; + border: 1px solid #d4d4d8; +} + +.swagger-ui .expand-methods svg, +.swagger-ui .expand-operation svg { + fill: #a1a1aa; + transition: fill 0.15s; +} + +.swagger-ui a { color: #b45309; } +.swagger-ui a:hover { color: #d97706; } + +.swagger-ui, +.swagger-ui label, +.swagger-ui .info .title, +.swagger-ui .opblock-tag { + color: #18181b; +} + +/* ── Dialog (light) ────────────────────────────────────────────────────── */ +.swagger-ui .dialog-ux .modal-ux { + background: #ffffff; + border: 1px solid #e4e4e7; + color: #18181b; + border-radius: 8px; +} + +.swagger-ui .dialog-ux .modal-ux-header { + border-bottom: 1px solid #e4e4e7; +} + +.swagger-ui .dialog-ux .modal-ux-header h3 { color: #18181b; } +.swagger-ui .dialog-ux .modal-ux-content { color: #52525b; } +.swagger-ui .dialog-ux .modal-ux-content p { color: #52525b; } +.swagger-ui .dialog-ux .backdrop-ux { background: rgba(0, 0, 0, 0.4); } + +.swagger-ui .auth-wrapper { color: #18181b; } +.swagger-ui .auth-wrapper .auth-btn-wrapper .btn-done { + color: #d97706; + border-color: #d97706; +} +.swagger-ui .auth-wrapper input { color: #18181b; } + +/* ── Footer (light) ────────────────────────────────────────────────────── */ +#footer { + background-color: #fafaf9; + border-top: 1px solid #e4e4e7; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + color: #a1a1aa; + font-size: 12px; + text-align: center; + padding: 16px 0; +} + +/* ══════════════════════════════════════════════════════════════════════════ + * DARK MODE — activated when Swagger UI toggle adds .dark-mode to + * ══════════════════════════════════════════════════════════════════════════ */ + +html.dark-mode body { + background: #09090b; + color: #fafaf9; +} + +html.dark-mode .swagger-ui { + color: #fafaf9; + background-color: #09090b !important; +} + +html.dark-mode .swagger-ui .wrapper { + background-color: #09090b !important; +} + +html.dark-mode .swagger-ui, +html.dark-mode .swagger-ui label, +html.dark-mode .swagger-ui .info .title, +html.dark-mode .swagger-ui .opblock-tag { + color: #fafaf9; +} + +/* ── Topbar (dark) ─────────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .topbar { + background-color: #000000 !important; + border-bottom: 1px solid #3f3f46 !important; +} + +html.dark-mode .swagger-ui .topbar .download-url-wrapper .select-label { + color: #a1a1aa; +} + +html.dark-mode .swagger-ui .topbar .download-url-wrapper .select-label select { + border-color: #27272a; + background: #18181b; + color: #fafaf9; +} + +html.dark-mode .swagger-ui .topbar .download-url-wrapper input[type=text] { + border-color: #27272a !important; + background: #18181b !important; + color: #fafaf9 !important; +} + +html.dark-mode .swagger-ui .topbar select { + background: #18181b !important; + border: 1px solid #27272a !important; + color: #fafaf9 !important; +} + +/* ── Info Section (dark) ───────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .info { + background-color: #18181b !important; + border-bottom: 3px solid #f59e0b !important; +} + +html.dark-mode .swagger-ui .info .title { + color: #fafaf9; +} + +html.dark-mode .swagger-ui .info .title small { + background-color: #f59e0b !important; + color: #09090b !important; +} + +html.dark-mode .swagger-ui .info .title small.version-stamp { + background-color: #27272a !important; + color: #a1a1aa !important; + border: 1px solid #3f3f46 !important; +} + +html.dark-mode .swagger-ui .info .title small pre { + color: #09090b !important; +} + +html.dark-mode .swagger-ui .info .title small.version-stamp pre { + color: #a1a1aa !important; +} + +html.dark-mode .swagger-ui .info .description, +html.dark-mode .swagger-ui .info .description p, +html.dark-mode .swagger-ui .info .description .markdown, +html.dark-mode .swagger-ui .info .description .markdown p { + color: #a1a1aa; +} + +html.dark-mode .swagger-ui .info a { + color: #fbbf24; +} + +html.dark-mode .swagger-ui .info a:hover { + color: #f59e0b; +} + +html.dark-mode .swagger-ui .info .base-url { + color: #71717a; +} + +/* ── Scheme Container (dark) ───────────────────────────────────────────── */ +html.dark-mode .swagger-ui .scheme-container { + border-bottom-color: #27272a; +} + +html.dark-mode .swagger-ui .schemes-title { + color: #a1a1aa; +} + +/* ── Authorize button (dark) ───────────────────────────────────────────── */ +html.dark-mode .swagger-ui .btn.authorize { + color: #f59e0b !important; + border-color: #f59e0b !important; +} + +html.dark-mode .swagger-ui .btn.authorize:hover { + background: rgba(245, 158, 11, 0.1) !important; +} + +html.dark-mode .swagger-ui .btn.authorize svg { + fill: #f59e0b !important; +} + +/* ── Execute button (dark) ─────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .btn.execute { + background-color: #f59e0b !important; + color: #09090b !important; + border-color: #f59e0b !important; +} + +html.dark-mode .swagger-ui .btn.execute:hover { + background-color: #d97706 !important; + border-color: #d97706 !important; +} + +/* ── Try-It-Out (dark) ─────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .try-out__btn { + border-color: #f59e0b; + color: #f59e0b; +} + +html.dark-mode .swagger-ui .try-out__btn:hover { + background-color: rgba(245, 158, 11, 0.1); +} + +/* ── Tag Groups (dark) ─────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .opblock-tag { + color: #d4d4d8; + border-bottom-color: #27272a !important; +} + +html.dark-mode .swagger-ui .opblock-tag:hover { + background-color: rgba(245, 158, 11, 0.05); +} + +html.dark-mode .swagger-ui .opblock-tag small { + color: #71717a; +} + +html.dark-mode .swagger-ui .opblock-tag a.nostyle { + color: #d4d4d8; +} + +html.dark-mode .swagger-ui .opblock-tag svg { + fill: #71717a; +} + +/* ── Operations (dark) ─────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .opblock { + border: 1px solid #27272a !important; + background: #18181b !important; +} + +html.dark-mode .swagger-ui .opblock .opblock-summary { + border-bottom: 1px solid #27272a !important; +} + +html.dark-mode .swagger-ui .opblock .opblock-summary-path, +html.dark-mode .swagger-ui .opblock .opblock-summary-path span { + color: #fafaf9; +} + +html.dark-mode .swagger-ui .opblock .opblock-summary-description { + color: #a1a1aa; +} + +html.dark-mode .swagger-ui .opblock.opblock-get { background: rgba(59, 130, 246, 0.06) !important; border-color: rgba(59, 130, 246, 0.2) !important; } +html.dark-mode .swagger-ui .opblock.opblock-post { background: rgba(34, 197, 94, 0.06) !important; border-color: rgba(34, 197, 94, 0.2) !important; } +html.dark-mode .swagger-ui .opblock.opblock-put { background: rgba(245, 158, 11, 0.06) !important; border-color: rgba(245, 158, 11, 0.2) !important; } +html.dark-mode .swagger-ui .opblock.opblock-delete { background: rgba(239, 68, 68, 0.06) !important; border-color: rgba(239, 68, 68, 0.2) !important; } +html.dark-mode .swagger-ui .opblock.opblock-patch { background: rgba(168, 85, 247, 0.06) !important; border-color: rgba(168, 85, 247, 0.2) !important; } + +html.dark-mode .swagger-ui .opblock.opblock-get .opblock-summary { border-color: rgba(59, 130, 246, 0.15) !important; } +html.dark-mode .swagger-ui .opblock.opblock-post .opblock-summary { border-color: rgba(34, 197, 94, 0.15) !important; } +html.dark-mode .swagger-ui .opblock.opblock-put .opblock-summary { border-color: rgba(245, 158, 11, 0.15) !important; } +html.dark-mode .swagger-ui .opblock.opblock-delete .opblock-summary { border-color: rgba(239, 68, 68, 0.15) !important; } +html.dark-mode .swagger-ui .opblock.opblock-patch .opblock-summary { border-color: rgba(168, 85, 247, 0.15) !important; } + +/* ── Operation Body (dark) ─────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .opblock-body { + background: #18181b; +} + +html.dark-mode .swagger-ui .opblock-body pre { + background: #09090b; + color: #fafaf9; + border: 1px solid #27272a; + border-radius: 6px; +} + +html.dark-mode .swagger-ui .opblock-body pre span { + color: #fafaf9 !important; +} + +html.dark-mode .swagger-ui .opblock-description-wrapper, +html.dark-mode .swagger-ui .opblock-description-wrapper p { + color: #a1a1aa; +} + +html.dark-mode .swagger-ui .opblock .opblock-section-header { + background: rgba(39, 39, 42, 0.5); + border-bottom: 1px solid #27272a; +} + +html.dark-mode .swagger-ui .opblock .opblock-section-header h4 { + color: #fafaf9; +} + +html.dark-mode .swagger-ui .opblock .opblock-section-header label { + color: #a1a1aa; +} + +/* ── Parameters (dark) ─────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .parameters-col_name, +html.dark-mode .swagger-ui .parameter__name { + color: #fafaf9; +} + +html.dark-mode .swagger-ui .parameter__type, +html.dark-mode .swagger-ui .parameter__in { + color: #71717a; +} + +html.dark-mode .swagger-ui table thead tr td, +html.dark-mode .swagger-ui table thead tr th { + color: #a1a1aa !important; + border-bottom-color: #27272a !important; +} + +html.dark-mode .swagger-ui .table-container { + color: #fafaf9; +} + +/* ── Responses (dark) ──────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .response-col_status { + color: #fafaf9 !important; +} + +html.dark-mode .swagger-ui .response-col_description, +html.dark-mode .swagger-ui .responses-header td, +html.dark-mode .swagger-ui .response-col_links { + color: #a1a1aa; +} + +html.dark-mode .swagger-ui .responses-table { + border-top: 1px solid #27272a; +} + +/* ── Models (dark) ─────────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui section.models { + border: 1px solid #27272a !important; + background: #18181b !important; +} + +html.dark-mode .swagger-ui section.models h4 { + color: #fafaf9; + border-bottom: 1px solid #27272a; +} + +html.dark-mode .swagger-ui section.models h4 svg { + fill: #71717a; +} + +html.dark-mode .swagger-ui section.models .model-container { + background-color: #09090b; + border: 1px solid #27272a; +} + +html.dark-mode .swagger-ui section.models .model-container:hover { + background-color: #18181b; +} + +html.dark-mode .swagger-ui .model { color: #a1a1aa; } +html.dark-mode .swagger-ui .model-title { color: #fafaf9; } +html.dark-mode .swagger-ui .model .property { color: #fafaf9; } +html.dark-mode .swagger-ui .model .property.primitive { color: #71717a; } + +/* ── Inputs (dark) ─────────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui input[type=text], +html.dark-mode .swagger-ui input[type=password], +html.dark-mode .swagger-ui input[type=search], +html.dark-mode .swagger-ui input[type=email], +html.dark-mode .swagger-ui input[type=file], +html.dark-mode .swagger-ui textarea, +html.dark-mode .swagger-ui select { + background: #09090b; + color: #fafaf9; + border: 1px solid #27272a; + border-radius: 6px; +} + +/* ── Code blocks (dark) ────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .highlight-code { + background: #09090b; + border-radius: 6px; +} + +html.dark-mode .swagger-ui .microlight { + background: #09090b !important; + color: #fafaf9 !important; + border-radius: 6px; +} + +html.dark-mode .swagger-ui .opblock-body pre.microlight, +html.dark-mode .swagger-ui pre.microlight { + background: #09090b !important; + color: #fafaf9 !important; + border: 1px solid #27272a !important; +} + +/* ── Markdown (dark) ───────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .markdown, +html.dark-mode .swagger-ui .markdown p, +html.dark-mode .swagger-ui .renderedMarkdown, +html.dark-mode .swagger-ui .renderedMarkdown p { + color: #a1a1aa; +} + +html.dark-mode .swagger-ui .markdown code, +html.dark-mode .swagger-ui .renderedMarkdown code { + background: #27272a; + color: #fbbf24; +} + +/* ── Misc (dark) ───────────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .copy-to-clipboard { + background: #27272a; + border: 1px solid #3f3f46; +} + +html.dark-mode .swagger-ui .content-type { + background: #09090b; + color: #fafaf9; + border: 1px solid #27272a; +} + +html.dark-mode .swagger-ui .expand-methods svg, +html.dark-mode .swagger-ui .expand-operation svg { + fill: #71717a; +} + +html.dark-mode .swagger-ui .tab li { color: #a1a1aa; } +html.dark-mode .swagger-ui .tab li.active { color: #fafaf9; } +html.dark-mode .swagger-ui .tab li:first-child::after { background: #27272a; } + +html.dark-mode .swagger-ui .loading-container .loading::after { color: #a1a1aa; } + +html.dark-mode .swagger-ui .btn-group .btn { + border-color: #27272a; + color: #a1a1aa; +} + +html.dark-mode .swagger-ui .url { color: #71717a; } + +html.dark-mode .swagger-ui .model-box { + background: #09090b; + border-radius: 6px; +} + +html.dark-mode .swagger-ui a { color: #fbbf24; } +html.dark-mode .swagger-ui a:hover { color: #f59e0b; } + +/* ── Dialog (dark) ─────────────────────────────────────────────────────── */ +html.dark-mode .swagger-ui .dialog-ux .modal-ux { + background: #18181b; + border: 1px solid #27272a; + color: #fafaf9; +} + +html.dark-mode .swagger-ui .dialog-ux .modal-ux-header { + border-bottom: 1px solid #27272a; +} + +html.dark-mode .swagger-ui .dialog-ux .modal-ux-header h3 { color: #fafaf9; } +html.dark-mode .swagger-ui .dialog-ux .modal-ux-content { color: #a1a1aa; } +html.dark-mode .swagger-ui .dialog-ux .modal-ux-content p { color: #a1a1aa; } +html.dark-mode .swagger-ui .dialog-ux .backdrop-ux { background: rgba(9, 9, 11, 0.8); } + +html.dark-mode .swagger-ui .auth-wrapper { color: #fafaf9; } +html.dark-mode .swagger-ui .auth-wrapper .auth-btn-wrapper .btn-done { + color: #f59e0b; + border-color: #f59e0b; +} +html.dark-mode .swagger-ui .auth-wrapper input { color: #fafaf9; } + +/* ── Footer (dark) ─────────────────────────────────────────────────────── */ +html.dark-mode #footer { + background-color: #09090b; + border-top: 1px solid #27272a; + color: #71717a; +} + +/* ── Scrollbar (dark, Webkit) ──────────────────────────────────────────── */ +html.dark-mode ::-webkit-scrollbar { width: 8px; height: 8px; } +html.dark-mode ::-webkit-scrollbar-track { background: #09090b; } +html.dark-mode ::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 4px; } +html.dark-mode ::-webkit-scrollbar-thumb:hover { background: #52525b; } \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/assets/cssMode-CRRdssKx.js b/src/main/resources/META-INF/resources/assets/cssMode-CRRdssKx.js deleted file mode 100644 index 4a4cd0692..000000000 --- a/src/main/resources/META-INF/resources/assets/cssMode-CRRdssKx.js +++ /dev/null @@ -1 +0,0 @@ -import{c,l as s}from"./index-Cfhvosw6.js";import{C as h,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-CWMiI3_8.js";import{h as b,i as H,j as y,t as U,k as T}from"./lspLanguageFeatures-CWMiI3_8.js";const C=120*1e3;class A{constructor(o){this._defaults=o,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>C&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=c({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-B4z49cGk.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...o){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(o)}).then(a=>e)}}function F(n){const o=[],e=[],a=new A(n);o.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=n;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new h(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,n.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),o.push(d(e)),d(o)}function d(n){return{dispose:()=>g(n)}}function g(n){for(;n.length;)n.pop().dispose()}export{h as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,b as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,H as fromPosition,y as fromRange,F as setupMode,U as toRange,T as toTextEdit}; diff --git a/src/main/resources/META-INF/resources/assets/cssMode-DMPmy9yy.js b/src/main/resources/META-INF/resources/assets/cssMode-DMPmy9yy.js deleted file mode 100644 index 755b51fa6..000000000 --- a/src/main/resources/META-INF/resources/assets/cssMode-DMPmy9yy.js +++ /dev/null @@ -1 +0,0 @@ -import{c,l as s}from"./index-BFi5BZ7U.js";import{C as h,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-CjZ9t0R-.js";import{h as b,i as H,j as y,t as U,k as T}from"./lspLanguageFeatures-CjZ9t0R-.js";const C=120*1e3;class A{constructor(o){this._defaults=o,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>C&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=c({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL("/assets/css.worker-B4z49cGk.js",import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...o){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(o)}).then(a=>e)}}function F(n){const o=[],e=[],a=new A(n);o.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=n;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new h(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,n.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),o.push(d(e)),d(o)}function d(n){return{dispose:()=>g(n)}}function g(n){for(;n.length;)n.pop().dispose()}export{h as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,b as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,H as fromPosition,y as fromRange,F as setupMode,U as toRange,T as toTextEdit}; diff --git a/src/main/resources/META-INF/resources/assets/freemarker2-Dl3FuCzB.js b/src/main/resources/META-INF/resources/assets/freemarker2-Dl3FuCzB.js deleted file mode 100644 index 35ae16730..000000000 --- a/src/main/resources/META-INF/resources/assets/freemarker2-Dl3FuCzB.js +++ /dev/null @@ -1,3 +0,0 @@ -import{l as c}from"./index-BFi5BZ7U.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],a={close:">",id:"angle",open:"<"},r={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` -\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function g(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` -\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function _(t,n){const i=`_${t.id}_${n.id}`,e=u=>u.replace(/__id__/g,i),o=u=>{const m=u.source.replace(/__id__/g,i);return new RegExp(m,u.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function A(t){const n=_(a,t),i=_(r,t),e=_(F,t);return{...n,...i,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...i.tokenizer,...e.tokenizer}}}const b={conf:l(a),language:_(a,k)},x={conf:l(r),language:_(r,k)},$={conf:l(a),language:_(a,p)},E={conf:l(r),language:_(r,p)},B={conf:g(),language:A(k)},D={conf:g(),language:A(p)};export{$ as TagAngleInterpolationBracket,b as TagAngleInterpolationDollar,D as TagAutoInterpolationBracket,B as TagAutoInterpolationDollar,E as TagBracketInterpolationBracket,x as TagBracketInterpolationDollar}; diff --git a/src/main/resources/META-INF/resources/assets/freemarker2-DqDWCtuK.js b/src/main/resources/META-INF/resources/assets/freemarker2-DqDWCtuK.js deleted file mode 100644 index bf27c831b..000000000 --- a/src/main/resources/META-INF/resources/assets/freemarker2-DqDWCtuK.js +++ /dev/null @@ -1,3 +0,0 @@ -import{l as c}from"./index-Cfhvosw6.js";const s=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],a={close:">",id:"angle",open:"<"},r={close:"\\]",id:"bracket",open:"\\["},F={close:"[>\\]]",id:"auto",open:"[<\\[]"},k={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},p={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function l(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` -\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${d.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function g(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` -\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:c.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${s.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:c.IndentAction.Indent}}]}}function _(t,n){const i=`_${t.id}_${n.id}`,e=u=>u.replace(/__id__/g,i),o=u=>{const m=u.source.replace(/__id__/g,i);return new RegExp(m,u.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function A(t){const n=_(a,t),i=_(r,t),e=_(F,t);return{...n,...i,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...i.tokenizer,...e.tokenizer}}}const b={conf:l(a),language:_(a,k)},x={conf:l(r),language:_(r,k)},$={conf:l(a),language:_(a,p)},E={conf:l(r),language:_(r,p)},B={conf:g(),language:A(k)},D={conf:g(),language:A(p)};export{$ as TagAngleInterpolationBracket,b as TagAngleInterpolationDollar,D as TagAutoInterpolationBracket,B as TagAutoInterpolationDollar,E as TagBracketInterpolationBracket,x as TagBracketInterpolationDollar}; diff --git a/src/main/resources/META-INF/resources/assets/handlebars-B6GL_0Gw.js b/src/main/resources/META-INF/resources/assets/handlebars-B6GL_0Gw.js deleted file mode 100644 index e3e69b7bf..000000000 --- a/src/main/resources/META-INF/resources/assets/handlebars-B6GL_0Gw.js +++ /dev/null @@ -1 +0,0 @@ -import{l as e}from"./index-Cfhvosw6.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],a={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},m={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{a as conf,m as language}; diff --git a/src/main/resources/META-INF/resources/assets/handlebars-u8CdY6Y6.js b/src/main/resources/META-INF/resources/assets/handlebars-u8CdY6Y6.js deleted file mode 100644 index a70c3e20f..000000000 --- a/src/main/resources/META-INF/resources/assets/handlebars-u8CdY6Y6.js +++ /dev/null @@ -1 +0,0 @@ -import{l as e}from"./index-BFi5BZ7U.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],a={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},m={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{a as conf,m as language}; diff --git a/src/main/resources/META-INF/resources/assets/html-CXIKgM1_.js b/src/main/resources/META-INF/resources/assets/html-CXIKgM1_.js deleted file mode 100644 index e45b7ddef..000000000 --- a/src/main/resources/META-INF/resources/assets/html-CXIKgM1_.js +++ /dev/null @@ -1 +0,0 @@ -import{l as e}from"./index-BFi5BZ7U.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},r={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{i as conf,r as language}; diff --git a/src/main/resources/META-INF/resources/assets/html-z1CojlRt.js b/src/main/resources/META-INF/resources/assets/html-z1CojlRt.js deleted file mode 100644 index b40ff6b46..000000000 --- a/src/main/resources/META-INF/resources/assets/html-z1CojlRt.js +++ /dev/null @@ -1 +0,0 @@ -import{l as e}from"./index-Cfhvosw6.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},r={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{i as conf,r as language}; diff --git a/src/main/resources/META-INF/resources/assets/htmlMode-CqKL2ox8.js b/src/main/resources/META-INF/resources/assets/htmlMode-CqKL2ox8.js deleted file mode 100644 index f2e9ffa51..000000000 --- a/src/main/resources/META-INF/resources/assets/htmlMode-CqKL2ox8.js +++ /dev/null @@ -1 +0,0 @@ -import{c as D,l as t}from"./index-BFi5BZ7U.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as _,C as R}from"./lspLanguageFeatures-CjZ9t0R-.js";import{a as E,e as H,d as b,R as y,i as T,j as U,t as x,k as M}from"./lspLanguageFeatures-CjZ9t0R-.js";const I=120*1e3;class f{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-DtiGdgqp.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function C(i){const n=new f(i),e=(...s)=>n.getLanguageServiceWorker(...s);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function W(i){const n=[],e=[],r=new f(i);n.push(r);const s=(...o)=>r.getLanguageServiceWorker(...o);function P(){const{languageId:o,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(o,new v(s))),a.hovers&&e.push(t.registerHoverProvider(o,new d(s))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(o,new l(s))),a.links&&e.push(t.registerLinkProvider(o,new c(s))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(o,new h(s))),a.rename&&e.push(t.registerRenameProvider(o,new p(s))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(o,new u(s))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(o,new m(s))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(o,new w(s))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(o,new _(s)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,E as DefinitionAdapter,H as DiagnosticsAdapter,b as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,y as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,T as fromPosition,U as fromRange,W as setupMode,C as setupMode1,x as toRange,M as toTextEdit}; diff --git a/src/main/resources/META-INF/resources/assets/htmlMode-FnQ1MKvn.js b/src/main/resources/META-INF/resources/assets/htmlMode-FnQ1MKvn.js deleted file mode 100644 index 602ae915e..000000000 --- a/src/main/resources/META-INF/resources/assets/htmlMode-FnQ1MKvn.js +++ /dev/null @@ -1 +0,0 @@ -import{c as D,l as t}from"./index-Cfhvosw6.js";import{H as d,D as l,h as c,F as u,b as h,S as m,c as p,f as w,g as _,C as R}from"./lspLanguageFeatures-CWMiI3_8.js";import{a as E,e as H,d as b,R as y,i as T,j as U,t as x,k as M}from"./lspLanguageFeatures-CWMiI3_8.js";const I=120*1e3;class f{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-DtiGdgqp.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(r=>e)}}class v extends R{constructor(n){super(n,[".",":","<",'"',"=","/"])}}function C(i){const n=new f(i),e=(...s)=>n.getLanguageServiceWorker(...s);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new d(e)),t.registerDocumentHighlightProvider(r,new l(e)),t.registerLinkProvider(r,new c(e)),t.registerFoldingRangeProvider(r,new u(e)),t.registerDocumentSymbolProvider(r,new h(e)),t.registerSelectionRangeProvider(r,new m(e)),t.registerRenameProvider(r,new p(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function W(i){const n=[],e=[],r=new f(i);n.push(r);const s=(...o)=>r.getLanguageServiceWorker(...o);function P(){const{languageId:o,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(o,new v(s))),a.hovers&&e.push(t.registerHoverProvider(o,new d(s))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(o,new l(s))),a.links&&e.push(t.registerLinkProvider(o,new c(s))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(o,new h(s))),a.rename&&e.push(t.registerRenameProvider(o,new p(s))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(o,new u(s))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(o,new m(s))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(o,new w(s))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(o,new _(s)))}return P(),n.push(g(e)),g(n)}function g(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,E as DefinitionAdapter,H as DiagnosticsAdapter,b as DocumentColorAdapter,w as DocumentFormattingEditProvider,l as DocumentHighlightAdapter,c as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,h as DocumentSymbolAdapter,u as FoldingRangeAdapter,d as HoverAdapter,y as ReferenceAdapter,p as RenameAdapter,m as SelectionRangeAdapter,f as WorkerManager,T as fromPosition,U as fromRange,W as setupMode,C as setupMode1,x as toRange,M as toTextEdit}; diff --git a/src/main/resources/META-INF/resources/assets/index-BFi5BZ7U.js b/src/main/resources/META-INF/resources/assets/index-BFi5BZ7U.js deleted file mode 100644 index 57e270f4e..000000000 --- a/src/main/resources/META-INF/resources/assets/index-BFi5BZ7U.js +++ /dev/null @@ -1,1905 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cssMode-DMPmy9yy.js","assets/lspLanguageFeatures-CjZ9t0R-.js","assets/htmlMode-CqKL2ox8.js","assets/jsonMode-D3E7SjOF.js","assets/javascript-SxiXgJ1p.js","assets/typescript-G7Eu3Ar3.js"])))=>i.map(i=>d[i]); -var LFe=Object.defineProperty;var oge=i=>{throw TypeError(i)};var DFe=(i,e,t)=>e in i?LFe(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var kt=(i,e,t)=>DFe(i,typeof e!="symbol"?e+"":e,t),$z=(i,e,t)=>e.has(i)||oge("Cannot "+t);var oe=(i,e,t)=>($z(i,e,"read from private field"),t?t.call(i):e.get(i)),Ht=(i,e,t)=>e.has(i)?oge("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),yt=(i,e,t,n)=>($z(i,e,"write to private field"),n?n.call(i,t):e.set(i,t),t),st=(i,e,t)=>($z(i,e,"access private method"),t);var c5=(i,e,t,n)=>({set _(s){yt(i,e,s,t)},get _(){return oe(i,e,n)}});function TFe(i,e){for(var t=0;tn[s]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();function t7(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var qz={exports:{}},hT={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var age;function IFe(){if(age)return hT;age=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,r){var o=null;if(r!==void 0&&(o=""+r),s.key!==void 0&&(o=""+s.key),"key"in s){r={};for(var a in s)a!=="key"&&(r[a]=s[a])}else r=s;return s=r.ref,{$$typeof:i,type:n,key:o,ref:s!==void 0?s:null,props:r}}return hT.Fragment=e,hT.jsx=t,hT.jsxs=t,hT}var lge;function AFe(){return lge||(lge=1,qz.exports=IFe()),qz.exports}var d=AFe(),Kz={exports:{}},si={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var cge;function RFe(){if(cge)return si;cge=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),g=Symbol.iterator;function f(Q){return Q===null||typeof Q!="object"?null:(Q=g&&Q[g]||Q["@@iterator"],typeof Q=="function"?Q:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,v={};function _(Q,Y,V){this.props=Q,this.context=Y,this.refs=v,this.updater=V||m}_.prototype.isReactComponent={},_.prototype.setState=function(Q,Y){if(typeof Q!="object"&&typeof Q!="function"&&Q!=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,Q,Y,"setState")},_.prototype.forceUpdate=function(Q){this.updater.enqueueForceUpdate(this,Q,"forceUpdate")};function w(){}w.prototype=_.prototype;function k(Q,Y,V){this.props=Q,this.context=Y,this.refs=v,this.updater=V||m}var C=k.prototype=new w;C.constructor=k,x(C,_.prototype),C.isPureReactComponent=!0;var E=Array.isArray;function D(){}var T={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function R(Q,Y,V){var ue=V.ref;return{$$typeof:i,type:Q,key:Y,ref:ue!==void 0?ue:null,props:V}}function P(Q,Y){return R(Q.type,Y,Q.props)}function j(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===i}function B(Q){var Y={"=":"=0",":":"=2"};return"$"+Q.replace(/[=:]/g,function(V){return Y[V]})}var U=/\/+/g;function $(Q,Y){return typeof Q=="object"&&Q!==null&&Q.key!=null?B(""+Q.key):Y.toString(36)}function K(Q){switch(Q.status){case"fulfilled":return Q.value;case"rejected":throw Q.reason;default:switch(typeof Q.status=="string"?Q.then(D,D):(Q.status="pending",Q.then(function(Y){Q.status==="pending"&&(Q.status="fulfilled",Q.value=Y)},function(Y){Q.status==="pending"&&(Q.status="rejected",Q.reason=Y)})),Q.status){case"fulfilled":return Q.value;case"rejected":throw Q.reason}}throw Q}function z(Q,Y,V,ue,he){var Te=typeof Q;(Te==="undefined"||Te==="boolean")&&(Q=null);var nt=!1;if(Q===null)nt=!0;else switch(Te){case"bigint":case"string":case"number":nt=!0;break;case"object":switch(Q.$$typeof){case i:case e:nt=!0;break;case u:return nt=Q._init,z(nt(Q._payload),Y,V,ue,he)}}if(nt)return he=he(Q),nt=ue===""?"."+$(Q,0):ue,E(he)?(V="",nt!=null&&(V=nt.replace(U,"$&/")+"/"),z(he,Y,V,"",function($e){return $e})):he!=null&&(j(he)&&(he=P(he,V+(he.key==null||Q&&Q.key===he.key?"":(""+he.key).replace(U,"$&/")+"/")+nt)),Y.push(he)),1;nt=0;var ge=ue===""?".":ue+":";if(E(Q))for(var _e=0;_e>>1,H=z[te];if(0>>1;tes(V,ne))ues(he,V)?(z[te]=he,z[ue]=ne,te=ue):(z[te]=V,z[Y]=ne,te=Y);else if(ues(he,ne))z[te]=he,z[ue]=ne,te=ue;else break e}}return G}function s(z,G){var ne=z.sortIndex-G.sortIndex;return ne!==0?ne:z.id-G.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var r=performance;i.unstable_now=function(){return r.now()}}else{var o=Date,a=o.now();i.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,h=null,g=3,f=!1,m=!1,x=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function C(z){for(var G=t(c);G!==null;){if(G.callback===null)n(c);else if(G.startTime<=z)n(c),G.sortIndex=G.expirationTime,e(l,G);else break;G=t(c)}}function E(z){if(x=!1,C(z),!m)if(t(l)!==null)m=!0,D||(D=!0,B());else{var G=t(c);G!==null&&K(E,G.startTime-z)}}var D=!1,T=-1,I=5,R=-1;function P(){return v?!0:!(i.unstable_now()-Rz&&P());){var te=h.callback;if(typeof te=="function"){h.callback=null,g=h.priorityLevel;var H=te(h.expirationTime<=z);if(z=i.unstable_now(),typeof H=="function"){h.callback=H,C(z),G=!0;break t}h===t(l)&&n(l),C(z)}else n(l);h=t(l)}if(h!==null)G=!0;else{var Q=t(c);Q!==null&&K(E,Q.startTime-z),G=!1}}break e}finally{h=null,g=ne,f=!1}G=void 0}}finally{G?B():D=!1}}}var B;if(typeof k=="function")B=function(){k(j)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,$=U.port2;U.port1.onmessage=j,B=function(){$.postMessage(null)}}else B=function(){_(j,0)};function K(z,G){T=_(function(){z(i.unstable_now())},G)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(z){z.callback=null},i.unstable_forceFrameRate=function(z){0>z||125te?(z.sortIndex=ne,e(c,z),t(l)===null&&z===t(c)&&(x?(w(T),T=-1):x=!0,K(E,ne-te))):(z.sortIndex=H,e(l,z),m||f||(m=!0,D||(D=!0,B()))),z},i.unstable_shouldYield=P,i.unstable_wrapCallback=function(z){var G=g;return function(){var ne=g;g=G;try{return z.apply(this,arguments)}finally{g=ne}}}})(Qz)),Qz}var hge;function PFe(){return hge||(hge=1,Yz.exports=MFe()),Yz.exports}var Xz={exports:{}},Bl={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var gge;function OFe(){if(gge)return Bl;gge=1;var i=_ie();function e(l){var c="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),Xz.exports=OFe(),Xz.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var pge;function jFe(){if(pge)return gT;pge=1;var i=PFe(),e=_ie(),t=DCe();function n(p){var b="https://react.dev/errors/"+p;if(1H||(p.current=te[H],te[H]=null,H--)}function V(p,b){H++,te[H]=p.current,p.current=b}var ue=Q(null),he=Q(null),Te=Q(null),nt=Q(null);function ge(p,b){switch(V(Te,b),V(he,p),V(ue,null),b.nodeType){case 9:case 11:p=(p=b.documentElement)&&(p=p.namespaceURI)?Dhe(p):0;break;default:if(p=b.tagName,b=b.namespaceURI)b=Dhe(b),p=The(b,p);else switch(p){case"svg":p=1;break;case"math":p=2;break;default:p=0}}Y(ue),V(ue,p)}function _e(){Y(ue),Y(he),Y(Te)}function $e(p){p.memoizedState!==null&&V(nt,p);var b=ue.current,y=The(b,p.type);b!==y&&(V(he,p),V(ue,y))}function Ke(p){he.current===p&&(Y(ue),Y(he)),nt.current===p&&(Y(nt),lT._currentValue=ne)}var ht,Ct;function Ft(p){if(ht===void 0)try{throw Error()}catch(y){var b=y.stack.trim().match(/\n( *(at )?)/);ht=b&&b[1]||"",Ct=-1)":-1A||me[N]!==Be[A]){var et=` -`+me[N].replace(" at new "," at ");return p.displayName&&et.includes("")&&(et=et.replace("",p.displayName)),et}while(1<=N&&0<=A);break}}}finally{Ve=!1,Error.prepareStackTrace=y}return(y=p?p.displayName||p.name:"")?Ft(y):""}function qt(p,b){switch(p.tag){case 26:case 27:case 5:return Ft(p.type);case 16:return Ft("Lazy");case 13:return p.child!==b&&b!==null?Ft("Suspense Fallback"):Ft("Suspense");case 19:return Ft("SuspenseList");case 0:case 15:return tt(p.type,!1);case 11:return tt(p.type.render,!1);case 1:return tt(p.type,!0);case 31:return Ft("Activity");default:return""}}function It(p){try{var b="",y=null;do b+=qt(p,y),y=p,p=p.return;while(p);return b}catch(N){return` -Error generating stack: `+N.message+` -`+N.stack}}var Zt=Object.prototype.hasOwnProperty,En=i.unstable_scheduleCallback,Xi=i.unstable_cancelCallback,zi=i.unstable_shouldYield,Tr=i.unstable_requestPaint,Fs=i.unstable_now,qo=i.unstable_getCurrentPriorityLevel,Ge=i.unstable_ImmediatePriority,mt=i.unstable_UserBlockingPriority,tn=i.unstable_NormalPriority,Ln=i.unstable_LowPriority,Un=i.unstable_IdlePriority,vs=i.log,_r=i.unstable_setDisableYieldValue,Js=null,Ei=null;function wi(p){if(typeof vs=="function"&&_r(p),Ei&&typeof Ei.setStrictMode=="function")try{Ei.setStrictMode(Js,p)}catch{}}var ii=Math.clz32?Math.clz32:ba,Ko=Math.log,Vr=Math.LN2;function ba(p){return p>>>=0,p===0?32:31-(Ko(p)/Vr|0)|0}var ll=256,qc=262144,_s=4194304;function ys(p){var b=p&42;if(b!==0)return b;switch(p&-p){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 p&261888;case 262144:case 524288:case 1048576:case 2097152:return p&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return p&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return p}}function on(p,b,y){var N=p.pendingLanes;if(N===0)return 0;var A=0,M=p.suspendedLanes,q=p.pingedLanes;p=p.warmLanes;var ee=N&134217727;return ee!==0?(N=ee&~M,N!==0?A=ys(N):(q&=ee,q!==0?A=ys(q):y||(y=ee&~p,y!==0&&(A=ys(y))))):(ee=N&~M,ee!==0?A=ys(ee):q!==0?A=ys(q):y||(y=N&~p,y!==0&&(A=ys(y)))),A===0?0:b!==0&&b!==A&&(b&M)===0&&(M=A&-A,y=b&-b,M>=y||M===32&&(y&4194048)!==0)?b:A}function Nn(p,b){return(p.pendingLanes&~(p.suspendedLanes&~p.pingedLanes)&b)===0}function vn(p,b){switch(p){case 1:case 2:case 4:case 8:case 64:return b+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 b+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 Ci(){var p=_s;return _s<<=1,(_s&62914560)===0&&(_s=4194304),p}function zr(p){for(var b=[],y=0;31>y;y++)b.push(p);return b}function Ii(p,b){p.pendingLanes|=b,b!==268435456&&(p.suspendedLanes=0,p.pingedLanes=0,p.warmLanes=0)}function Si(p,b,y,N,A,M){var q=p.pendingLanes;p.pendingLanes=y,p.suspendedLanes=0,p.pingedLanes=0,p.warmLanes=0,p.expiredLanes&=y,p.entangledLanes&=y,p.errorRecoveryDisabledLanes&=y,p.shellSuspendCounter=0;var ee=p.entanglements,me=p.expirationTimes,Be=p.hiddenUpdates;for(y=q&~y;0"u")return null;try{return p.activeElement||p.body}catch{return p.body}}var w4e=/[\n"\\]/g;function Hu(p){return p.replace(w4e,function(b){return"\\"+b.charCodeAt(0).toString(16)+" "})}function BW(p,b,y,N,A,M,q,ee){p.name="",q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?p.type=q:p.removeAttribute("type"),b!=null?q==="number"?(b===0&&p.value===""||p.value!=b)&&(p.value=""+Bu(b)):p.value!==""+Bu(b)&&(p.value=""+Bu(b)):q!=="submit"&&q!=="reset"||p.removeAttribute("value"),b!=null?HW(p,q,Bu(b)):y!=null?HW(p,q,Bu(y)):N!=null&&p.removeAttribute("value"),A==null&&M!=null&&(p.defaultChecked=!!M),A!=null&&(p.checked=A&&typeof A!="function"&&typeof A!="symbol"),ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?p.name=""+Bu(ee):p.removeAttribute("name")}function Cce(p,b,y,N,A,M,q,ee){if(M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(p.type=M),b!=null||y!=null){if(!(M!=="submit"&&M!=="reset"||b!=null)){FW(p);return}y=y!=null?""+Bu(y):"",b=b!=null?""+Bu(b):y,ee||b===p.value||(p.value=b),p.defaultValue=b}N=N??A,N=typeof N!="function"&&typeof N!="symbol"&&!!N,p.checked=ee?p.checked:!!N,p.defaultChecked=!!N,q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"&&(p.name=q),FW(p)}function HW(p,b,y){b==="number"&&JP(p.ownerDocument)===p||p.defaultValue===""+y||(p.defaultValue=""+y)}function YC(p,b,y,N){if(p=p.options,b){b={};for(var A=0;A"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$W=!1;if(Ap)try{var ND={};Object.defineProperty(ND,"passive",{get:function(){$W=!0}}),window.addEventListener("test",ND,ND),window.removeEventListener("test",ND,ND)}catch{$W=!1}var nx=null,qW=null,tO=null;function Tce(){if(tO)return tO;var p,b=qW,y=b.length,N,A="value"in nx?nx.value:nx.textContent,M=A.length;for(p=0;p=DD),Oce=" ",jce=!1;function Fce(p,b){switch(p){case"keyup":return Q4e.indexOf(b.keyCode)!==-1;case"keydown":return b.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bce(p){return p=p.detail,typeof p=="object"&&"data"in p?p.data:null}var JC=!1;function Z4e(p,b){switch(p){case"compositionend":return Bce(b);case"keypress":return b.which!==32?null:(jce=!0,Oce);case"textInput":return p=b.data,p===Oce&&jce?null:p;default:return null}}function J4e(p,b){if(JC)return p==="compositionend"||!XW&&Fce(p,b)?(p=Tce(),tO=qW=nx=null,JC=!1,p):null;switch(p){case"paste":return null;case"keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:y,offset:b-p};p=N}e:{for(;y;){if(y.nextSibling){y=y.nextSibling;break e}y=y.parentNode}y=void 0}y=Kce(y)}}function Yce(p,b){return p&&b?p===b?!0:p&&p.nodeType===3?!1:b&&b.nodeType===3?Yce(p,b.parentNode):"contains"in p?p.contains(b):p.compareDocumentPosition?!!(p.compareDocumentPosition(b)&16):!1:!1}function Qce(p){p=p!=null&&p.ownerDocument!=null&&p.ownerDocument.defaultView!=null?p.ownerDocument.defaultView:window;for(var b=JP(p.document);b instanceof p.HTMLIFrameElement;){try{var y=typeof b.contentWindow.location.href=="string"}catch{y=!1}if(y)p=b.contentWindow;else break;b=JP(p.document)}return b}function eV(p){var b=p&&p.nodeName&&p.nodeName.toLowerCase();return b&&(b==="input"&&(p.type==="text"||p.type==="search"||p.type==="tel"||p.type==="url"||p.type==="password")||b==="textarea"||p.contentEditable==="true")}var aje=Ap&&"documentMode"in document&&11>=document.documentMode,eS=null,tV=null,RD=null,nV=!1;function Xce(p,b,y){var N=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;nV||eS==null||eS!==JP(N)||(N=eS,"selectionStart"in N&&eV(N)?N={start:N.selectionStart,end:N.selectionEnd}:(N=(N.ownerDocument&&N.ownerDocument.defaultView||window).getSelection(),N={anchorNode:N.anchorNode,anchorOffset:N.anchorOffset,focusNode:N.focusNode,focusOffset:N.focusOffset}),RD&&AD(RD,N)||(RD=N,N=GO(tV,"onSelect"),0>=q,A-=q,Hg=1<<32-ii(b)+A|y<fi?(qi=mn,mn=null):qi=mn.sibling;var Ss=Ue(De,mn,Fe[fi],it);if(Ss===null){mn===null&&(mn=qi);break}p&&mn&&Ss.alternate===null&&b(De,mn),ke=M(Ss,ke,fi),Cs===null?Cn=Ss:Cs.sibling=Ss,Cs=Ss,mn=qi}if(fi===Fe.length)return y(De,mn),Zi&&Mp(De,fi),Cn;if(mn===null){for(;fifi?(qi=mn,mn=null):qi=mn.sibling;var Sx=Ue(De,mn,Ss.value,it);if(Sx===null){mn===null&&(mn=qi);break}p&&mn&&Sx.alternate===null&&b(De,mn),ke=M(Sx,ke,fi),Cs===null?Cn=Sx:Cs.sibling=Sx,Cs=Sx,mn=qi}if(Ss.done)return y(De,mn),Zi&&Mp(De,fi),Cn;if(mn===null){for(;!Ss.done;fi++,Ss=Fe.next())Ss=at(De,Ss.value,it),Ss!==null&&(ke=M(Ss,ke,fi),Cs===null?Cn=Ss:Cs.sibling=Ss,Cs=Ss);return Zi&&Mp(De,fi),Cn}for(mn=N(mn);!Ss.done;fi++,Ss=Fe.next())Ss=Ye(mn,De,fi,Ss.value,it),Ss!==null&&(p&&Ss.alternate!==null&&mn.delete(Ss.key===null?fi:Ss.key),ke=M(Ss,ke,fi),Cs===null?Cn=Ss:Cs.sibling=Ss,Cs=Ss);return p&&mn.forEach(function(EFe){return b(De,EFe)}),Zi&&Mp(De,fi),Cn}function ur(De,ke,Fe,it){if(typeof Fe=="object"&&Fe!==null&&Fe.type===x&&Fe.key===null&&(Fe=Fe.props.children),typeof Fe=="object"&&Fe!==null){switch(Fe.$$typeof){case f:e:{for(var Cn=Fe.key;ke!==null;){if(ke.key===Cn){if(Cn=Fe.type,Cn===x){if(ke.tag===7){y(De,ke.sibling),it=A(ke,Fe.props.children),it.return=De,De=it;break e}}else if(ke.elementType===Cn||typeof Cn=="object"&&Cn!==null&&Cn.$$typeof===I&&w0(Cn)===ke.type){y(De,ke.sibling),it=A(ke,Fe.props),BD(it,Fe),it.return=De,De=it;break e}y(De,ke);break}else b(De,ke);ke=ke.sibling}Fe.type===x?(it=b0(Fe.props.children,De.mode,it,Fe.key),it.return=De,De=it):(it=uO(Fe.type,Fe.key,Fe.props,null,De.mode,it),BD(it,Fe),it.return=De,De=it)}return q(De);case m:e:{for(Cn=Fe.key;ke!==null;){if(ke.key===Cn)if(ke.tag===4&&ke.stateNode.containerInfo===Fe.containerInfo&&ke.stateNode.implementation===Fe.implementation){y(De,ke.sibling),it=A(ke,Fe.children||[]),it.return=De,De=it;break e}else{y(De,ke);break}else b(De,ke);ke=ke.sibling}it=cV(Fe,De.mode,it),it.return=De,De=it}return q(De);case I:return Fe=w0(Fe),ur(De,ke,Fe,it)}if(K(Fe))return nn(De,ke,Fe,it);if(B(Fe)){if(Cn=B(Fe),typeof Cn!="function")throw Error(n(150));return Fe=Cn.call(Fe),Pn(De,ke,Fe,it)}if(typeof Fe.then=="function")return ur(De,ke,xO(Fe),it);if(Fe.$$typeof===k)return ur(De,ke,fO(De,Fe),it);vO(De,Fe)}return typeof Fe=="string"&&Fe!==""||typeof Fe=="number"||typeof Fe=="bigint"?(Fe=""+Fe,ke!==null&&ke.tag===6?(y(De,ke.sibling),it=A(ke,Fe),it.return=De,De=it):(y(De,ke),it=lV(Fe,De.mode,it),it.return=De,De=it),q(De)):y(De,ke)}return function(De,ke,Fe,it){try{FD=0;var Cn=ur(De,ke,Fe,it);return uS=null,Cn}catch(mn){if(mn===dS||mn===mO)throw mn;var Cs=Ud(29,mn,null,De.mode);return Cs.lanes=it,Cs.return=De,Cs}finally{}}}var S0=_de(!0),yde=_de(!1),ax=!1;function yV(p){p.updateQueue={baseState:p.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wV(p,b){p=p.updateQueue,b.updateQueue===p&&(b.updateQueue={baseState:p.baseState,firstBaseUpdate:p.firstBaseUpdate,lastBaseUpdate:p.lastBaseUpdate,shared:p.shared,callbacks:null})}function lx(p){return{lane:p,tag:0,payload:null,callback:null,next:null}}function cx(p,b,y){var N=p.updateQueue;if(N===null)return null;if(N=N.shared,(Ts&2)!==0){var A=N.pending;return A===null?b.next=b:(b.next=A.next,A.next=b),N.pending=b,b=dO(p),sde(p,null,y),b}return cO(p,N,b,y),dO(p)}function HD(p,b,y){if(b=b.updateQueue,b!==null&&(b=b.shared,(y&4194048)!==0)){var N=b.lanes;N&=p.pendingLanes,y|=N,b.lanes=y,Bs(p,y)}}function CV(p,b){var y=p.updateQueue,N=p.alternate;if(N!==null&&(N=N.updateQueue,y===N)){var A=null,M=null;if(y=y.firstBaseUpdate,y!==null){do{var q={lane:y.lane,tag:y.tag,payload:y.payload,callback:null,next:null};M===null?A=M=q:M=M.next=q,y=y.next}while(y!==null);M===null?A=M=b:M=M.next=b}else A=M=b;y={baseState:N.baseState,firstBaseUpdate:A,lastBaseUpdate:M,shared:N.shared,callbacks:N.callbacks},p.updateQueue=y;return}p=y.lastBaseUpdate,p===null?y.firstBaseUpdate=b:p.next=b,y.lastBaseUpdate=b}var SV=!1;function WD(){if(SV){var p=cS;if(p!==null)throw p}}function VD(p,b,y,N){SV=!1;var A=p.updateQueue;ax=!1;var M=A.firstBaseUpdate,q=A.lastBaseUpdate,ee=A.shared.pending;if(ee!==null){A.shared.pending=null;var me=ee,Be=me.next;me.next=null,q===null?M=Be:q.next=Be,q=me;var et=p.alternate;et!==null&&(et=et.updateQueue,ee=et.lastBaseUpdate,ee!==q&&(ee===null?et.firstBaseUpdate=Be:ee.next=Be,et.lastBaseUpdate=me))}if(M!==null){var at=A.baseState;q=0,et=Be=me=null,ee=M;do{var Ue=ee.lane&-536870913,Ye=Ue!==ee.lane;if(Ye?($i&Ue)===Ue:(N&Ue)===Ue){Ue!==0&&Ue===lS&&(SV=!0),et!==null&&(et=et.next={lane:0,tag:ee.tag,payload:ee.payload,callback:null,next:null});e:{var nn=p,Pn=ee;Ue=b;var ur=y;switch(Pn.tag){case 1:if(nn=Pn.payload,typeof nn=="function"){at=nn.call(ur,at,Ue);break e}at=nn;break e;case 3:nn.flags=nn.flags&-65537|128;case 0:if(nn=Pn.payload,Ue=typeof nn=="function"?nn.call(ur,at,Ue):nn,Ue==null)break e;at=h({},at,Ue);break e;case 2:ax=!0}}Ue=ee.callback,Ue!==null&&(p.flags|=64,Ye&&(p.flags|=8192),Ye=A.callbacks,Ye===null?A.callbacks=[Ue]:Ye.push(Ue))}else Ye={lane:Ue,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null},et===null?(Be=et=Ye,me=at):et=et.next=Ye,q|=Ue;if(ee=ee.next,ee===null){if(ee=A.shared.pending,ee===null)break;Ye=ee,ee=Ye.next,Ye.next=null,A.lastBaseUpdate=Ye,A.shared.pending=null}}while(!0);et===null&&(me=at),A.baseState=me,A.firstBaseUpdate=Be,A.lastBaseUpdate=et,M===null&&(A.shared.lanes=0),fx|=q,p.lanes=q,p.memoizedState=at}}function wde(p,b){if(typeof p!="function")throw Error(n(191,p));p.call(b)}function Cde(p,b){var y=p.callbacks;if(y!==null)for(p.callbacks=null,p=0;pM?M:8;var q=z.T,ee={};z.T=ee,zV(p,!1,b,y);try{var me=A(),Be=z.S;if(Be!==null&&Be(ee,me),me!==null&&typeof me=="object"&&typeof me.then=="function"){var et=mje(me,N);$D(p,b,et,Yd(p))}else $D(p,b,N,Yd(p))}catch(at){$D(p,b,{then:function(){},status:"rejected",reason:at},Yd())}finally{G.p=M,q!==null&&ee.types!==null&&(q.types=ee.types),z.T=q}}function wje(){}function WV(p,b,y,N){if(p.tag!==5)throw Error(n(476));var A=tue(p).queue;eue(p,A,b,ne,y===null?wje:function(){return nue(p),y(N)})}function tue(p){var b=p.memoizedState;if(b!==null)return b;b={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fp,lastRenderedState:ne},next:null};var y={};return b.next={memoizedState:y,baseState:y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fp,lastRenderedState:y},next:null},p.memoizedState=b,p=p.alternate,p!==null&&(p.memoizedState=b),b}function nue(p){var b=tue(p);b.next===null&&(b=p.alternate.memoizedState),$D(p,b.next.queue,{},Yd())}function VV(){return dl(lT)}function iue(){return Mo().memoizedState}function sue(){return Mo().memoizedState}function Cje(p){for(var b=p.return;b!==null;){switch(b.tag){case 24:case 3:var y=Yd();p=lx(y);var N=cx(b,p,y);N!==null&&(Zc(N,b,y),HD(N,b,y)),b={cache:bV()},p.payload=b;return}b=b.return}}function Sje(p,b,y){var N=Yd();y={lane:N,revertLane:0,gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},DO(p)?oue(b,y):(y=oV(p,b,y,N),y!==null&&(Zc(y,p,N),aue(y,b,N)))}function rue(p,b,y){var N=Yd();$D(p,b,y,N)}function $D(p,b,y,N){var A={lane:N,revertLane:0,gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null};if(DO(p))oue(b,A);else{var M=p.alternate;if(p.lanes===0&&(M===null||M.lanes===0)&&(M=b.lastRenderedReducer,M!==null))try{var q=b.lastRenderedState,ee=M(q,y);if(A.hasEagerState=!0,A.eagerState=ee,zd(ee,q))return cO(p,b,A,0),wr===null&&lO(),!1}catch{}finally{}if(y=oV(p,b,A,N),y!==null)return Zc(y,p,N),aue(y,b,N),!0}return!1}function zV(p,b,y,N){if(N={lane:2,revertLane:yz(),gesture:null,action:N,hasEagerState:!1,eagerState:null,next:null},DO(p)){if(b)throw Error(n(479))}else b=oV(p,y,N,2),b!==null&&Zc(b,p,2)}function DO(p){var b=p.alternate;return p===ci||b!==null&&b===ci}function oue(p,b){gS=wO=!0;var y=p.pending;y===null?b.next=b:(b.next=y.next,y.next=b),p.pending=b}function aue(p,b,y){if((y&4194048)!==0){var N=b.lanes;N&=p.pendingLanes,y|=N,b.lanes=y,Bs(p,y)}}var qD={readContext:dl,use:kO,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};qD.useEffectEvent=xo;var lue={readContext:dl,use:kO,useCallback:function(p,b){return fc().memoizedState=[p,b===void 0?null:b],p},useContext:dl,useEffect:$de,useImperativeHandle:function(p,b,y){y=y!=null?y.concat([p]):null,EO(4194308,4,Yde.bind(null,b,p),y)},useLayoutEffect:function(p,b){return EO(4194308,4,p,b)},useInsertionEffect:function(p,b){EO(4,2,p,b)},useMemo:function(p,b){var y=fc();b=b===void 0?null:b;var N=p();if(k0){wi(!0);try{p()}finally{wi(!1)}}return y.memoizedState=[N,b],N},useReducer:function(p,b,y){var N=fc();if(y!==void 0){var A=y(b);if(k0){wi(!0);try{y(b)}finally{wi(!1)}}}else A=b;return N.memoizedState=N.baseState=A,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:A},N.queue=p,p=p.dispatch=Sje.bind(null,ci,p),[N.memoizedState,p]},useRef:function(p){var b=fc();return p={current:p},b.memoizedState=p},useState:function(p){p=OV(p);var b=p.queue,y=rue.bind(null,ci,b);return b.dispatch=y,[p.memoizedState,y]},useDebugValue:BV,useDeferredValue:function(p,b){var y=fc();return HV(y,p,b)},useTransition:function(){var p=OV(!1);return p=eue.bind(null,ci,p.queue,!0,!1),fc().memoizedState=p,[!1,p]},useSyncExternalStore:function(p,b,y){var N=ci,A=fc();if(Zi){if(y===void 0)throw Error(n(407));y=y()}else{if(y=b(),wr===null)throw Error(n(349));($i&127)!==0||Dde(N,b,y)}A.memoizedState=y;var M={value:y,getSnapshot:b};return A.queue=M,$de(Ide.bind(null,N,M,p),[p]),N.flags|=2048,pS(9,{destroy:void 0},Tde.bind(null,N,M,y,b),null),y},useId:function(){var p=fc(),b=wr.identifierPrefix;if(Zi){var y=Wg,N=Hg;y=(N&~(1<<32-ii(N)-1)).toString(32)+y,b="_"+b+"R_"+y,y=CO++,0<\/script>",M=M.removeChild(M.firstChild);break;case"select":M=typeof N.is=="string"?q.createElement("select",{is:N.is}):q.createElement("select"),N.multiple?M.multiple=!0:N.size&&(M.size=N.size);break;default:M=typeof N.is=="string"?q.createElement(A,{is:N.is}):q.createElement(A)}}M[Ds]=b,M[yr]=N;e:for(q=b.child;q!==null;){if(q.tag===5||q.tag===6)M.appendChild(q.stateNode);else if(q.tag!==4&&q.tag!==27&&q.child!==null){q.child.return=q,q=q.child;continue}if(q===b)break e;for(;q.sibling===null;){if(q.return===null||q.return===b)break e;q=q.return}q.sibling.return=q.return,q=q.sibling}b.stateNode=M;e:switch(hl(M,A,N),A){case"button":case"input":case"select":case"textarea":N=!!N.autoFocus;break e;case"img":N=!0;break e;default:N=!1}N&&Hp(b)}}return Fr(b),iz(b,b.type,p===null?null:p.memoizedProps,b.pendingProps,y),null;case 6:if(p&&b.stateNode!=null)p.memoizedProps!==N&&Hp(b);else{if(typeof N!="string"&&b.stateNode===null)throw Error(n(166));if(p=Te.current,oS(b)){if(p=b.stateNode,y=b.memoizedProps,N=null,A=cl,A!==null)switch(A.tag){case 27:case 5:N=A.memoizedProps}p[Ds]=b,p=!!(p.nodeValue===y||N!==null&&N.suppressHydrationWarning===!0||Ehe(p.nodeValue,y)),p||rx(b,!0)}else p=YO(p).createTextNode(N),p[Ds]=b,b.stateNode=p}return Fr(b),null;case 31:if(y=b.memoizedState,p===null||p.memoizedState!==null){if(N=oS(b),y!==null){if(p===null){if(!N)throw Error(n(318));if(p=b.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(n(557));p[Ds]=b}else x0(),(b.flags&128)===0&&(b.memoizedState=null),b.flags|=4;Fr(b),p=!1}else y=gV(),p!==null&&p.memoizedState!==null&&(p.memoizedState.hydrationErrors=y),p=!0;if(!p)return b.flags&256?(qd(b),b):(qd(b),null);if((b.flags&128)!==0)throw Error(n(558))}return Fr(b),null;case 13:if(N=b.memoizedState,p===null||p.memoizedState!==null&&p.memoizedState.dehydrated!==null){if(A=oS(b),N!==null&&N.dehydrated!==null){if(p===null){if(!A)throw Error(n(318));if(A=b.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(n(317));A[Ds]=b}else x0(),(b.flags&128)===0&&(b.memoizedState=null),b.flags|=4;Fr(b),A=!1}else A=gV(),p!==null&&p.memoizedState!==null&&(p.memoizedState.hydrationErrors=A),A=!0;if(!A)return b.flags&256?(qd(b),b):(qd(b),null)}return qd(b),(b.flags&128)!==0?(b.lanes=y,b):(y=N!==null,p=p!==null&&p.memoizedState!==null,y&&(N=b.child,A=null,N.alternate!==null&&N.alternate.memoizedState!==null&&N.alternate.memoizedState.cachePool!==null&&(A=N.alternate.memoizedState.cachePool.pool),M=null,N.memoizedState!==null&&N.memoizedState.cachePool!==null&&(M=N.memoizedState.cachePool.pool),M!==A&&(N.flags|=2048)),y!==p&&y&&(b.child.flags|=8192),MO(b,b.updateQueue),Fr(b),null);case 4:return _e(),p===null&&kz(b.stateNode.containerInfo),Fr(b),null;case 10:return Op(b.type),Fr(b),null;case 19:if(Y(Ro),N=b.memoizedState,N===null)return Fr(b),null;if(A=(b.flags&128)!==0,M=N.rendering,M===null)if(A)GD(N,!1);else{if(vo!==0||p!==null&&(p.flags&128)!==0)for(p=b.child;p!==null;){if(M=yO(p),M!==null){for(b.flags|=128,GD(N,!1),p=M.updateQueue,b.updateQueue=p,MO(b,p),b.subtreeFlags=0,p=y,y=b.child;y!==null;)rde(y,p),y=y.sibling;return V(Ro,Ro.current&1|2),Zi&&Mp(b,N.treeForkCount),b.child}p=p.sibling}N.tail!==null&&Fs()>BO&&(b.flags|=128,A=!0,GD(N,!1),b.lanes=4194304)}else{if(!A)if(p=yO(M),p!==null){if(b.flags|=128,A=!0,p=p.updateQueue,b.updateQueue=p,MO(b,p),GD(N,!0),N.tail===null&&N.tailMode==="hidden"&&!M.alternate&&!Zi)return Fr(b),null}else 2*Fs()-N.renderingStartTime>BO&&y!==536870912&&(b.flags|=128,A=!0,GD(N,!1),b.lanes=4194304);N.isBackwards?(M.sibling=b.child,b.child=M):(p=N.last,p!==null?p.sibling=M:b.child=M,N.last=M)}return N.tail!==null?(p=N.tail,N.rendering=p,N.tail=p.sibling,N.renderingStartTime=Fs(),p.sibling=null,y=Ro.current,V(Ro,A?y&1|2:y&1),Zi&&Mp(b,N.treeForkCount),p):(Fr(b),null);case 22:case 23:return qd(b),NV(),N=b.memoizedState!==null,p!==null?p.memoizedState!==null!==N&&(b.flags|=8192):N&&(b.flags|=8192),N?(y&536870912)!==0&&(b.flags&128)===0&&(Fr(b),b.subtreeFlags&6&&(b.flags|=8192)):Fr(b),y=b.updateQueue,y!==null&&MO(b,y.retryQueue),y=null,p!==null&&p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(y=p.memoizedState.cachePool.pool),N=null,b.memoizedState!==null&&b.memoizedState.cachePool!==null&&(N=b.memoizedState.cachePool.pool),N!==y&&(b.flags|=2048),p!==null&&Y(y0),null;case 24:return y=null,p!==null&&(y=p.memoizedState.cache),b.memoizedState.cache!==y&&(b.flags|=2048),Op(Go),Fr(b),null;case 25:return null;case 30:return null}throw Error(n(156,b.tag))}function Dje(p,b){switch(uV(b),b.tag){case 1:return p=b.flags,p&65536?(b.flags=p&-65537|128,b):null;case 3:return Op(Go),_e(),p=b.flags,(p&65536)!==0&&(p&128)===0?(b.flags=p&-65537|128,b):null;case 26:case 27:case 5:return Ke(b),null;case 31:if(b.memoizedState!==null){if(qd(b),b.alternate===null)throw Error(n(340));x0()}return p=b.flags,p&65536?(b.flags=p&-65537|128,b):null;case 13:if(qd(b),p=b.memoizedState,p!==null&&p.dehydrated!==null){if(b.alternate===null)throw Error(n(340));x0()}return p=b.flags,p&65536?(b.flags=p&-65537|128,b):null;case 19:return Y(Ro),null;case 4:return _e(),null;case 10:return Op(b.type),null;case 22:case 23:return qd(b),NV(),p!==null&&Y(y0),p=b.flags,p&65536?(b.flags=p&-65537|128,b):null;case 24:return Op(Go),null;case 25:return null;default:return null}}function Aue(p,b){switch(uV(b),b.tag){case 3:Op(Go),_e();break;case 26:case 27:case 5:Ke(b);break;case 4:_e();break;case 31:b.memoizedState!==null&&qd(b);break;case 13:qd(b);break;case 19:Y(Ro);break;case 10:Op(b.type);break;case 22:case 23:qd(b),NV(),p!==null&&Y(y0);break;case 24:Op(Go)}}function YD(p,b){try{var y=b.updateQueue,N=y!==null?y.lastEffect:null;if(N!==null){var A=N.next;y=A;do{if((y.tag&p)===p){N=void 0;var M=y.create,q=y.inst;N=M(),q.destroy=N}y=y.next}while(y!==A)}}catch(ee){tr(b,b.return,ee)}}function hx(p,b,y){try{var N=b.updateQueue,A=N!==null?N.lastEffect:null;if(A!==null){var M=A.next;N=M;do{if((N.tag&p)===p){var q=N.inst,ee=q.destroy;if(ee!==void 0){q.destroy=void 0,A=b;var me=y,Be=ee;try{Be()}catch(et){tr(A,me,et)}}}N=N.next}while(N!==M)}}catch(et){tr(b,b.return,et)}}function Rue(p){var b=p.updateQueue;if(b!==null){var y=p.stateNode;try{Cde(b,y)}catch(N){tr(p,p.return,N)}}}function Mue(p,b,y){y.props=N0(p.type,p.memoizedProps),y.state=p.memoizedState;try{y.componentWillUnmount()}catch(N){tr(p,b,N)}}function QD(p,b){try{var y=p.ref;if(y!==null){switch(p.tag){case 26:case 27:case 5:var N=p.stateNode;break;case 30:N=p.stateNode;break;default:N=p.stateNode}typeof y=="function"?p.refCleanup=y(N):y.current=N}}catch(A){tr(p,b,A)}}function Vg(p,b){var y=p.ref,N=p.refCleanup;if(y!==null)if(typeof N=="function")try{N()}catch(A){tr(p,b,A)}finally{p.refCleanup=null,p=p.alternate,p!=null&&(p.refCleanup=null)}else if(typeof y=="function")try{y(null)}catch(A){tr(p,b,A)}else y.current=null}function Pue(p){var b=p.type,y=p.memoizedProps,N=p.stateNode;try{e:switch(b){case"button":case"input":case"select":case"textarea":y.autoFocus&&N.focus();break e;case"img":y.src?N.src=y.src:y.srcSet&&(N.srcset=y.srcSet)}}catch(A){tr(p,p.return,A)}}function sz(p,b,y){try{var N=p.stateNode;Xje(N,p.type,y,b),N[yr]=b}catch(A){tr(p,p.return,A)}}function Oue(p){return p.tag===5||p.tag===3||p.tag===26||p.tag===27&&vx(p.type)||p.tag===4}function rz(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||Oue(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.tag===27&&vx(p.type)||p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function oz(p,b,y){var N=p.tag;if(N===5||N===6)p=p.stateNode,b?(y.nodeType===9?y.body:y.nodeName==="HTML"?y.ownerDocument.body:y).insertBefore(p,b):(b=y.nodeType===9?y.body:y.nodeName==="HTML"?y.ownerDocument.body:y,b.appendChild(p),y=y._reactRootContainer,y!=null||b.onclick!==null||(b.onclick=Ip));else if(N!==4&&(N===27&&vx(p.type)&&(y=p.stateNode,b=null),p=p.child,p!==null))for(oz(p,b,y),p=p.sibling;p!==null;)oz(p,b,y),p=p.sibling}function PO(p,b,y){var N=p.tag;if(N===5||N===6)p=p.stateNode,b?y.insertBefore(p,b):y.appendChild(p);else if(N!==4&&(N===27&&vx(p.type)&&(y=p.stateNode),p=p.child,p!==null))for(PO(p,b,y),p=p.sibling;p!==null;)PO(p,b,y),p=p.sibling}function jue(p){var b=p.stateNode,y=p.memoizedProps;try{for(var N=p.type,A=b.attributes;A.length;)b.removeAttributeNode(A[0]);hl(b,N,y),b[Ds]=p,b[yr]=y}catch(M){tr(p,p.return,M)}}var Wp=!1,Xo=!1,az=!1,Fue=typeof WeakSet=="function"?WeakSet:Set,ja=null;function Tje(p,b){if(p=p.containerInfo,Lz=n5,p=Qce(p),eV(p)){if("selectionStart"in p)var y={start:p.selectionStart,end:p.selectionEnd};else e:{y=(y=p.ownerDocument)&&y.defaultView||window;var N=y.getSelection&&y.getSelection();if(N&&N.rangeCount!==0){y=N.anchorNode;var A=N.anchorOffset,M=N.focusNode;N=N.focusOffset;try{y.nodeType,M.nodeType}catch{y=null;break e}var q=0,ee=-1,me=-1,Be=0,et=0,at=p,Ue=null;t:for(;;){for(var Ye;at!==y||A!==0&&at.nodeType!==3||(ee=q+A),at!==M||N!==0&&at.nodeType!==3||(me=q+N),at.nodeType===3&&(q+=at.nodeValue.length),(Ye=at.firstChild)!==null;)Ue=at,at=Ye;for(;;){if(at===p)break t;if(Ue===y&&++Be===A&&(ee=q),Ue===M&&++et===N&&(me=q),(Ye=at.nextSibling)!==null)break;at=Ue,Ue=at.parentNode}at=Ye}y=ee===-1||me===-1?null:{start:ee,end:me}}else y=null}y=y||{start:0,end:0}}else y=null;for(Dz={focusedElem:p,selectionRange:y},n5=!1,ja=b;ja!==null;)if(b=ja,p=b.child,(b.subtreeFlags&1028)!==0&&p!==null)p.return=b,ja=p;else for(;ja!==null;){switch(b=ja,M=b.alternate,p=b.flags,b.tag){case 0:if((p&4)!==0&&(p=b.updateQueue,p=p!==null?p.events:null,p!==null))for(y=0;y title"))),hl(M,N,y),M[Ds]=p,Bn(M),N=M;break e;case"link":var q=Uhe("link","href",A).get(N+(y.href||""));if(q){for(var ee=0;eeur&&(q=ur,ur=Pn,Pn=q);var De=Gce(ee,Pn),ke=Gce(ee,ur);if(De&&ke&&(Ye.rangeCount!==1||Ye.anchorNode!==De.node||Ye.anchorOffset!==De.offset||Ye.focusNode!==ke.node||Ye.focusOffset!==ke.offset)){var Fe=at.createRange();Fe.setStart(De.node,De.offset),Ye.removeAllRanges(),Pn>ur?(Ye.addRange(Fe),Ye.extend(ke.node,ke.offset)):(Fe.setEnd(ke.node,ke.offset),Ye.addRange(Fe))}}}}for(at=[],Ye=ee;Ye=Ye.parentNode;)Ye.nodeType===1&&at.push({element:Ye,left:Ye.scrollLeft,top:Ye.scrollTop});for(typeof ee.focus=="function"&&ee.focus(),ee=0;eey?32:y,z.T=null,y=fz,fz=null;var M=mx,q=qp;if(va=0,_S=mx=null,qp=0,(Ts&6)!==0)throw Error(n(331));var ee=Ts;if(Ts|=4,Yue(M.current),que(M,M.current,q,y),Ts=ee,nT(0,!1),Ei&&typeof Ei.onPostCommitFiberRoot=="function")try{Ei.onPostCommitFiberRoot(Js,M)}catch{}return!0}finally{G.p=A,z.T=N,ghe(p,b)}}function phe(p,b,y){b=Vu(y,b),b=KV(p.stateNode,b,2),p=cx(p,b,2),p!==null&&(Ii(p,2),zg(p))}function tr(p,b,y){if(p.tag===3)phe(p,p,y);else for(;b!==null;){if(b.tag===3){phe(b,p,y);break}else if(b.tag===1){var N=b.stateNode;if(typeof b.type.getDerivedStateFromError=="function"||typeof N.componentDidCatch=="function"&&(px===null||!px.has(N))){p=Vu(y,p),y=mue(2),N=cx(b,y,2),N!==null&&(bue(y,N,b,p),Ii(N,2),zg(N));break}}b=b.return}}function xz(p,b,y){var N=p.pingCache;if(N===null){N=p.pingCache=new Rje;var A=new Set;N.set(b,A)}else A=N.get(b),A===void 0&&(A=new Set,N.set(b,A));A.has(y)||(dz=!0,A.add(y),p=Fje.bind(null,p,b,y),b.then(p,p))}function Fje(p,b,y){var N=p.pingCache;N!==null&&N.delete(b),p.pingedLanes|=p.suspendedLanes&y,p.warmLanes&=~y,wr===p&&($i&y)===y&&(vo===4||vo===3&&($i&62914560)===$i&&300>Fs()-FO?(Ts&2)===0&&yS(p,0):uz|=y,vS===$i&&(vS=0)),zg(p)}function mhe(p,b){b===0&&(b=Ci()),p=m0(p,b),p!==null&&(Ii(p,b),zg(p))}function Bje(p){var b=p.memoizedState,y=0;b!==null&&(y=b.retryLane),mhe(p,y)}function Hje(p,b){var y=0;switch(p.tag){case 31:case 13:var N=p.stateNode,A=p.memoizedState;A!==null&&(y=A.retryLane);break;case 19:N=p.stateNode;break;case 22:N=p.stateNode._retryCache;break;default:throw Error(n(314))}N!==null&&N.delete(b),mhe(p,y)}function Wje(p,b){return En(p,b)}var $O=null,CS=null,vz=!1,qO=!1,_z=!1,xx=0;function zg(p){p!==CS&&p.next===null&&(CS===null?$O=CS=p:CS=CS.next=p),qO=!0,vz||(vz=!0,zje())}function nT(p,b){if(!_z&&qO){_z=!0;do for(var y=!1,N=$O;N!==null;){if(p!==0){var A=N.pendingLanes;if(A===0)var M=0;else{var q=N.suspendedLanes,ee=N.pingedLanes;M=(1<<31-ii(42|p)+1)-1,M&=A&~(q&~ee),M=M&201326741?M&201326741|1:M?M|2:0}M!==0&&(y=!0,_he(N,M))}else M=$i,M=on(N,N===wr?M:0,N.cancelPendingCommit!==null||N.timeoutHandle!==-1),(M&3)===0||Nn(N,M)||(y=!0,_he(N,M));N=N.next}while(y);_z=!1}}function Vje(){bhe()}function bhe(){qO=vz=!1;var p=0;xx!==0&&Jje()&&(p=xx);for(var b=Fs(),y=null,N=$O;N!==null;){var A=N.next,M=xhe(N,b);M===0?(N.next=null,y===null?$O=A:y.next=A,A===null&&(CS=y)):(y=N,(p!==0||(M&3)!==0)&&(qO=!0)),N=A}va!==0&&va!==5||nT(p),xx!==0&&(xx=0)}function xhe(p,b){for(var y=p.suspendedLanes,N=p.pingedLanes,A=p.expirationTimes,M=p.pendingLanes&-62914561;0ee)break;var et=me.transferSize,at=me.initiatorType;et&&Lhe(at)&&(me=me.responseEnd,q+=et*(me"u"?null:document;function Hhe(p,b,y){var N=SS;if(N&&typeof b=="string"&&b){var A=Hu(b);A='link[rel="'+p+'"][href="'+A+'"]',typeof y=="string"&&(A+='[crossorigin="'+y+'"]'),Bhe.has(A)||(Bhe.add(A),p={rel:p,crossOrigin:y,href:b},N.querySelector(A)===null&&(b=N.createElement("link"),hl(b,"link",p),Bn(b),N.head.appendChild(b)))}}function lFe(p){Kp.D(p),Hhe("dns-prefetch",p,null)}function cFe(p,b){Kp.C(p,b),Hhe("preconnect",p,b)}function dFe(p,b,y){Kp.L(p,b,y);var N=SS;if(N&&p&&b){var A='link[rel="preload"][as="'+Hu(b)+'"]';b==="image"&&y&&y.imageSrcSet?(A+='[imagesrcset="'+Hu(y.imageSrcSet)+'"]',typeof y.imageSizes=="string"&&(A+='[imagesizes="'+Hu(y.imageSizes)+'"]')):A+='[href="'+Hu(p)+'"]';var M=A;switch(b){case"style":M=kS(p);break;case"script":M=NS(p)}Gu.has(M)||(p=h({rel:"preload",href:b==="image"&&y&&y.imageSrcSet?void 0:p,as:b},y),Gu.set(M,p),N.querySelector(A)!==null||b==="style"&&N.querySelector(oT(M))||b==="script"&&N.querySelector(aT(M))||(b=N.createElement("link"),hl(b,"link",p),Bn(b),N.head.appendChild(b)))}}function uFe(p,b){Kp.m(p,b);var y=SS;if(y&&p){var N=b&&typeof b.as=="string"?b.as:"script",A='link[rel="modulepreload"][as="'+Hu(N)+'"][href="'+Hu(p)+'"]',M=A;switch(N){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":M=NS(p)}if(!Gu.has(M)&&(p=h({rel:"modulepreload",href:p},b),Gu.set(M,p),y.querySelector(A)===null)){switch(N){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(y.querySelector(aT(M)))return}N=y.createElement("link"),hl(N,"link",p),Bn(N),y.head.appendChild(N)}}}function hFe(p,b,y){Kp.S(p,b,y);var N=SS;if(N&&p){var A=Tn(N).hoistableStyles,M=kS(p);b=b||"default";var q=A.get(M);if(!q){var ee={loading:0,preload:null};if(q=N.querySelector(oT(M)))ee.loading=5;else{p=h({rel:"stylesheet",href:p,"data-precedence":b},y),(y=Gu.get(M))&&Oz(p,y);var me=q=N.createElement("link");Bn(me),hl(me,"link",p),me._p=new Promise(function(Be,et){me.onload=Be,me.onerror=et}),me.addEventListener("load",function(){ee.loading|=1}),me.addEventListener("error",function(){ee.loading|=2}),ee.loading|=4,XO(q,b,N)}q={type:"stylesheet",instance:q,count:1,state:ee},A.set(M,q)}}}function gFe(p,b){Kp.X(p,b);var y=SS;if(y&&p){var N=Tn(y).hoistableScripts,A=NS(p),M=N.get(A);M||(M=y.querySelector(aT(A)),M||(p=h({src:p,async:!0},b),(b=Gu.get(A))&&jz(p,b),M=y.createElement("script"),Bn(M),hl(M,"link",p),y.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},N.set(A,M))}}function fFe(p,b){Kp.M(p,b);var y=SS;if(y&&p){var N=Tn(y).hoistableScripts,A=NS(p),M=N.get(A);M||(M=y.querySelector(aT(A)),M||(p=h({src:p,async:!0,type:"module"},b),(b=Gu.get(A))&&jz(p,b),M=y.createElement("script"),Bn(M),hl(M,"link",p),y.head.appendChild(M)),M={type:"script",instance:M,count:1,state:null},N.set(A,M))}}function Whe(p,b,y,N){var A=(A=Te.current)?QO(A):null;if(!A)throw Error(n(446));switch(p){case"meta":case"title":return null;case"style":return typeof y.precedence=="string"&&typeof y.href=="string"?(b=kS(y.href),y=Tn(A).hoistableStyles,N=y.get(b),N||(N={type:"style",instance:null,count:0,state:null},y.set(b,N)),N):{type:"void",instance:null,count:0,state:null};case"link":if(y.rel==="stylesheet"&&typeof y.href=="string"&&typeof y.precedence=="string"){p=kS(y.href);var M=Tn(A).hoistableStyles,q=M.get(p);if(q||(A=A.ownerDocument||A,q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},M.set(p,q),(M=A.querySelector(oT(p)))&&!M._p&&(q.instance=M,q.state.loading=5),Gu.has(p)||(y={rel:"preload",as:"style",href:y.href,crossOrigin:y.crossOrigin,integrity:y.integrity,media:y.media,hrefLang:y.hrefLang,referrerPolicy:y.referrerPolicy},Gu.set(p,y),M||pFe(A,p,y,q.state))),b&&N===null)throw Error(n(528,""));return q}if(b&&N!==null)throw Error(n(529,""));return null;case"script":return b=y.async,y=y.src,typeof y=="string"&&b&&typeof b!="function"&&typeof b!="symbol"?(b=NS(y),y=Tn(A).hoistableScripts,N=y.get(b),N||(N={type:"script",instance:null,count:0,state:null},y.set(b,N)),N):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,p))}}function kS(p){return'href="'+Hu(p)+'"'}function oT(p){return'link[rel="stylesheet"]['+p+"]"}function Vhe(p){return h({},p,{"data-precedence":p.precedence,precedence:null})}function pFe(p,b,y,N){p.querySelector('link[rel="preload"][as="style"]['+b+"]")?N.loading=1:(b=p.createElement("link"),N.preload=b,b.addEventListener("load",function(){return N.loading|=1}),b.addEventListener("error",function(){return N.loading|=2}),hl(b,"link",y),Bn(b),p.head.appendChild(b))}function NS(p){return'[src="'+Hu(p)+'"]'}function aT(p){return"script[async]"+p}function zhe(p,b,y){if(b.count++,b.instance===null)switch(b.type){case"style":var N=p.querySelector('style[data-href~="'+Hu(y.href)+'"]');if(N)return b.instance=N,Bn(N),N;var A=h({},y,{"data-href":y.href,"data-precedence":y.precedence,href:null,precedence:null});return N=(p.ownerDocument||p).createElement("style"),Bn(N),hl(N,"style",A),XO(N,y.precedence,p),b.instance=N;case"stylesheet":A=kS(y.href);var M=p.querySelector(oT(A));if(M)return b.state.loading|=4,b.instance=M,Bn(M),M;N=Vhe(y),(A=Gu.get(A))&&Oz(N,A),M=(p.ownerDocument||p).createElement("link"),Bn(M);var q=M;return q._p=new Promise(function(ee,me){q.onload=ee,q.onerror=me}),hl(M,"link",N),b.state.loading|=4,XO(M,y.precedence,p),b.instance=M;case"script":return M=NS(y.src),(A=p.querySelector(aT(M)))?(b.instance=A,Bn(A),A):(N=y,(A=Gu.get(M))&&(N=h({},y),jz(N,A)),p=p.ownerDocument||p,A=p.createElement("script"),Bn(A),hl(A,"link",N),p.head.appendChild(A),b.instance=A);case"void":return null;default:throw Error(n(443,b.type))}else b.type==="stylesheet"&&(b.state.loading&4)===0&&(N=b.instance,b.state.loading|=4,XO(N,y.precedence,p));return b.instance}function XO(p,b,y){for(var N=y.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=N.length?N[N.length-1]:null,M=A,q=0;q title"):null)}function mFe(p,b,y){if(y===1||b.itemProp!=null)return!1;switch(p){case"meta":case"title":return!0;case"style":if(typeof b.precedence!="string"||typeof b.href!="string"||b.href==="")break;return!0;case"link":if(typeof b.rel!="string"||typeof b.href!="string"||b.href===""||b.onLoad||b.onError)break;switch(b.rel){case"stylesheet":return p=b.disabled,typeof b.precedence=="string"&&p==null;default:return!0}case"script":if(b.async&&typeof b.async!="function"&&typeof b.async!="symbol"&&!b.onLoad&&!b.onError&&b.src&&typeof b.src=="string")return!0}return!1}function qhe(p){return!(p.type==="stylesheet"&&(p.state.loading&3)===0)}function bFe(p,b,y,N){if(y.type==="stylesheet"&&(typeof N.media!="string"||matchMedia(N.media).matches!==!1)&&(y.state.loading&4)===0){if(y.instance===null){var A=kS(N.href),M=b.querySelector(oT(A));if(M){b=M._p,b!==null&&typeof b=="object"&&typeof b.then=="function"&&(p.count++,p=JO.bind(p),b.then(p,p)),y.state.loading|=4,y.instance=M,Bn(M);return}M=b.ownerDocument||b,N=Vhe(N),(A=Gu.get(A))&&Oz(N,A),M=M.createElement("link"),Bn(M);var q=M;q._p=new Promise(function(ee,me){q.onload=ee,q.onerror=me}),hl(M,"link",N),y.instance=M}p.stylesheets===null&&(p.stylesheets=new Map),p.stylesheets.set(y,b),(b=y.state.preload)&&(y.state.loading&3)===0&&(p.count++,y=JO.bind(p),b.addEventListener("load",y),b.addEventListener("error",y))}}var Fz=0;function xFe(p,b){return p.stylesheets&&p.count===0&&t5(p,p.stylesheets),0Fz?50:800)+b);return p.unsuspend=y,function(){p.unsuspend=null,clearTimeout(N),clearTimeout(A)}}:null}function JO(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)t5(this,this.stylesheets);else if(this.unsuspend){var p=this.unsuspend;this.unsuspend=null,p()}}}var e5=null;function t5(p,b){p.stylesheets=null,p.unsuspend!==null&&(p.count++,e5=new Map,b.forEach(vFe,p),e5=null,JO.call(p))}function vFe(p,b){if(!(b.state.loading&4)){var y=e5.get(p);if(y)var N=y.get(null);else{y=new Map,e5.set(p,y);for(var A=p.querySelectorAll("link[data-precedence],style[data-precedence]"),M=0;M"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),Gz.exports=jFe(),Gz.exports}var BFe=FFe(),hg=DCe();const TCe=t7(hg);/** - * @remix-run/router v1.23.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function uA(){return uA=Object.assign?Object.assign.bind():function(i){for(var e=1;e"u")throw new Error(e)}function yie(i,e){if(!i){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function WFe(){return Math.random().toString(36).substr(2,8)}function xge(i,e){return{usr:i.state,key:i.key,idx:e}}function LK(i,e,t,n){return t===void 0&&(t=null),uA({pathname:typeof i=="string"?i:i.pathname,search:"",hash:""},typeof e=="string"?DL(e):e,{state:t,key:e&&e.key||n||WFe()})}function pj(i){let{pathname:e="/",search:t="",hash:n=""}=i;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function DL(i){let e={};if(i){let t=i.indexOf("#");t>=0&&(e.hash=i.substr(t),i=i.substr(0,t));let n=i.indexOf("?");n>=0&&(e.search=i.substr(n),i=i.substr(0,n)),i&&(e.pathname=i)}return e}function VFe(i,e,t,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:r=!1}=n,o=s.history,a=_v.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(uA({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function h(){a=_v.Pop;let v=u(),_=v==null?null:v-c;c=v,l&&l({action:a,location:x.location,delta:_})}function g(v,_){a=_v.Push;let w=LK(x.location,v,_);c=u()+1;let k=xge(w,c),C=x.createHref(w);try{o.pushState(k,"",C)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(C)}r&&l&&l({action:a,location:x.location,delta:1})}function f(v,_){a=_v.Replace;let w=LK(x.location,v,_);c=u();let k=xge(w,c),C=x.createHref(w);o.replaceState(k,"",C),r&&l&&l({action:a,location:x.location,delta:0})}function m(v){let _=s.location.origin!=="null"?s.location.origin:s.location.href,w=typeof v=="string"?v:pj(v);return w=w.replace(/ $/,"%20"),co(_,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,_)}let x={get action(){return a},get location(){return i(s,o)},listen(v){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(bge,h),l=v,()=>{s.removeEventListener(bge,h),l=null}},createHref(v){return e(s,v)},createURL:m,encodeLocation(v){let _=m(v);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:g,replace:f,go(v){return o.go(v)}};return x}var vge;(function(i){i.data="data",i.deferred="deferred",i.redirect="redirect",i.error="error"})(vge||(vge={}));function zFe(i,e,t){return t===void 0&&(t="/"),UFe(i,e,t)}function UFe(i,e,t,n){let s=typeof e=="string"?DL(e):e,r=TE(s.pathname||"/",t);if(r==null)return null;let o=ICe(i);$Fe(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?r.path||"":a,caseSensitive:r.caseSensitive===!0,childrenIndex:o,route:r};l.relativePath.startsWith("/")&&(co(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Wv([n,l.relativePath]),u=t.concat(l);r.children&&r.children.length>0&&(co(r.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),ICe(r.children,e,u,c)),!(r.path==null&&!r.index)&&e.push({path:c,score:ZFe(c,r.index),routesMeta:u})};return i.forEach((r,o)=>{var a;if(r.path===""||!((a=r.path)!=null&&a.includes("?")))s(r,o);else for(let l of ACe(r.path))s(r,o,l)}),e}function ACe(i){let e=i.split("/");if(e.length===0)return[];let[t,...n]=e,s=t.endsWith("?"),r=t.replace(/\?$/,"");if(n.length===0)return s?[r,""]:[r];let o=ACe(n.join("/")),a=[];return a.push(...o.map(l=>l===""?r:[r,l].join("/"))),s&&a.push(...o),a.map(l=>i.startsWith("/")&&l===""?"/":l)}function $Fe(i){i.sort((e,t)=>e.score!==t.score?t.score-e.score:JFe(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}const qFe=/^:[\w-]+$/,KFe=3,GFe=2,YFe=1,QFe=10,XFe=-2,_ge=i=>i==="*";function ZFe(i,e){let t=i.split("/"),n=t.length;return t.some(_ge)&&(n+=XFe),e&&(n+=GFe),t.filter(s=>!_ge(s)).reduce((s,r)=>s+(qFe.test(r)?KFe:r===""?YFe:QFe),n)}function JFe(i,e){return i.length===e.length&&i.slice(0,-1).every((n,s)=>n===e[s])?i[i.length-1]-e[e.length-1]:0}function e6e(i,e,t){let{routesMeta:n}=i,s={},r="/",o=[];for(let a=0;a{let{paramName:g,isOptional:f}=u;if(g==="*"){let x=a[h]||"";o=r.slice(0,r.length-x.length).replace(/(.)\/+$/,"$1")}const m=a[h];return f&&!m?c[g]=void 0:c[g]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:r,pathnameBase:o,pattern:i}}function t6e(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),yie(i==="*"||!i.endsWith("*")||i.endsWith("/*"),'Route path "'+i+'" will be treated as if it were '+('"'+i.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+i.replace(/\*$/,"/*")+'".'));let n=[],s="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return i.endsWith("*")?(n.push({paramName:"*"}),s+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?s+="\\/*$":i!==""&&i!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function n6e(i){try{return i.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return yie(!1,'The URL path "'+i+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),i}}function TE(i,e){if(e==="/")return i;if(!i.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=i.charAt(t);return n&&n!=="/"?null:i.slice(t)||"/"}const i6e=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,s6e=i=>i6e.test(i);function r6e(i,e){e===void 0&&(e="/");let{pathname:t,search:n="",hash:s=""}=typeof i=="string"?DL(i):i,r;if(t)if(s6e(t))r=t;else{if(t.includes("//")){let o=t;t=t.replace(/\/\/+/g,"/"),yie(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+t))}t.startsWith("/")?r=yge(t.substring(1),"/"):r=yge(t,e)}else r=e;return{pathname:r,search:l6e(n),hash:c6e(s)}}function yge(i,e){let t=e.replace(/\/+$/,"").split("/");return i.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function Zz(i,e,t,n){return"Cannot include a '"+i+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function o6e(i){return i.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function wie(i,e){let t=o6e(i);return e?t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase):t.map(n=>n.pathnameBase)}function Cie(i,e,t,n){n===void 0&&(n=!1);let s;typeof i=="string"?s=DL(i):(s=uA({},i),co(!s.pathname||!s.pathname.includes("?"),Zz("?","pathname","search",s)),co(!s.pathname||!s.pathname.includes("#"),Zz("#","pathname","hash",s)),co(!s.search||!s.search.includes("#"),Zz("#","search","hash",s)));let r=i===""||s.pathname==="",o=r?"/":s.pathname,a;if(o==null)a=t;else{let h=e.length-1;if(!n&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),h-=1;s.pathname=g.join("/")}a=h>=0?e[h]:"/"}let l=r6e(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(r||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Wv=i=>i.join("/").replace(/\/\/+/g,"/"),a6e=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),l6e=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,c6e=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function d6e(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}const RCe=["post","put","patch","delete"];new Set(RCe);const u6e=["get",...RCe];new Set(u6e);/** - * React Router v6.30.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function hA(){return hA=Object.assign?Object.assign.bind():function(i){for(var e=1;e{a.current=!0}),L.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let h=Cie(c,JSON.parse(o),r,u.relative==="path");i==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:Wv([e,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[e,n,o,r,i])}const f6e=L.createContext(null);function p6e(i){let e=L.useContext(pp).outlet;return e&&L.createElement(f6e.Provider,{value:i},e)}function K_(){let{matches:i}=L.useContext(pp),e=i[i.length-1];return e?e.params:{}}function r7(i,e){let{relative:t}=e===void 0?{}:e,{future:n}=L.useContext(Wb),{matches:s}=L.useContext(pp),{pathname:r}=mp(),o=JSON.stringify(wie(s,n.v7_relativeSplatPath));return L.useMemo(()=>Cie(i,JSON.parse(o),r,t==="path"),[i,o,r,t])}function m6e(i,e){return b6e(i,e)}function b6e(i,e,t,n){TL()||co(!1);let{navigator:s}=L.useContext(Wb),{matches:r}=L.useContext(pp),o=r[r.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=mp(),u;if(e){var h;let v=typeof e=="string"?DL(e):e;l==="/"||(h=v.pathname)!=null&&h.startsWith(l)||co(!1),u=v}else u=c;let g=u.pathname||"/",f=g;if(l!=="/"){let v=l.replace(/^\//,"").split("/");f="/"+g.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=zFe(i,{pathname:f}),x=w6e(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:Wv([l,s.encodeLocation?s.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:Wv([l,s.encodeLocation?s.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),r,t,n);return e&&x?L.createElement(s7.Provider,{value:{location:hA({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:_v.Pop}},x):x}function x6e(){let i=N6e(),e=d6e(i)?i.status+" "+i.statusText:i instanceof Error?i.message:JSON.stringify(i),t=i instanceof Error?i.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},e),t?L.createElement("pre",{style:s},t):null,null)}const v6e=L.createElement(x6e,null);class _6e extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?L.createElement(pp.Provider,{value:this.props.routeContext},L.createElement(PCe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function y6e(i){let{routeContext:e,match:t,children:n}=i,s=L.useContext(i7);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(pp.Provider,{value:e},n)}function w6e(i,e,t,n){var s;if(e===void 0&&(e=[]),t===void 0&&(t=null),n===void 0&&(n=null),i==null){var r;if(!t)return null;if(t.errors)i=t.matches;else if((r=n)!=null&&r.v7_partialHydration&&e.length===0&&!t.initialized&&t.matches.length>0)i=t.matches;else return null}let o=i,a=(s=t)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);u>=0||co(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(t&&n&&n.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,h,g)=>{let f,m=!1,x=null,v=null;t&&(f=a&&h.route.id?a[h.route.id]:void 0,x=h.route.errorElement||v6e,l&&(c<0&&g===0?(L6e("route-fallback"),m=!0,v=null):c===g&&(m=!0,v=h.route.hydrateFallbackElement||null)));let _=e.concat(o.slice(0,g+1)),w=()=>{let k;return f?k=x:m?k=v:h.route.Component?k=L.createElement(h.route.Component,null):h.route.element?k=h.route.element:k=u,L.createElement(y6e,{match:h,routeContext:{outlet:u,matches:_,isDataRoute:t!=null},children:k})};return t&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?L.createElement(_6e,{location:t.location,revalidation:t.revalidation,component:x,error:f,children:w(),routeContext:{outlet:null,matches:_,isDataRoute:!0}}):w()},null)}var jCe=(function(i){return i.UseBlocker="useBlocker",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i})(jCe||{}),FCe=(function(i){return i.UseBlocker="useBlocker",i.UseLoaderData="useLoaderData",i.UseActionData="useActionData",i.UseRouteError="useRouteError",i.UseNavigation="useNavigation",i.UseRouteLoaderData="useRouteLoaderData",i.UseMatches="useMatches",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i.UseRouteId="useRouteId",i})(FCe||{});function C6e(i){let e=L.useContext(i7);return e||co(!1),e}function S6e(i){let e=L.useContext(MCe);return e||co(!1),e}function k6e(i){let e=L.useContext(pp);return e||co(!1),e}function BCe(i){let e=k6e(),t=e.matches[e.matches.length-1];return t.route.id||co(!1),t.route.id}function N6e(){var i;let e=L.useContext(PCe),t=S6e(),n=BCe();return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function E6e(){let{router:i}=C6e(jCe.UseNavigateStable),e=BCe(FCe.UseNavigateStable),t=L.useRef(!1);return OCe(()=>{t.current=!0}),L.useCallback(function(s,r){r===void 0&&(r={}),t.current&&(typeof s=="number"?i.navigate(s):i.navigate(s,hA({fromRouteId:e},r)))},[i,e])}const wge={};function L6e(i,e,t){wge[i]||(wge[i]=!0)}function D6e(i,e){i==null||i.v7_startTransition,i==null||i.v7_relativeSplatPath}function fT(i){let{to:e,replace:t,state:n,relative:s}=i;TL()||co(!1);let{future:r,static:o}=L.useContext(Wb),{matches:a}=L.useContext(pp),{pathname:l}=mp(),c=il(),u=Cie(e,wie(a,r.v7_relativeSplatPath),l,s==="path"),h=JSON.stringify(u);return L.useEffect(()=>c(JSON.parse(h),{replace:t,state:n,relative:s}),[c,h,s,t,n]),null}function T6e(i){return p6e(i.context)}function Li(i){co(!1)}function I6e(i){let{basename:e="/",children:t=null,location:n,navigationType:s=_v.Pop,navigator:r,static:o=!1,future:a}=i;TL()&&co(!1);let l=e.replace(/^\/*/,"/"),c=L.useMemo(()=>({basename:l,navigator:r,static:o,future:hA({v7_relativeSplatPath:!1},a)}),[l,a,r,o]);typeof n=="string"&&(n=DL(n));let{pathname:u="/",search:h="",hash:g="",state:f=null,key:m="default"}=n,x=L.useMemo(()=>{let v=TE(u,l);return v==null?null:{location:{pathname:v,search:h,hash:g,state:f,key:m},navigationType:s}},[l,u,h,g,f,m,s]);return x==null?null:L.createElement(Wb.Provider,{value:c},L.createElement(s7.Provider,{children:t,value:x}))}function A6e(i){let{children:e,location:t}=i;return m6e(TK(e),t)}new Promise(()=>{});function TK(i,e){e===void 0&&(e=[]);let t=[];return L.Children.forEach(i,(n,s)=>{if(!L.isValidElement(n))return;let r=[...e,s];if(n.type===L.Fragment){t.push.apply(t,TK(n.props.children,r));return}n.type!==Li&&co(!1),!n.props.index||!n.props.children||co(!1);let o={id:n.props.id||r.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=TK(n.props.children,r)),t.push(o)}),t}/** - * React Router DOM v6.30.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function mj(){return mj=Object.assign?Object.assign.bind():function(i){for(var e=1;e=0)&&(t[s]=i[s]);return t}function R6e(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function M6e(i,e){return i.button===0&&(!e||e==="_self")&&!R6e(i)}function IK(i){return i===void 0&&(i=""),new URLSearchParams(typeof i=="string"||Array.isArray(i)||i instanceof URLSearchParams?i:Object.keys(i).reduce((e,t)=>{let n=i[t];return e.concat(Array.isArray(n)?n.map(s=>[t,s]):[[t,n]])},[]))}function P6e(i,e){let t=IK(i);return e&&e.forEach((n,s)=>{t.has(s)||e.getAll(s).forEach(r=>{t.append(s,r)})}),t}const O6e=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],j6e=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],F6e="6";try{window.__reactRouterVersion=F6e}catch{}const B6e=L.createContext({isTransitioning:!1}),H6e="startTransition",Cge=n7[H6e];function W6e(i){let{basename:e,children:t,future:n,window:s}=i,r=L.useRef();r.current==null&&(r.current=HFe({window:s,v5Compat:!0}));let o=r.current,[a,l]=L.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},u=L.useCallback(h=>{c&&Cge?Cge(()=>l(h)):l(h)},[l,c]);return L.useLayoutEffect(()=>o.listen(u),[o,u]),L.useEffect(()=>D6e(n),[n]),L.createElement(I6e,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:o,future:n})}const V6e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",z6e=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kn=L.forwardRef(function(e,t){let{onClick:n,relative:s,reloadDocument:r,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:h}=e,g=HCe(e,O6e),{basename:f}=L.useContext(Wb),m,x=!1;if(typeof c=="string"&&z6e.test(c)&&(m=c,V6e))try{let k=new URL(window.location.href),C=c.startsWith("//")?new URL(k.protocol+c):new URL(c),E=TE(C.pathname,f);C.origin===k.origin&&E!=null?c=E+C.search+C.hash:x=!0}catch{}let v=h6e(c,{relative:s}),_=q6e(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:h});function w(k){n&&n(k),k.defaultPrevented||_(k)}return L.createElement("a",mj({},g,{href:m||v,onClick:x||r?n:w,ref:t,target:l}))}),U6e=L.forwardRef(function(e,t){let{"aria-current":n="page",caseSensitive:s=!1,className:r="",end:o=!1,style:a,to:l,viewTransition:c,children:u}=e,h=HCe(e,j6e),g=r7(l,{relative:h.relative}),f=mp(),m=L.useContext(MCe),{navigator:x,basename:v}=L.useContext(Wb),_=m!=null&&K6e(g)&&c===!0,w=x.encodeLocation?x.encodeLocation(g).pathname:g.pathname,k=f.pathname,C=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;s||(k=k.toLowerCase(),C=C?C.toLowerCase():null,w=w.toLowerCase()),C&&v&&(C=TE(C,v)||C);const E=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let D=k===w||!o&&k.startsWith(w)&&k.charAt(E)==="/",T=C!=null&&(C===w||!o&&C.startsWith(w)&&C.charAt(w.length)==="/"),I={isActive:D,isPending:T,isTransitioning:_},R=D?n:void 0,P;typeof r=="function"?P=r(I):P=[r,D?"active":null,T?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let j=typeof a=="function"?a(I):a;return L.createElement(Kn,mj({},h,{"aria-current":R,className:P,ref:t,style:j,to:l,viewTransition:c}),typeof u=="function"?u(I):u)});var AK;(function(i){i.UseScrollRestoration="useScrollRestoration",i.UseSubmit="useSubmit",i.UseSubmitFetcher="useSubmitFetcher",i.UseFetcher="useFetcher",i.useViewTransitionState="useViewTransitionState"})(AK||(AK={}));var Sge;(function(i){i.UseFetcher="useFetcher",i.UseFetchers="useFetchers",i.UseScrollRestoration="useScrollRestoration"})(Sge||(Sge={}));function $6e(i){let e=L.useContext(i7);return e||co(!1),e}function q6e(i,e){let{target:t,replace:n,state:s,preventScrollReset:r,relative:o,viewTransition:a}=e===void 0?{}:e,l=il(),c=mp(),u=r7(i,{relative:o});return L.useCallback(h=>{if(M6e(h,t)){h.preventDefault();let g=n!==void 0?n:pj(c)===pj(u);l(i,{replace:g,state:s,preventScrollReset:r,relative:o,viewTransition:a})}},[c,l,u,n,s,t,i,r,o,a])}function G_(i){let e=L.useRef(IK(i)),t=L.useRef(!1),n=mp(),s=L.useMemo(()=>P6e(n.search,t.current?null:e.current),[n.search]),r=il(),o=L.useCallback((a,l)=>{const c=IK(typeof a=="function"?a(s):a);t.current=!0,r("?"+c,l)},[r,s]);return[s,o]}function K6e(i,e){e===void 0&&(e={});let t=L.useContext(B6e);t==null&&co(!1);let{basename:n}=$6e(AK.useViewTransitionState),s=r7(i,{relative:e.relative});if(!t.isTransitioning)return!1;let r=TE(t.currentLocation.pathname,n)||t.currentLocation.pathname,o=TE(t.nextLocation.pathname,n)||t.nextLocation.pathname;return DK(s.pathname,o)!=null||DK(s.pathname,r)!=null}var bC=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},G6e={setTimeout:(i,e)=>setTimeout(i,e),clearTimeout:i=>clearTimeout(i),setInterval:(i,e)=>setInterval(i,e),clearInterval:i=>clearInterval(i)},dv,vie,gCe,Y6e=(gCe=class{constructor(){Ht(this,dv,G6e);Ht(this,vie,!1)}setTimeoutProvider(i){yt(this,dv,i)}setTimeout(i,e){return oe(this,dv).setTimeout(i,e)}clearTimeout(i){oe(this,dv).clearTimeout(i)}setInterval(i,e){return oe(this,dv).setInterval(i,e)}clearInterval(i){oe(this,dv).clearInterval(i)}},dv=new WeakMap,vie=new WeakMap,gCe),Py=new Y6e;function Q6e(i){setTimeout(i,0)}var Nw=typeof window>"u"||"Deno"in globalThis;function zl(){}function X6e(i,e){return typeof i=="function"?i(e):i}function RK(i){return typeof i=="number"&&i>=0&&i!==1/0}function WCe(i,e){return Math.max(i+(e||0)-Date.now(),0)}function Vv(i,e){return typeof i=="function"?i(e):i}function oh(i,e){return typeof i=="function"?i(e):i}function kge(i,e){const{type:t="all",exact:n,fetchStatus:s,predicate:r,queryKey:o,stale:a}=i;if(o){if(n){if(e.queryHash!==Sie(o,e.options))return!1}else if(!gA(e.queryKey,o))return!1}if(t!=="all"){const l=e.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||r&&!r(e))}function Nge(i,e){const{exact:t,status:n,predicate:s,mutationKey:r}=i;if(r){if(!e.options.mutationKey)return!1;if(t){if(Ew(e.options.mutationKey)!==Ew(r))return!1}else if(!gA(e.options.mutationKey,r))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function Sie(i,e){return((e==null?void 0:e.queryKeyHashFn)||Ew)(i)}function Ew(i){return JSON.stringify(i,(e,t)=>MK(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function gA(i,e){return i===e?!0:typeof i!=typeof e?!1:i&&e&&typeof i=="object"&&typeof e=="object"?Object.keys(e).every(t=>gA(i[t],e[t])):!1}var Z6e=Object.prototype.hasOwnProperty;function kie(i,e,t=0){if(i===e)return i;if(t>500)return e;const n=Ege(i)&&Ege(e);if(!n&&!(MK(i)&&MK(e)))return e;const r=(n?i:Object.keys(i)).length,o=n?e:Object.keys(e),a=o.length,l=n?new Array(a):{};let c=0;for(let u=0;u{Py.setTimeout(e,i)})}function PK(i,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(i,e):t.structuralSharing!==!1?kie(i,e):e}function Nie(i){return i}function e8e(i,e,t=0){const n=[...i,e];return t&&n.length>t?n.slice(1):n}function t8e(i,e,t=0){const n=[e,...i];return t&&n.length>t?n.slice(0,-1):n}var Eie=Symbol();function VCe(i,e){return!i.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!i.queryFn||i.queryFn===Eie?()=>Promise.reject(new Error(`Missing queryFn: '${i.queryHash}'`)):i.queryFn}function Lie(i,e){return typeof i=="function"?i(...e):!!i}function n8e(i,e,t){let n=!1,s;return Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(s??(s=e()),n||(n=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),i}var e1,uv,XN,fCe,i8e=(fCe=class extends bC{constructor(){super();Ht(this,e1);Ht(this,uv);Ht(this,XN);yt(this,XN,e=>{if(!Nw&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){oe(this,uv)||this.setEventListener(oe(this,XN))}onUnsubscribe(){var e;this.hasListeners()||((e=oe(this,uv))==null||e.call(this),yt(this,uv,void 0))}setEventListener(e){var t;yt(this,XN,e),(t=oe(this,uv))==null||t.call(this),yt(this,uv,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){oe(this,e1)!==e&&(yt(this,e1,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof oe(this,e1)=="boolean"?oe(this,e1):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},e1=new WeakMap,uv=new WeakMap,XN=new WeakMap,fCe),Die=new i8e;function OK(){let i,e;const t=new Promise((s,r)=>{i=s,e=r});t.status="pending",t.catch(()=>{});function n(s){Object.assign(t,s),delete t.resolve,delete t.reject}return t.resolve=s=>{n({status:"fulfilled",value:s}),i(s)},t.reject=s=>{n({status:"rejected",reason:s}),e(s)},t}var s8e=Q6e;function r8e(){let i=[],e=0,t=a=>{a()},n=a=>{a()},s=s8e;const r=a=>{e?i.push(a):s(()=>{t(a)})},o=()=>{const a=i;i=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{t(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{r(()=>{a(...l)})},schedule:r,setNotifyFunction:a=>{t=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var ko=r8e(),ZN,hv,JN,pCe,o8e=(pCe=class extends bC{constructor(){super();Ht(this,ZN,!0);Ht(this,hv);Ht(this,JN);yt(this,JN,e=>{if(!Nw&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){oe(this,hv)||this.setEventListener(oe(this,JN))}onUnsubscribe(){var e;this.hasListeners()||((e=oe(this,hv))==null||e.call(this),yt(this,hv,void 0))}setEventListener(e){var t;yt(this,JN,e),(t=oe(this,hv))==null||t.call(this),yt(this,hv,e(this.setOnline.bind(this)))}setOnline(e){oe(this,ZN)!==e&&(yt(this,ZN,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return oe(this,ZN)}},ZN=new WeakMap,hv=new WeakMap,JN=new WeakMap,pCe),bj=new o8e;function a8e(i){return Math.min(1e3*2**i,3e4)}function zCe(i){return(i??"online")==="online"?bj.isOnline():!0}var jK=class extends Error{constructor(i){super("CancelledError"),this.revert=i==null?void 0:i.revert,this.silent=i==null?void 0:i.silent}};function UCe(i){let e=!1,t=0,n;const s=OK(),r=()=>s.status!=="pending",o=x=>{var v;if(!r()){const _=new jK(x);g(_),(v=i.onCancel)==null||v.call(i,_)}},a=()=>{e=!0},l=()=>{e=!1},c=()=>Die.isFocused()&&(i.networkMode==="always"||bj.isOnline())&&i.canRun(),u=()=>zCe(i.networkMode)&&i.canRun(),h=x=>{r()||(n==null||n(),s.resolve(x))},g=x=>{r()||(n==null||n(),s.reject(x))},f=()=>new Promise(x=>{var v;n=_=>{(r()||c())&&x(_)},(v=i.onPause)==null||v.call(i)}).then(()=>{var x;n=void 0,r()||(x=i.onContinue)==null||x.call(i)}),m=()=>{if(r())return;let x;const v=t===0?i.initialPromise:void 0;try{x=v??i.fn()}catch(_){x=Promise.reject(_)}Promise.resolve(x).then(h).catch(_=>{var D;if(r())return;const w=i.retry??(Nw?0:3),k=i.retryDelay??a8e,C=typeof k=="function"?k(t,_):k,E=w===!0||typeof w=="number"&&tc()?void 0:f()).then(()=>{e?g(_):m()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(n==null||n(),s),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?m():f().then(m),s)}}var t1,mCe,$Ce=(mCe=class{constructor(){Ht(this,t1)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),RK(this.gcTime)&&yt(this,t1,Py.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(i){this.gcTime=Math.max(this.gcTime||0,i??(Nw?1/0:300*1e3))}clearGcTimeout(){oe(this,t1)&&(Py.clearTimeout(oe(this,t1)),yt(this,t1,void 0))}},t1=new WeakMap,mCe),n1,eE,sh,i1,Va,SM,s1,Xh,lm,bCe,l8e=(bCe=class extends $Ce{constructor(e){super();Ht(this,Xh);Ht(this,n1);Ht(this,eE);Ht(this,sh);Ht(this,i1);Ht(this,Va);Ht(this,SM);Ht(this,s1);yt(this,s1,!1),yt(this,SM,e.defaultOptions),this.setOptions(e.options),this.observers=[],yt(this,i1,e.client),yt(this,sh,oe(this,i1).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,yt(this,n1,Tge(this.options)),this.state=e.state??oe(this,n1),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=oe(this,Va))==null?void 0:e.promise}setOptions(e){if(this.options={...oe(this,SM),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Tge(this.options);t.data!==void 0&&(this.setState(Dge(t.data,t.dataUpdatedAt)),yt(this,n1,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&oe(this,sh).remove(this)}setData(e,t){const n=PK(this.state.data,e,this.options);return st(this,Xh,lm).call(this,{data:n,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),n}setState(e,t){st(this,Xh,lm).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var n,s;const t=(n=oe(this,Va))==null?void 0:n.promise;return(s=oe(this,Va))==null||s.cancel(e),t?t.then(zl).catch(zl):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(oe(this,n1))}isActive(){return this.observers.some(e=>oh(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Eie||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Vv(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!WCe(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=oe(this,Va))==null||t.continue()}onOnline(){var t;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=oe(this,Va))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),oe(this,sh).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(oe(this,Va)&&(oe(this,s1)?oe(this,Va).cancel({revert:!0}):oe(this,Va).cancelRetry()),this.scheduleGc()),oe(this,sh).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||st(this,Xh,lm).call(this,{type:"invalidate"})}async fetch(e,t){var l,c,u,h,g,f,m,x,v,_,w,k;if(this.state.fetchStatus!=="idle"&&((l=oe(this,Va))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(oe(this,Va))return oe(this,Va).continueRetry(),oe(this,Va).promise}if(e&&this.setOptions(e),!this.options.queryFn){const C=this.observers.find(E=>E.options.queryFn);C&&this.setOptions(C.options)}const n=new AbortController,s=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(yt(this,s1,!0),n.signal)})},r=()=>{const C=VCe(this.options,t),D=(()=>{const T={client:oe(this,i1),queryKey:this.queryKey,meta:this.meta};return s(T),T})();return yt(this,s1,!1),this.options.persister?this.options.persister(C,D,this):C(D)},a=(()=>{const C={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:oe(this,i1),state:this.state,fetchFn:r};return s(C),C})();(c=this.options.behavior)==null||c.onFetch(a,this),yt(this,eE,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&st(this,Xh,lm).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta}),yt(this,Va,UCe({initialPromise:t==null?void 0:t.initialPromise,fn:a.fetchFn,onCancel:C=>{C instanceof jK&&C.revert&&this.setState({...oe(this,eE),fetchStatus:"idle"}),n.abort()},onFail:(C,E)=>{st(this,Xh,lm).call(this,{type:"failed",failureCount:C,error:E})},onPause:()=>{st(this,Xh,lm).call(this,{type:"pause"})},onContinue:()=>{st(this,Xh,lm).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const C=await oe(this,Va).start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(f=(g=oe(this,sh).config).onSuccess)==null||f.call(g,C,this),(x=(m=oe(this,sh).config).onSettled)==null||x.call(m,C,this.state.error,this),C}catch(C){if(C instanceof jK){if(C.silent)return oe(this,Va).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw st(this,Xh,lm).call(this,{type:"error",error:C}),(_=(v=oe(this,sh).config).onError)==null||_.call(v,C,this),(k=(w=oe(this,sh).config).onSettled)==null||k.call(w,this.state.data,C,this),C}finally{this.scheduleGc()}}},n1=new WeakMap,eE=new WeakMap,sh=new WeakMap,i1=new WeakMap,Va=new WeakMap,SM=new WeakMap,s1=new WeakMap,Xh=new WeakSet,lm=function(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...qCe(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,...Dge(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return yt(this,eE,e.manual?s:void 0),s;case"error":const r=e.error;return{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),ko.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),oe(this,sh).notify({query:this,type:"updated",action:e})})},bCe);function qCe(i,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:zCe(e.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function Dge(i,e){return{data:i,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tge(i){const e=typeof i.initialData=="function"?i.initialData():i.initialData,t=e!==void 0,n=t?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var hd,Ji,kM,vc,r1,tE,Am,gv,NM,nE,iE,o1,a1,fv,sE,Ys,h2,FK,BK,HK,WK,VK,zK,UK,KCe,xCe,o7=(xCe=class extends bC{constructor(e,t){super();Ht(this,Ys);Ht(this,hd);Ht(this,Ji);Ht(this,kM);Ht(this,vc);Ht(this,r1);Ht(this,tE);Ht(this,Am);Ht(this,gv);Ht(this,NM);Ht(this,nE);Ht(this,iE);Ht(this,o1);Ht(this,a1);Ht(this,fv);Ht(this,sE,new Set);this.options=t,yt(this,hd,e),yt(this,gv,null),yt(this,Am,OK()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(oe(this,Ji).addObserver(this),Ige(oe(this,Ji),this.options)?st(this,Ys,h2).call(this):this.updateResult(),st(this,Ys,WK).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $K(oe(this,Ji),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $K(oe(this,Ji),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,st(this,Ys,VK).call(this),st(this,Ys,zK).call(this),oe(this,Ji).removeObserver(this)}setOptions(e){const t=this.options,n=oe(this,Ji);if(this.options=oe(this,hd).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof oh(this.options.enabled,oe(this,Ji))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");st(this,Ys,UK).call(this),oe(this,Ji).setOptions(this.options),t._defaulted&&!fA(this.options,t)&&oe(this,hd).getQueryCache().notify({type:"observerOptionsUpdated",query:oe(this,Ji),observer:this});const s=this.hasListeners();s&&Age(oe(this,Ji),n,this.options,t)&&st(this,Ys,h2).call(this),this.updateResult(),s&&(oe(this,Ji)!==n||oh(this.options.enabled,oe(this,Ji))!==oh(t.enabled,oe(this,Ji))||Vv(this.options.staleTime,oe(this,Ji))!==Vv(t.staleTime,oe(this,Ji)))&&st(this,Ys,FK).call(this);const r=st(this,Ys,BK).call(this);s&&(oe(this,Ji)!==n||oh(this.options.enabled,oe(this,Ji))!==oh(t.enabled,oe(this,Ji))||r!==oe(this,fv))&&st(this,Ys,HK).call(this,r)}getOptimisticResult(e){const t=oe(this,hd).getQueryCache().build(oe(this,hd),e),n=this.createResult(t,e);return d8e(this,n)&&(yt(this,vc,n),yt(this,tE,this.options),yt(this,r1,oe(this,Ji).state)),n}getCurrentResult(){return oe(this,vc)}trackResult(e,t){return new Proxy(e,{get:(n,s)=>(this.trackProp(s),t==null||t(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&oe(this,Am).status==="pending"&&oe(this,Am).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(e){oe(this,sE).add(e)}getCurrentQuery(){return oe(this,Ji)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=oe(this,hd).defaultQueryOptions(e),n=oe(this,hd).getQueryCache().build(oe(this,hd),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return st(this,Ys,h2).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),oe(this,vc)))}createResult(e,t){var R;const n=oe(this,Ji),s=this.options,r=oe(this,vc),o=oe(this,r1),a=oe(this,tE),c=e!==n?e.state:oe(this,kM),{state:u}=e;let h={...u},g=!1,f;if(t._optimisticResults){const P=this.hasListeners(),j=!P&&Ige(e,t),B=P&&Age(e,n,t,s);(j||B)&&(h={...h,...qCe(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:v}=h;f=h.data;let _=!1;if(t.placeholderData!==void 0&&f===void 0&&v==="pending"){let P;r!=null&&r.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData)?(P=r.data,_=!0):P=typeof t.placeholderData=="function"?t.placeholderData((R=oe(this,iE))==null?void 0:R.state.data,oe(this,iE)):t.placeholderData,P!==void 0&&(v="success",f=PK(r==null?void 0:r.data,P,t),g=!0)}if(t.select&&f!==void 0&&!_)if(r&&f===(o==null?void 0:o.data)&&t.select===oe(this,NM))f=oe(this,nE);else try{yt(this,NM,t.select),f=t.select(f),f=PK(r==null?void 0:r.data,f,t),yt(this,nE,f),yt(this,gv,null)}catch(P){yt(this,gv,P)}oe(this,gv)&&(m=oe(this,gv),f=oe(this,nE),x=Date.now(),v="error");const w=h.fetchStatus==="fetching",k=v==="pending",C=v==="error",E=k&&w,D=f!==void 0,I={status:v,fetchStatus:h.fetchStatus,isPending:k,isSuccess:v==="success",isError:C,isInitialLoading:E,isLoading:E,data:f,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!k,isLoadingError:C&&!D,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:C&&D,isStale:Tie(e,t),refetch:this.refetch,promise:oe(this,Am),isEnabled:oh(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const P=I.data!==void 0,j=I.status==="error"&&!P,B=K=>{j?K.reject(I.error):P&&K.resolve(I.data)},U=()=>{const K=yt(this,Am,I.promise=OK());B(K)},$=oe(this,Am);switch($.status){case"pending":e.queryHash===n.queryHash&&B($);break;case"fulfilled":(j||I.data!==$.value)&&U();break;case"rejected":(!j||I.error!==$.reason)&&U();break}}return I}updateResult(){const e=oe(this,vc),t=this.createResult(oe(this,Ji),this.options);if(yt(this,r1,oe(this,Ji).state),yt(this,tE,this.options),oe(this,r1).data!==void 0&&yt(this,iE,oe(this,Ji)),fA(t,e))return;yt(this,vc,t);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,r=typeof s=="function"?s():s;if(r==="all"||!r&&!oe(this,sE).size)return!0;const o=new Set(r??oe(this,sE));return this.options.throwOnError&&o.add("error"),Object.keys(oe(this,vc)).some(a=>{const l=a;return oe(this,vc)[l]!==e[l]&&o.has(l)})};st(this,Ys,KCe).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&st(this,Ys,WK).call(this)}},hd=new WeakMap,Ji=new WeakMap,kM=new WeakMap,vc=new WeakMap,r1=new WeakMap,tE=new WeakMap,Am=new WeakMap,gv=new WeakMap,NM=new WeakMap,nE=new WeakMap,iE=new WeakMap,o1=new WeakMap,a1=new WeakMap,fv=new WeakMap,sE=new WeakMap,Ys=new WeakSet,h2=function(e){st(this,Ys,UK).call(this);let t=oe(this,Ji).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(zl)),t},FK=function(){st(this,Ys,VK).call(this);const e=Vv(this.options.staleTime,oe(this,Ji));if(Nw||oe(this,vc).isStale||!RK(e))return;const n=WCe(oe(this,vc).dataUpdatedAt,e)+1;yt(this,o1,Py.setTimeout(()=>{oe(this,vc).isStale||this.updateResult()},n))},BK=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(oe(this,Ji)):this.options.refetchInterval)??!1},HK=function(e){st(this,Ys,zK).call(this),yt(this,fv,e),!(Nw||oh(this.options.enabled,oe(this,Ji))===!1||!RK(oe(this,fv))||oe(this,fv)===0)&&yt(this,a1,Py.setInterval(()=>{(this.options.refetchIntervalInBackground||Die.isFocused())&&st(this,Ys,h2).call(this)},oe(this,fv)))},WK=function(){st(this,Ys,FK).call(this),st(this,Ys,HK).call(this,st(this,Ys,BK).call(this))},VK=function(){oe(this,o1)&&(Py.clearTimeout(oe(this,o1)),yt(this,o1,void 0))},zK=function(){oe(this,a1)&&(Py.clearInterval(oe(this,a1)),yt(this,a1,void 0))},UK=function(){const e=oe(this,hd).getQueryCache().build(oe(this,hd),this.options);if(e===oe(this,Ji))return;const t=oe(this,Ji);yt(this,Ji,e),yt(this,kM,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},KCe=function(e){ko.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(oe(this,vc))}),oe(this,hd).getQueryCache().notify({query:oe(this,Ji),type:"observerResultsUpdated"})})},xCe);function c8e(i,e){return oh(e.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&e.retryOnMount===!1)}function Ige(i,e){return c8e(i,e)||i.state.data!==void 0&&$K(i,e,e.refetchOnMount)}function $K(i,e,t){if(oh(e.enabled,i)!==!1&&Vv(e.staleTime,i)!=="static"){const n=typeof t=="function"?t(i):t;return n==="always"||n!==!1&&Tie(i,e)}return!1}function Age(i,e,t,n){return(i!==e||oh(n.enabled,i)===!1)&&(!t.suspense||i.state.status!=="error")&&Tie(i,t)}function Tie(i,e){return oh(e.enabled,i)!==!1&&i.isStaleByTime(Vv(e.staleTime,i))}function d8e(i,e){return!fA(i.getCurrentResult(),e)}function xj(i){return{onFetch:(e,t)=>{var u,h,g,f,m;const n=e.options,s=(g=(h=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:g.direction,r=((f=e.state.data)==null?void 0:f.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let x=!1;const v=k=>{n8e(k,()=>e.signal,()=>x=!0)},_=VCe(e.options,e.fetchOptions),w=async(k,C,E)=>{if(x)return Promise.reject();if(C==null&&k.pages.length)return Promise.resolve(k);const T=(()=>{const j={client:e.client,queryKey:e.queryKey,pageParam:C,direction:E?"backward":"forward",meta:e.options.meta};return v(j),j})(),I=await _(T),{maxPages:R}=e.options,P=E?t8e:e8e;return{pages:P(k.pages,I,R),pageParams:P(k.pageParams,C,R)}};if(s&&r.length){const k=s==="backward",C=k?GCe:qK,E={pages:r,pageParams:o},D=C(n,E);a=await w(E,D,k)}else{const k=i??r.length;do{const C=l===0?o[0]??n.initialPageParam:qK(n,a);if(l>0&&C==null)break;a=await w(a,C),l++}while(l{var x,v;return(v=(x=e.options).persister)==null?void 0:v.call(x,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=c}}}function qK(i,{pages:e,pageParams:t}){const n=e.length-1;return e.length>0?i.getNextPageParam(e[n],e,t[n],t):void 0}function GCe(i,{pages:e,pageParams:t}){var n;return e.length>0?(n=i.getPreviousPageParam)==null?void 0:n.call(i,e[0],e,t[0],t):void 0}function u8e(i,e){return e?qK(i,e)!=null:!1}function h8e(i,e){return!e||!i.getPreviousPageParam?!1:GCe(i,e)!=null}var g8e=class extends o7{constructor(i,e){super(i,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(i){super.setOptions({...i,behavior:xj()})}getOptimisticResult(i){return i.behavior=xj(),super.getOptimisticResult(i)}fetchNextPage(i){return this.fetch({...i,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(i){return this.fetch({...i,meta:{fetchMore:{direction:"backward"}}})}createResult(i,e){var m,x;const{state:t}=i,n=super.createResult(i,e),{isFetching:s,isRefetching:r,isError:o,isRefetchError:a}=n,l=(x=(m=t.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:x.direction,c=o&&l==="forward",u=s&&l==="forward",h=o&&l==="backward",g=s&&l==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:u8e(e,t.data),hasPreviousPage:h8e(e,t.data),isFetchNextPageError:c,isFetchingNextPage:u,isFetchPreviousPageError:h,isFetchingPreviousPage:g,isRefetchError:a&&!c&&!h,isRefetching:r&&!u&&!g}}},EM,xf,Vl,l1,vf,Rx,vCe,f8e=(vCe=class extends $Ce{constructor(e){super();Ht(this,vf);Ht(this,EM);Ht(this,xf);Ht(this,Vl);Ht(this,l1);yt(this,EM,e.client),this.mutationId=e.mutationId,yt(this,Vl,e.mutationCache),yt(this,xf,[]),this.state=e.state||YCe(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){oe(this,xf).includes(e)||(oe(this,xf).push(e),this.clearGcTimeout(),oe(this,Vl).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){yt(this,xf,oe(this,xf).filter(t=>t!==e)),this.scheduleGc(),oe(this,Vl).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){oe(this,xf).length||(this.state.status==="pending"?this.scheduleGc():oe(this,Vl).remove(this))}continue(){var e;return((e=oe(this,l1))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,a,l,c,u,h,g,f,m,x,v,_,w,k,C,E,D,T;const t=()=>{st(this,vf,Rx).call(this,{type:"continue"})},n={client:oe(this,EM),meta:this.options.meta,mutationKey:this.options.mutationKey};yt(this,l1,UCe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(I,R)=>{st(this,vf,Rx).call(this,{type:"failed",failureCount:I,error:R})},onPause:()=>{st(this,vf,Rx).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>oe(this,Vl).canRun(this)}));const s=this.state.status==="pending",r=!oe(this,l1).canStart();try{if(s)t();else{st(this,vf,Rx).call(this,{type:"pending",variables:e,isPaused:r}),oe(this,Vl).config.onMutate&&await oe(this,Vl).config.onMutate(e,this,n);const R=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e,n));R!==this.state.context&&st(this,vf,Rx).call(this,{type:"pending",context:R,variables:e,isPaused:r})}const I=await oe(this,l1).start();return await((c=(l=oe(this,Vl).config).onSuccess)==null?void 0:c.call(l,I,e,this.state.context,this,n)),await((h=(u=this.options).onSuccess)==null?void 0:h.call(u,I,e,this.state.context,n)),await((f=(g=oe(this,Vl).config).onSettled)==null?void 0:f.call(g,I,null,this.state.variables,this.state.context,this,n)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,I,null,e,this.state.context,n)),st(this,vf,Rx).call(this,{type:"success",data:I}),I}catch(I){try{await((_=(v=oe(this,Vl).config).onError)==null?void 0:_.call(v,I,e,this.state.context,this,n))}catch(R){Promise.reject(R)}try{await((k=(w=this.options).onError)==null?void 0:k.call(w,I,e,this.state.context,n))}catch(R){Promise.reject(R)}try{await((E=(C=oe(this,Vl).config).onSettled)==null?void 0:E.call(C,void 0,I,this.state.variables,this.state.context,this,n))}catch(R){Promise.reject(R)}try{await((T=(D=this.options).onSettled)==null?void 0:T.call(D,void 0,I,e,this.state.context,n))}catch(R){Promise.reject(R)}throw st(this,vf,Rx).call(this,{type:"error",error:I}),I}finally{oe(this,Vl).runNext(this)}}},EM=new WeakMap,xf=new WeakMap,Vl=new WeakMap,l1=new WeakMap,vf=new WeakSet,Rx=function(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),ko.batch(()=>{oe(this,xf).forEach(n=>{n.onMutationUpdate(e)}),oe(this,Vl).notify({mutation:this,type:"updated",action:e})})},vCe);function YCe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Rm,Zh,LM,_Ce,p8e=(_Ce=class extends bC{constructor(e={}){super();Ht(this,Rm);Ht(this,Zh);Ht(this,LM);this.config=e,yt(this,Rm,new Set),yt(this,Zh,new Map),yt(this,LM,0)}build(e,t,n){const s=new f8e({client:e,mutationCache:this,mutationId:++c5(this,LM)._,options:e.defaultMutationOptions(t),state:n});return this.add(s),s}add(e){oe(this,Rm).add(e);const t=d5(e);if(typeof t=="string"){const n=oe(this,Zh).get(t);n?n.push(e):oe(this,Zh).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(oe(this,Rm).delete(e)){const t=d5(e);if(typeof t=="string"){const n=oe(this,Zh).get(t);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&oe(this,Zh).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=d5(e);if(typeof t=="string"){const n=oe(this,Zh).get(t),s=n==null?void 0:n.find(r=>r.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const t=d5(e);if(typeof t=="string"){const s=(n=oe(this,Zh).get(t))==null?void 0:n.find(r=>r!==e&&r.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ko.batch(()=>{oe(this,Rm).forEach(e=>{this.notify({type:"removed",mutation:e})}),oe(this,Rm).clear(),oe(this,Zh).clear()})}getAll(){return Array.from(oe(this,Rm))}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Nge(t,n))}findAll(e={}){return this.getAll().filter(t=>Nge(e,t))}notify(e){ko.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return ko.batch(()=>Promise.all(e.map(t=>t.continue().catch(zl))))}},Rm=new WeakMap,Zh=new WeakMap,LM=new WeakMap,_Ce);function d5(i){var e;return(e=i.options.scope)==null?void 0:e.id}var Mm,pv,gd,Pm,xb,p4,KK,yCe,m8e=(yCe=class extends bC{constructor(t,n){super();Ht(this,xb);Ht(this,Mm);Ht(this,pv);Ht(this,gd);Ht(this,Pm);yt(this,Mm,t),this.setOptions(n),this.bindMethods(),st(this,xb,p4).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=oe(this,Mm).defaultMutationOptions(t),fA(this.options,n)||oe(this,Mm).getMutationCache().notify({type:"observerOptionsUpdated",mutation:oe(this,gd),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ew(n.mutationKey)!==Ew(this.options.mutationKey)?this.reset():((s=oe(this,gd))==null?void 0:s.state.status)==="pending"&&oe(this,gd).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=oe(this,gd))==null||t.removeObserver(this)}onMutationUpdate(t){st(this,xb,p4).call(this),st(this,xb,KK).call(this,t)}getCurrentResult(){return oe(this,pv)}reset(){var t;(t=oe(this,gd))==null||t.removeObserver(this),yt(this,gd,void 0),st(this,xb,p4).call(this),st(this,xb,KK).call(this)}mutate(t,n){var s;return yt(this,Pm,n),(s=oe(this,gd))==null||s.removeObserver(this),yt(this,gd,oe(this,Mm).getMutationCache().build(oe(this,Mm),this.options)),oe(this,gd).addObserver(this),oe(this,gd).execute(t)}},Mm=new WeakMap,pv=new WeakMap,gd=new WeakMap,Pm=new WeakMap,xb=new WeakSet,p4=function(){var n;const t=((n=oe(this,gd))==null?void 0:n.state)??YCe();yt(this,pv,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},KK=function(t){ko.batch(()=>{var n,s,r,o,a,l,c,u;if(oe(this,Pm)&&this.hasListeners()){const h=oe(this,pv).variables,g=oe(this,pv).context,f={client:oe(this,Mm),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(n=oe(this,Pm)).onSuccess)==null||s.call(n,t.data,h,g,f)}catch(m){Promise.reject(m)}try{(o=(r=oe(this,Pm)).onSettled)==null||o.call(r,t.data,null,h,g,f)}catch(m){Promise.reject(m)}}else if((t==null?void 0:t.type)==="error"){try{(l=(a=oe(this,Pm)).onError)==null||l.call(a,t.error,h,g,f)}catch(m){Promise.reject(m)}try{(u=(c=oe(this,Pm)).onSettled)==null||u.call(c,void 0,t.error,h,g,f)}catch(m){Promise.reject(m)}}}this.listeners.forEach(h=>{h(oe(this,pv))})})},yCe);function Rge(i,e){const t=new Set(e);return i.filter(n=>!t.has(n))}function b8e(i,e,t){const n=i.slice(0);return n[e]=t,n}var rE,iu,oE,aE,rh,mv,DM,TM,IM,AM,Al,GK,YK,QK,XK,ZK,wCe,x8e=(wCe=class extends bC{constructor(e,t,n){super();Ht(this,Al);Ht(this,rE);Ht(this,iu);Ht(this,oE);Ht(this,aE);Ht(this,rh);Ht(this,mv);Ht(this,DM);Ht(this,TM);Ht(this,IM);Ht(this,AM,[]);yt(this,rE,e),yt(this,aE,n),yt(this,oE,[]),yt(this,rh,[]),yt(this,iu,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&oe(this,rh).forEach(e=>{e.subscribe(t=>{st(this,Al,XK).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,oe(this,rh).forEach(e=>{e.destroy()})}setQueries(e,t){yt(this,oE,e),yt(this,aE,t),ko.batch(()=>{const n=oe(this,rh),s=st(this,Al,QK).call(this,oe(this,oE));s.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions));const r=s.map(h=>h.observer),o=r.map(h=>h.getCurrentResult()),a=n.length!==r.length,l=r.some((h,g)=>h!==n[g]),c=a||l,u=c?!0:o.some((h,g)=>{const f=oe(this,iu)[g];return!f||!fA(h,f)});!c&&!u||(c&&(yt(this,AM,s),yt(this,rh,r)),yt(this,iu,o),this.hasListeners()&&(c&&(Rge(n,r).forEach(h=>{h.destroy()}),Rge(r,n).forEach(h=>{h.subscribe(g=>{st(this,Al,XK).call(this,h,g)})})),st(this,Al,ZK).call(this)))})}getCurrentResult(){return oe(this,iu)}getQueries(){return oe(this,rh).map(e=>e.getCurrentQuery())}getObservers(){return oe(this,rh)}getOptimisticResult(e,t){const n=st(this,Al,QK).call(this,e),s=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=n.map(o=>o.defaultedQueryOptions.queryHash);return[s,o=>st(this,Al,YK).call(this,o??s,t,r),()=>st(this,Al,GK).call(this,s,n)]}},rE=new WeakMap,iu=new WeakMap,oE=new WeakMap,aE=new WeakMap,rh=new WeakMap,mv=new WeakMap,DM=new WeakMap,TM=new WeakMap,IM=new WeakMap,AM=new WeakMap,Al=new WeakSet,GK=function(e,t){return t.map((n,s)=>{const r=e[s];return n.defaultedQueryOptions.notifyOnChangeProps?r:n.observer.trackResult(r,o=>{t.forEach(a=>{a.observer.trackProp(o)})})})},YK=function(e,t,n){if(t){const s=oe(this,IM),r=n!==void 0&&s!==void 0&&(s.length!==n.length||n.some((o,a)=>o!==s[a]));return(!oe(this,mv)||oe(this,iu)!==oe(this,TM)||r||t!==oe(this,DM))&&(yt(this,DM,t),yt(this,TM,oe(this,iu)),n!==void 0&&yt(this,IM,n),yt(this,mv,kie(oe(this,mv),t(e)))),oe(this,mv)}return e},QK=function(e){const t=new Map;oe(this,rh).forEach(s=>{const r=s.options.queryHash;if(!r)return;const o=t.get(r);o?o.push(s):t.set(r,[s])});const n=[];return e.forEach(s=>{var l;const r=oe(this,rE).defaultQueryOptions(s),a=((l=t.get(r.queryHash))==null?void 0:l.shift())??new o7(oe(this,rE),r);n.push({defaultedQueryOptions:r,observer:a})}),n},XK=function(e,t){const n=oe(this,rh).indexOf(e);n!==-1&&(yt(this,iu,b8e(oe(this,iu),n,t)),st(this,Al,ZK).call(this))},ZK=function(){var e;if(this.hasListeners()){const t=oe(this,mv),n=st(this,Al,GK).call(this,oe(this,iu),oe(this,AM)),s=st(this,Al,YK).call(this,n,(e=oe(this,aE))==null?void 0:e.combine);t!==s&&ko.batch(()=>{this.listeners.forEach(r=>{r(oe(this,iu))})})}},wCe),_f,CCe,v8e=(CCe=class extends bC{constructor(e={}){super();Ht(this,_f);this.config=e,yt(this,_f,new Map)}build(e,t,n){const s=t.queryKey,r=t.queryHash??Sie(s,t);let o=this.get(r);return o||(o=new l8e({client:e,queryKey:s,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){oe(this,_f).has(e.queryHash)||(oe(this,_f).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=oe(this,_f).get(e.queryHash);t&&(e.destroy(),t===e&&oe(this,_f).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ko.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return oe(this,_f).get(e)}getAll(){return[...oe(this,_f).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>kge(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>kge(e,n)):t}notify(e){ko.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ko.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ko.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_f=new WeakMap,CCe),yo,bv,xv,lE,cE,vv,dE,uE,SCe,_8e=(SCe=class{constructor(i={}){Ht(this,yo);Ht(this,bv);Ht(this,xv);Ht(this,lE);Ht(this,cE);Ht(this,vv);Ht(this,dE);Ht(this,uE);yt(this,yo,i.queryCache||new v8e),yt(this,bv,i.mutationCache||new p8e),yt(this,xv,i.defaultOptions||{}),yt(this,lE,new Map),yt(this,cE,new Map),yt(this,vv,0)}mount(){c5(this,vv)._++,oe(this,vv)===1&&(yt(this,dE,Die.subscribe(async i=>{i&&(await this.resumePausedMutations(),oe(this,yo).onFocus())})),yt(this,uE,bj.subscribe(async i=>{i&&(await this.resumePausedMutations(),oe(this,yo).onOnline())})))}unmount(){var i,e;c5(this,vv)._--,oe(this,vv)===0&&((i=oe(this,dE))==null||i.call(this),yt(this,dE,void 0),(e=oe(this,uE))==null||e.call(this),yt(this,uE,void 0))}isFetching(i){return oe(this,yo).findAll({...i,fetchStatus:"fetching"}).length}isMutating(i){return oe(this,bv).findAll({...i,status:"pending"}).length}getQueryData(i){var t;const e=this.defaultQueryOptions({queryKey:i});return(t=oe(this,yo).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(i){const e=this.defaultQueryOptions(i),t=oe(this,yo).build(this,e),n=t.state.data;return n===void 0?this.fetchQuery(i):(i.revalidateIfStale&&t.isStaleByTime(Vv(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(i){return oe(this,yo).findAll(i).map(({queryKey:e,state:t})=>{const n=t.data;return[e,n]})}setQueryData(i,e,t){const n=this.defaultQueryOptions({queryKey:i}),s=oe(this,yo).get(n.queryHash),r=s==null?void 0:s.state.data,o=X6e(e,r);if(o!==void 0)return oe(this,yo).build(this,n).setData(o,{...t,manual:!0})}setQueriesData(i,e,t){return ko.batch(()=>oe(this,yo).findAll(i).map(({queryKey:n})=>[n,this.setQueryData(n,e,t)]))}getQueryState(i){var t;const e=this.defaultQueryOptions({queryKey:i});return(t=oe(this,yo).get(e.queryHash))==null?void 0:t.state}removeQueries(i){const e=oe(this,yo);ko.batch(()=>{e.findAll(i).forEach(t=>{e.remove(t)})})}resetQueries(i,e){const t=oe(this,yo);return ko.batch(()=>(t.findAll(i).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...i},e)))}cancelQueries(i,e={}){const t={revert:!0,...e},n=ko.batch(()=>oe(this,yo).findAll(i).map(s=>s.cancel(t)));return Promise.all(n).then(zl).catch(zl)}invalidateQueries(i,e={}){return ko.batch(()=>(oe(this,yo).findAll(i).forEach(t=>{t.invalidate()}),(i==null?void 0:i.refetchType)==="none"?Promise.resolve():this.refetchQueries({...i,type:(i==null?void 0:i.refetchType)??(i==null?void 0:i.type)??"active"},e)))}refetchQueries(i,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},n=ko.batch(()=>oe(this,yo).findAll(i).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let r=s.fetch(void 0,t);return t.throwOnError||(r=r.catch(zl)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(n).then(zl)}fetchQuery(i){const e=this.defaultQueryOptions(i);e.retry===void 0&&(e.retry=!1);const t=oe(this,yo).build(this,e);return t.isStaleByTime(Vv(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(i){return this.fetchQuery(i).then(zl).catch(zl)}fetchInfiniteQuery(i){return i.behavior=xj(i.pages),this.fetchQuery(i)}prefetchInfiniteQuery(i){return this.fetchInfiniteQuery(i).then(zl).catch(zl)}ensureInfiniteQueryData(i){return i.behavior=xj(i.pages),this.ensureQueryData(i)}resumePausedMutations(){return bj.isOnline()?oe(this,bv).resumePausedMutations():Promise.resolve()}getQueryCache(){return oe(this,yo)}getMutationCache(){return oe(this,bv)}getDefaultOptions(){return oe(this,xv)}setDefaultOptions(i){yt(this,xv,i)}setQueryDefaults(i,e){oe(this,lE).set(Ew(i),{queryKey:i,defaultOptions:e})}getQueryDefaults(i){const e=[...oe(this,lE).values()],t={};return e.forEach(n=>{gA(i,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(i,e){oe(this,cE).set(Ew(i),{mutationKey:i,defaultOptions:e})}getMutationDefaults(i){const e=[...oe(this,cE).values()],t={};return e.forEach(n=>{gA(i,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(i){if(i._defaulted)return i;const e={...oe(this,xv).queries,...this.getQueryDefaults(i.queryKey),...i,_defaulted:!0};return e.queryHash||(e.queryHash=Sie(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Eie&&(e.enabled=!1),e}defaultMutationOptions(i){return i!=null&&i._defaulted?i:{...oe(this,xv).mutations,...(i==null?void 0:i.mutationKey)&&this.getMutationDefaults(i.mutationKey),...i,_defaulted:!0}}clear(){oe(this,yo).clear(),oe(this,bv).clear()}},yo=new WeakMap,bv=new WeakMap,xv=new WeakMap,lE=new WeakMap,cE=new WeakMap,vv=new WeakMap,dE=new WeakMap,uE=new WeakMap,SCe),QCe=L.createContext(void 0),cn=i=>{const e=L.useContext(QCe);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},y8e=({client:i,children:e})=>(L.useEffect(()=>(i.mount(),()=>{i.unmount()}),[i]),d.jsx(QCe.Provider,{value:i,children:e})),XCe=L.createContext(!1),ZCe=()=>L.useContext(XCe);XCe.Provider;function w8e(){let i=!1;return{clearReset:()=>{i=!1},reset:()=>{i=!0},isReset:()=>i}}var C8e=L.createContext(w8e()),JCe=()=>L.useContext(C8e),eSe=(i,e,t)=>{const n=t!=null&&t.state.error&&typeof i.throwOnError=="function"?Lie(i.throwOnError,[t.state.error,t]):i.throwOnError;(i.suspense||i.experimental_prefetchInRender||n)&&(e.isReset()||(i.retryOnMount=!1))},tSe=i=>{L.useEffect(()=>{i.clearReset()},[i])},nSe=({result:i,errorResetBoundary:e,throwOnError:t,query:n,suspense:s})=>i.isError&&!e.isReset()&&!i.isFetching&&n&&(s&&i.data===void 0||Lie(t,[i.error,n])),iSe=i=>{if(i.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),n=i.staleTime;i.staleTime=typeof n=="function"?(...s)=>t(n(...s)):t(n),typeof i.gcTime=="number"&&(i.gcTime=Math.max(i.gcTime,1e3))}},S8e=(i,e)=>i.isLoading&&i.isFetching&&!e,JK=(i,e)=>(i==null?void 0:i.suspense)&&e.isPending,eG=(i,e,t)=>e.fetchOptimistic(i).catch(()=>{t.clearReset()});function k8e({queries:i,...e},t){const n=cn(),s=ZCe(),r=JCe(),o=L.useMemo(()=>i.map(x=>{const v=n.defaultQueryOptions(x);return v._optimisticResults=s?"isRestoring":"optimistic",v}),[i,n,s]);o.forEach(x=>{iSe(x);const v=n.getQueryCache().get(x.queryHash);eSe(x,r,v)}),tSe(r);const[a]=L.useState(()=>new x8e(n,o,e)),[l,c,u]=a.getOptimisticResult(o,e.combine),h=!s&&e.subscribed!==!1;L.useSyncExternalStore(L.useCallback(x=>h?a.subscribe(ko.batchCalls(x)):zl,[a,h]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),L.useEffect(()=>{a.setQueries(o,e)},[o,e,a]);const f=l.some((x,v)=>JK(o[v],x))?l.flatMap((x,v)=>{const _=o[v];if(_&&JK(_,x)){const w=new o7(n,_);return eG(_,w,r)}return[]}):[];if(f.length>0)throw Promise.all(f);const m=l.find((x,v)=>{const _=o[v];return _&&nSe({result:x,errorResetBoundary:r,throwOnError:_.throwOnError,query:n.getQueryCache().get(_.queryHash),suspense:_.suspense})});if(m!=null&&m.error)throw m.error;return c(u())}function sSe(i,e,t){var g,f,m,x;const n=ZCe(),s=JCe(),r=cn(),o=r.defaultQueryOptions(i);(f=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||f.call(g,o);const a=r.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",iSe(o),eSe(o,s,a),tSe(s);const l=!r.getQueryCache().get(o.queryHash),[c]=L.useState(()=>new e(r,o)),u=c.getOptimisticResult(o),h=!n&&i.subscribed!==!1;if(L.useSyncExternalStore(L.useCallback(v=>{const _=h?c.subscribe(ko.batchCalls(v)):zl;return c.updateResult(),_},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),L.useEffect(()=>{c.setOptions(o)},[o,c]),JK(o,u))throw eG(o,c,s);if(nSe({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw u.error;if((x=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||x.call(m,o,u),o.experimental_prefetchInRender&&!Nw&&S8e(u,n)){const v=l?eG(o,c,s):a==null?void 0:a.promise;v==null||v.catch(zl).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function hn(i,e){return sSe(i,o7)}function Kt(i,e){const t=cn(),[n]=L.useState(()=>new m8e(t,i));L.useEffect(()=>{n.setOptions(i)},[n,i]);const s=L.useSyncExternalStore(L.useCallback(o=>n.subscribe(ko.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),r=L.useCallback((o,a)=>{n.mutate(o,a).catch(zl)},[n]);if(s.error&&Lie(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}function rSe(i,e){return sSe(i,g8e)}function N8e(i){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",e.appendChild(t),t.styleSheet?t.styleSheet.cssText=i:t.appendChild(document.createTextNode(i))}const E8e=i=>{switch(i){case"success":return T8e;case"info":return A8e;case"warning":return I8e;case"error":return R8e;default:return null}},L8e=Array(12).fill(0),D8e=({visible:i,className:e})=>ft.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":i},ft.createElement("div",{className:"sonner-spinner"},L8e.map((t,n)=>ft.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),T8e=ft.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ft.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),I8e=ft.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ft.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),A8e=ft.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ft.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),R8e=ft.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ft.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),M8e=ft.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ft.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ft.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),P8e=()=>{const[i,e]=ft.useState(document.hidden);return ft.useEffect(()=>{const t=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),i};let tG=1;class O8e{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...s}=e,r=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:tG++,o=this.toasts.find(l=>l.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),o?this.toasts=this.toasts.map(l=>l.id===r?(this.publish({...l,...e,id:r,title:n}),{...l,...e,id:r,dismissible:a,title:n}):l):this.addToast({title:n,...s,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,o;const a=s.then(async c=>{if(o=["resolve",c],ft.isValidElement(c))r=!1,this.create({id:n,type:"default",message:c});else if(F8e(c)&&!c.ok){r=!1;const h=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,g=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description,m=typeof h=="object"&&!ft.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:g,...m})}else if(c instanceof Error){r=!1;const h=typeof t.error=="function"?await t.error(c):t.error,g=typeof t.description=="function"?await t.description(c):t.description,m=typeof h=="object"&&!ft.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:g,...m})}else if(t.success!==void 0){r=!1;const h=typeof t.success=="function"?await t.success(c):t.success,g=typeof t.description=="function"?await t.description(c):t.description,m=typeof h=="object"&&!ft.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:g,...m})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(c):t.error,h=typeof t.description=="function"?await t.description(c):t.description,f=typeof u=="object"&&!ft.isValidElement(u)?u:{message:u};this.create({id:n,type:"error",description:h,...f})}}).finally(()=>{r&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),l=()=>new Promise((c,u)=>a.then(()=>o[0]==="reject"?u(o[1]):c(o[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{const n=(t==null?void 0:t.id)||tG++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const pd=new O8e,j8e=(i,e)=>{const t=(e==null?void 0:e.id)||tG++;return pd.addToast({title:i,...e,id:t}),t},F8e=i=>i&&typeof i=="object"&&"ok"in i&&typeof i.ok=="boolean"&&"status"in i&&typeof i.status=="number",B8e=j8e,H8e=()=>pd.toasts,W8e=()=>pd.getActiveToasts(),ze=Object.assign(B8e,{success:pd.success,info:pd.info,warning:pd.warning,error:pd.error,custom:pd.custom,message:pd.message,promise:pd.promise,dismiss:pd.dismiss,loading:pd.loading},{getHistory:H8e,getToasts:W8e});N8e("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function u5(i){return i.label!==void 0}const V8e=3,z8e="24px",U8e="16px",Mge=4e3,$8e=356,q8e=14,K8e=45,G8e=200;function Ug(...i){return i.filter(Boolean).join(" ")}function Y8e(i){const[e,t]=i.split("-"),n=[];return e&&n.push(e),t&&n.push(t),n}const Q8e=i=>{var e,t,n,s,r,o,a,l,c;const{invert:u,toast:h,unstyled:g,interacting:f,setHeights:m,visibleToasts:x,heights:v,index:_,toasts:w,expanded:k,removeToast:C,defaultRichColors:E,closeButton:D,style:T,cancelButtonStyle:I,actionButtonStyle:R,className:P="",descriptionClassName:j="",duration:B,position:U,gap:$,expandByDefault:K,classNames:z,icons:G,closeButtonAriaLabel:ne="Close toast"}=i,[te,H]=ft.useState(null),[Q,Y]=ft.useState(null),[V,ue]=ft.useState(!1),[he,Te]=ft.useState(!1),[nt,ge]=ft.useState(!1),[_e,$e]=ft.useState(!1),[Ke,ht]=ft.useState(!1),[Ct,Ft]=ft.useState(0),[Ve,tt]=ft.useState(0),qt=ft.useRef(h.duration||B||Mge),It=ft.useRef(null),Zt=ft.useRef(null),En=_===0,Xi=_+1<=x,zi=h.type,Tr=h.dismissible!==!1,Fs=h.className||"",qo=h.descriptionClassName||"",Ge=ft.useMemo(()=>v.findIndex(on=>on.toastId===h.id)||0,[v,h.id]),mt=ft.useMemo(()=>{var on;return(on=h.closeButton)!=null?on:D},[h.closeButton,D]),tn=ft.useMemo(()=>h.duration||B||Mge,[h.duration,B]),Ln=ft.useRef(0),Un=ft.useRef(0),vs=ft.useRef(0),_r=ft.useRef(null),[Js,Ei]=U.split("-"),wi=ft.useMemo(()=>v.reduce((on,Nn,vn)=>vn>=Ge?on:on+Nn.height,0),[v,Ge]),ii=P8e(),Ko=h.invert||u,Vr=zi==="loading";Un.current=ft.useMemo(()=>Ge*$+wi,[Ge,wi]),ft.useEffect(()=>{qt.current=tn},[tn]),ft.useEffect(()=>{ue(!0)},[]),ft.useEffect(()=>{const on=Zt.current;if(on){const Nn=on.getBoundingClientRect().height;return tt(Nn),m(vn=>[{toastId:h.id,height:Nn,position:h.position},...vn]),()=>m(vn=>vn.filter(Ci=>Ci.toastId!==h.id))}},[m,h.id]),ft.useLayoutEffect(()=>{if(!V)return;const on=Zt.current,Nn=on.style.height;on.style.height="auto";const vn=on.getBoundingClientRect().height;on.style.height=Nn,tt(vn),m(Ci=>Ci.find(Ii=>Ii.toastId===h.id)?Ci.map(Ii=>Ii.toastId===h.id?{...Ii,height:vn}:Ii):[{toastId:h.id,height:vn,position:h.position},...Ci])},[V,h.title,h.description,m,h.id,h.jsx,h.action,h.cancel]);const ba=ft.useCallback(()=>{Te(!0),Ft(Un.current),m(on=>on.filter(Nn=>Nn.toastId!==h.id)),setTimeout(()=>{C(h)},G8e)},[h,C,m,Un]);ft.useEffect(()=>{if(h.promise&&zi==="loading"||h.duration===1/0||h.type==="loading")return;let on;return k||f||ii?(()=>{if(vs.current{qt.current!==1/0&&(Ln.current=new Date().getTime(),on=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ba()},qt.current))})(),()=>clearTimeout(on)},[k,f,h,zi,ii,ba]),ft.useEffect(()=>{h.delete&&(ba(),h.onDismiss==null||h.onDismiss.call(h,h))},[ba,h.delete]);function ll(){var on;if(G!=null&&G.loading){var Nn;return ft.createElement("div",{className:Ug(z==null?void 0:z.loader,h==null||(Nn=h.classNames)==null?void 0:Nn.loader,"sonner-loader"),"data-visible":zi==="loading"},G.loading)}return ft.createElement(D8e,{className:Ug(z==null?void 0:z.loader,h==null||(on=h.classNames)==null?void 0:on.loader),visible:zi==="loading"})}const qc=h.icon||(G==null?void 0:G[zi])||E8e(zi);var _s,ys;return ft.createElement("li",{tabIndex:0,ref:Zt,className:Ug(P,Fs,z==null?void 0:z.toast,h==null||(e=h.classNames)==null?void 0:e.toast,z==null?void 0:z.default,z==null?void 0:z[zi],h==null||(t=h.classNames)==null?void 0:t[zi]),"data-sonner-toast":"","data-rich-colors":(_s=h.richColors)!=null?_s:E,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":V,"data-promise":!!h.promise,"data-swiped":Ke,"data-removed":he,"data-visible":Xi,"data-y-position":Js,"data-x-position":Ei,"data-index":_,"data-front":En,"data-swiping":nt,"data-dismissible":Tr,"data-type":zi,"data-invert":Ko,"data-swipe-out":_e,"data-swipe-direction":Q,"data-expanded":!!(k||K&&V),"data-testid":h.testId,style:{"--index":_,"--toasts-before":_,"--z-index":w.length-_,"--offset":`${he?Ct:Un.current}px`,"--initial-height":K?"auto":`${Ve}px`,...T,...h.style},onDragEnd:()=>{ge(!1),H(null),_r.current=null},onPointerDown:on=>{on.button!==2&&(Vr||!Tr||(It.current=new Date,Ft(Un.current),on.target.setPointerCapture(on.pointerId),on.target.tagName!=="BUTTON"&&(ge(!0),_r.current={x:on.clientX,y:on.clientY})))},onPointerUp:()=>{var on,Nn,vn;if(_e||!Tr)return;_r.current=null;const Ci=Number(((on=Zt.current)==null?void 0:on.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),zr=Number(((Nn=Zt.current)==null?void 0:Nn.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ii=new Date().getTime()-((vn=It.current)==null?void 0:vn.getTime()),Si=te==="x"?Ci:zr,bo=Math.abs(Si)/Ii;if(Math.abs(Si)>=K8e||bo>.11){Ft(Un.current),h.onDismiss==null||h.onDismiss.call(h,h),Y(te==="x"?Ci>0?"right":"left":zr>0?"down":"up"),ba(),$e(!0);return}else{var Bs,Ai;(Bs=Zt.current)==null||Bs.style.setProperty("--swipe-amount-x","0px"),(Ai=Zt.current)==null||Ai.style.setProperty("--swipe-amount-y","0px")}ht(!1),ge(!1),H(null)},onPointerMove:on=>{var Nn,vn,Ci;if(!_r.current||!Tr||((Nn=window.getSelection())==null?void 0:Nn.toString().length)>0)return;const Ii=on.clientY-_r.current.y,Si=on.clientX-_r.current.x;var bo;const Bs=(bo=i.swipeDirections)!=null?bo:Y8e(U);!te&&(Math.abs(Si)>1||Math.abs(Ii)>1)&&H(Math.abs(Si)>Math.abs(Ii)?"x":"y");let Ai={x:0,y:0};const ws=lr=>1/(1.5+Math.abs(lr)/20);if(te==="y"){if(Bs.includes("top")||Bs.includes("bottom"))if(Bs.includes("top")&&Ii<0||Bs.includes("bottom")&&Ii>0)Ai.y=Ii;else{const lr=Ii*ws(Ii);Ai.y=Math.abs(lr)0)Ai.x=Si;else{const lr=Si*ws(Si);Ai.x=Math.abs(lr)0||Math.abs(Ai.y)>0)&&ht(!0),(vn=Zt.current)==null||vn.style.setProperty("--swipe-amount-x",`${Ai.x}px`),(Ci=Zt.current)==null||Ci.style.setProperty("--swipe-amount-y",`${Ai.y}px`)}},mt&&!h.jsx&&zi!=="loading"?ft.createElement("button",{"aria-label":ne,"data-disabled":Vr,"data-close-button":!0,onClick:Vr||!Tr?()=>{}:()=>{ba(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Ug(z==null?void 0:z.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(ys=G==null?void 0:G.close)!=null?ys:M8e):null,(zi||h.icon||h.promise)&&h.icon!==null&&((G==null?void 0:G[zi])!==null||h.icon)?ft.createElement("div",{"data-icon":"",className:Ug(z==null?void 0:z.icon,h==null||(s=h.classNames)==null?void 0:s.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||ll():null,h.type!=="loading"?qc:null):null,ft.createElement("div",{"data-content":"",className:Ug(z==null?void 0:z.content,h==null||(r=h.classNames)==null?void 0:r.content)},ft.createElement("div",{"data-title":"",className:Ug(z==null?void 0:z.title,h==null||(o=h.classNames)==null?void 0:o.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?ft.createElement("div",{"data-description":"",className:Ug(j,qo,z==null?void 0:z.description,h==null||(a=h.classNames)==null?void 0:a.description)},typeof h.description=="function"?h.description():h.description):null),ft.isValidElement(h.cancel)?h.cancel:h.cancel&&u5(h.cancel)?ft.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||I,onClick:on=>{u5(h.cancel)&&Tr&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,on),ba())},className:Ug(z==null?void 0:z.cancelButton,h==null||(l=h.classNames)==null?void 0:l.cancelButton)},h.cancel.label):null,ft.isValidElement(h.action)?h.action:h.action&&u5(h.action)?ft.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||R,onClick:on=>{u5(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,on),!on.defaultPrevented&&ba())},className:Ug(z==null?void 0:z.actionButton,h==null||(c=h.classNames)==null?void 0:c.actionButton)},h.action.label):null)};function Pge(){if(typeof window>"u"||typeof document>"u")return"ltr";const i=document.documentElement.getAttribute("dir");return i==="auto"||!i?window.getComputedStyle(document.documentElement).direction:i}function X8e(i,e){const t={};return[i,e].forEach((n,s)=>{const r=s===1,o=r?"--mobile-offset":"--offset",a=r?U8e:z8e;function l(c){["top","right","bottom","left"].forEach(u=>{t[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?t[`${o}-${c}`]=a:t[`${o}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),t}const Z8e=ft.forwardRef(function(e,t){const{id:n,invert:s,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:u,mobileOffset:h,theme:g="light",richColors:f,duration:m,style:x,visibleToasts:v=V8e,toastOptions:_,dir:w=Pge(),gap:k=q8e,icons:C,containerAriaLabel:E="Notifications"}=e,[D,T]=ft.useState([]),I=ft.useMemo(()=>n?D.filter(V=>V.toasterId===n):D.filter(V=>!V.toasterId),[D,n]),R=ft.useMemo(()=>Array.from(new Set([r].concat(I.filter(V=>V.position).map(V=>V.position)))),[I,r]),[P,j]=ft.useState([]),[B,U]=ft.useState(!1),[$,K]=ft.useState(!1),[z,G]=ft.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ne=ft.useRef(null),te=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=ft.useRef(null),Q=ft.useRef(!1),Y=ft.useCallback(V=>{T(ue=>{var he;return(he=ue.find(Te=>Te.id===V.id))!=null&&he.delete||pd.dismiss(V.id),ue.filter(({id:Te})=>Te!==V.id)})},[]);return ft.useEffect(()=>pd.subscribe(V=>{if(V.dismiss){requestAnimationFrame(()=>{T(ue=>ue.map(he=>he.id===V.id?{...he,delete:!0}:he))});return}setTimeout(()=>{TCe.flushSync(()=>{T(ue=>{const he=ue.findIndex(Te=>Te.id===V.id);return he!==-1?[...ue.slice(0,he),{...ue[he],...V},...ue.slice(he+1)]:[V,...ue]})})})}),[D]),ft.useEffect(()=>{if(g!=="system"){G(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?G("dark"):G("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:ue})=>{G(ue?"dark":"light")})}catch{V.addListener(({matches:he})=>{try{G(he?"dark":"light")}catch(Te){console.error(Te)}})}},[g]),ft.useEffect(()=>{D.length<=1&&U(!1)},[D]),ft.useEffect(()=>{const V=ue=>{var he;if(o.every(ge=>ue[ge]||ue.code===ge)){var nt;U(!0),(nt=ne.current)==null||nt.focus()}ue.code==="Escape"&&(document.activeElement===ne.current||(he=ne.current)!=null&&he.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[o]),ft.useEffect(()=>{if(ne.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,Q.current=!1)}},[ne.current]),ft.createElement("section",{ref:t,"aria-label":`${E} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((V,ue)=>{var he;const[Te,nt]=V.split("-");return I.length?ft.createElement("ol",{key:V,dir:w==="auto"?Pge():w,tabIndex:-1,ref:ne,className:c,"data-sonner-toaster":!0,"data-sonner-theme":z,"data-y-position":Te,"data-x-position":nt,style:{"--front-toast-height":`${((he=P[0])==null?void 0:he.height)||0}px`,"--width":`${$8e}px`,"--gap":`${k}px`,...x,...X8e(u,h)},onBlur:ge=>{Q.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(Q.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||Q.current||(Q.current=!0,H.current=ge.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{$||U(!1)},onDragEnd:()=>U(!1),onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},I.filter(ge=>!ge.position&&ue===0||ge.position===V).map((ge,_e)=>{var $e,Ke;return ft.createElement(Q8e,{key:ge.id,icons:C,index:_e,toast:ge,defaultRichColors:f,duration:($e=_==null?void 0:_.duration)!=null?$e:m,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:s,visibleToasts:v,closeButton:(Ke=_==null?void 0:_.closeButton)!=null?Ke:l,interacting:$,position:V,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:Y,toasts:I.filter(ht=>ht.position==ge.position),heights:P.filter(ht=>ht.position==ge.position),setHeights:j,expandByDefault:a,gap:k,expanded:B,swipeDirections:e.swipeDirections})})):null}))}),oSe=L.createContext({theme:"system",setTheme:()=>null,resolvedTheme:"light"});function J8e(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function e9e({children:i,defaultTheme:e="system",storageKey:t="eddi-theme"}){const[n,s]=L.useState(()=>localStorage.getItem(t)||e),[r,o]=L.useState(J8e);L.useEffect(()=>{const u=window.matchMedia("(prefers-color-scheme: dark)"),h=g=>o(g.matches?"dark":"light");return u.addEventListener("change",h),()=>u.removeEventListener("change",h)},[]);const a=n==="system"?r:n;L.useEffect(()=>{const u=window.document.documentElement;u.classList.remove("light","dark"),u.classList.add(a)},[a]);const l=L.useCallback(u=>{localStorage.setItem(t,u),s(u)},[t]),c=L.useMemo(()=>({theme:n,resolvedTheme:a,setTheme:l}),[n,a,l]);return d.jsx(oSe.Provider,{value:c,children:i})}function RM(){const i=L.useContext(oSe);if(i===void 0)throw new Error("useTheme must be used within a ThemeProvider");return i}const t9e="application/json";var Om,fd,hE,gE,yf,fE,ir,Jh,Bt,m4,aSe,lSe,cSe,dSe,nG,uSe,iG,hSe,gSe,b4,g2,sG,Mx,fSe,rG,Px,x4,f2,Jg,oG;class n9e{constructor(e){Ht(this,Bt);Ht(this,Om,[]);Ht(this,fd);Ht(this,hE,!0);Ht(this,gE);Ht(this,yf,st(this,Bt,oG).call(this,console.info));Ht(this,fE,st(this,Bt,oG).call(this,console.warn));Ht(this,ir,{enable:!0,callbackList:[],interval:5});Ht(this,Jh);kt(this,"didInitialize",!1);kt(this,"authenticated",!1);kt(this,"loginRequired",!1);kt(this,"responseMode","fragment");kt(this,"responseType","code");kt(this,"flow","standard");kt(this,"timeSkew",null);kt(this,"redirectUri");kt(this,"silentCheckSsoRedirectUri");kt(this,"silentCheckSsoFallback",!0);kt(this,"pkceMethod","S256");kt(this,"enableLogging",!1);kt(this,"logoutMethod","GET");kt(this,"scope");kt(this,"messageReceiveTimeout",1e4);kt(this,"idToken");kt(this,"idTokenParsed");kt(this,"token");kt(this,"tokenParsed");kt(this,"refreshToken");kt(this,"refreshTokenParsed");kt(this,"clientId");kt(this,"sessionId");kt(this,"subject");kt(this,"authServerUrl");kt(this,"realm");kt(this,"realmAccess");kt(this,"resourceAccess");kt(this,"profile");kt(this,"userInfo");kt(this,"endpoints");kt(this,"tokenTimeoutHandle");kt(this,"onAuthSuccess");kt(this,"onAuthError");kt(this,"onAuthRefreshSuccess");kt(this,"onAuthRefreshError");kt(this,"onTokenExpired");kt(this,"onAuthLogout");kt(this,"onReady");kt(this,"onActionUpdate");kt(this,"init",async(e={})=>{var n;if(this.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");this.didInitialize=!0,yt(this,gE,c9e());const t=["default","cordova","cordova-native"];if(typeof e.adapter=="string"&&t.includes(e.adapter)?yt(this,fd,st(this,Bt,m4).call(this,e.adapter)):typeof e.adapter=="object"?yt(this,fd,e.adapter):"Cordova"in window||"cordova"in window?yt(this,fd,st(this,Bt,m4).call(this,"cordova")):yt(this,fd,st(this,Bt,m4).call(this,"default")),typeof e.useNonce<"u"&&yt(this,hE,e.useNonce),typeof e.checkLoginIframe<"u"&&(oe(this,ir).enable=e.checkLoginIframe),e.checkLoginIframeInterval&&(oe(this,ir).interval=e.checkLoginIframeInterval),e.onLoad==="login-required"&&(this.loginRequired=!0),e.responseMode)if(e.responseMode==="query"||e.responseMode==="fragment")this.responseMode=e.responseMode;else throw new Error("Invalid value for responseMode");if(e.flow){switch(e.flow){case"standard":this.responseType="code";break;case"implicit":this.responseType="id_token token";break;case"hybrid":this.responseType="code id_token token";break;default:throw new Error("Invalid value for flow")}this.flow=e.flow}if(typeof e.timeSkew=="number"&&(this.timeSkew=e.timeSkew),e.redirectUri&&(this.redirectUri=e.redirectUri),e.silentCheckSsoRedirectUri&&(this.silentCheckSsoRedirectUri=e.silentCheckSsoRedirectUri),typeof e.silentCheckSsoFallback=="boolean"&&(this.silentCheckSsoFallback=e.silentCheckSsoFallback),typeof e.pkceMethod<"u"){if(e.pkceMethod!=="S256"&&e.pkceMethod!==!1)throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${e.pkceMethod}.`);this.pkceMethod=e.pkceMethod}return typeof e.enableLogging=="boolean"&&(this.enableLogging=e.enableLogging),e.logoutMethod==="POST"&&(this.logoutMethod="POST"),typeof e.scope=="string"&&(this.scope=e.scope),typeof e.messageReceiveTimeout=="number"&&e.messageReceiveTimeout>0&&(this.messageReceiveTimeout=e.messageReceiveTimeout),await st(this,Bt,dSe).call(this),await st(this,Bt,hSe).call(this),await st(this,Bt,gSe).call(this,e),(n=this.onReady)==null||n.call(this,this.authenticated),this.authenticated});kt(this,"login",e=>oe(this,fd).login(e));kt(this,"createLoginUrl",async e=>{const t=Oge(),n=Oge(),s=oe(this,fd).redirectUri(e),r={state:t,nonce:n,redirectUri:s,loginOptions:e};e!=null&&e.prompt&&(r.prompt=e.prompt);const o=(e==null?void 0:e.action)==="register"?this.endpoints.register():this.endpoints.authorize();let a=(e==null?void 0:e.scope)||this.scope;const l=a?a.split(" "):[];l.includes("openid")||l.unshift("openid"),a=l.join(" ");const c=new URLSearchParams([["client_id",this.clientId],["redirect_uri",s],["state",t],["response_mode",this.responseMode],["response_type",this.responseType],["scope",a]]);if(oe(this,hE)&&c.append("nonce",n),e!=null&&e.prompt&&c.append("prompt",e.prompt),typeof(e==null?void 0:e.maxAge)=="number"&&c.append("max_age",e.maxAge.toString()),e!=null&&e.loginHint&&c.append("login_hint",e.loginHint),e!=null&&e.idpHint&&c.append("kc_idp_hint",e.idpHint),e!=null&&e.action&&e.action!=="register"&&c.append("kc_action",e.action),e!=null&&e.locale&&c.append("ui_locales",e.locale),e!=null&&e.acr&&c.append("claims",i9e(e.acr)),e!=null&&e.acrValues&&c.append("acr_values",e.acrValues),this.pkceMethod)try{const u=s9e(96),h=await r9e(this.pkceMethod,u);r.pkceCodeVerifier=u,c.append("code_challenge",h),c.append("code_challenge_method",this.pkceMethod)}catch(u){throw new Error("Failed to generate PKCE challenge.",{cause:u})}return oe(this,gE).add(r),`${o}?${c.toString()}`});kt(this,"logout",e=>oe(this,fd).logout(e));kt(this,"createLogoutUrl",e=>{const t=(e==null?void 0:e.logoutMethod)??this.logoutMethod,n=this.endpoints.logout();if(t==="POST")return n;const s=new URLSearchParams([["client_id",this.clientId],["post_logout_redirect_uri",oe(this,fd).redirectUri(e)]]);return this.idToken&&s.append("id_token_hint",this.idToken),`${n}?${s.toString()}`});kt(this,"register",e=>oe(this,fd).register(e));kt(this,"createRegisterUrl",e=>this.createLoginUrl({...e,action:"register"}));kt(this,"createAccountUrl",e=>{const t=st(this,Bt,Jg).call(this);if(!t)throw new Error("Unable to create account URL, make sure the adapter is not configured using a generic OIDC provider.");const n=new URLSearchParams([["referrer",this.clientId],["referrer_uri",oe(this,fd).redirectUri(e)]]);return`${t}/account?${n.toString()}`});kt(this,"accountManagement",()=>oe(this,fd).accountManagement());kt(this,"hasRealmRole",e=>{const t=this.realmAccess;return!!t&&t.roles.indexOf(e)>=0});kt(this,"hasResourceRole",(e,t)=>{if(!this.resourceAccess)return!1;const n=this.resourceAccess[t||this.clientId];return!!n&&n.roles.indexOf(e)>=0});kt(this,"loadUserProfile",async()=>{const e=st(this,Bt,Jg).call(this);if(!e)throw new Error("Unable to load user profile, make sure the adapter is not configured using a generic OIDC provider.");const t=`${e}/account`,n=await IE(t,{headers:[jge(this.token)]});return this.profile=n});kt(this,"loadUserInfo",async()=>{const e=this.endpoints.userinfo(),t=await IE(e,{headers:[jge(this.token)]});return this.userInfo=t});kt(this,"isTokenExpired",e=>{if(!this.tokenParsed||!this.refreshToken&&this.flow!=="implicit")throw new Error("Not authenticated");if(this.timeSkew==null)return oe(this,yf).call(this,"[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;if(typeof this.tokenParsed.exp!="number")return!1;let t=this.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+this.timeSkew;if(e){if(isNaN(e))throw new Error("Invalid minValidity");t-=e}return t<0});kt(this,"updateToken",async e=>{var o,a;if(!this.refreshToken)throw new Error("Unable to update token, no refresh token available.");e=e||5,oe(this,ir).enable&&await st(this,Bt,g2).call(this);let t=!1;if(e===-1?(t=!0,oe(this,yf).call(this,"[KEYCLOAK] Refreshing token: forced refresh")):(!this.tokenParsed||this.isTokenExpired(e))&&(t=!0,oe(this,yf).call(this,"[KEYCLOAK] Refreshing token: token expired")),!t)return!1;const{promise:n,resolve:s,reject:r}=Promise.withResolvers();if(oe(this,Om).push({resolve:s,reject:r}),oe(this,Om).length===1){const l=this.endpoints.token();let c=new Date().getTime();try{const u=await v9e(l,this.refreshToken,this.clientId);oe(this,yf).call(this,"[KEYCLOAK] Token refreshed"),c=(c+new Date().getTime())/2,st(this,Bt,f2).call(this,u.access_token,u.refresh_token,u.id_token,c),(o=this.onAuthRefreshSuccess)==null||o.call(this);for(let h=oe(this,Om).pop();h!=null;h=oe(this,Om).pop())h.resolve(!0)}catch(u){oe(this,fE).call(this,"[KEYCLOAK] Failed to refresh token"),u instanceof xSe&&u.response.status===400&&this.clearToken(),(a=this.onAuthRefreshError)==null||a.call(this);for(let h=oe(this,Om).pop();h!=null;h=oe(this,Om).pop())h.reject(u)}}return await n});kt(this,"clearToken",()=>{var e;this.token&&(st(this,Bt,f2).call(this),(e=this.onAuthLogout)==null||e.call(this),this.loginRequired&&this.login())});if(typeof e!="string"&&!uG(e))throw new Error("The 'Keycloak' constructor must be provided with a configuration object, or a URL to a JSON configuration file.");if(uG(e)){const t="oidcProvider"in e?["clientId"]:["url","realm","clientId"];for(const n of t)if(!(n in e))throw new Error(`The configuration object is missing the required '${n}' property.`)}globalThis.isSecureContext||oe(this,fE).call(this,`[KEYCLOAK] Keycloak JS must be used in a 'secure context' to function properly as it relies on browser APIs that are otherwise not available. -Continuing to run your application insecurely will lead to unexpected behavior and breakage. - -For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts`),yt(this,Jh,e)}}Om=new WeakMap,fd=new WeakMap,hE=new WeakMap,gE=new WeakMap,yf=new WeakMap,fE=new WeakMap,ir=new WeakMap,Jh=new WeakMap,Bt=new WeakSet,m4=function(e){if(e==="default")return st(this,Bt,aSe).call(this);if(e==="cordova")return oe(this,ir).enable=!1,st(this,Bt,lSe).call(this);if(e==="cordova-native")return oe(this,ir).enable=!1,st(this,Bt,cSe).call(this);throw new Error("invalid adapter type: "+e)},aSe=function(){const e=t=>(t==null?void 0:t.redirectUri)||this.redirectUri||globalThis.location.href;return{login:async t=>(window.location.assign(await this.createLoginUrl(t)),await new Promise(()=>{})),logout:async t=>{if(((t==null?void 0:t.logoutMethod)??this.logoutMethod)==="GET"){window.location.replace(this.createLogoutUrl(t));return}const s=document.createElement("form");s.setAttribute("method","POST"),s.setAttribute("action",this.createLogoutUrl(t)),s.style.display="none";const r={id_token_hint:this.idToken,client_id:this.clientId,post_logout_redirect_uri:e(t)};for(const[o,a]of Object.entries(r)){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",o),l.setAttribute("value",a),s.appendChild(l)}document.body.appendChild(s),s.submit()},register:async t=>(window.location.assign(await this.createRegisterUrl(t)),await new Promise(()=>{})),accountManagement:async()=>{const t=this.createAccountUrl();if(typeof t<"u")window.location.href=t;else throw new Error("Not supported by the OIDC server");return await new Promise(()=>{})},redirectUri:e}},lSe=function(){const e=(o,a,l)=>window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(o,a,l):window.open(o,a,l),t=o=>o&&o.cordovaOptions?Object.keys(o.cordovaOptions).reduce((a,l)=>(a[l]=o.cordovaOptions[l],a),{}):{},n=o=>Object.keys(o).reduce((a,l)=>(a.push(l+"="+o[l]),a),[]).join(","),s=o=>{const a=t(o);return a.location="no",o&&o.prompt==="none"&&(a.hidden="yes"),n(a)},r=()=>this.redirectUri||"http://localhost";return{login:async o=>{const a=s(o),l=await this.createLoginUrl(o),c=e(l,"_blank",a);let u=!1,h=!1;function g(){h=!0,c.close()}return await new Promise((f,m)=>{c.addEventListener("loadstart",async x=>{if(x.url.indexOf(r())===0){const v=st(this,Bt,Mx).call(this,x.url);try{await st(this,Bt,Px).call(this,v),f()}catch(_){m(_)}g(),u=!0}}),c.addEventListener("loaderror",async x=>{if(!u)if(x.url.indexOf(r())===0){const v=st(this,Bt,Mx).call(this,x.url);try{await st(this,Bt,Px).call(this,v),f()}catch(_){m(_)}g(),u=!0}else m(new Error("Unable to process login.")),g()}),c.addEventListener("exit",function(x){h||m(new Error("User closed the login window."))})})},logout:async o=>{const a=this.createLogoutUrl(o),l=e(a,"_blank","location=no,hidden=yes,clearcache=yes");let c=!1;l.addEventListener("loadstart",u=>{u.url.indexOf(r())===0&&l.close()}),l.addEventListener("loaderror",u=>{u.url.indexOf(r())===0||(c=!0),l.close()}),await new Promise((u,h)=>{l.addEventListener("exit",()=>{c?h(new Error("User closed the login window.")):(this.clearToken(),u())})})},register:async o=>{const a=await this.createRegisterUrl(),l=s(o),c=e(a,"_blank",l);await new Promise((h,g)=>{c.addEventListener("loadstart",async f=>{if(f.url.indexOf(r())===0){c.close();const m=st(this,Bt,Mx).call(this,f.url);try{await st(this,Bt,Px).call(this,m),h()}catch(x){g(x)}}})})},accountManagement:async()=>{const o=this.createAccountUrl();if(typeof o<"u"){const a=e(o,"_blank","location=no");a.addEventListener("loadstart",function(l){l.url.indexOf(r())===0&&a.close()})}else throw new Error("Not supported by the OIDC server")},redirectUri:()=>r()}},cSe=function(){return{login:async e=>{const t=await this.createLoginUrl(e);await new Promise((n,s)=>{universalLinks.subscribe("keycloak",async r=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();const o=st(this,Bt,Mx).call(this,r.url);try{await st(this,Bt,Px).call(this,o),n()}catch(a){s(a)}}),window.cordova.plugins.browsertab.openUrl(t)})},logout:async e=>{const t=this.createLogoutUrl(e);await new Promise(n=>{universalLinks.subscribe("keycloak",()=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),this.clearToken(),n()}),window.cordova.plugins.browsertab.openUrl(t)})},register:async e=>{const t=await this.createRegisterUrl(e);await new Promise((n,s)=>{universalLinks.subscribe("keycloak",async r=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();const o=st(this,Bt,Mx).call(this,r.url);try{await st(this,Bt,Px).call(this,o),n()}catch(a){s(a)}}),window.cordova.plugins.browsertab.openUrl(t)})},accountManagement:async()=>{const e=this.createAccountUrl();if(typeof e<"u")window.cordova.plugins.browsertab.openUrl(e);else throw new Error("Not supported by the OIDC server")},redirectUri:e=>e&&e.redirectUri?e.redirectUri:this.redirectUri?this.redirectUri:"http://localhost"}},dSe=async function(){if(typeof oe(this,Jh)=="string"){const e=await m9e(oe(this,Jh));this.authServerUrl=e["auth-server-url"],this.realm=e.realm,this.clientId=e.resource,st(this,Bt,nG).call(this)}else this.clientId=oe(this,Jh).clientId,"oidcProvider"in oe(this,Jh)?await st(this,Bt,uSe).call(this,oe(this,Jh).oidcProvider):(this.authServerUrl=oe(this,Jh).url,this.realm=oe(this,Jh).realm,st(this,Bt,nG).call(this))},nG=function(){this.endpoints={authorize:()=>st(this,Bt,Jg).call(this)+"/protocol/openid-connect/auth",token:()=>st(this,Bt,Jg).call(this)+"/protocol/openid-connect/token",logout:()=>st(this,Bt,Jg).call(this)+"/protocol/openid-connect/logout",checkSessionIframe:()=>st(this,Bt,Jg).call(this)+"/protocol/openid-connect/login-status-iframe.html",thirdPartyCookiesIframe:()=>st(this,Bt,Jg).call(this)+"/protocol/openid-connect/3p-cookies/step1.html",register:()=>st(this,Bt,Jg).call(this)+"/protocol/openid-connect/registrations",userinfo:()=>st(this,Bt,Jg).call(this)+"/protocol/openid-connect/userinfo"}},uSe=async function(e){if(typeof e=="string"){const t=`${Fge(e)}/.well-known/openid-configuration`,n=await b9e(t);st(this,Bt,iG).call(this,n)}else st(this,Bt,iG).call(this,e)},iG=function(e){this.endpoints={authorize(){return e.authorization_endpoint},token(){return e.token_endpoint},logout(){if(!e.end_session_endpoint)throw new Error("Not supported by the OIDC server");return e.end_session_endpoint},checkSessionIframe(){if(!e.check_session_iframe)throw new Error("Not supported by the OIDC server");return e.check_session_iframe},register(){throw new Error('Redirection to "Register user" page not supported in standard OIDC mode')},userinfo(){if(!e.userinfo_endpoint)throw new Error("Not supported by the OIDC server");return e.userinfo_endpoint}}},hSe=async function(){if(!oe(this,ir).enable&&!this.silentCheckSsoRedirectUri||typeof this.endpoints.thirdPartyCookiesIframe!="function")return;const e=document.createElement("iframe");e.setAttribute("src",this.endpoints.thirdPartyCookiesIframe()),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-3p-check-iframe"),e.style.display="none",document.body.appendChild(e);const t=new Promise(n=>{const s=r=>{e.contentWindow===r.source&&(r.data!=="supported"&&r.data!=="unsupported"||(r.data==="unsupported"&&(oe(this,fE).call(this,`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means: - - - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication). - - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab). - -For more information see: https://www.keycloak.org/securing-apps/javascript-adapter#_modern_browsers`),oe(this,ir).enable=!1,this.silentCheckSsoFallback&&(this.silentCheckSsoRedirectUri=void 0)),document.body.removeChild(e),window.removeEventListener("message",s),n()))};window.addEventListener("message",s,!1)});return await l9e(t,this.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")},gSe=async function(e){var r,o,a;const t=st(this,Bt,Mx).call(this,window.location.href);if(t!=null&&t.newUrl&&window.history.replaceState(window.history.state,"",t.newUrl),t&&t.valid){await st(this,Bt,b4).call(this),await st(this,Bt,Px).call(this,t);return}const n=async l=>{const c={};l||(c.prompt="none"),e.locale&&(c.locale=e.locale),await this.login(c)},s=async()=>{switch(e.onLoad){case"check-sso":oe(this,ir).enable?(await st(this,Bt,b4).call(this),await st(this,Bt,g2).call(this)||(this.silentCheckSsoRedirectUri?await st(this,Bt,sG).call(this):await n(!1))):this.silentCheckSsoRedirectUri?await st(this,Bt,sG).call(this):await n(!1);break;case"login-required":await n(!0);break;default:throw new Error("Invalid value for onLoad")}};if(e.token&&e.refreshToken)if(st(this,Bt,f2).call(this,e.token,e.refreshToken,e.idToken),oe(this,ir).enable)await st(this,Bt,b4).call(this),await st(this,Bt,g2).call(this)&&((r=this.onAuthSuccess)==null||r.call(this),st(this,Bt,x4).call(this));else try{await this.updateToken(-1),(o=this.onAuthSuccess)==null||o.call(this)}catch(l){if((a=this.onAuthError)==null||a.call(this),e.onLoad)await s();else throw l}else e.onLoad&&await s()},b4=async function(){if(!oe(this,ir).enable||oe(this,ir).iframe)return;const e=document.createElement("iframe");oe(this,ir).iframe=e,e.setAttribute("src",this.endpoints.checkSessionIframe()),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-session-iframe"),e.style.display="none",document.body.appendChild(e);const t=s=>{var o;if(s.origin!==oe(this,ir).iframeOrigin||((o=oe(this,ir).iframe)==null?void 0:o.contentWindow)!==s.source||!(s.data==="unchanged"||s.data==="changed"||s.data==="error"))return;s.data!=="unchanged"&&this.clearToken();const r=oe(this,ir).callbackList;oe(this,ir).callbackList=[];for(const a of r.reverse())s.data==="error"?a(new Error("Error while checking login iframe")):a(null,s.data==="unchanged")};window.addEventListener("message",t,!1),await new Promise(s=>{e.addEventListener("load",()=>{const r=this.endpoints.authorize();r.startsWith("/")?oe(this,ir).iframeOrigin=globalThis.location.origin:oe(this,ir).iframeOrigin=new URL(r).origin,s()})})},g2=async function(){if(!oe(this,ir).iframe||!oe(this,ir).iframeOrigin)return;const e=`${this.clientId} ${this.sessionId?this.sessionId:""}`,t=oe(this,ir).iframeOrigin;return await new Promise((s,r)=>{var a,l;const o=(c,u)=>c?r(c):s(u);oe(this,ir).callbackList.push(o),oe(this,ir).callbackList.length===1&&((l=(a=oe(this,ir).iframe)==null?void 0:a.contentWindow)==null||l.postMessage(e,t))})},sG=async function(){const e=document.createElement("iframe"),t=await this.createLoginUrl({prompt:"none",redirectUri:this.silentCheckSsoRedirectUri});return e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e),await new Promise((n,s)=>{const r=async o=>{if(o.origin!==window.location.origin||e.contentWindow!==o.source)return;const a=st(this,Bt,Mx).call(this,o.data);try{await st(this,Bt,Px).call(this,a),n()}catch(l){s(l)}document.body.removeChild(e),window.removeEventListener("message",r)};window.addEventListener("message",r)})},Mx=function(e){const t=st(this,Bt,fSe).call(this,e);if(!t)return;const n=oe(this,gE).get(t.state);return n&&(t.valid=!0,t.redirectUri=n.redirectUri,t.storedNonce=n.nonce,t.prompt=n.prompt,t.pkceCodeVerifier=n.pkceCodeVerifier,t.loginOptions=n.loginOptions),t},fSe=function(e){let t=[];switch(this.flow){case"standard":t=["code","state","session_state","kc_action_status","kc_action","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","kc_action","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","kc_action","iss"];break}t.push("error"),t.push("error_description"),t.push("error_uri");const n=new URL(e);let s="",r;if(this.responseMode==="query"&&n.searchParams.size>0?(r=st(this,Bt,rG).call(this,n.search,t),n.search=r.paramsString,s=n.toString()):this.responseMode==="fragment"&&n.hash.length>0&&(r=st(this,Bt,rG).call(this,n.hash.substring(1),t),n.hash=r.paramsString,s=n.toString()),r!=null&&r.oauthParams){if(this.flow==="standard"||this.flow==="hybrid"){if((r.oauthParams.code||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=s,r.oauthParams}else if(this.flow==="implicit"&&(r.oauthParams.access_token||r.oauthParams.error)&&r.oauthParams.state)return r.oauthParams.newUrl=s,r.oauthParams}},rG=function(e,t){const n=e.split("&"),s={};let r="";for(const o of n.reverse()){const a=new URLSearchParams(o).entries().next().value;if(!a){r="&"+r;continue}const[l,c]=a;t.includes(l)&&!(l in s)?s[l]=c:r=r.length===0?o:o+"&"+r}return{paramsString:r,oauthParams:s}},Px=async function(e){var a,l,c,u;const{code:t,error:n,prompt:s}=e;let r=new Date().getTime();const o=(h,g,f)=>{if(r=(r+new Date().getTime())/2,st(this,Bt,f2).call(this,h,g,f,r),oe(this,hE)&&this.idTokenParsed&&this.idTokenParsed.nonce!==e.storedNonce)throw oe(this,yf).call(this,"[KEYCLOAK] Invalid nonce, clearing token"),this.clearToken(),new Error("Invalid nonce.")};if(e.kc_action_status&&this.onActionUpdate&&this.onActionUpdate(e.kc_action_status,e.kc_action),n){if(s!=="none")if(e.error_description&&e.error_description==="authentication_expired")await this.login(e.loginOptions);else{const h={error:n,error_description:e.error_description};throw(a=this.onAuthError)==null||a.call(this,h),h}return}else this.flow!=="standard"&&(e.access_token||e.id_token)&&(o(e.access_token,void 0,e.id_token),(l=this.onAuthSuccess)==null||l.call(this));if(this.flow!=="implicit"&&t)try{const h=await x9e(this.endpoints.token(),t,this.clientId,e.redirectUri,e.pkceCodeVerifier);o(h.access_token,h.refresh_token,h.id_token),this.flow==="standard"&&((c=this.onAuthSuccess)==null||c.call(this)),st(this,Bt,x4).call(this)}catch(h){throw(u=this.onAuthError)==null||u.call(this),h}},x4=async function(){oe(this,ir).enable&&this.token&&(await y9e(oe(this,ir).interval*1e3),await st(this,Bt,g2).call(this)&&await st(this,Bt,x4).call(this))},f2=function(e,t,n,s){if(this.tokenTimeoutHandle&&(clearTimeout(this.tokenTimeoutHandle),this.tokenTimeoutHandle=void 0),t?(this.refreshToken=t,this.refreshTokenParsed=Jz(t)):(delete this.refreshToken,delete this.refreshTokenParsed),n?(this.idToken=n,this.idTokenParsed=Jz(n)):(delete this.idToken,delete this.idTokenParsed),e){if(this.token=e,this.tokenParsed=Jz(e),this.sessionId=this.tokenParsed.sid,this.authenticated=!0,this.subject=this.tokenParsed.sub,this.realmAccess=this.tokenParsed.realm_access,this.resourceAccess=this.tokenParsed.resource_access,s&&(this.timeSkew=Math.floor(s/1e3)-this.tokenParsed.iat),this.timeSkew!==null&&(oe(this,yf).call(this,"[KEYCLOAK] Estimated time difference between browser and server is "+this.timeSkew+" seconds"),this.onTokenExpired)){const r=(this.tokenParsed.exp-new Date().getTime()/1e3+this.timeSkew)*1e3;oe(this,yf).call(this,"[KEYCLOAK] Token expires in "+Math.round(r/1e3)+" s"),r<=0?this.onTokenExpired():this.tokenTimeoutHandle=window.setTimeout(this.onTokenExpired,r)}}else delete this.token,delete this.tokenParsed,delete this.subject,delete this.realmAccess,delete this.resourceAccess,this.authenticated=!1},Jg=function(){if(!(typeof this.authServerUrl>"u"))return`${Fge(this.authServerUrl)}/realms/${encodeURIComponent(this.realm)}`},oG=function(e){return t=>{this.enableLogging&&e.call(console,t)}};function Oge(){if(typeof crypto>"u"||typeof crypto.randomUUID>"u")throw new Error("Web Crypto API is not available.");return crypto.randomUUID()}function i9e(i){return JSON.stringify({id_token:{acr:i}})}function s9e(i){return o9e(i,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}async function r9e(i,e){if(i!=="S256")throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${i}'.`);const t=new Uint8Array(await g9e(e));return h9e(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function o9e(i,e){const t=a9e(i),n=new Array(i);for(let s=0;s"u"||typeof crypto.getRandomValues>"u")throw new Error("Web Crypto API is not available.");return crypto.getRandomValues(new Uint8Array(i))}function l9e(i,e,t){let n;const s=new Promise(function(r,o){n=window.setTimeout(function(){o(new Error(t))},e)});return Promise.race([i,s]).finally(function(){clearTimeout(n)})}function c9e(){try{return new d9e}catch{return new u9e}}const gN="kc-callback-";var Th,aG,pSe,lG,mSe;class d9e{constructor(){Ht(this,Th);globalThis.localStorage.setItem("kc-test","test"),globalThis.localStorage.removeItem("kc-test")}get(e){if(!e)return null;st(this,Th,aG).call(this);const t=gN+e,n=globalThis.localStorage.getItem(t);return n?(globalThis.localStorage.removeItem(t),JSON.parse(n)):null}add(e){st(this,Th,aG).call(this);const t=gN+e.state,n=JSON.stringify({...e,expires:Date.now()+3600*1e3});try{globalThis.localStorage.setItem(t,n)}catch{st(this,Th,pSe).call(this),globalThis.localStorage.setItem(t,n)}}}Th=new WeakSet,aG=function(){const e=Date.now();for(const[t,n]of st(this,Th,lG).call(this)){const s=st(this,Th,mSe).call(this,n);(s===null||se.startsWith(gN))},mSe=function(e){let t;try{t=JSON.parse(e)}catch{return null}return uG(t)&&"expires"in t&&typeof t.expires=="number"?t.expires:null};var fp,bSe,cG,dG;class u9e{constructor(){Ht(this,fp)}get(e){if(!e)return null;const t=st(this,fp,bSe).call(this,gN+e);return st(this,fp,cG).call(this,gN+e,"",st(this,fp,dG).call(this,-100)),t?JSON.parse(t):null}add(e){st(this,fp,cG).call(this,gN+e.state,JSON.stringify(e),st(this,fp,dG).call(this,60))}}fp=new WeakSet,bSe=function(e){const t=e+"=",n=document.cookie.split(";");for(let s=0;s"u"||typeof crypto.subtle>"u")throw new Error("Web Crypto API is not available.");return await crypto.subtle.digest("SHA-256",t)}function Jz(i){const[,e]=i.split(".");if(typeof e!="string")throw new Error("Unable to decode token, payload not found.");let t;try{t=f9e(e)}catch(n){throw new Error("Unable to decode token, payload is not a valid Base64URL value.",{cause:n})}try{return JSON.parse(t)}catch(n){throw new Error("Unable to decode token, payload is not a valid JSON value.",{cause:n})}}function f9e(i){let e=i.replaceAll("-","+").replaceAll("_","/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("Input is not of the correct length.")}try{return p9e(e)}catch{return atob(e)}}function p9e(i){return decodeURIComponent(atob(i).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function uG(i){return typeof i=="object"&&i!==null}async function m9e(i){return await IE(i)}async function b9e(i){return await IE(i)}async function x9e(i,e,t,n,s){const r=new URLSearchParams([["code",e],["grant_type","authorization_code"],["client_id",t],["redirect_uri",n]]);return s&&r.append("code_verifier",s),await IE(i,{method:"POST",credentials:"include",body:r})}async function v9e(i,e,t){const n=new URLSearchParams([["grant_type","refresh_token"],["refresh_token",e],["client_id",t]]);return await IE(i,{method:"POST",credentials:"include",body:n})}async function IE(i,e={}){const t=new Headers(e.headers);return t.set("Accept",t9e),await(await _9e(i,{...e,headers:t})).json()}async function _9e(i,e){const t=await fetch(i,e);if(!t.ok)throw new xSe("Server responded with an invalid status.",{response:t});return t}function jge(i){if(!i)throw new Error("Unable to build authorization header, token is not set, make sure the user is authenticated.");return["Authorization",`bearer ${i}`]}function Fge(i){return i.endsWith("/")?i.slice(0,-1):i}class xSe extends Error{constructor(t,n){super(t,n);kt(this,"response");this.response=n.response}}const y9e=i=>new Promise(e=>setTimeout(e,i)),eU={url:"http://localhost:8180",realm:"eddi",clientId:"eddi-frontend"};function w9e(){const i=window.__EDDI_AUTH__;return(i==null?void 0:i.method)==="keycloak"?{method:"keycloak",url:i.url||eU.url,realm:i.realm||eU.realm,clientId:i.clientId||eU.clientId}:{method:"none",url:"",realm:"",clientId:""}}const C9e=window.location.origin;function Iie(i){return typeof i=="object"&&i!==null&&"status"in i&&"message"in i}function Vs(i){return Iie(i)?`${i.message} (HTTP ${i.status})`:i instanceof Error?i.message:String(i)}class S9e{constructor(e){kt(this,"baseUrl");kt(this,"headers",{"Content-Type":"application/json"});this.baseUrl=e}setAuthToken(e){this.headers.Authorization=`Bearer ${e}`}clearAuthToken(){delete this.headers.Authorization}getAuthHeader(){const e=this.headers.Authorization;return e?{Authorization:e}:{}}getBaseUrl(){return this.baseUrl}async request(e,t,n,s){const r=`${this.baseUrl}${t}`,o={...this.headers,...s};let a;try{a=await fetch(r,{method:e,headers:o,body:n!==void 0?typeof n=="string"?n:JSON.stringify(n):void 0})}catch(h){throw{status:0,message:h instanceof Error?`Network error: ${h.message}`:"Network error: unable to reach server",url:r}}if(!a.ok){const h={status:a.status,message:a.statusText,url:r};try{const g=await a.json();h.message=g.message||g.errorMessage||g.detail||a.statusText}catch{}throw h}if(a.status===202||a.status===204)return;const l=a.headers.get("Location");if(l&&(a.status===200||a.status===201))try{return{...await a.json(),location:l}}catch{return{location:l}}if(a.headers.get("Content-Length")==="0")return;const u=await a.text();if(u)try{return JSON.parse(u)}catch{throw{status:a.status,message:"Unexpected non-JSON response",url:r}}}get(e){return this.request("GET",e)}post(e,t,n){return this.request("POST",e,t,n)}put(e,t,n){return this.request("PUT",e,t,n)}patch(e,t,n){return this.request("PATCH",e,t,n)}delete(e){return this.request("DELETE",e)}}const Oe=new S9e(C9e),vSe={authenticated:!0,loading:!1,user:null,roles:[],method:"none",login:()=>{},logout:()=>{}},Aie=L.createContext(vSe);function k9e({children:i,configOverride:e}){const t=L.useMemo(()=>e??w9e(),[e]);return t.method==="none"?d.jsx(Aie.Provider,{value:vSe,children:i}):d.jsx(N9e,{config:t,children:i})}function N9e({config:i,children:e}){const[t]=L.useState(()=>new n9e({url:i.url,realm:i.realm,clientId:i.clientId})),[n,s]=L.useState(!1),[r,o]=L.useState(!0),[a,l]=L.useState(null),[c,u]=L.useState([]);L.useEffect(()=>{let m=!0;return(async()=>{var v,_,w,k,C,E,D,T,I,R,P,j;try{t.onTokenExpired=()=>{t.updateToken(30).then(()=>{m&&t.token&&Oe.setAuthToken(t.token)}).catch(()=>{console.warn("[EDDI Auth] Token refresh failed, logging out"),t.logout()})};const B=await t.init({onLoad:"login-required",checkLoginIframe:!1,pkceMethod:"S256",responseMode:"query"});if(!m)return;if(s(B),B&&t.token){Oe.setAuthToken(t.token);try{const $=await t.loadUserInfo();l({username:$.preferred_username??((v=t.tokenParsed)==null?void 0:v.preferred_username)??"",firstName:$.given_name??((_=t.tokenParsed)==null?void 0:_.given_name)??"",lastName:$.family_name??((w=t.tokenParsed)==null?void 0:w.family_name)??"",email:$.email??((k=t.tokenParsed)==null?void 0:k.email)??"",fullName:$.name??((C=t.tokenParsed)==null?void 0:C.name)??""})}catch{l({username:((E=t.tokenParsed)==null?void 0:E.preferred_username)??"",firstName:((D=t.tokenParsed)==null?void 0:D.given_name)??"",lastName:((T=t.tokenParsed)==null?void 0:T.family_name)??"",email:((I=t.tokenParsed)==null?void 0:I.email)??"",fullName:((R=t.tokenParsed)==null?void 0:R.name)??""})}const U=((j=(P=t.tokenParsed)==null?void 0:P.realm_access)==null?void 0:j.roles)??[];u(U)}o(!1)}catch(B){if(!m)return;console.error("[EDDI Auth] Keycloak init failed:",B),o(!1),s(!1)}})(),()=>{m=!1}},[]);const h=L.useCallback(()=>{t.login()},[t]),g=L.useCallback(()=>{Oe.clearAuthToken(),t.logout({redirectUri:window.location.origin})},[t]),f=L.useMemo(()=>({authenticated:n,loading:r,user:a,roles:c,method:"keycloak",login:h,logout:g}),[n,r,a,c,h,g]);return r?d.jsx("div",{className:"flex h-screen items-center justify-center bg-background","data-testid":"auth-loading",children:d.jsxs("div",{className:"flex flex-col items-center gap-4",children:[d.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-muted border-t-primary"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Authenticating…"})]})}):d.jsx(Aie.Provider,{value:f,children:e})}const E9e=(i,e,t,n)=>{var r,o,a,l;const s=[t,{code:e,...n||{}}];if((o=(r=i==null?void 0:i.services)==null?void 0:r.logger)!=null&&o.forward)return i.services.logger.forward(s,"warn","react-i18next::",!0);c1(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(l=(a=i==null?void 0:i.services)==null?void 0:a.logger)!=null&&l.warn?i.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},Bge={},hG=(i,e,t,n)=>{c1(t)&&Bge[t]||(c1(t)&&(Bge[t]=new Date),E9e(i,e,t,n))},_Se=(i,e)=>()=>{if(i.isInitialized)e();else{const t=()=>{setTimeout(()=>{i.off("initialized",t)},0),e()};i.on("initialized",t)}},gG=(i,e,t)=>{i.loadNamespaces(e,_Se(i,t))},Hge=(i,e,t,n)=>{if(c1(t)&&(t=[t]),i.options.preload&&i.options.preload.indexOf(e)>-1)return gG(i,t,n);t.forEach(s=>{i.options.ns.indexOf(s)<0&&i.options.ns.push(s)}),i.loadLanguages(e,_Se(i,n))},L9e=(i,e,t={})=>!e.languages||!e.languages.length?(hG(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(i,{lng:t.lng,precheck:(n,s)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!s(n.isLanguageChangingTo,i))return!1}}),c1=i=>typeof i=="string",D9e=i=>typeof i=="object"&&i!==null,T9e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,I9e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},A9e=i=>I9e[i],R9e=i=>i.replace(T9e,A9e);let fG={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:R9e};const M9e=(i={})=>{fG={...fG,...i}},P9e=()=>fG;let ySe;const O9e=i=>{ySe=i},j9e=()=>ySe,F9e={type:"3rdParty",init(i){M9e(i.options.react),O9e(i)}},B9e=L.createContext();class H9e{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const W9e=(i,e)=>{const t=L.useRef();return L.useEffect(()=>{t.current=i},[i,e]),t.current},wSe=(i,e,t,n)=>i.getFixedT(e,t,n),V9e=(i,e,t,n)=>L.useCallback(wSe(i,e,t,n),[i,e,t,n]),xe=(i,e={})=>{var C,E,D,T;const{i18n:t}=e,{i18n:n,defaultNS:s}=L.useContext(B9e)||{},r=t||n||j9e();if(r&&!r.reportNamespaces&&(r.reportNamespaces=new H9e),!r){hG(r,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const I=(P,j)=>c1(j)?j:D9e(j)&&c1(j.defaultValue)?j.defaultValue:Array.isArray(P)?P[P.length-1]:P,R=[I,{},!1];return R.t=I,R.i18n={},R.ready=!1,R}(C=r.options.react)!=null&&C.wait&&hG(r,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...P9e(),...r.options.react,...e},{useSuspense:a,keyPrefix:l}=o;let c=s||((E=r.options)==null?void 0:E.defaultNS);c=c1(c)?[c]:c||["translation"],(T=(D=r.reportNamespaces).addUsedNamespaces)==null||T.call(D,c);const u=(r.isInitialized||r.initializedStoreOnce)&&c.every(I=>L9e(I,r,o)),h=V9e(r,e.lng||null,o.nsMode==="fallback"?c:c[0],l),g=()=>h,f=()=>wSe(r,e.lng||null,o.nsMode==="fallback"?c:c[0],l),[m,x]=L.useState(g);let v=c.join();e.lng&&(v=`${e.lng}${v}`);const _=W9e(v),w=L.useRef(!0);L.useEffect(()=>{const{bindI18n:I,bindI18nStore:R}=o;w.current=!0,!u&&!a&&(e.lng?Hge(r,e.lng,c,()=>{w.current&&x(f)}):gG(r,c,()=>{w.current&&x(f)})),u&&_&&_!==v&&w.current&&x(f);const P=()=>{w.current&&x(f)};return I&&(r==null||r.on(I,P)),R&&(r==null||r.store.on(R,P)),()=>{w.current=!1,r&&I&&(I==null||I.split(" ").forEach(j=>r.off(j,P))),R&&r&&R.split(" ").forEach(j=>r.store.off(j,P))}},[r,v]),L.useEffect(()=>{w.current&&u&&x(g)},[r,l,u]);const k=[m,r,u];if(k.t=m,k.i18n=r,k.ready=u,u||!u&&!a)return k;throw new Promise(I=>{e.lng?Hge(r,e.lng,c,()=>I()):gG(r,c,()=>I())})};/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const z9e=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),CSe=(...i)=>i.filter((e,t,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===t).join(" ").trim();/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var U9e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $9e=L.forwardRef(({color:i="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:n,className:s="",children:r,iconNode:o,...a},l)=>L.createElement("svg",{ref:l,...U9e,width:e,height:e,stroke:i,strokeWidth:n?Number(t)*24/Number(e):t,className:CSe("lucide",s),...a},[...o.map(([c,u])=>L.createElement(c,u)),...Array.isArray(r)?r:[r]]));/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const He=(i,e)=>{const t=L.forwardRef(({className:n,...s},r)=>L.createElement($9e,{ref:r,iconNode:e,className:CSe(`lucide-${z9e(i)}`,n),...s}));return t.displayName=`${i}`,t};/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const q9e=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],AE=He("Activity",q9e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const K9e=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],zf=He("ArrowDown",K9e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const G9e=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],El=He("ArrowLeft",G9e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Y9e=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],fN=He("ArrowRightLeft",Y9e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Q9e=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],wg=He("ArrowRight",Q9e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const X9e=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],pN=He("ArrowUpDown",X9e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Z9e=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],zv=He("ArrowUp",Z9e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const J9e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],tU=He("Ban",J9e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eBe=[["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m16 12 2 2 4-4",key:"mdajum"}],["path",{d:"M22 6V4a1 1 0 0 0-1-1h-5a4 4 0 0 0-4 4 4 4 0 0 0-4-4H3a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h6a3 3 0 0 1 3 3 3 3 0 0 1 3-3h6a1 1 0 0 0 1-1v-1.3",key:"8arnkb"}]],SSe=He("BookOpenCheck",eBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tBe=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Lw=He("BookOpen",tBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nBe=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],ai=He("Bot",nBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iBe=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],pA=He("Boxes",iBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sBe=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],rBe=He("Braces",sBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oBe=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],Nl=He("Brain",oBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aBe=[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]],vb=He("Cable",aBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lBe=[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],a7=He("CalendarClock",lBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cBe=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],l7=He("ChartColumn",cBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dBe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ns=He("Check",dBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uBe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Rn=He("ChevronDown",uBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hBe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],kSe=He("ChevronLeft",hBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gBe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],hs=He("ChevronRight",gBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fBe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Y_=He("ChevronUp",fBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pBe=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],mBe=He("ChevronsUpDown",pBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bBe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Lo=He("CircleAlert",bBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xBe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],NSe=He("CircleArrowUp",xBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vBe=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Rie=He("CircleCheckBig",vBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _Be=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Xl=He("CircleCheck",_Be);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yBe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],wBe=He("CircleHelp",yBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const CBe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],SBe=He("CircleStop",CBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kBe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],NBe=He("CircleX",kBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const EBe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],RE=He("Circle",EBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const LBe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Zr=He("Clock",LBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const DBe=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],ESe=He("Cloud",DBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const TBe=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],IBe=He("CodeXml",TBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ABe=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],LSe=He("Code",ABe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RBe=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],DSe=He("Coins",RBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const MBe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],mo=He("Copy",MBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PBe=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],Mie=He("Cpu",PBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const OBe=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],C_=He("Database",OBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jBe=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],MM=He("DollarSign",jBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const FBe=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Q_=He("Download",FBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const BBe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],c7=He("EllipsisVertical",BBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const HBe=[["line",{x1:"5",x2:"19",y1:"9",y2:"9",key:"1nwqeh"}],["line",{x1:"5",x2:"19",y1:"15",y2:"15",key:"g8yjpy"}]],WBe=He("Equal",HBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const VBe=[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16.2V21h-4.8",key:"1hrera"}],["path",{d:"M21 7.8V3h-4.8",key:"ul1q53"}],["path",{d:"M3 16.2V21h4.8",key:"1x04uo"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 7.8V3h4.8",key:"1ijppm"}],["path",{d:"M9 9 3 3",key:"v551iv"}]],zBe=He("Expand",VBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const UBe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],To=He("ExternalLink",UBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $Be=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],_b=He("EyeOff",$Be);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qBe=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Sh=He("Eye",qBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const KBe=[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]],Pie=He("FileArchive",KBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const GBe=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],TSe=He("FileCode2",GBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const YBe=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],bp=He("FileCode",YBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const QBe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],Wge=He("FileDown",QBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XBe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],ZBe=He("FileJson",XBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JBe=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 7V4a2 2 0 0 1 2-2 2 2 0 0 0-2 2",key:"1vk7w2"}],["path",{d:"M4.063 20.999a2 2 0 0 0 2 1L18 22a2 2 0 0 0 2-2V7l-5-5H6",key:"1jink5"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],vj=He("FileOutput",JBe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const e7e=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],t7e=He("FilePlus",e7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const n7e=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]],i7e=He("FileSearch",n7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const s7e=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],IL=He("FileText",s7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r7e=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],o7e=He("Filter",r7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const a7e=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],ME=He("Fingerprint",a7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const l7e=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],c7e=He("FolderSearch",l7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const d7e=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Oie=He("Gauge",d7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const u7e=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Vb=He("GitBranch",u7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const h7e=[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]],ISe=He("GitCompareArrows",h7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const g7e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Su=He("Globe",g7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const f7e=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],p7e=He("GripVertical",f7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const m7e=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],pG=He("Handshake",m7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const b7e=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Zf=He("Hash",b7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const x7e=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],PE=He("History",x7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const v7e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],_d=He("Info",v7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _7e=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Uv=He("KeyRound",_7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const y7e=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],w7e=He("Keyboard",y7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const C7e=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Uf=He("Layers",C7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const S7e=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],_j=He("LayoutDashboard",S7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k7e=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],N7e=He("LayoutGrid",k7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const E7e=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],L7e=He("Lightbulb",E7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const D7e=[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],ASe=He("Link2Off",D7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const T7e=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Dw=He("Link2",T7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const I7e=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],A7e=He("Link",I7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const R7e=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]],RSe=He("ListFilter",R7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const M7e=[["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"M21 12h-6",key:"bt1uis"}]],P7e=He("ListMinus",M7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const O7e=[["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]],j7e=He("ListPlus",O7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const F7e=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],MSe=He("List",F7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const B7e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ni=He("LoaderCircle",B7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const H7e=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],W7e=He("LockOpen",H7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const V7e=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],d7=He("Lock",V7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const z7e=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],PSe=He("LogOut",z7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const U7e=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],jie=He("Maximize2",U7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $7e=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],q7e=He("Menu",$7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const K7e=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],Jf=He("MessageCircle",K7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const G7e=[["path",{d:"M10 7.5 8 10l2 2.5",key:"xb17xw"}],["path",{d:"m14 7.5 2 2.5-2 2.5",key:"5rap1v"}],["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],OSe=He("MessageSquareCode",G7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Y7e=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]],Fie=He("MessageSquarePlus",Y7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Q7e=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M8 12a2 2 0 0 0 2-2V8H8",key:"1jfesj"}],["path",{d:"M14 12a2 2 0 0 0 2-2V8h-2",key:"1dq9mh"}]],jSe=He("MessageSquareQuote",Q7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const X7e=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]],AL=He("MessageSquareText",X7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Z7e=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],Zl=He("MessageSquare",Z7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const J7e=[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]],FSe=He("MessagesSquare",J7e);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eHe=[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],BSe=He("Minimize2",eHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tHe=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],nHe=He("Monitor",tHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iHe=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],HSe=He("Moon",iHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sHe=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],rHe=He("Package",sHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oHe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],aHe=He("PanelLeftClose",oHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lHe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],cHe=He("PanelLeft",lHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dHe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],WSe=He("PanelRightClose",dHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uHe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],hHe=He("PanelRightOpen",uHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gHe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],fHe=He("PanelRight",gHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pHe=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]],mHe=He("Paperclip",pHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bHe=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],Bie=He("Pause",bHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xHe=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],vHe=He("PenLine",xHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _He=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],VSe=He("Pencil",_He);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yHe=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Hie=He("Play",yHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wHe=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]],PM=He("Plug",wHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const CHe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Gt=He("Plus",CHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const SHe=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],OM=He("Puzzle",SHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kHe=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],zSe=He("Radio",kHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const NHe=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],Vge=He("RectangleEllipsis",NHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const EHe=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],LHe=He("Redo2",EHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const DHe=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],xi=He("RefreshCw",DHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const THe=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],Ih=He("Rocket",THe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const IHe=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],S_=He("RotateCcw",IHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const AHe=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],u7=He("Save",AHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RHe=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]],zge=He("ScanSearch",RHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const MHe=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],USe=He("Scissors",MHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PHe=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],$v=He("ScrollText",PHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const OHe=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],br=He("Search",OHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jHe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],mA=He("Send",jHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const FHe=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],rb=He("Server",FHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const BHe=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Wie=He("Settings2",BHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const HHe=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],xp=He("Settings",HHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const WHe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],h7=He("ShieldAlert",WHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const VHe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]],Uge=He("ShieldBan",VHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zHe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],bh=He("ShieldCheck",zHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const UHe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],OE=He("Shield",UHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $He=[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]],$Se=He("SlidersHorizontal",$He);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qHe=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Ll=He("Sparkles",qHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const KHe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],qSe=He("Square",KHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const GHe=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],yj=He("Star",GHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const YHe=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],QHe=He("Sun",YHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XHe=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],KSe=He("Tag",XHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ZHe=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Vie=He("Timer",ZHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JHe=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]],GSe=He("ToggleLeft",JHe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eWe=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]],zie=He("ToggleRight",eWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tWe=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],_n=He("Trash2",tWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nWe=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],YSe=He("TrendingUp",nWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iWe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Vi=He("TriangleAlert",iWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sWe=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],$ge=He("Type",sWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rWe=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],Uie=He("Undo2",rWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oWe=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],qv=He("Upload",oWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aWe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],lWe=He("UserPlus",aWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cWe=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],$ie=He("User",cWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dWe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],ga=He("Users",dWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uWe=[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]],mG=He("Variable",uWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hWe=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],RL=He("WandSparkles",hWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gWe=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Ed=He("Workflow",gWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fWe=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],zb=He("Wrench",fWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pWe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],An=He("X",pWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mWe=[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],bWe=He("ZapOff",mWe);/** - * @license lucide-react v0.474.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xWe=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],nc=He("Zap",xWe);function QSe(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var s=i.length;for(e=0;e{const t=new Array(i.length+e.length);for(let n=0;n({classGroupId:i,validator:e}),ZSe=(i=new Map,e=null,t)=>({nextPart:i,validators:e,classGroupId:t}),wj="-",qge=[],yWe="arbitrary..",wWe=i=>{const e=SWe(i),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=i;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return CWe(o);const a=o.split(wj),l=a[0]===""&&a.length>1?1:0;return JSe(a,l,e)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],c=t[o];return l?c?vWe(c,l):l:c||qge}return t[o]||qge}}},JSe=(i,e,t)=>{if(i.length-e===0)return t.classGroupId;const s=i[e],r=t.nextPart.get(s);if(r){const c=JSe(i,e+1,r);if(c)return c}const o=t.validators;if(o===null)return;const a=e===0?i.join(wj):i.slice(e).join(wj),l=o.length;for(let c=0;ci.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=i.slice(1,-1),t=e.indexOf(":"),n=e.slice(0,t);return n?yWe+n:void 0})(),SWe=i=>{const{theme:e,classGroups:t}=i;return kWe(t,e)},kWe=(i,e)=>{const t=ZSe();for(const n in i){const s=i[n];qie(s,t,n,e)}return t},qie=(i,e,t,n)=>{const s=i.length;for(let r=0;r{if(typeof i=="string"){EWe(i,e,t);return}if(typeof i=="function"){LWe(i,e,t,n);return}DWe(i,e,t,n)},EWe=(i,e,t)=>{const n=i===""?e:eke(e,i);n.classGroupId=t},LWe=(i,e,t,n)=>{if(TWe(i)){qie(i(n),e,t,n);return}e.validators===null&&(e.validators=[]),e.validators.push(_We(t,i))},DWe=(i,e,t,n)=>{const s=Object.entries(i),r=s.length;for(let o=0;o{let t=i;const n=e.split(wj),s=n.length;for(let r=0;r"isThemeGetter"in i&&i.isThemeGetter===!0,IWe=i=>{if(i<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),n=Object.create(null);const s=(r,o)=>{t[r]=o,e++,e>i&&(e=0,n=t,t=Object.create(null))};return{get(r){let o=t[r];if(o!==void 0)return o;if((o=n[r])!==void 0)return s(r,o),o},set(r,o){r in t?t[r]=o:s(r,o)}}},bG="!",Kge=":",AWe=[],Gge=(i,e,t,n,s)=>({modifiers:i,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),RWe=i=>{const{prefix:e,experimentalParseClassName:t}=i;let n=s=>{const r=[];let o=0,a=0,l=0,c;const u=s.length;for(let x=0;xl?c-l:void 0;return Gge(r,f,g,m)};if(e){const s=e+Kge,r=n;n=o=>o.startsWith(s)?r(o.slice(s.length)):Gge(AWe,!1,o,void 0,!0)}if(t){const s=n;n=r=>t({className:r,parseClassName:s})}return n},MWe=i=>{const e=new Map;return i.orderSensitiveModifiers.forEach((t,n)=>{e.set(t,1e6+n)}),t=>{const n=[];let s=[];for(let r=0;r0&&(s.sort(),n.push(...s),s=[]),n.push(o)):s.push(o)}return s.length>0&&(s.sort(),n.push(...s)),n}},PWe=i=>({cache:IWe(i.cacheSize),parseClassName:RWe(i),sortModifiers:MWe(i),...wWe(i)}),OWe=/\s+/,jWe=(i,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:r}=e,o=[],a=i.trim().split(OWe);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:h,modifiers:g,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:x}=t(u);if(h){l=u+(l.length>0?" "+l:l);continue}let v=!!x,_=n(v?m.substring(0,x):m);if(!_){if(!v){l=u+(l.length>0?" "+l:l);continue}if(_=n(m),!_){l=u+(l.length>0?" "+l:l);continue}v=!1}const w=g.length===0?"":g.length===1?g[0]:r(g).join(":"),k=f?w+bG:w,C=k+_;if(o.indexOf(C)>-1)continue;o.push(C);const E=s(_,v);for(let D=0;D0?" "+l:l)}return l},FWe=(...i)=>{let e=0,t,n,s="";for(;e{if(typeof i=="string")return i;let e,t="";for(let n=0;n{let t,n,s,r;const o=l=>{const c=e.reduce((u,h)=>h(u),i());return t=PWe(c),n=t.cache.get,s=t.cache.set,r=a,a(l)},a=l=>{const c=n(l);if(c)return c;const u=jWe(l,t);return s(l,u),u};return r=o,(...l)=>r(FWe(...l))},HWe=[],_a=i=>{const e=t=>t[i]||HWe;return e.isThemeGetter=!0,e},nke=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ike=/^\((?:(\w[\w-]*):)?(.+)\)$/i,WWe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,VWe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zWe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,UWe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$We=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qWe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kx=i=>WWe.test(i),ki=i=>!!i&&!Number.isNaN(Number(i)),Nx=i=>!!i&&Number.isInteger(Number(i)),nU=i=>i.endsWith("%")&&ki(i.slice(0,-1)),Gp=i=>VWe.test(i),ske=()=>!0,KWe=i=>zWe.test(i)&&!UWe.test(i),Kie=()=>!1,GWe=i=>$We.test(i),YWe=i=>qWe.test(i),QWe=i=>!an(i)&&!dn(i),XWe=i=>X_(i,ake,Kie),an=i=>nke.test(i),D0=i=>X_(i,lke,KWe),Yge=i=>X_(i,rVe,ki),ZWe=i=>X_(i,dke,ske),JWe=i=>X_(i,cke,Kie),Qge=i=>X_(i,rke,Kie),eVe=i=>X_(i,oke,YWe),h5=i=>X_(i,uke,GWe),dn=i=>ike.test(i),pT=i=>xC(i,lke),tVe=i=>xC(i,cke),Xge=i=>xC(i,rke),nVe=i=>xC(i,ake),iVe=i=>xC(i,oke),g5=i=>xC(i,uke,!0),sVe=i=>xC(i,dke,!0),X_=(i,e,t)=>{const n=nke.exec(i);return n?n[1]?e(n[1]):t(n[2]):!1},xC=(i,e,t=!1)=>{const n=ike.exec(i);return n?n[1]?e(n[1]):t:!1},rke=i=>i==="position"||i==="percentage",oke=i=>i==="image"||i==="url",ake=i=>i==="length"||i==="size"||i==="bg-size",lke=i=>i==="length",rVe=i=>i==="number",cke=i=>i==="family-name",dke=i=>i==="number"||i==="weight",uke=i=>i==="shadow",oVe=()=>{const i=_a("color"),e=_a("font"),t=_a("text"),n=_a("font-weight"),s=_a("tracking"),r=_a("leading"),o=_a("breakpoint"),a=_a("container"),l=_a("spacing"),c=_a("radius"),u=_a("shadow"),h=_a("inset-shadow"),g=_a("text-shadow"),f=_a("drop-shadow"),m=_a("blur"),x=_a("perspective"),v=_a("aspect"),_=_a("ease"),w=_a("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...C(),dn,an],D=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],I=()=>[dn,an,l],R=()=>[kx,"full","auto",...I()],P=()=>[Nx,"none","subgrid",dn,an],j=()=>["auto",{span:["full",Nx,dn,an]},Nx,dn,an],B=()=>[Nx,"auto",dn,an],U=()=>["auto","min","max","fr",dn,an],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...I()],G=()=>[kx,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],ne=()=>[kx,"screen","full","dvw","lvw","svw","min","max","fit",...I()],te=()=>[kx,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],H=()=>[i,dn,an],Q=()=>[...C(),Xge,Qge,{position:[dn,an]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",nVe,XWe,{size:[dn,an]}],ue=()=>[nU,pT,D0],he=()=>["","none","full",c,dn,an],Te=()=>["",ki,pT,D0],nt=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_e=()=>[ki,nU,Xge,Qge],$e=()=>["","none",m,dn,an],Ke=()=>["none",ki,dn,an],ht=()=>["none",ki,dn,an],Ct=()=>[ki,dn,an],Ft=()=>[kx,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gp],breakpoint:[Gp],color:[ske],container:[Gp],"drop-shadow":[Gp],ease:["in","out","in-out"],font:[QWe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gp],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gp],shadow:[Gp],spacing:["px",ki],text:[Gp],"text-shadow":[Gp],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kx,an,dn,v]}],container:["container"],columns:[{columns:[ki,an,dn,a]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Nx,"auto",dn,an]}],basis:[{basis:[kx,"full","auto",a,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ki,kx,"auto","initial","none",an]}],grow:[{grow:["",ki,dn,an]}],shrink:[{shrink:["",ki,dn,an]}],order:[{order:[Nx,"first","last","none",dn,an]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...ne()]}],"min-inline-size":[{"min-inline":["auto",...ne()]}],"max-inline-size":[{"max-inline":["none",...ne()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",t,pT,D0]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,sVe,ZWe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",nU,an]}],"font-family":[{font:[tVe,JWe,e]}],"font-features":[{"font-features":[an]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,dn,an]}],"line-clamp":[{"line-clamp":[ki,"none",dn,Yge]}],leading:[{leading:[r,...I()]}],"list-image":[{"list-image":["none",dn,an]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",dn,an]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...nt(),"wavy"]}],"text-decoration-thickness":[{decoration:[ki,"from-font","auto",dn,D0]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[ki,"auto",dn,an]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",dn,an]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",dn,an]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Q()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nx,dn,an],radial:["",dn,an],conic:[Nx,dn,an]},iVe,eVe]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:Te()}],"border-w-x":[{"border-x":Te()}],"border-w-y":[{"border-y":Te()}],"border-w-s":[{"border-s":Te()}],"border-w-e":[{"border-e":Te()}],"border-w-bs":[{"border-bs":Te()}],"border-w-be":[{"border-be":Te()}],"border-w-t":[{"border-t":Te()}],"border-w-r":[{"border-r":Te()}],"border-w-b":[{"border-b":Te()}],"border-w-l":[{"border-l":Te()}],"divide-x":[{"divide-x":Te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...nt(),"hidden","none"]}],"divide-style":[{divide:[...nt(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...nt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ki,dn,an]}],"outline-w":[{outline:["",ki,pT,D0]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",u,g5,h5]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",h,g5,h5]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[ki,D0]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":Te()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",g,g5,h5]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[ki,dn,an]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ki]}],"mask-image-linear-from-pos":[{"mask-linear-from":_e()}],"mask-image-linear-to-pos":[{"mask-linear-to":_e()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":_e()}],"mask-image-t-to-pos":[{"mask-t-to":_e()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":_e()}],"mask-image-r-to-pos":[{"mask-r-to":_e()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":_e()}],"mask-image-b-to-pos":[{"mask-b-to":_e()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":_e()}],"mask-image-l-to-pos":[{"mask-l-to":_e()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":_e()}],"mask-image-x-to-pos":[{"mask-x-to":_e()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":_e()}],"mask-image-y-to-pos":[{"mask-y-to":_e()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[dn,an]}],"mask-image-radial-from-pos":[{"mask-radial-from":_e()}],"mask-image-radial-to-pos":[{"mask-radial-to":_e()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[ki]}],"mask-image-conic-from-pos":[{"mask-conic-from":_e()}],"mask-image-conic-to-pos":[{"mask-conic-to":_e()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Q()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",dn,an]}],filter:[{filter:["","none",dn,an]}],blur:[{blur:$e()}],brightness:[{brightness:[ki,dn,an]}],contrast:[{contrast:[ki,dn,an]}],"drop-shadow":[{"drop-shadow":["","none",f,g5,h5]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",ki,dn,an]}],"hue-rotate":[{"hue-rotate":[ki,dn,an]}],invert:[{invert:["",ki,dn,an]}],saturate:[{saturate:[ki,dn,an]}],sepia:[{sepia:["",ki,dn,an]}],"backdrop-filter":[{"backdrop-filter":["","none",dn,an]}],"backdrop-blur":[{"backdrop-blur":$e()}],"backdrop-brightness":[{"backdrop-brightness":[ki,dn,an]}],"backdrop-contrast":[{"backdrop-contrast":[ki,dn,an]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ki,dn,an]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ki,dn,an]}],"backdrop-invert":[{"backdrop-invert":["",ki,dn,an]}],"backdrop-opacity":[{"backdrop-opacity":[ki,dn,an]}],"backdrop-saturate":[{"backdrop-saturate":[ki,dn,an]}],"backdrop-sepia":[{"backdrop-sepia":["",ki,dn,an]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",dn,an]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ki,"initial",dn,an]}],ease:[{ease:["linear","initial",_,dn,an]}],delay:[{delay:[ki,dn,an]}],animate:[{animate:["none",w,dn,an]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,dn,an]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Ke()}],"rotate-x":[{"rotate-x":Ke()}],"rotate-y":[{"rotate-y":Ke()}],"rotate-z":[{"rotate-z":Ke()}],scale:[{scale:ht()}],"scale-x":[{"scale-x":ht()}],"scale-y":[{"scale-y":ht()}],"scale-z":[{"scale-z":ht()}],"scale-3d":["scale-3d"],skew:[{skew:Ct()}],"skew-x":[{"skew-x":Ct()}],"skew-y":[{"skew-y":Ct()}],transform:[{transform:[dn,an,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ft()}],"translate-x":[{"translate-x":Ft()}],"translate-y":[{"translate-y":Ft()}],"translate-z":[{"translate-z":Ft()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",dn,an]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",dn,an]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[ki,pT,D0,Yge]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},aVe=BWe(oVe);function be(...i){return aVe(XSe(i))}function Tw(i){const t=Date.now()-i,n=Math.floor(t/1e3),s=Math.floor(n/60),r=Math.floor(s/60),o=Math.floor(r/24);return o>0?`${o}d ago`:r>0?`${r}h ago`:s>0?`${s}m ago`:"just now"}const Zge=["bg-blue-500","bg-emerald-500","bg-amber-500","bg-purple-500","bg-rose-500","bg-cyan-500","bg-indigo-500","bg-orange-500","bg-teal-500","bg-pink-500","bg-lime-500","bg-violet-500"];function g7(i){let e=0;for(let t=0;te[0]).filter(Boolean).slice(0,2).join("").toUpperCase()}function lVe(i){try{const e=new URL(i);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}}function jE(i){return!Number.isFinite(i)||i<1?"<1ms":i<1e3?`${Math.round(i)}ms`:`${(i/1e3).toFixed(2)}s`}function hke(){return L.useContext(Aie)}const Jge=i=>{let e;const t=new Set,n=(c,u)=>{const h=typeof c=="function"?c(e):c;if(!Object.is(h,e)){const g=e;e=u??(typeof h!="object"||h===null)?h:Object.assign({},e,h),t.forEach(f=>f(e,g))}},s=()=>e,a={setState:n,getState:s,getInitialState:()=>l,subscribe:c=>(t.add(c),()=>t.delete(c))},l=e=i(n,s,a);return a},cVe=(i=>i?Jge(i):Jge),dVe=i=>i;function uVe(i,e=dVe){const t=ft.useSyncExternalStore(i.subscribe,ft.useCallback(()=>e(i.getState()),[i,e]),ft.useCallback(()=>e(i.getInitialState()),[i,e]));return ft.useDebugValue(t),t}const efe=i=>{const e=cVe(i),t=n=>uVe(e,n);return Object.assign(t,e),t},ML=(i=>i?efe(i):efe),xG=["dashboard","agents","workflows","chat","resources","conversations","groups","logs","secrets","audit","schedules","quotas","coordinator","orphans"],Gie="eddi-onboarding-welcomed",Yie="eddi-tour-offers-dismissed",Qie=i=>`eddi-tour-${i}`;function hVe(i){try{return localStorage.getItem(Qie(i))==="done"}catch{return!1}}function iU(i){try{localStorage.setItem(Qie(i),"done")}catch{}}function tfe(i){try{localStorage.removeItem(Qie(i))}catch{}}function gVe(){try{return localStorage.getItem(Gie)==="true"}catch{return!1}}function fVe(){try{localStorage.setItem(Gie,"true")}catch{}}function pVe(){try{localStorage.removeItem(Gie)}catch{}}function mVe(){try{return localStorage.getItem(Yie)==="true"}catch{return!1}}function bVe(){try{localStorage.setItem(Yie,"true")}catch{}}function xVe(){try{localStorage.removeItem(Yie)}catch{}}const $s=ML((i,e)=>{const t=new Set;for(const n of xG)hVe(n)&&t.add(n);return{showWelcome:!gVe(),activeChapter:null,currentStep:0,offeredChapter:null,completedChapters:t,openWelcome:()=>i({showWelcome:!0}),dismissWelcome:()=>{fVe(),i({showWelcome:!1})},startChapter:n=>{i({activeChapter:n,currentStep:0,offeredChapter:null})},nextStep:()=>{const{currentStep:n,activeChapter:s}=e();s&&i({currentStep:n+1})},prevStep:()=>{i(n=>({currentStep:Math.max(0,n.currentStep-1)}))},skipChapter:()=>{const{activeChapter:n,completedChapters:s}=e();if(n){iU(n);const r=new Set(s);r.add(n),i({activeChapter:null,currentStep:0,completedChapters:r})}},completeChapter:()=>{const{activeChapter:n,completedChapters:s}=e();if(n){iU(n);const r=new Set(s);r.add(n),i({activeChapter:null,currentStep:0,completedChapters:r})}},restartChapter:n=>{tfe(n);const s=new Set(e().completedChapters);s.delete(n),i({activeChapter:n,currentStep:0,offeredChapter:null,completedChapters:s})},acceptOffer:()=>{const{offeredChapter:n}=e();n&&i({activeChapter:n,currentStep:0,offeredChapter:null})},dismissOffer:()=>{const{offeredChapter:n,completedChapters:s}=e();if(n){iU(n);const r=new Set(s);r.add(n),i({offeredChapter:null,completedChapters:r})}},dismissAllOffers:()=>{bVe(),i({offeredChapter:null})},isChapterCompleted:n=>e().completedChapters.has(n),maybeAutoStart:n=>{const{activeChapter:s,completedChapters:r,showWelcome:o,offeredChapter:a}=e();if(!(o||s||r.has(n)||a)){if(n==="dashboard"){i({activeChapter:n,currentStep:0});return}mVe()||i({offeredChapter:n})}},resetAll:()=>{pVe(),xVe();for(const n of xG)tfe(n);i({showWelcome:!0,activeChapter:null,currentStep:0,offeredChapter:null,completedChapters:new Set})}}}),vVe={id:"dashboard",titleKey:"onboarding.tour.dashboard.title",icon:"LayoutDashboard",route:"/manage",steps:[{target:'[data-testid="sidebar"] nav',titleKey:"onboarding.tour.dashboard.step1Title",descriptionKey:"onboarding.tour.dashboard.step1Desc",placement:"right",padding:4},{target:'[data-tour="dashboard-stats"]',titleKey:"onboarding.tour.dashboard.step2Title",descriptionKey:"onboarding.tour.dashboard.step2Desc",placement:"bottom"},{target:'[data-tour="dashboard-actions"]',titleKey:"onboarding.tour.dashboard.step3Title",descriptionKey:"onboarding.tour.dashboard.step3Desc",placement:"bottom"},{target:'[data-tour="topbar-personalize"]',titleKey:"onboarding.tour.dashboard.step4Title",descriptionKey:"onboarding.tour.dashboard.step4Desc",placement:"bottom"}]},_Ve={id:"agents",titleKey:"onboarding.tour.agents.title",icon:"Bot",route:"/manage/agents",steps:[{target:'[data-testid="create-agent-btn"]',titleKey:"onboarding.tour.agents.step1Title",descriptionKey:"onboarding.tour.agents.step1Desc",placement:"bottom"},{target:'[data-testid="import-agent-btn"]',titleKey:"onboarding.tour.agents.step2Title",descriptionKey:"onboarding.tour.agents.step2Desc",placement:"bottom"},{target:'[data-tour="agents-search"]',titleKey:"onboarding.tour.agents.step3Title",descriptionKey:"onboarding.tour.agents.step3Desc",placement:"bottom"},{target:'[data-tour="agents-content"]',titleKey:"onboarding.tour.agents.step4Title",descriptionKey:"onboarding.tour.agents.step4Desc",placement:"top",padding:8}]},yVe={id:"workflows",titleKey:"onboarding.tour.workflows.title",icon:"Workflow",route:"/manage/workflows",steps:[{target:'[data-testid="create-workflow-btn"]',titleKey:"onboarding.tour.workflows.step1Title",descriptionKey:"onboarding.tour.workflows.step1Desc",placement:"bottom"},{target:'[data-tour="workflows-content"]',titleKey:"onboarding.tour.workflows.step2Title",descriptionKey:"onboarding.tour.workflows.step2Desc",placement:"top",padding:8},{target:'[data-tour="workflows-search"]',titleKey:"onboarding.tour.workflows.step3Title",descriptionKey:"onboarding.tour.workflows.step3Desc",placement:"bottom"}]},wVe={id:"chat",titleKey:"onboarding.tour.chat.title",icon:"MessageCircle",route:"/manage/chat",steps:[{target:'[data-testid="agent-selector"]',titleKey:"onboarding.tour.chat.step1Title",descriptionKey:"onboarding.tour.chat.step1Desc",placement:"bottom"},{target:'[data-testid="streaming-toggle"]',titleKey:"onboarding.tour.chat.step2Title",descriptionKey:"onboarding.tour.chat.step2Desc",placement:"bottom"},{target:'[data-testid="history-toggle"]',titleKey:"onboarding.tour.chat.step3Title",descriptionKey:"onboarding.tour.chat.step3Desc",placement:"bottom"},{target:'[data-tour="chat-input-area"]',titleKey:"onboarding.tour.chat.step4Title",descriptionKey:"onboarding.tour.chat.step4Desc",placement:"top"}]},CVe={id:"resources",titleKey:"onboarding.tour.resources.title",icon:"FileCode",route:"/manage/resources",steps:[{target:'[data-testid="resource-types-grid"]',titleKey:"onboarding.tour.resources.step1Title",descriptionKey:"onboarding.tour.resources.step1Desc",placement:"bottom",padding:8},{target:'[data-testid="resource-type-llm"]',titleKey:"onboarding.tour.resources.step2Title",descriptionKey:"onboarding.tour.resources.step2Desc",placement:"bottom"},{target:'[data-testid="resource-type-rules"]',titleKey:"onboarding.tour.resources.step3Title",descriptionKey:"onboarding.tour.resources.step3Desc",placement:"right"}]},SVe={id:"conversations",titleKey:"onboarding.tour.conversations.title",icon:"MessagesSquare",route:"/manage/conversations",steps:[{target:'[data-testid="conversation-search"]',titleKey:"onboarding.tour.conversations.step1Title",descriptionKey:"onboarding.tour.conversations.step1Desc",placement:"bottom"},{target:'[data-tour="conversations-filters"]',titleKey:"onboarding.tour.conversations.step2Title",descriptionKey:"onboarding.tour.conversations.step2Desc",placement:"bottom"},{target:'[data-tour="conversations-content"]',titleKey:"onboarding.tour.conversations.step3Title",descriptionKey:"onboarding.tour.conversations.step3Desc",placement:"top",padding:8}]},kVe={id:"groups",titleKey:"onboarding.tour.groups.title",icon:"Boxes",route:"/manage/groups",steps:[{target:'[data-testid="create-group-btn"]',titleKey:"onboarding.tour.groups.step1Title",descriptionKey:"onboarding.tour.groups.step1Desc",placement:"bottom"},{target:'[data-testid="group-search"]',titleKey:"onboarding.tour.groups.step2Title",descriptionKey:"onboarding.tour.groups.step2Desc",placement:"bottom"},{target:'[data-tour="groups-content"]',titleKey:"onboarding.tour.groups.step3Title",descriptionKey:"onboarding.tour.groups.step3Desc",placement:"top",padding:8}]},NVe={id:"logs",titleKey:"onboarding.tour.logs.title",icon:"ScrollText",route:"/manage/logs",steps:[{target:'[data-tour="logs-tabs"]',titleKey:"onboarding.tour.logs.step1Title",descriptionKey:"onboarding.tour.logs.step1Desc",placement:"bottom"},{target:'[data-tour="logs-filters"]',titleKey:"onboarding.tour.logs.step2Title",descriptionKey:"onboarding.tour.logs.step2Desc",placement:"bottom"},{target:'[data-testid="export-logs-btn"]',titleKey:"onboarding.tour.logs.step3Title",descriptionKey:"onboarding.tour.logs.step3Desc",placement:"bottom"}]},EVe={id:"secrets",titleKey:"onboarding.tour.secrets.title",icon:"KeyRound",route:"/manage/secrets",steps:[{target:'[data-testid="create-secret-button"]',titleKey:"onboarding.tour.secrets.step1Title",descriptionKey:"onboarding.tour.secrets.step1Desc",placement:"bottom"},{target:'[data-testid="tenant-input"]',titleKey:"onboarding.tour.secrets.step2Title",descriptionKey:"onboarding.tour.secrets.step2Desc",placement:"bottom"},{target:'[data-tour="secrets-info"]',titleKey:"onboarding.tour.secrets.step3Title",descriptionKey:"onboarding.tour.secrets.step3Desc",placement:"bottom",padding:4}]},LVe={id:"audit",titleKey:"onboarding.tour.audit.title",icon:"ShieldCheck",route:"/manage/audit",steps:[{target:'[data-tour="audit-mode-toggle"]',titleKey:"onboarding.tour.audit.step1Title",descriptionKey:"onboarding.tour.audit.step1Desc",placement:"bottom"},{target:'[data-testid="search-button"]',titleKey:"onboarding.tour.audit.step2Title",descriptionKey:"onboarding.tour.audit.step2Desc",placement:"bottom"},{target:'[data-testid="export-btn"]',titleKey:"onboarding.tour.audit.step3Title",descriptionKey:"onboarding.tour.audit.step3Desc",placement:"bottom"}]},DVe={id:"schedules",titleKey:"onboarding.tour.schedules.title",icon:"CalendarClock",route:"/manage/schedules",steps:[{target:'[data-testid="create-schedule-btn"]',titleKey:"onboarding.tour.schedules.step1Title",descriptionKey:"onboarding.tour.schedules.step1Desc",placement:"bottom"},{target:'[data-tour="schedules-stats"]',titleKey:"onboarding.tour.schedules.step2Title",descriptionKey:"onboarding.tour.schedules.step2Desc",placement:"bottom",padding:8},{target:'[data-testid="schedules-table-container"]',titleKey:"onboarding.tour.schedules.step3Title",descriptionKey:"onboarding.tour.schedules.step3Desc",placement:"top",padding:8}]},TVe={id:"quotas",titleKey:"onboarding.tour.quotas.title",icon:"SlidersHorizontal",route:"/manage/quotas",steps:[{target:'[data-tour="quotas-config"]',titleKey:"onboarding.tour.quotas.step1Title",descriptionKey:"onboarding.tour.quotas.step1Desc",placement:"right",padding:8},{target:'[data-tour="quotas-usage"]',titleKey:"onboarding.tour.quotas.step2Title",descriptionKey:"onboarding.tour.quotas.step2Desc",placement:"left",padding:8},{target:'[data-testid="quotas-save"]',titleKey:"onboarding.tour.quotas.step3Title",descriptionKey:"onboarding.tour.quotas.step3Desc",placement:"bottom"}]},IVe={id:"coordinator",titleKey:"onboarding.tour.coordinator.title",icon:"Activity",route:"/manage/coordinator",steps:[{target:'[data-testid="coordinator-connection-card"]',titleKey:"onboarding.tour.coordinator.step1Title",descriptionKey:"onboarding.tour.coordinator.step1Desc",placement:"bottom",padding:8},{target:'[data-testid="coordinator-queues"]',titleKey:"onboarding.tour.coordinator.step2Title",descriptionKey:"onboarding.tour.coordinator.step2Desc",placement:"top",padding:8},{target:'[data-testid="coordinator-dead-letters"]',titleKey:"onboarding.tour.coordinator.step3Title",descriptionKey:"onboarding.tour.coordinator.step3Desc",placement:"top",padding:8}]},AVe={id:"orphans",titleKey:"onboarding.tour.orphans.title",icon:"Link2Off",route:"/manage/orphans",steps:[{target:'[data-testid="scan-button"]',titleKey:"onboarding.tour.orphans.step1Title",descriptionKey:"onboarding.tour.orphans.step1Desc",placement:"bottom"},{target:'[data-testid="include-deleted-checkbox"]',titleKey:"onboarding.tour.orphans.step2Title",descriptionKey:"onboarding.tour.orphans.step2Desc",placement:"bottom"},{target:'[data-testid="pre-scan-state"]',titleKey:"onboarding.tour.orphans.step3Title",descriptionKey:"onboarding.tour.orphans.step3Desc",placement:"top",padding:8}]},Xie={dashboard:vVe,agents:_Ve,workflows:yVe,chat:wVe,resources:CVe,conversations:SVe,groups:kVe,logs:NVe,secrets:EVe,audit:LVe,schedules:DVe,quotas:TVe,coordinator:IVe,orphans:AVe};async function RVe(){var i;try{const e=await Oe.get("/openapi?format=json");return((i=e==null?void 0:e.info)==null?void 0:i.version)||"Unknown"}catch(e){return console.error("Failed to fetch EDDI version",e),"Unknown"}}const MVe=[{labelKey:"nav.sectionCore",items:[{path:"/manage",icon:_j,labelKey:"nav.dashboard"},{path:"/manage/agents",icon:ai,labelKey:"nav.agents"},{path:"/manage/workflows",icon:Ed,labelKey:"nav.packages"},{path:"/manage/groups",icon:pA,labelKey:"nav.groups"},{path:"/manage/channels",icon:vb,labelKey:"nav.channels"},{path:"/manage/capabilities",icon:Uf,labelKey:"nav.capabilities"}]},{labelKey:"nav.sectionBuild",items:[{path:"/manage/resources",icon:bp,labelKey:"nav.resources"},{path:"/manage/chat",icon:Jf,labelKey:"nav.chat"},{path:"/manage/triggers",icon:nc,labelKey:"nav.triggers"}]},{labelKey:"nav.sectionMonitor",items:[{path:"/manage/logs",icon:$v,labelKey:"nav.logs"},{path:"/manage/conversations",icon:FSe,labelKey:"nav.conversations"},{path:"/manage/coordinator",icon:AE,labelKey:"nav.coordinator"},{path:"/manage/audit",icon:bh,labelKey:"nav.audit"}]},{labelKey:"nav.sectionAdmin",items:[{path:"/manage/secrets",icon:Uv,labelKey:"nav.secrets"},{path:"/manage/variables",icon:mG,labelKey:"nav.variables"},{path:"/manage/quotas",icon:$Se,labelKey:"nav.quotas"},{path:"/manage/schedules",icon:a7,labelKey:"nav.schedules"},{path:"/manage/userdata",icon:ga,labelKey:"nav.userData"},{path:"/manage/orphans",icon:ASe,labelKey:"nav.orphans"},{path:"/manage/sync",icon:xi,labelKey:"nav.sync"},{path:"/manage/gdpr",icon:h7,labelKey:"nav.gdpr"}]}],PVe=[{href:"/q/swagger-ui",icon:ZBe,labelKey:"nav.openapi",fallback:"OpenAPI"},{href:"https://docs.labs.ai",icon:Lw,labelKey:"nav.docs",fallback:"Documentation"}];function nfe({collapsed:i,onToggle:e}){var m;const{t}=xe(),{method:n,user:s,logout:r}=hke(),o=n==="keycloak"&&s,{data:a,isLoading:l}=hn({queryKey:["eddi-version"],queryFn:RVe,staleTime:1/0,retry:1}),c=o?[s.firstName,s.lastName].filter(Boolean).map(x=>x[0]).join("").toUpperCase()||((m=s.username[0])==null?void 0:m.toUpperCase())||"?":"",u="eddi-sidebar-sections",[h,g]=L.useState(()=>{try{const x=localStorage.getItem(u);return x?new Set(JSON.parse(x)):new Set}catch{return new Set}}),f=L.useCallback(x=>{g(v=>{const _=new Set(v);_.has(x)?_.delete(x):_.add(x);try{localStorage.setItem(u,JSON.stringify([..._]))}catch{}return _})},[]);return d.jsxs("aside",{"data-testid":"sidebar",className:be("flex h-full flex-col border-e border-sidebar-border bg-sidebar transition-all duration-300",i?"w-16":"w-64"),children:[d.jsx("div",{className:"flex h-16 items-center justify-center border-b border-sidebar-border px-4",children:i?d.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0","aria-label":"EDDI",children:[d.jsx("rect",{width:"28",height:"28",rx:"6",className:"fill-sidebar-accent"}),d.jsx("text",{x:"5",y:"20",fontFamily:"'Noto Sans', sans-serif",fontWeight:"700",fontSize:"16",className:"fill-sidebar",children:"E."})]}):d.jsx("img",{src:"/logo_eddi.png",alt:"EDDI",className:"h-7 w-auto"})}),d.jsx("nav",{className:"flex-1 overflow-y-auto p-1.5","aria-label":t("nav.mainNavigation","Main navigation"),children:MVe.map((x,v)=>d.jsxs("div",{className:be(v>0&&"mt-2.5"),children:[!i&&d.jsxs("button",{type:"button",onClick:()=>f(v),className:"mb-1 flex w-full items-center gap-1 px-3 text-[11px] font-semibold uppercase tracking-wider text-sidebar-foreground/50 hover:text-sidebar-foreground/80 transition-colors","aria-expanded":!h.has(v),"aria-controls":`sidebar-section-${v}`,children:[d.jsx(hs,{className:be("h-3 w-3 shrink-0 transition-transform duration-200",!h.has(v)&&"rotate-90"),"aria-hidden":"true"}),t(x.labelKey)]}),i&&v>0&&d.jsx("div",{className:"mx-3 mb-2 border-t border-sidebar-border"}),(i?!0:!h.has(v))&&d.jsx("div",{id:`sidebar-section-${v}`,className:"space-y-0.5",children:x.items.map(_=>d.jsxs(U6e,{to:_.path,end:_.path==="/manage",className:({isActive:w})=>be("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-all","hover:bg-sidebar-accent/10 hover:text-sidebar-accent",w?"border-s-2 border-sidebar-accent bg-sidebar-accent/10 text-sidebar-accent":"border-s-2 border-transparent text-sidebar-foreground",i&&"justify-center px-2"),"aria-label":i?t(_.labelKey):void 0,title:i?t(_.labelKey):void 0,children:[d.jsx(_.icon,{className:"h-5 w-5 shrink-0","aria-hidden":"true"}),!i&&d.jsx("span",{children:t(_.labelKey)})]},_.path))})]},x.labelKey))}),d.jsxs("div",{className:"border-t border-sidebar-border p-1.5",children:[!i&&d.jsx("p",{className:"mb-1 px-3 text-[11px] font-semibold uppercase tracking-wider text-sidebar-foreground/50",children:t("nav.sectionExternal","External")}),d.jsx("div",{className:"space-y-0.5",children:PVe.map(x=>d.jsxs("a",{href:x.href,target:"_blank",rel:"noopener noreferrer",className:be("flex items-center gap-3 rounded-lg px-3 py-1.5 text-sm font-medium transition-all","border-s-2 border-transparent text-sidebar-foreground","hover:bg-sidebar-accent/10 hover:text-sidebar-accent",i&&"justify-center px-2"),"aria-label":i?`${t(x.labelKey,x.fallback)} (${t("common.opensNewTab","opens in new tab")})`:void 0,title:i?t(x.labelKey,x.fallback):void 0,children:[d.jsx(x.icon,{className:"h-5 w-5 shrink-0","aria-hidden":"true"}),!i&&d.jsxs("span",{className:"flex items-center gap-1.5",children:[t(x.labelKey,x.fallback),d.jsx(To,{className:"h-3 w-3 opacity-50","aria-hidden":"true"}),d.jsxs("span",{className:"sr-only",children:["(",t("common.opensNewTab","opens in new tab"),")"]})]})]},x.href))})]}),o&&d.jsx("div",{className:"border-t border-sidebar-border p-1.5",children:d.jsxs("div",{className:be("flex items-center gap-3 rounded-lg px-3 py-2",i&&"justify-center px-2"),"data-testid":"sidebar-user",children:[d.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-xs font-bold text-sidebar",children:c}),!i&&d.jsxs("div",{className:"flex min-w-0 flex-1 items-center justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"truncate text-sm font-medium text-sidebar-foreground",children:s.fullName||s.username}),s.email&&d.jsx("p",{className:"truncate text-xs text-sidebar-foreground/60",children:s.email})]}),d.jsx("button",{onClick:r,"data-testid":"sidebar-logout",title:t("auth.logout","Logout"),"aria-label":t("auth.logout","Logout"),className:"ms-2 shrink-0 rounded-md p-1.5 text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent/10 hover:text-sidebar-accent",children:d.jsx(PSe,{className:"h-4 w-4","aria-hidden":"true"})})]})]})}),d.jsx(jVe,{collapsed:i}),d.jsxs("div",{className:"border-t border-sidebar-border p-1.5",children:[!i&&d.jsx("p",{className:"mb-1 px-3 text-center text-[10px] text-sidebar-foreground/30",title:a==="Unknown"?"Standalone Demo Mode fallback":void 0,children:l?"Checking version...":a&&a!=="Unknown"?`EDDI ${a}`:"EDDI Demo 6.1.0"}),d.jsx("button",{onClick:e,"data-testid":"sidebar-toggle","aria-label":i?"Expand sidebar":"Collapse sidebar",className:"flex w-full items-center justify-center rounded-lg p-2 text-sidebar-foreground transition-all hover:bg-sidebar-accent/10 hover:text-sidebar-accent active:scale-[0.98]",children:i?d.jsx(cHe,{className:"h-5 w-5"}):d.jsx(aHe,{className:"h-5 w-5"})})]})]})}const OVe={dashboard:"/manage",agents:"/manage/agents",workflows:"/manage/workflows",chat:"/manage/chat",resources:"/manage/resources",conversations:"/manage/conversations",groups:"/manage/groups",logs:"/manage/logs",secrets:"/manage/secrets",audit:"/manage/audit",schedules:"/manage/schedules",quotas:"/manage/quotas",coordinator:"/manage/coordinator",orphans:"/manage/orphans"};function jVe({collapsed:i}){const{t:e}=xe(),t=il(),[n,s]=L.useState(!1),r=L.useRef(null),o=L.useRef(null),a=$s(g=>g.completedChapters),l=$s(g=>g.restartChapter),c=$s(g=>g.resetAll);L.useEffect(()=>{if(!n)return;const g=m=>{r.current&&!r.current.contains(m.target)&&s(!1)},f=m=>{var x;m.key==="Escape"&&(m.preventDefault(),s(!1),(x=o.current)==null||x.focus())};return document.addEventListener("mousedown",g),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",f)}},[n]);const u=g=>{s(!1),t(OVe[g]),setTimeout(()=>l(g),300)};L.useEffect(()=>{n&&requestAnimationFrame(()=>{var f;const g=(f=r.current)==null?void 0:f.querySelector('[role="menuitem"]');g==null||g.focus()})},[n]);const h=L.useCallback(g=>{var _,w;const f=(_=r.current)==null?void 0:_.querySelectorAll('[role="menuitem"]');if(!f||f.length===0)return;const m=Array.from(f),x=m.indexOf(document.activeElement);let v=null;switch(g.key){case"ArrowDown":v=(x+1)%m.length;break;case"ArrowUp":v=(x-1+m.length)%m.length;break;case"Home":v=0;break;case"End":v=m.length-1;break;default:return}g.preventDefault(),(w=m[v])==null||w.focus()},[]);return d.jsxs("div",{ref:r,className:"relative border-t border-sidebar-border p-1.5",children:[d.jsxs("button",{ref:o,onClick:()=>s(g=>!g),className:be("flex w-full items-center rounded-lg px-3 py-2 text-sidebar-foreground transition-all hover:bg-sidebar-accent/10 hover:text-sidebar-accent",i&&"justify-center px-2"),title:e("onboarding.help.title","Help & Tour"),"aria-label":e("onboarding.help.title","Help & Tour"),"aria-haspopup":"true","aria-expanded":n,"data-testid":"sidebar-help",children:[d.jsx(wBe,{className:"h-5 w-5 shrink-0","aria-hidden":"true"}),!i&&d.jsx("span",{className:"ms-3 text-sm font-medium",children:e("onboarding.help.title","Help & Tour")})]}),n&&d.jsxs("div",{className:be("absolute z-50 mb-2 w-56 rounded-xl border border-sidebar-border bg-sidebar p-1.5 shadow-xl shadow-black/20",i?"inset-s-14 bottom-0":"inset-s-2 bottom-full"),role:"menu","aria-label":e("onboarding.help.platformTour","Platform Tour"),onKeyDown:h,"data-testid":"help-menu-dropdown",children:[d.jsx("p",{className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-widest text-sidebar-foreground/40","aria-hidden":"true",children:e("onboarding.help.platformTour","Platform Tour")}),xG.map(g=>{const f=Xie[g],m=a.has(g);return d.jsxs("button",{onClick:()=>u(g),className:"flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-start text-sm text-sidebar-foreground transition-colors hover:bg-sidebar-accent/10 focus:bg-sidebar-accent/10",role:"menuitem",tabIndex:-1,"data-testid":`help-chapter-${g}`,children:[d.jsx("span",{className:"flex-1 truncate",children:e(f.titleKey)}),m?d.jsx(Ns,{className:"h-3.5 w-3.5 text-emerald-500 shrink-0","aria-hidden":"true"}):d.jsx("span",{className:"h-3.5 w-3.5 shrink-0 rounded-full border border-sidebar-foreground/30","aria-hidden":"true"})]},g)}),d.jsx("div",{className:"mt-1 border-t border-sidebar-border pt-1",children:d.jsxs("button",{onClick:()=>{s(!1),c()},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-xs text-sidebar-foreground/50 transition-colors hover:text-sidebar-foreground hover:bg-sidebar-accent/10 focus:bg-sidebar-accent/10",role:"menuitem",tabIndex:-1,"data-testid":"help-reset-all",children:[d.jsx(S_,{className:"h-3.5 w-3.5","aria-hidden":"true"}),e("onboarding.help.resetAll","Reset All Tours")]})})]})]})}async function FVe(){const i=performance.now(),e=await fetch(`${window.location.origin}/administration/logs/instance-id`,{signal:AbortSignal.timeout(5e3),headers:Oe.getAuthHeader()}),t=Math.round(performance.now()-i);if(!e.ok)throw new Error(`HTTP ${e.status}`);return{instanceId:(await e.json()).instanceId,latencyMs:t}}const BVe=["platform","health"];function gke(){const i=hn({queryKey:BVe,queryFn:FVe,refetchInterval:15e3,staleTime:1e4,retry:1}),e=i.dataUpdatedAt||i.errorUpdatedAt,t=i.isLoading?"checking":i.isError?"offline":"online";return L.useMemo(()=>{var n,s;return{status:t,instanceId:((n=i.data)==null?void 0:n.instanceId)??null,latencyMs:t==="online"?((s=i.data)==null?void 0:s.latencyMs)??null:null,lastCheckedAt:e?new Date(e):null}},[t,i.data,e])}function HVe(){const{t:i}=xe(),{status:e,instanceId:t,latencyMs:n,lastCheckedAt:s}=gke(),[r,o]=L.useState(!1),a=L.useRef(null);L.useEffect(()=>{if(!r)return;const g=m=>{a.current&&!a.current.contains(m.target)&&o(!1)},f=m=>{m.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",g),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",f)}},[r]);const[,l]=L.useState(0);L.useEffect(()=>{if(!r)return;const g=setInterval(()=>l(f=>f+1),1e3);return()=>clearInterval(g)},[r]);const c=L.useCallback(()=>{if(!s)return"";const g=Math.round((Date.now()-s.getTime())/1e3);return g<5?i("platform.justNow","just now"):i("platform.secondsAgo","{{count}}s ago",{count:g})},[s,i]),u=e==="online",h=e==="checking";return d.jsxs("div",{ref:a,className:"relative","data-testid":"platform-status",children:[d.jsxs("button",{onClick:()=>o(g=>!g),"aria-expanded":r,"aria-haspopup":"dialog","aria-label":h?i("platform.checking","Checking connection…"):u?i("platform.online","Online"):i("platform.offline","Offline"),className:be("inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-all duration-500",h&&"border-border bg-muted/50 text-muted-foreground",u&&"border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",!u&&!h&&"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400"),children:[d.jsx("span",{className:be("inline-block h-2 w-2 rounded-full transition-colors duration-500",h&&"bg-muted-foreground/40 animate-pulse",u&&"bg-emerald-500 animate-pulse",!u&&!h&&"bg-red-500 animate-pulse"),"aria-hidden":"true"}),d.jsx("span",{children:h?"…":u?i("platform.online","Online"):i("platform.offline","Offline")})]}),r&&d.jsxs("div",{className:"absolute inset-s-1/2 top-full z-50 mt-2 w-56 rounded-xl border border-border bg-card p-3 shadow-xl shadow-black/10 transform-[translateX(-50%)] rtl:transform-[translateX(50%)]",role:"dialog","aria-label":i("platform.status","Platform Status"),"data-testid":"platform-status-popover",children:[d.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:i("platform.status","Platform Status")}),d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsx("span",{className:be("h-2.5 w-2.5 rounded-full",u?"bg-emerald-500 animate-pulse":h?"bg-muted-foreground/40 animate-pulse":"bg-red-500 animate-pulse")}),d.jsx("span",{className:be("text-sm font-medium",u?"text-emerald-600 dark:text-emerald-400":h?"text-muted-foreground":"text-red-600 dark:text-red-400"),children:h?i("platform.checking","Checking connection…"):u?i("platform.connected","Connected"):i("platform.disconnected","Disconnected")})]}),d.jsxs("div",{className:"space-y-1.5 text-xs",children:[t&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:i("platform.instance","Instance")}),d.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground",children:t.length>12?`${t.substring(0,12)}…`:t})]}),n!==null&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:i("platform.latency","Latency")}),d.jsxs("span",{className:be("font-medium tabular-nums",n<100?"text-emerald-600 dark:text-emerald-400":n<500?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"),children:[n,"ms"]})]}),s&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:i("platform.lastChecked","Last checked")}),d.jsx("span",{className:"text-foreground/70",children:c()})]})]})]})]})}function WVe(){const i=mp(),{t:e}=xe(),t=i.pathname.replace(/^\/manage\/?/,"").split("/").filter(Boolean),n=[{label:e("nav.dashboard"),to:"/manage"}],s={agents:e("nav.agents"),workflows:e("nav.packages"),conversations:e("nav.conversations"),chat:e("nav.chat"),resources:e("nav.resources"),groups:e("nav.groups","Groups"),coordinator:e("nav.coordinator","Coordinator"),schedules:e("nav.schedules","Schedules"),logs:e("nav.logs","Logs"),orphans:e("nav.orphans","Orphans"),secrets:e("nav.secrets","Secrets"),audit:e("nav.audit","Audit Trail"),quotas:e("nav.quotas","Quotas"),userdata:e("userData.title","User Data"),triggers:e("nav.triggers","Triggers"),capabilities:e("nav.capabilities","Capabilities"),sync:e("nav.sync","Sync"),gdpr:e("nav.gdpr","GDPR"),wizard:e("wizard.title","Agent Wizard"),workflowview:e("nav.packages")};let r="/manage";for(const o of t){r+=`/${o}`;const a=s[o]??(o.match(/^[a-f0-9]{24}$/)?`${o.substring(0,8)}…`:o.replace(/view$/,""));n.push({label:a,to:r})}return n}function VVe({onMenuClick:i,sidebarVisible:e}){var _;const{theme:t,setTheme:n}=RM(),{t:s,i18n:r}=xe(),o=WVe(),{method:a,user:l,logout:c}=hke(),u=a==="keycloak"&&l,[h,g]=L.useState(!1),f=L.useRef(null);L.useEffect(()=>{if(!h)return;const w=C=>{f.current&&!f.current.contains(C.target)&&g(!1)},k=C=>{C.key==="Escape"&&g(!1)};return document.addEventListener("mousedown",w),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("keydown",k)}},[h]);const m=[{value:"light",icon:QHe,label:s("theme.light")},{value:"dark",icon:HSe,label:s("theme.dark")},{value:"system",icon:nHe,label:s("theme.system")}],x=[{code:"en",label:s("language.en")},{code:"de",label:s("language.de")},{code:"fr",label:s("language.fr")},{code:"es",label:s("language.es")},{code:"ar",label:s("language.ar")},{code:"zh",label:s("language.zh")},{code:"th",label:s("language.th")},{code:"ja",label:s("language.ja")},{code:"ko",label:s("language.ko")},{code:"pt",label:s("language.pt")},{code:"hi",label:s("language.hi")}],v=u?[l.firstName,l.lastName].filter(Boolean).map(w=>w[0]).join("").toUpperCase()||((_=l.username[0])==null?void 0:_.toUpperCase())||"?":"";return d.jsxs("header",{className:"flex h-16 items-center justify-between border-b border-border bg-card px-4",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("button",{onClick:i,"data-testid":"mobile-menu-toggle","aria-label":s("nav.openMenu","Open navigation menu"),className:be("rounded-lg p-2 text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground md:hidden",e&&"hidden"),children:d.jsx(q7e,{className:"h-5 w-5","aria-hidden":"true"})}),d.jsx("nav",{"aria-label":"Breadcrumb",className:"hidden items-center gap-1 text-sm md:flex",children:o.map((w,k)=>d.jsxs("span",{className:"flex items-center gap-1",children:[k>0&&d.jsx(hs,{className:"h-3.5 w-3.5 text-muted-foreground/60"}),k===o.length-1?d.jsx("span",{className:"font-medium text-foreground","aria-current":"page",children:w.label}):d.jsx(Kn,{to:w.to,className:"text-muted-foreground transition-colors hover:text-foreground",children:w.label})]},w.to))})]}),d.jsx(HVe,{}),d.jsxs("div",{className:"flex items-center gap-2","data-tour":"topbar-personalize",children:[d.jsxs("div",{className:"relative flex items-center gap-1",children:[d.jsx(Su,{className:"h-4 w-4 text-muted-foreground"}),d.jsx("select",{value:r.language,onChange:w=>r.changeLanguage(w.target.value),"data-testid":"language-selector",className:"appearance-none rounded-md bg-transparent px-2 py-1.5 text-sm text-foreground outline-none transition-colors hover:bg-secondary focus:ring-2 focus:ring-ring",children:x.map(w=>d.jsx("option",{value:w.code,children:w.label},w.code))})]}),d.jsx("div",{className:"flex items-center rounded-lg bg-secondary p-0.5",children:m.map(w=>d.jsx("button",{onClick:()=>n(w.value),"data-testid":`theme-${w.value}`,title:w.label,"aria-label":w.label,"aria-pressed":t===w.value,className:be("rounded-md p-1.5 transition-colors",t===w.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:d.jsx(w.icon,{className:"h-4 w-4","aria-hidden":"true"})},w.value))}),u&&d.jsxs("div",{className:"relative",ref:f,children:[d.jsx("button",{onClick:()=>g(w=>!w),"data-testid":"user-menu-trigger",className:"flex h-8 w-8 items-center justify-center rounded-full bg-primary text-xs font-bold text-primary-foreground transition-opacity hover:opacity-80",title:l.fullName||l.username,"aria-label":s("auth.userMenu","User menu"),"aria-haspopup":"true","aria-expanded":h,children:v}),h&&d.jsxs("div",{className:"absolute inset-e-0 top-full z-50 mt-2 w-56 rounded-lg border border-border bg-card p-1 shadow-lg","data-testid":"user-menu-dropdown",role:"menu","aria-label":s("auth.userMenu","User menu"),children:[d.jsxs("div",{className:"border-b border-border px-3 py-2.5",children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:l.fullName||l.username}),l.email&&d.jsx("p",{className:"text-xs text-muted-foreground",children:l.email})]}),d.jsx("div",{className:"py-1",children:d.jsxs("button",{onClick:()=>{g(!1),c()},"data-testid":"user-menu-logout",role:"menuitem",className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-foreground transition-colors hover:bg-secondary",children:[d.jsx(PSe,{className:"h-4 w-4"}),s("auth.logout","Logout")]})})]})]})]})]})}const _c=ML(i=>({isOpen:!1,agentId:null,agentName:null,step:"idle",errorMessage:null,open:(e,t)=>i({isOpen:!0,agentId:e,agentName:t??"Agent",step:"idle",errorMessage:null}),close:()=>i({isOpen:!1,agentId:null,agentName:null,step:"idle",errorMessage:null}),setStep:(e,t)=>i({step:e,errorMessage:t??null})}));function zVe(i){const e=i.split("/"),t=e[e.length-1]||i;return t.split("?")[0]??t}async function UVe(i,e){const t=await Oe.post(`/agents/${e}/start`);return zVe(t.location)}function Zie(i,e,t,n=!1){const s=new URLSearchParams({returnDetailed:"false",returnCurrentStepOnly:String(n)});return Oe.get(`/agents/${t}?${s.toString()}`)}async function $Ve(i,e,t,n){const s=new URLSearchParams({returnDetailed:"false",returnCurrentStepOnly:"true"}),r=await fetch(`${Oe.getBaseUrl()}/agents/${t}?${s.toString()}`,{method:"POST",headers:{"Content-Type":"text/plain",...Oe.getAuthHeader()},body:n});if(!r.ok)throw{status:r.status,message:r.statusText,url:r.url};return r.json()}function qVe(i,e,t,n){const s=new URLSearchParams({returnDetailed:"false",returnCurrentStepOnly:"true"});return Oe.post(`/agents/${t}?${s.toString()}`,n)}async function*KVe(i,e,t,n,s){var c;const r=await fetch(`${Oe.getBaseUrl()}/agents/${t}/stream`,{method:"POST",headers:{"Content-Type":"application/json",...Oe.getAuthHeader()},body:JSON.stringify(n),signal:s});if(!r.ok)throw{status:r.status,message:`Streaming failed: ${r.statusText}`,url:r.url};const o=(c=r.body)==null?void 0:c.getReader();if(!o)throw new Error("No readable stream");const a=new TextDecoder;let l="";try{for(;;){const{done:u,value:h}=await o.read();if(u)break;l+=a.decode(h,{stream:!0});const g=l.split(` - -`);l=g.pop()??"";for(const f of g){if(!f.trim())continue;let m="token",x="";for(const v of f.split(` -`))v.startsWith("event:")?m=v.slice(6).trim():v.startsWith("data:")&&(x=v.slice(5).trim());(x||m)&&(yield{type:m,data:x})}}}finally{o.releaseLock()}}function GVe(i){return Oe.post(`/agents/${i}/endConversation`)}function YVe(i,e,t){return Oe.post(`/agents/${t}/undo`)}function QVe(i,e,t){return Oe.post(`/agents/${t}/redo`)}function XVe(i){const e=new URLSearchParams({returnDetailed:"false",returnCurrentStepOnly:"true"});return Oe.post(`/agents/${i}/rerun?${e.toString()}`)}function ZVe(i){if(!i)return{agentId:"",agentVersion:0};try{const e=i.startsWith("eddi://")?i.replace("eddi://","http://"):i,t=new URL(e,"http://dummy"),n=t.pathname.split("/"),s=n[n.length-1]||"",r=parseInt(t.searchParams.get("version")||"0",10);return{agentId:s,agentVersion:isNaN(r)?0:r}}catch{return{agentId:i,agentVersion:0}}}function JVe(i){const e=ZVe(i.agentResource);return{resource:i.resource,name:i.name||i.agentName||"",description:i.description||"",createdOn:i.createdOn,lastModifiedOn:i.lastModifiedOn,agentId:i.agentId||e.agentId,agentVersion:i.agentVersion??e.agentVersion,conversationState:i.conversationState,viewState:i.viewState,conversationStepSize:i.conversationStepSize,environment:i.environment,userId:i.userId}}function Cj(i){var t;const e=(t=i.conversationStep)==null?void 0:t.find(n=>n.key==="input:initial");return e==null?void 0:e.value}function Iw(i){if(!i)return;const e=[],t=i.output;if(Array.isArray(t)){for(const n of t)typeof n=="string"?e.push(n):n!=null&&n.text&&e.push(n.text);if(e.length>0)return e.join(` -`)}for(const[n,s]of Object.entries(i))if(n.startsWith("output:text:"))if(typeof s=="string")e.push(s);else if(Array.isArray(s))for(const r of s)typeof r=="string"?e.push(r):r!=null&&r.text&&e.push(r.text);else s&&typeof s=="object"&&s.text&&e.push(s.text);return e.length>0?e.join(` -`):void 0}function eze(i){if(!i)return;const e=i.output;if(Array.isArray(e)){for(const t of e)if(t&&typeof t=="object"&&t.type==="inputField"){const n=t;return{subType:n.subType||"password",placeholder:n.placeholder,label:n.label,defaultValue:n.defaultValue}}}}function Jie(i){if(!i)return[];const e=i.quickReplies;return Array.isArray(e)?e.map(t=>typeof t=="string"?t:t&&typeof t=="object"&&"value"in t?t.value:null).filter(t=>t!==null):[]}function tze(i){var t;const e=(t=i.conversationStep)==null?void 0:t.find(n=>n.key==="actions");return e!=null&&e.value?Array.isArray(e.value)?e.value:typeof e.value=="string"?[e.value]:[]:[]}function dg(i){try{const e=i.startsWith("eddi://")?i.replace("eddi://","http://"):i,n=new URL(e,"http://dummy").pathname.split("/");return n[n.length-1]||i}catch{return i}}async function PL(i=20,e=0,t="",n="",s,r){const o=new URLSearchParams({limit:String(i),index:String(e)});t&&o.set("filter",t),n&&o.set("agentId",n),r&&o.set("conversationState",r);const a=await Oe.get(`/conversationstore/conversations?${o.toString()}`);return(Array.isArray(a)?a:(a==null?void 0:a.value)??[]).map(JVe)}function fke(i,e=!1,t=!1){const n=new URLSearchParams({returnDetailed:String(e),returnCurrentStepOnly:String(t)});return Oe.get(`/conversationstore/conversations/simple/${i}?${n.toString()}`)}function nze(i,e=!1){return Oe.delete(`/conversationstore/conversations/${i}?deletePermanently=${e}`)}function ize(i){return Oe.get(`/agents/${i}?returnDetailed=true`)}const Sj=["production","test"],pke={high:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20",medium:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",low:"bg-rose-500/10 text-rose-600 dark:text-rose-400 border-rose-500/20"};function uo(i){const e=i.startsWith("eddi://")?i.replace("eddi://","http://"):i,t=new URL(e,"http://dummy"),n=t.pathname.split("/").filter(Boolean),s=n[n.length-1]??i,r=parseInt(t.searchParams.get("version")||"1",10),o=isNaN(r)?1:r;return{id:s,version:o}}function OL(i=20,e=0,t=""){const n=new URLSearchParams({limit:String(i),index:String(e)});return t&&n.set("filter",t),Oe.get(`/agentstore/agents/descriptors?${n.toString()}`)}async function sze(i){const t=await Oe.get(`/agentstore/agents/${i}/currentversion`)??1,s=(await Promise.all(Array.from({length:t},(r,o)=>o+1).map(async r=>{try{return await Oe.get(`/agentstore/agents/descriptors?filter=${i}&version=${r}`)}catch{return[]}}))).flat();return s.length===0?Oe.get(`/agentstore/agents/descriptors?filter=${i}`):s}function vC(i,e){const t=e!=null&&e>0?`?version=${e}`:"";return Oe.get(`/agentstore/agents/${i}${t}`)}function rze(i){return Oe.post("/agentstore/agents",i)}function jM(i,e,t){return Oe.put(`/agentstore/agents/${i}?version=${e}`,t)}function mke(i,e,t){const n=new URLSearchParams({version:String(e)});return t!=null&&t.cascade&&n.set("cascade","true"),t!=null&&t.permanent&&n.set("permanent","true"),Oe.delete(`/agentstore/agents/${i}?${n}`)}function oze(i,e,t=!1){return Oe.post(`/agentstore/agents/${i}?version=${e}&deepCopy=${t}`)}function ese(i,e,t){return Oe.post(`/administration/${i}/deploy/${e}?version=${t}`)}function aze(i,e,t){return Oe.post(`/administration/${i}/undeploy/${e}?version=${t}`)}function FM(i,e,t){return Oe.get(`/administration/${i}/deploymentstatus/${e}?version=${t}`)}async function lze(i,e){return(await Promise.allSettled(Sj.map(async n=>{try{const s=await FM(n,i,e);return{environment:n,status:s.status}}catch{return{environment:n,status:"NOT_FOUND"}}}))).map((n,s)=>n.status==="fulfilled"?n.value:{environment:Sj[s],status:"NOT_FOUND"})}const cze=()=>{try{return localStorage.getItem("eddi-debug-open")==="true"}catch{return!1}},ife=i=>{try{localStorage.setItem("eddi-debug-open",String(i))}catch{}},dze=()=>{try{return localStorage.getItem("eddi-show-activity")!=="false"}catch{return!0}},uze=i=>{try{localStorage.setItem("eddi-show-activity",String(i))}catch{}},bu=ML(i=>({turns:[],currentTurnEvents:[],currentTurnStart:0,isDebugOpen:cze(),activeTab:"pipeline",selectedTurnIndex:null,showActivity:dze(),addEvent:e=>i(t=>({currentTurnEvents:[...t.currentTurnEvents,e],currentTurnStart:t.currentTurnStart||e.timestamp})),finalizeTurn:()=>i(e=>{if(e.currentTurnEvents.length===0)return e;const t=e.currentTurnEvents,n=t.reduce((r,o)=>r+(o.durationMs??0),0),s={turnIndex:e.turns.length,events:t,totalDurationMs:n,startTime:e.currentTurnStart};return{turns:[...e.turns,s],currentTurnEvents:[],currentTurnStart:0,selectedTurnIndex:null}}),setDebugOpen:e=>{ife(e),i({isDebugOpen:e})},toggleDebug:()=>i(e=>{const t=!e.isDebugOpen;return ife(t),{isDebugOpen:t}}),setActiveTab:e=>i({activeTab:e}),setSelectedTurn:e=>i({selectedTurnIndex:e}),toggleShowActivity:()=>i(e=>{const t=!e.showActivity;return uze(t),{showActivity:t}}),reset:()=>i({turns:[],currentTurnEvents:[],currentTurnStart:0,selectedTurnIndex:null})})),hze=()=>{try{return localStorage.getItem("eddi-chat-streaming")!=="false"}catch{return!0}},Oi=ML(i=>({messages:[],conversationId:null,selectedAgentId:null,selectedAgentName:null,isProcessing:!1,isThinking:!1,streamingEnabled:hze(),undoAvailable:!1,redoAvailable:!1,quickReplies:[],activeInputField:null,isSecretMode:!1,setSelectedAgent:(e,t)=>i({selectedAgentId:e,selectedAgentName:t,conversationId:null,messages:[]}),setConversationId:e=>i({conversationId:e}),addMessage:e=>i(t=>({messages:[...t.messages,e]})),appendToLastAgentMessage:e=>i(t=>{const n=[...t.messages],s=n[n.length-1];return(s==null?void 0:s.role)==="agent"&&(n[n.length-1]={...s,content:s.content+e}),{messages:n}}),finishStreaming:()=>i(e=>{const t=[...e.messages],n=t[t.length-1];return(n==null?void 0:n.role)==="agent"&&(t[t.length-1]={...n,isStreaming:!1}),{messages:t,isProcessing:!1}}),setProcessing:e=>i({isProcessing:e}),setThinking:e=>i({isThinking:e}),toggleStreaming:()=>i(e=>{const t=!e.streamingEnabled;try{localStorage.setItem("eddi-chat-streaming",String(t))}catch{}return{streamingEnabled:t}}),clearMessages:()=>i({messages:[],conversationId:null,undoAvailable:!1,redoAvailable:!1,quickReplies:[],activeInputField:null,isSecretMode:!1}),setUndoRedo:(e,t)=>i({undoAvailable:e,redoAvailable:t}),setQuickReplies:e=>i({quickReplies:e}),replaceMessages:e=>i({messages:e}),setInputField:e=>i({activeInputField:e}),clearInputField:()=>i({activeInputField:null}),toggleSecretMode:()=>i(e=>({isSecretMode:!e.isSecretMode})),reset:()=>i({messages:[],conversationId:null,selectedAgentId:null,selectedAgentName:null,isProcessing:!1,isThinking:!1,undoAvailable:!1,redoAvailable:!1,quickReplies:[],activeInputField:null,isSecretMode:!1})})),tse=["chat"];function nse(){return hn({queryKey:[...tse,"deployedAgents"],queryFn:async()=>{const i=await OL(500,0,""),e=new Map;for(const s of i){const{id:r,version:o}=uo(s.resource),a=e.get(s.name);(!a||o>a.version)&&e.set(s.name,{...s,id:r,version:o})}const t=Array.from(e.values());return(await Promise.allSettled(t.map(async s=>{const r=await FM("production",s.id,s.version);return{agent:s,status:r}}))).filter(s=>s.status==="fulfilled"&&s.value.status.status==="READY").map(s=>s.value.agent)},staleTime:6e4})}function BM(){const i=Oi;return Kt({mutationFn:async({agentId:e})=>{const t=await UVe("production",e);i.getState().setConversationId(t);const s=(await Zie("production",e,t,!1)).conversationOutputs??[];for(const r of s){const o=Iw(r);o&&i.getState().addMessage({id:`welcome-${Date.now()}-${Math.random()}`,role:"agent",content:o,timestamp:Date.now()});const a=Jie(r);a.length>0&&i.getState().setQuickReplies(a)}return t}})}function ise(){const i=Oi;return Kt({mutationFn:async({message:e,isSecret:t})=>{var a,l;const n=i.getState(),{selectedAgentId:s,conversationId:r,streamingEnabled:o}=n;if(!s||!r)throw new Error("No active conversation");if(n.addMessage({id:`user-${Date.now()}`,role:"user",content:t?"●●●●●●●●":e,timestamp:Date.now()}),n.setProcessing(!0),n.setQuickReplies([]),t&&n.clearInputField(),o){n.addMessage({id:`agent-${Date.now()}`,role:"agent",content:"",timestamp:Date.now(),isStreaming:!0});const c=new AbortController,u=KVe("production",s,r,{input:e},c.signal);try{for await(const h of u)if(gze(h,i)){c.abort();break}}catch(h){if(!(h instanceof DOMException&&h.name==="AbortError"))throw h}i.getState().isProcessing&&i.getState().finishStreaming()}else{const c=`agent-typing-${Date.now()}`;n.addMessage({id:c,role:"agent",content:"",timestamp:Date.now(),isStreaming:!0});let u;t?u=await qVe("production",s,r,{input:e,context:{secretInput:{type:"string",value:"true"}}}):u=await $Ve("production",s,r,e);const h=(l=u.conversationOutputs)==null?void 0:l[(((a=u.conversationOutputs)==null?void 0:a.length)??1)-1],g=Iw(h);i.setState(x=>{const v=x.messages.filter(_=>_.id!==c);return g&&v.push({id:`agent-${Date.now()}`,role:"agent",content:g,timestamp:Date.now()}),{messages:v}});const f=eze(h);f&&n.setInputField(f);const m=Jie(h);n.setQuickReplies(m),n.setProcessing(!1)}},onError:e=>{const t=i.getState(),n=e&&typeof e=="object"&&"message"in e?String(e.message):String(e);t.addMessage({id:`agent-error-${Date.now()}`,role:"agent",content:` - -⚠️ Error: ${n}`,timestamp:Date.now()}),t.setProcessing(!1),t.setQuickReplies([])}})}function gze(i,e){var n;const t=bu.getState();switch(i.type){case"token":return e.getState().setThinking(!1),e.getState().appendToLastAgentMessage(i.data),!1;case"done":{t.finalizeTurn();let s=[];if(i.data)try{const r=JSON.parse(i.data);if((n=r.conversationOutputs)!=null&&n.length){const o=r.conversationOutputs[r.conversationOutputs.length-1];s=Jie(o);const a=e.getState().messages,l=a[a.length-1];if((l==null?void 0:l.role)==="agent"&&!l.content.trim()){const c=Iw(o);c&&e.setState(u=>{const h=[...u.messages],g=h[h.length-1];return g&&(h[h.length-1]={id:g.id,role:g.role,content:c,timestamp:g.timestamp,isStreaming:g.isStreaming}),{messages:h}})}}}catch{}return e.getState().setQuickReplies(s),e.getState().finishStreaming(),!0}case"error":return e.getState().appendToLastAgentMessage(` - -⚠️ Error: ${i.data}`),e.getState().finishStreaming(),t.finalizeTurn(),!0;case"task_start":{e.getState().setThinking(!0);let s="unknown",r="unknown",o=0;try{const a=JSON.parse(i.data);s=a.taskId??a.id??"unknown",r=a.taskType??a.type??"unknown",o=a.index??0}catch{r=i.data||"unknown"}return t.addEvent({type:"task_start",taskId:s,taskType:r,index:o,timestamp:Date.now()}),!1}case"task_complete":{e.getState().setThinking(!1);let s="unknown",r="unknown",o=0,a,l,c,u;try{const h=JSON.parse(i.data);s=h.taskId??h.id??"unknown",r=h.taskType??h.type??"unknown",o=h.index??0,a=h.durationMs??h.duration,l=h.actions,c=h.confidence,u=h.toolTrace}catch{r=i.data||"unknown"}return t.addEvent({type:"task_complete",taskId:s,taskType:r,index:o,durationMs:a,actions:l,confidence:c,toolTrace:u,timestamp:Date.now()}),!1}default:return!1}}function p7(i){const e=[],t=i.conversationOutputs??[];for(let n=0;n<(i.conversationSteps??[]).length;n++){const s=i.conversationSteps[n],r=s?Cj(s):void 0,o=Iw(t[n]);r&&e.push({id:`user-${e.length}-${Date.now()}`,role:"user",content:r,timestamp:Date.now()}),o&&e.push({id:`agent-${e.length}-${Date.now()}`,role:"agent",content:o,timestamp:Date.now()})}return e}function fze(i){return hn({queryKey:[...tse,"history",i],queryFn:()=>PL(50,0,"",i??""),enabled:!!i,staleTime:3e4})}function pze(){const i=Oi;return Kt({mutationFn:async({agentId:e,conversationId:t})=>{i.getState().clearMessages(),i.getState().setConversationId(t);const n=await Zie("production",e,t,!1),s=p7(n);return i.getState().replaceMessages(s),i.getState().setUndoRedo(n.conversationSteps.length>0,n.redoAvailable??!1),n}})}function mze(){const i=Oi;return Kt({mutationFn:async()=>{const{selectedAgentId:e,conversationId:t}=i.getState();if(!e||!t)throw new Error("No active conversation");const n=await YVe("production",e,t),s=p7(n);return i.getState().replaceMessages(s),i.getState().setUndoRedo(n.conversationSteps.length>0,n.redoAvailable??!1),n}})}function bze(){const i=Oi;return Kt({mutationFn:async()=>{const{selectedAgentId:e,conversationId:t}=i.getState();if(!e||!t)throw new Error("No active conversation");const n=await QVe("production",e,t),s=p7(n);return i.getState().replaceMessages(s),i.getState().setUndoRedo(n.conversationSteps.length>0,n.redoAvailable??!1),n}})}function xze(){const i=Oi,e=cn();return Kt({mutationFn:async()=>{const t=i.getState().conversationId;if(!t)throw new Error("No active conversation");await GVe(t),i.getState().clearMessages()},onSuccess:()=>{e.invalidateQueries({queryKey:[...tse,"history"]})}})}function vze(){const i=Oi;return Kt({mutationFn:async()=>{const{selectedAgentId:e,conversationId:t}=i.getState();if(!e||!t)throw new Error("No active conversation");await XVe(t);const n=await Zie("production",e,t,!1),s=p7(n);return i.getState().replaceMessages(s),i.getState().setUndoRedo(n.conversationSteps.length>0,n.redoAvailable??!1),n}})}function sfe(i){const e=[],t=String(i||"");let n=t.indexOf(","),s=0,r=!1;for(;!r;){n===-1&&(n=t.length,r=!0);const o=t.slice(s,n).trim();(o||!r)&&e.push(o),s=n+1,n=t.indexOf(",",s)}return e}function bke(i,e){const t={};return(i[i.length-1]===""?[...i,""]:i).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const _ze=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yze=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wze={};function rfe(i,e){return(wze.jsx?yze:_ze).test(i)}const Cze=/[ \t\n\f\r]/g;function Sze(i){return typeof i=="object"?i.type==="text"?ofe(i.value):!1:ofe(i)}function ofe(i){return i.replace(Cze,"")===""}class HM{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}HM.prototype.normal={};HM.prototype.property={};HM.prototype.space=void 0;function xke(i,e){const t={},n={};for(const s of i)Object.assign(t,s.property),Object.assign(n,s.normal);return new HM(t,n,e)}function bA(i){return i.toLowerCase()}class jd{constructor(e,t){this.attribute=t,this.property=e}}jd.prototype.attribute="";jd.prototype.booleanish=!1;jd.prototype.boolean=!1;jd.prototype.commaOrSpaceSeparated=!1;jd.prototype.commaSeparated=!1;jd.prototype.defined=!1;jd.prototype.mustUseProperty=!1;jd.prototype.number=!1;jd.prototype.overloadedBoolean=!1;jd.prototype.property="";jd.prototype.spaceSeparated=!1;jd.prototype.space=void 0;let kze=0;const mi=_C(),ia=_C(),vG=_C(),Dt=_C(),Rr=_C(),mN=_C(),Xd=_C();function _C(){return 2**++kze}const _G=Object.freeze(Object.defineProperty({__proto__:null,boolean:mi,booleanish:ia,commaOrSpaceSeparated:Xd,commaSeparated:mN,number:Dt,overloadedBoolean:vG,spaceSeparated:Rr},Symbol.toStringTag,{value:"Module"})),sU=Object.keys(_G);class sse extends jd{constructor(e,t,n,s){let r=-1;if(super(e,t),afe(this,"space",s),typeof n=="number")for(;++r4&&t.slice(0,4)==="data"&&Tze.test(e)){if(e.charAt(4)==="-"){const r=e.slice(5).replace(lfe,Aze);n="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{const r=e.slice(4);if(!lfe.test(r)){let o=r.replace(Dze,Ize);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}s=sse}return new s(n,e)}function Ize(i){return"-"+i.toLowerCase()}function Aze(i){return i.charAt(1).toUpperCase()}const WM=xke([vke,Nze,wke,Cke,Ske],"html"),Z_=xke([vke,Eze,wke,Cke,Ske],"svg");function cfe(i){const e=String(i||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function kke(i){return i.join(" ").trim()}var LS={},rU,dfe;function Rze(){if(dfe)return rU;dfe=1;var i=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,t=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,l=` -`,c="/",u="*",h="",g="comment",f="declaration";function m(v,_){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];_=_||{};var w=1,k=1;function C($){var K=$.match(e);K&&(w+=K.length);var z=$.lastIndexOf(l);k=~z?$.length-z:k+$.length}function E(){var $={line:w,column:k};return function(K){return K.position=new D($),R(),K}}function D($){this.start=$,this.end={line:w,column:k},this.source=_.source}D.prototype.content=v;function T($){var K=new Error(_.source+":"+w+":"+k+": "+$);if(K.reason=$,K.filename=_.source,K.line=w,K.column=k,K.source=v,!_.silent)throw K}function I($){var K=$.exec(v);if(K){var z=K[0];return C(z),v=v.slice(z.length),K}}function R(){I(t)}function P($){var K;for($=$||[];K=j();)K!==!1&&$.push(K);return $}function j(){var $=E();if(!(c!=v.charAt(0)||u!=v.charAt(1))){for(var K=2;h!=v.charAt(K)&&(u!=v.charAt(K)||c!=v.charAt(K+1));)++K;if(K+=2,h===v.charAt(K-1))return T("End of comment missing");var z=v.slice(2,K-2);return k+=2,C(z),v=v.slice(K),k+=2,$({type:g,comment:z})}}function B(){var $=E(),K=I(n);if(K){if(j(),!I(s))return T("property missing ':'");var z=I(r),G=$({type:f,property:x(K[0].replace(i,h)),value:z?x(z[0].replace(i,h)):h});return I(o),G}}function U(){var $=[];P($);for(var K;K=B();)K!==!1&&($.push(K),P($));return $}return R(),U()}function x(v){return v?v.replace(a,h):h}return rU=m,rU}var ufe;function Mze(){if(ufe)return LS;ufe=1;var i=LS&&LS.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(LS,"__esModule",{value:!0}),LS.default=t;const e=i(Rze());function t(n,s){let r=null;if(!n||typeof n!="string")return r;const o=(0,e.default)(n),a=typeof s=="function";return o.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:u}=l;a?s(c,u,l):u&&(r=r||{},r[c]=u)}),r}return LS}var mT={},hfe;function Pze(){if(hfe)return mT;hfe=1,Object.defineProperty(mT,"__esModule",{value:!0}),mT.camelCase=void 0;var i=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,t=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,r=function(c){return!c||t.test(c)||i.test(c)},o=function(c,u){return u.toUpperCase()},a=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),r(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(s,a):c=c.replace(n,a),c.replace(e,o))};return mT.camelCase=l,mT}var bT,gfe;function Oze(){if(gfe)return bT;gfe=1;var i=bT&&bT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},e=i(Mze()),t=Pze();function n(s,r){var o={};return!s||typeof s!="string"||(0,e.default)(s,function(a,l){a&&l&&(o[(0,t.camelCase)(a,r)]=l)}),o}return n.default=n,bT=n,bT}var jze=Oze();const Fze=t7(jze),b7=Nke("end"),vp=Nke("start");function Nke(i){return e;function e(t){const n=t&&t.position&&t.position[i]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Bze(i){const e=vp(i),t=b7(i);if(e&&t)return{start:e,end:t}}function F2(i){return!i||typeof i!="object"?"":"position"in i||"type"in i?ffe(i.position):"start"in i||"end"in i?ffe(i):"line"in i||"column"in i?yG(i):""}function yG(i){return pfe(i&&i.line)+":"+pfe(i&&i.column)}function ffe(i){return yG(i&&i.start)+"-"+yG(i&&i.end)}function pfe(i){return i&&typeof i=="number"?i:1}class cc extends Error{constructor(e,t,n){super(),typeof t=="string"&&(n=t,t=void 0);let s="",r={},o=!1;if(t&&("line"in t&&"column"in t?r={place:t}:"start"in t&&"end"in t?r={place:t}:"type"in t?r={ancestors:[t],place:t.position}:r={...t}),typeof e=="string"?s=e:!r.cause&&e&&(o=!0,s=e.message,r.cause=e),!r.ruleId&&!r.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?r.ruleId=n:(r.source=n.slice(0,l),r.ruleId=n.slice(l+1))}if(!r.place&&r.ancestors&&r.ancestors){const l=r.ancestors[r.ancestors.length-1];l&&(r.place=l.position)}const a=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=a?a.line:void 0,this.name=F2(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=o&&r.cause&&typeof r.cause.stack=="string"?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}cc.prototype.file="";cc.prototype.name="";cc.prototype.reason="";cc.prototype.message="";cc.prototype.stack="";cc.prototype.column=void 0;cc.prototype.line=void 0;cc.prototype.ancestors=void 0;cc.prototype.cause=void 0;cc.prototype.fatal=void 0;cc.prototype.place=void 0;cc.prototype.ruleId=void 0;cc.prototype.source=void 0;const rse={}.hasOwnProperty,Hze=new Map,Wze=/[A-Z]/g,Vze=new Set(["table","tbody","thead","tfoot","tr"]),zze=new Set(["td","th"]),Eke="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Uze(i,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=e.filePath||void 0;let n;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=Zze(t,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=Xze(t,e.jsx,e.jsxs)}const s={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:n,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Z_:WM,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},r=Lke(s,i,void 0);return r&&typeof r!="string"?r:s.create(i,s.Fragment,{children:r||void 0},void 0)}function Lke(i,e,t){if(e.type==="element")return $ze(i,e,t);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return qze(i,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return Gze(i,e,t);if(e.type==="mdxjsEsm")return Kze(i,e);if(e.type==="root")return Yze(i,e,t);if(e.type==="text")return Qze(i,e)}function $ze(i,e,t){const n=i.schema;let s=n;e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=Z_,i.schema=s),i.ancestors.push(e);const r=Tke(i,e.tagName,!1),o=Jze(i,e);let a=ase(i,e);return Vze.has(e.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Sze(l):!0})),Dke(i,o,r,e),ose(o,a),i.ancestors.pop(),i.schema=n,i.create(e,r,o,t)}function qze(i,e){if(e.data&&e.data.estree&&i.evaluater){const n=e.data.estree.body[0];return n.type,i.evaluater.evaluateExpression(n.expression)}xA(i,e.position)}function Kze(i,e){if(e.data&&e.data.estree&&i.evaluater)return i.evaluater.evaluateProgram(e.data.estree);xA(i,e.position)}function Gze(i,e,t){const n=i.schema;let s=n;e.name==="svg"&&n.space==="html"&&(s=Z_,i.schema=s),i.ancestors.push(e);const r=e.name===null?i.Fragment:Tke(i,e.name,!0),o=eUe(i,e),a=ase(i,e);return Dke(i,o,r,e),ose(o,a),i.ancestors.pop(),i.schema=n,i.create(e,r,o,t)}function Yze(i,e,t){const n={};return ose(n,ase(i,e)),i.create(e,i.Fragment,n,t)}function Qze(i,e){return e.value}function Dke(i,e,t,n){typeof t!="string"&&t!==i.Fragment&&i.passNode&&(e.node=n)}function ose(i,e){if(e.length>0){const t=e.length>1?e:e[0];t&&(i.children=t)}}function Xze(i,e,t){return n;function n(s,r,o,a){const c=Array.isArray(o.children)?t:e;return a?c(r,o,a):c(r,o)}}function Zze(i,e){return t;function t(n,s,r,o){const a=Array.isArray(r.children),l=vp(n);return e(s,r,o,a,{columnNumber:l?l.column-1:void 0,fileName:i,lineNumber:l?l.line:void 0},void 0)}}function Jze(i,e){const t={};let n,s;for(s in e.properties)if(s!=="children"&&rse.call(e.properties,s)){const r=tUe(i,s,e.properties[s]);if(r){const[o,a]=r;i.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&zze.has(e.tagName)?n=a:t[o]=a}}if(n){const r=t.style||(t.style={});r[i.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return t}function eUe(i,e){const t={};for(const n of e.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&i.evaluater){const r=n.data.estree.body[0];r.type;const o=r.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,i.evaluater.evaluateExpression(a.argument))}else xA(i,e.position);else{const s=n.name;let r;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&i.evaluater){const a=n.value.data.estree.body[0];a.type,r=i.evaluater.evaluateExpression(a.expression)}else xA(i,e.position);else r=n.value===null?!0:n.value;t[s]=r}return t}function ase(i,e){const t=[];let n=-1;const s=i.passKeys?new Map:Hze;for(;++ns?0:s+e:e=e>s?s:e,t=t>0?t:0,n.length<1e4)o=Array.from(n),o.unshift(e,t),i.splice(...o);else for(t&&i.splice(e,t);r0?(vu(i,i.length,0,e),i):e}const xfe={}.hasOwnProperty;function Ake(i){const e={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function mg(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kc=J_(/[A-Za-z]/),Gl=J_(/[\dA-Za-z]/),dUe=J_(/[#-'*+\--9=?A-Z^-~]/);function kj(i){return i!==null&&(i<32||i===127)}const wG=J_(/\d/),uUe=J_(/[\dA-Fa-f]/),hUe=J_(/[!-/:-@[-`{-~]/);function In(i){return i!==null&&i<-2}function Er(i){return i!==null&&(i<0||i===32)}function Bi(i){return i===-2||i===-1||i===32}const x7=J_(new RegExp("\\p{P}|\\p{S}","u")),Aw=J_(/\s/);function J_(i){return e;function e(t){return t!==null&&t>-1&&i.test(String.fromCharCode(t))}}function FL(i){const e=[];let t=-1,n=0,s=0;for(;++t55295&&r<57344){const a=i.charCodeAt(t+1);r<56320&&a>56319&&a<57344?(o=String.fromCharCode(r,a),s=1):o="�"}else o=String.fromCharCode(r);o&&(e.push(i.slice(n,t),encodeURIComponent(o)),n=t+s+1,o=""),s&&(t+=s,s=0)}return e.join("")+i.slice(n)}function ds(i,e,t,n){const s=n?n-1:Number.POSITIVE_INFINITY;let r=0;return o;function o(l){return Bi(l)?(i.enter(t),a(l)):e(l)}function a(l){return Bi(l)&&r++o))return;const T=e.events.length;let I=T,R,P;for(;I--;)if(e.events[I][0]==="exit"&&e.events[I][1].type==="chunkFlow"){if(R){P=e.events[I][1].end;break}R=!0}for(_(n),D=T;Dk;){const E=t[C];e.containerState=E[1],E[0].exit.call(e,i)}t.length=k}function w(){s.write([null]),r=void 0,s=void 0,e.containerState._closeFlow=void 0}}function bUe(i,e,t){return ds(i,i.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function FE(i){if(i===null||Er(i)||Aw(i))return 1;if(x7(i))return 2}function v7(i,e,t){const n=[];let s=-1;for(;++s1&&i[t][1].end.offset-i[t][1].start.offset>1?2:1;const h={...i[n][1].end},g={...i[t][1].start};_fe(h,-l),_fe(g,l),o={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...i[n][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...i[t][1].start},end:g},r={type:l>1?"strongText":"emphasisText",start:{...i[n][1].end},end:{...i[t][1].start}},s={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},i[n][1].end={...o.start},i[t][1].start={...a.end},c=[],i[n][1].end.offset-i[n][1].start.offset&&(c=uh(c,[["enter",i[n][1],e],["exit",i[n][1],e]])),c=uh(c,[["enter",s,e],["enter",o,e],["exit",o,e],["enter",r,e]]),c=uh(c,v7(e.parser.constructs.insideSpan.null,i.slice(n+1,t),e)),c=uh(c,[["exit",r,e],["enter",a,e],["exit",a,e],["exit",s,e]]),i[t][1].end.offset-i[t][1].start.offset?(u=2,c=uh(c,[["enter",i[t][1],e],["exit",i[t][1],e]])):u=0,vu(i,n-1,t-n+3,c),t=n+c.length-u-2;break}}for(t=-1;++t0&&Bi(D)?ds(i,w,"linePrefix",r+1)(D):w(D)}function w(D){return D===null||In(D)?i.check(yfe,x,C)(D):(i.enter("codeFlowValue"),k(D))}function k(D){return D===null||In(D)?(i.exit("codeFlowValue"),w(D)):(i.consume(D),k)}function C(D){return i.exit("codeFenced"),e(D)}function E(D,T,I){let R=0;return P;function P(K){return D.enter("lineEnding"),D.consume(K),D.exit("lineEnding"),j}function j(K){return D.enter("codeFencedFence"),Bi(K)?ds(D,B,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):B(K)}function B(K){return K===a?(D.enter("codeFencedFenceSequence"),U(K)):I(K)}function U(K){return K===a?(R++,D.consume(K),U):R>=o?(D.exit("codeFencedFenceSequence"),Bi(K)?ds(D,$,"whitespace")(K):$(K)):I(K)}function $(K){return K===null||In(K)?(D.exit("codeFencedFence"),T(K)):I(K)}}}function DUe(i,e,t){const n=this;return s;function s(o){return o===null?t(o):(i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),r)}function r(o){return n.parser.lazy[n.now().line]?t(o):e(o)}}const aU={name:"codeIndented",tokenize:IUe},TUe={partial:!0,tokenize:AUe};function IUe(i,e,t){const n=this;return s;function s(c){return i.enter("codeIndented"),ds(i,r,"linePrefix",5)(c)}function r(c){const u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?l(c):In(c)?i.attempt(TUe,o,l)(c):(i.enter("codeFlowValue"),a(c))}function a(c){return c===null||In(c)?(i.exit("codeFlowValue"),o(c)):(i.consume(c),a)}function l(c){return i.exit("codeIndented"),e(c)}}function AUe(i,e,t){const n=this;return s;function s(o){return n.parser.lazy[n.now().line]?t(o):In(o)?(i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),s):ds(i,r,"linePrefix",5)(o)}function r(o){const a=n.events[n.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(o):In(o)?s(o):t(o)}}const RUe={name:"codeText",previous:PUe,resolve:MUe,tokenize:OUe};function MUe(i){let e=i.length-4,t=3,n,s;if((i[t][1].type==="lineEnding"||i[t][1].type==="space")&&(i[e][1].type==="lineEnding"||i[e][1].type==="space")){for(n=t;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const s=t||0;this.setCursor(Math.trunc(e));const r=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return n&&xT(this.left,n),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),xT(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),xT(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(o):i.interrupt(n.parser.constructs.flow,t,e)(o)}}function Fke(i,e,t,n,s,r,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return h;function h(_){return _===60?(i.enter(n),i.enter(s),i.enter(r),i.consume(_),i.exit(r),g):_===null||_===32||_===41||kj(_)?t(_):(i.enter(n),i.enter(o),i.enter(a),i.enter("chunkString",{contentType:"string"}),x(_))}function g(_){return _===62?(i.enter(r),i.consume(_),i.exit(r),i.exit(s),i.exit(n),e):(i.enter(a),i.enter("chunkString",{contentType:"string"}),f(_))}function f(_){return _===62?(i.exit("chunkString"),i.exit(a),g(_)):_===null||_===60||In(_)?t(_):(i.consume(_),_===92?m:f)}function m(_){return _===60||_===62||_===92?(i.consume(_),f):f(_)}function x(_){return!u&&(_===null||_===41||Er(_))?(i.exit("chunkString"),i.exit(a),i.exit(o),i.exit(n),e(_)):u999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(f):f===93?(i.exit(r),i.enter(s),i.consume(f),i.exit(s),i.exit(n),e):In(f)?(i.enter("lineEnding"),i.consume(f),i.exit("lineEnding"),u):(i.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||In(f)||a++>999?(i.exit("chunkString"),u(f)):(i.consume(f),l||(l=!Bi(f)),f===92?g:h)}function g(f){return f===91||f===92||f===93?(i.consume(f),a++,h):h(f)}}function Hke(i,e,t,n,s,r){let o;return a;function a(g){return g===34||g===39||g===40?(i.enter(n),i.enter(s),i.consume(g),i.exit(s),o=g===40?41:g,l):t(g)}function l(g){return g===o?(i.enter(s),i.consume(g),i.exit(s),i.exit(n),e):(i.enter(r),c(g))}function c(g){return g===o?(i.exit(r),l(o)):g===null?t(g):In(g)?(i.enter("lineEnding"),i.consume(g),i.exit("lineEnding"),ds(i,c,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===o||g===null||In(g)?(i.exit("chunkString"),c(g)):(i.consume(g),g===92?h:u)}function h(g){return g===o||g===92?(i.consume(g),u):u(g)}}function B2(i,e){let t;return n;function n(s){return In(s)?(i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),t=!0,n):Bi(s)?ds(i,n,t?"linePrefix":"lineSuffix")(s):e(s)}}const UUe={name:"definition",tokenize:qUe},$Ue={partial:!0,tokenize:KUe};function qUe(i,e,t){const n=this;let s;return r;function r(f){return i.enter("definition"),o(f)}function o(f){return Bke.call(n,i,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return s=mg(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(i.enter("definitionMarker"),i.consume(f),i.exit("definitionMarker"),l):t(f)}function l(f){return Er(f)?B2(i,c)(f):c(f)}function c(f){return Fke(i,u,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return i.attempt($Ue,h,h)(f)}function h(f){return Bi(f)?ds(i,g,"whitespace")(f):g(f)}function g(f){return f===null||In(f)?(i.exit("definition"),n.parser.defined.push(s),e(f)):t(f)}}function KUe(i,e,t){return n;function n(a){return Er(a)?B2(i,s)(a):t(a)}function s(a){return Hke(i,r,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function r(a){return Bi(a)?ds(i,o,"whitespace")(a):o(a)}function o(a){return a===null||In(a)?e(a):t(a)}}const GUe={name:"hardBreakEscape",tokenize:YUe};function YUe(i,e,t){return n;function n(r){return i.enter("hardBreakEscape"),i.consume(r),s}function s(r){return In(r)?(i.exit("hardBreakEscape"),e(r)):t(r)}}const QUe={name:"headingAtx",resolve:XUe,tokenize:ZUe};function XUe(i,e){let t=i.length-2,n=3,s,r;return i[n][1].type==="whitespace"&&(n+=2),t-2>n&&i[t][1].type==="whitespace"&&(t-=2),i[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&i[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(s={type:"atxHeadingText",start:i[n][1].start,end:i[t][1].end},r={type:"chunkText",start:i[n][1].start,end:i[t][1].end,contentType:"text"},vu(i,n,t-n+1,[["enter",s,e],["enter",r,e],["exit",r,e],["exit",s,e]])),i}function ZUe(i,e,t){let n=0;return s;function s(u){return i.enter("atxHeading"),r(u)}function r(u){return i.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&n++<6?(i.consume(u),o):u===null||Er(u)?(i.exit("atxHeadingSequence"),a(u)):t(u)}function a(u){return u===35?(i.enter("atxHeadingSequence"),l(u)):u===null||In(u)?(i.exit("atxHeading"),e(u)):Bi(u)?ds(i,a,"whitespace")(u):(i.enter("atxHeadingText"),c(u))}function l(u){return u===35?(i.consume(u),l):(i.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Er(u)?(i.exit("atxHeadingText"),a(u)):(i.consume(u),c)}}const JUe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Cfe=["pre","script","style","textarea"],e$e={concrete:!0,name:"htmlFlow",resolveTo:i$e,tokenize:s$e},t$e={partial:!0,tokenize:o$e},n$e={partial:!0,tokenize:r$e};function i$e(i){let e=i.length;for(;e--&&!(i[e][0]==="enter"&&i[e][1].type==="htmlFlow"););return e>1&&i[e-2][1].type==="linePrefix"&&(i[e][1].start=i[e-2][1].start,i[e+1][1].start=i[e-2][1].start,i.splice(e-2,2)),i}function s$e(i,e,t){const n=this;let s,r,o,a,l;return c;function c(V){return u(V)}function u(V){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(V),h}function h(V){return V===33?(i.consume(V),g):V===47?(i.consume(V),r=!0,x):V===63?(i.consume(V),s=3,n.interrupt?e:H):kc(V)?(i.consume(V),o=String.fromCharCode(V),v):t(V)}function g(V){return V===45?(i.consume(V),s=2,f):V===91?(i.consume(V),s=5,a=0,m):kc(V)?(i.consume(V),s=4,n.interrupt?e:H):t(V)}function f(V){return V===45?(i.consume(V),n.interrupt?e:H):t(V)}function m(V){const ue="CDATA[";return V===ue.charCodeAt(a++)?(i.consume(V),a===ue.length?n.interrupt?e:B:m):t(V)}function x(V){return kc(V)?(i.consume(V),o=String.fromCharCode(V),v):t(V)}function v(V){if(V===null||V===47||V===62||Er(V)){const ue=V===47,he=o.toLowerCase();return!ue&&!r&&Cfe.includes(he)?(s=1,n.interrupt?e(V):B(V)):JUe.includes(o.toLowerCase())?(s=6,ue?(i.consume(V),_):n.interrupt?e(V):B(V)):(s=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(V):r?w(V):k(V))}return V===45||Gl(V)?(i.consume(V),o+=String.fromCharCode(V),v):t(V)}function _(V){return V===62?(i.consume(V),n.interrupt?e:B):t(V)}function w(V){return Bi(V)?(i.consume(V),w):P(V)}function k(V){return V===47?(i.consume(V),P):V===58||V===95||kc(V)?(i.consume(V),C):Bi(V)?(i.consume(V),k):P(V)}function C(V){return V===45||V===46||V===58||V===95||Gl(V)?(i.consume(V),C):E(V)}function E(V){return V===61?(i.consume(V),D):Bi(V)?(i.consume(V),E):k(V)}function D(V){return V===null||V===60||V===61||V===62||V===96?t(V):V===34||V===39?(i.consume(V),l=V,T):Bi(V)?(i.consume(V),D):I(V)}function T(V){return V===l?(i.consume(V),l=null,R):V===null||In(V)?t(V):(i.consume(V),T)}function I(V){return V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||Er(V)?E(V):(i.consume(V),I)}function R(V){return V===47||V===62||Bi(V)?k(V):t(V)}function P(V){return V===62?(i.consume(V),j):t(V)}function j(V){return V===null||In(V)?B(V):Bi(V)?(i.consume(V),j):t(V)}function B(V){return V===45&&s===2?(i.consume(V),z):V===60&&s===1?(i.consume(V),G):V===62&&s===4?(i.consume(V),Q):V===63&&s===3?(i.consume(V),H):V===93&&s===5?(i.consume(V),te):In(V)&&(s===6||s===7)?(i.exit("htmlFlowData"),i.check(t$e,Y,U)(V)):V===null||In(V)?(i.exit("htmlFlowData"),U(V)):(i.consume(V),B)}function U(V){return i.check(n$e,$,Y)(V)}function $(V){return i.enter("lineEnding"),i.consume(V),i.exit("lineEnding"),K}function K(V){return V===null||In(V)?U(V):(i.enter("htmlFlowData"),B(V))}function z(V){return V===45?(i.consume(V),H):B(V)}function G(V){return V===47?(i.consume(V),o="",ne):B(V)}function ne(V){if(V===62){const ue=o.toLowerCase();return Cfe.includes(ue)?(i.consume(V),Q):B(V)}return kc(V)&&o.length<8?(i.consume(V),o+=String.fromCharCode(V),ne):B(V)}function te(V){return V===93?(i.consume(V),H):B(V)}function H(V){return V===62?(i.consume(V),Q):V===45&&s===2?(i.consume(V),H):B(V)}function Q(V){return V===null||In(V)?(i.exit("htmlFlowData"),Y(V)):(i.consume(V),Q)}function Y(V){return i.exit("htmlFlow"),e(V)}}function r$e(i,e,t){const n=this;return s;function s(o){return In(o)?(i.enter("lineEnding"),i.consume(o),i.exit("lineEnding"),r):t(o)}function r(o){return n.parser.lazy[n.now().line]?t(o):e(o)}}function o$e(i,e,t){return n;function n(s){return i.enter("lineEnding"),i.consume(s),i.exit("lineEnding"),i.attempt(VM,e,t)}}const a$e={name:"htmlText",tokenize:l$e};function l$e(i,e,t){const n=this;let s,r,o;return a;function a(H){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(H),l}function l(H){return H===33?(i.consume(H),c):H===47?(i.consume(H),E):H===63?(i.consume(H),k):kc(H)?(i.consume(H),I):t(H)}function c(H){return H===45?(i.consume(H),u):H===91?(i.consume(H),r=0,m):kc(H)?(i.consume(H),w):t(H)}function u(H){return H===45?(i.consume(H),f):t(H)}function h(H){return H===null?t(H):H===45?(i.consume(H),g):In(H)?(o=h,G(H)):(i.consume(H),h)}function g(H){return H===45?(i.consume(H),f):h(H)}function f(H){return H===62?z(H):H===45?g(H):h(H)}function m(H){const Q="CDATA[";return H===Q.charCodeAt(r++)?(i.consume(H),r===Q.length?x:m):t(H)}function x(H){return H===null?t(H):H===93?(i.consume(H),v):In(H)?(o=x,G(H)):(i.consume(H),x)}function v(H){return H===93?(i.consume(H),_):x(H)}function _(H){return H===62?z(H):H===93?(i.consume(H),_):x(H)}function w(H){return H===null||H===62?z(H):In(H)?(o=w,G(H)):(i.consume(H),w)}function k(H){return H===null?t(H):H===63?(i.consume(H),C):In(H)?(o=k,G(H)):(i.consume(H),k)}function C(H){return H===62?z(H):k(H)}function E(H){return kc(H)?(i.consume(H),D):t(H)}function D(H){return H===45||Gl(H)?(i.consume(H),D):T(H)}function T(H){return In(H)?(o=T,G(H)):Bi(H)?(i.consume(H),T):z(H)}function I(H){return H===45||Gl(H)?(i.consume(H),I):H===47||H===62||Er(H)?R(H):t(H)}function R(H){return H===47?(i.consume(H),z):H===58||H===95||kc(H)?(i.consume(H),P):In(H)?(o=R,G(H)):Bi(H)?(i.consume(H),R):z(H)}function P(H){return H===45||H===46||H===58||H===95||Gl(H)?(i.consume(H),P):j(H)}function j(H){return H===61?(i.consume(H),B):In(H)?(o=j,G(H)):Bi(H)?(i.consume(H),j):R(H)}function B(H){return H===null||H===60||H===61||H===62||H===96?t(H):H===34||H===39?(i.consume(H),s=H,U):In(H)?(o=B,G(H)):Bi(H)?(i.consume(H),B):(i.consume(H),$)}function U(H){return H===s?(i.consume(H),s=void 0,K):H===null?t(H):In(H)?(o=U,G(H)):(i.consume(H),U)}function $(H){return H===null||H===34||H===39||H===60||H===61||H===96?t(H):H===47||H===62||Er(H)?R(H):(i.consume(H),$)}function K(H){return H===47||H===62||Er(H)?R(H):t(H)}function z(H){return H===62?(i.consume(H),i.exit("htmlTextData"),i.exit("htmlText"),e):t(H)}function G(H){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(H),i.exit("lineEnding"),ne}function ne(H){return Bi(H)?ds(i,te,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):te(H)}function te(H){return i.enter("htmlTextData"),o(H)}}const dse={name:"labelEnd",resolveAll:h$e,resolveTo:g$e,tokenize:f$e},c$e={tokenize:p$e},d$e={tokenize:m$e},u$e={tokenize:b$e};function h$e(i){let e=-1;const t=[];for(;++e=3&&(c===null||In(c))?(i.exit("thematicBreak"),e(c)):t(c)}function l(c){return c===s?(i.consume(c),n++,l):(i.exit("thematicBreakSequence"),Bi(c)?ds(i,a,"whitespace")(c):a(c))}}const nd={continuation:{tokenize:E$e},exit:D$e,name:"list",tokenize:N$e},S$e={partial:!0,tokenize:T$e},k$e={partial:!0,tokenize:L$e};function N$e(i,e,t){const n=this,s=n.events[n.events.length-1];let r=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return a;function a(f){const m=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:wG(f)){if(n.containerState.type||(n.containerState.type=m,i.enter(m,{_container:!0})),m==="listUnordered")return i.enter("listItemPrefix"),f===42||f===45?i.check(v4,t,c)(f):c(f);if(!n.interrupt||f===49)return i.enter("listItemPrefix"),i.enter("listItemValue"),l(f)}return t(f)}function l(f){return wG(f)&&++o<10?(i.consume(f),l):(!n.interrupt||o<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(i.exit("listItemValue"),c(f)):t(f)}function c(f){return i.enter("listItemMarker"),i.consume(f),i.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,i.check(VM,n.interrupt?t:u,i.attempt(S$e,g,h))}function u(f){return n.containerState.initialBlankLine=!0,r++,g(f)}function h(f){return Bi(f)?(i.enter("listItemPrefixWhitespace"),i.consume(f),i.exit("listItemPrefixWhitespace"),g):t(f)}function g(f){return n.containerState.size=r+n.sliceSerialize(i.exit("listItemPrefix"),!0).length,e(f)}}function E$e(i,e,t){const n=this;return n.containerState._closeFlow=void 0,i.check(VM,s,r);function s(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ds(i,e,"listItemIndent",n.containerState.size+1)(a)}function r(a){return n.containerState.furtherBlankLines||!Bi(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i.attempt(k$e,e,o)(a))}function o(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,ds(i,i.attempt(nd,e,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function L$e(i,e,t){const n=this;return ds(i,s,"listItemIndent",n.containerState.size+1);function s(r){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?e(r):t(r)}}function D$e(i){i.exit(this.containerState.type)}function T$e(i,e,t){const n=this;return ds(i,s,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(r){const o=n.events[n.events.length-1];return!Bi(r)&&o&&o[1].type==="listItemPrefixWhitespace"?e(r):t(r)}}const Sfe={name:"setextUnderline",resolveTo:I$e,tokenize:A$e};function I$e(i,e){let t=i.length,n,s,r;for(;t--;)if(i[t][0]==="enter"){if(i[t][1].type==="content"){n=t;break}i[t][1].type==="paragraph"&&(s=t)}else i[t][1].type==="content"&&i.splice(t,1),!r&&i[t][1].type==="definition"&&(r=t);const o={type:"setextHeading",start:{...i[n][1].start},end:{...i[i.length-1][1].end}};return i[s][1].type="setextHeadingText",r?(i.splice(s,0,["enter",o,e]),i.splice(r+1,0,["exit",i[n][1],e]),i[n][1].end={...i[r][1].end}):i[n][1]=o,i.push(["exit",o,e]),i}function A$e(i,e,t){const n=this;let s;return r;function r(c){let u=n.events.length,h;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){h=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(i.enter("setextHeadingLine"),s=c,o(c)):t(c)}function o(c){return i.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===s?(i.consume(c),a):(i.exit("setextHeadingLineSequence"),Bi(c)?ds(i,l,"lineSuffix")(c):l(c))}function l(c){return c===null||In(c)?(i.exit("setextHeadingLine"),e(c)):t(c)}}const R$e={tokenize:M$e};function M$e(i){const e=this,t=i.attempt(VM,n,i.attempt(this.parser.constructs.flowInitial,s,ds(i,i.attempt(this.parser.constructs.flow,s,i.attempt(BUe,s)),"linePrefix")));return t;function n(r){if(r===null){i.consume(r);return}return i.enter("lineEndingBlank"),i.consume(r),i.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function s(r){if(r===null){i.consume(r);return}return i.enter("lineEnding"),i.consume(r),i.exit("lineEnding"),e.currentConstruct=void 0,t}}const P$e={resolveAll:Vke()},O$e=Wke("string"),j$e=Wke("text");function Wke(i){return{resolveAll:Vke(i==="text"?F$e:void 0),tokenize:e};function e(t){const n=this,s=this.parser.constructs[i],r=t.attempt(s,o,a);return o;function o(u){return c(u)?r(u):a(u)}function a(u){if(u===null){t.consume(u);return}return t.enter("data"),t.consume(u),l}function l(u){return c(u)?(t.exit("data"),r(u)):(t.consume(u),l)}function c(u){if(u===null)return!0;const h=s[u];let g=-1;if(h)for(;++g-1){const a=o[0];typeof a=="string"?o[0]=a.slice(n):o.shift()}r>0&&o.push(i[s].slice(0,r))}return o}function X$e(i,e){let t=-1;const n=[];let s;for(;++t0){const vs=tn.tokenStack[tn.tokenStack.length-1];(vs[1]||Nfe).call(tn,void 0,vs[0])}for(mt.position={start:Ex(Ge.length>0?Ge[0][1].start:{line:1,column:1,offset:0}),end:Ex(Ge.length>0?Ge[Ge.length-2][1].end:{line:1,column:1,offset:0})},Un=-1;++Un0&&(n.className=["language-"+s[0]]);let r={type:"element",tagName:"code",properties:n,children:[{type:"text",value:t}]};return e.meta&&(r.data={meta:e.meta}),i.patch(e,r),r=i.applyData(e,r),r={type:"element",tagName:"pre",properties:{},children:[r]},i.patch(e,r),r}function uqe(i,e){const t={type:"element",tagName:"del",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function hqe(i,e){const t={type:"element",tagName:"em",properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function gqe(i,e){const t=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),s=FL(n.toLowerCase()),r=i.footnoteOrder.indexOf(n);let o,a=i.footnoteCounts.get(n);a===void 0?(a=0,i.footnoteOrder.push(n),o=i.footnoteOrder.length):o=r+1,a+=1,i.footnoteCounts.set(n,a);const l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};i.patch(e,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return i.patch(e,c),i.applyData(e,c)}function fqe(i,e){const t={type:"element",tagName:"h"+e.depth,properties:{},children:i.all(e)};return i.patch(e,t),i.applyData(e,t)}function pqe(i,e){if(i.options.allowDangerousHtml){const t={type:"raw",value:e.value};return i.patch(e,t),i.applyData(e,t)}}function $ke(i,e){const t=e.referenceType;let n="]";if(t==="collapsed"?n+="[]":t==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];const s=i.all(e),r=s[0];r&&r.type==="text"?r.value="["+r.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=n:s.push({type:"text",value:n}),s}function mqe(i,e){const t=String(e.identifier).toUpperCase(),n=i.definitionById.get(t);if(!n)return $ke(i,e);const s={src:FL(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(s.title=n.title);const r={type:"element",tagName:"img",properties:s,children:[]};return i.patch(e,r),i.applyData(e,r)}function bqe(i,e){const t={src:FL(e.url)};e.alt!==null&&e.alt!==void 0&&(t.alt=e.alt),e.title!==null&&e.title!==void 0&&(t.title=e.title);const n={type:"element",tagName:"img",properties:t,children:[]};return i.patch(e,n),i.applyData(e,n)}function xqe(i,e){const t={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};i.patch(e,t);const n={type:"element",tagName:"code",properties:{},children:[t]};return i.patch(e,n),i.applyData(e,n)}function vqe(i,e){const t=String(e.identifier).toUpperCase(),n=i.definitionById.get(t);if(!n)return $ke(i,e);const s={href:FL(n.url||"")};n.title!==null&&n.title!==void 0&&(s.title=n.title);const r={type:"element",tagName:"a",properties:s,children:i.all(e)};return i.patch(e,r),i.applyData(e,r)}function _qe(i,e){const t={href:FL(e.url)};e.title!==null&&e.title!==void 0&&(t.title=e.title);const n={type:"element",tagName:"a",properties:t,children:i.all(e)};return i.patch(e,n),i.applyData(e,n)}function yqe(i,e,t){const n=i.all(e),s=t?wqe(t):qke(e),r={},o=[];if(typeof e.checked=="boolean"){const u=n[0];let h;u&&u.type==="element"&&u.tagName==="p"?h=u:(h={type:"element",tagName:"p",properties:{},children:[]},n.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let a=-1;for(;++a1}function Cqe(i,e){const t={},n=i.all(e);let s=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++s0){const o={type:"element",tagName:"tbody",properties:{},children:i.wrap(t,!0)},a=vp(e.children[1]),l=b7(e.children[e.children.length-1]);a&&l&&(o.position={start:a,end:l}),s.push(o)}const r={type:"element",tagName:"table",properties:{},children:i.wrap(s,!0)};return i.patch(e,r),i.applyData(e,r)}function Lqe(i,e,t){const n=t?t.children:void 0,r=(n?n.indexOf(e):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,a=o?o.length:e.children.length;let l=-1;const c=[];for(;++l0,!0),n[0]),s=n.index+n[0].length,n=t.exec(e);return r.push(Dfe(e.slice(s),s>0,!1)),r.join("")}function Dfe(i,e,t){let n=0,s=i.length;if(e){let r=i.codePointAt(n);for(;r===Efe||r===Lfe;)n++,r=i.codePointAt(n)}if(t){let r=i.codePointAt(s-1);for(;r===Efe||r===Lfe;)s--,r=i.codePointAt(s-1)}return s>n?i.slice(n,s):""}function Iqe(i,e){const t={type:"text",value:Tqe(String(e.value))};return i.patch(e,t),i.applyData(e,t)}function Aqe(i,e){const t={type:"element",tagName:"hr",properties:{},children:[]};return i.patch(e,t),i.applyData(e,t)}const Rqe={blockquote:lqe,break:cqe,code:dqe,delete:uqe,emphasis:hqe,footnoteReference:gqe,heading:fqe,html:pqe,imageReference:mqe,image:bqe,inlineCode:xqe,linkReference:vqe,link:_qe,listItem:yqe,list:Cqe,paragraph:Sqe,root:kqe,strong:Nqe,table:Eqe,tableCell:Dqe,tableRow:Lqe,text:Iqe,thematicBreak:Aqe,toml:f5,yaml:f5,definition:f5,footnoteDefinition:f5};function f5(){}const Kke=-1,_7=0,H2=1,Nj=2,use=3,hse=4,gse=5,fse=6,Gke=7,Yke=8,Tfe=typeof self=="object"?self:globalThis,Mqe=(i,e)=>{const t=(s,r)=>(i.set(r,s),s),n=s=>{if(i.has(s))return i.get(s);const[r,o]=e[s];switch(r){case _7:case Kke:return t(o,s);case H2:{const a=t([],s);for(const l of o)a.push(n(l));return a}case Nj:{const a=t({},s);for(const[l,c]of o)a[n(l)]=n(c);return a}case use:return t(new Date(o),s);case hse:{const{source:a,flags:l}=o;return t(new RegExp(a,l),s)}case gse:{const a=t(new Map,s);for(const[l,c]of o)a.set(n(l),n(c));return a}case fse:{const a=t(new Set,s);for(const l of o)a.add(n(l));return a}case Gke:{const{name:a,message:l}=o;return t(new Tfe[a](l),s)}case Yke:return t(BigInt(o),s);case"BigInt":return t(Object(BigInt(o)),s);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(new Tfe[r](o),s)};return n},Ife=i=>Mqe(new Map,i)(0),DS="",{toString:Pqe}={},{keys:Oqe}=Object,vT=i=>{const e=typeof i;if(e!=="object"||!i)return[_7,e];const t=Pqe.call(i).slice(8,-1);switch(t){case"Array":return[H2,DS];case"Object":return[Nj,DS];case"Date":return[use,DS];case"RegExp":return[hse,DS];case"Map":return[gse,DS];case"Set":return[fse,DS];case"DataView":return[H2,t]}return t.includes("Array")?[H2,t]:t.includes("Error")?[Gke,t]:[Nj,t]},p5=([i,e])=>i===_7&&(e==="function"||e==="symbol"),jqe=(i,e,t,n)=>{const s=(o,a)=>{const l=n.push(o)-1;return t.set(a,l),l},r=o=>{if(t.has(o))return t.get(o);let[a,l]=vT(o);switch(a){case _7:{let u=o;switch(l){case"bigint":a=Yke,u=o.toString();break;case"function":case"symbol":if(i)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return s([Kke],o)}return s([a,u],o)}case H2:{if(l){let g=o;return l==="DataView"?g=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(g=new Uint8Array(o)),s([l,[...g]],o)}const u=[],h=s([a,u],o);for(const g of o)u.push(r(g));return h}case Nj:{if(l)switch(l){case"BigInt":return s([l,o.toString()],o);case"Boolean":case"Number":case"String":return s([l,o.valueOf()],o)}if(e&&"toJSON"in o)return r(o.toJSON());const u=[],h=s([a,u],o);for(const g of Oqe(o))(i||!p5(vT(o[g])))&&u.push([r(g),r(o[g])]);return h}case use:return s([a,o.toISOString()],o);case hse:{const{source:u,flags:h}=o;return s([a,{source:u,flags:h}],o)}case gse:{const u=[],h=s([a,u],o);for(const[g,f]of o)(i||!(p5(vT(g))||p5(vT(f))))&&u.push([r(g),r(f)]);return h}case fse:{const u=[],h=s([a,u],o);for(const g of o)(i||!p5(vT(g)))&&u.push(r(g));return h}}const{message:c}=o;return s([a,{name:l,message:c}],o)};return r},Afe=(i,{json:e,lossy:t}={})=>{const n=[];return jqe(!(e||t),!!e,new Map,n)(i),n},BE=typeof structuredClone=="function"?(i,e)=>e&&("json"in e||"lossy"in e)?Ife(Afe(i,e)):structuredClone(i):(i,e)=>Ife(Afe(i,e));function Fqe(i,e){const t=[{type:"text",value:"↩"}];return e>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),t}function Bqe(i,e){return"Back to reference "+(i+1)+(e>1?"-"+e:"")}function Hqe(i){const e=typeof i.options.clobberPrefix=="string"?i.options.clobberPrefix:"user-content-",t=i.options.footnoteBackContent||Fqe,n=i.options.footnoteBackLabel||Bqe,s=i.options.footnoteLabel||"Footnotes",r=i.options.footnoteLabelTagName||"h2",o=i.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l0&&m.push({type:"text",value:" "});let w=typeof t=="string"?t:t(l,f);typeof w=="string"&&(w={type:"text",value:w}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+g+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,f),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=u[u.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...m)}else u.push(...m);const _={type:"element",tagName:"li",properties:{id:e+"fn-"+g},children:i.wrap(u,!0)};i.patch(c,_),a.push(_)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:{...BE(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:i.wrap(a,!0)},{type:"text",value:` -`}]}}const y7=(function(i){if(i==null)return Uqe;if(typeof i=="function")return w7(i);if(typeof i=="object")return Array.isArray(i)?Wqe(i):Vqe(i);if(typeof i=="string")return zqe(i);throw new Error("Expected function, string, or object as test")});function Wqe(i){const e=[];let t=-1;for(;++t":""))+")"})}return g;function g(){let f=Qke,m,x,v;if((!e||r(l,c,u[u.length-1]||void 0))&&(f=Gqe(t(l,u)),f[0]===SG))return f;if("children"in l&&l.children){const _=l;if(_.children&&f[0]!==Kqe)for(x=(n?_.children.length:-1)+o,v=u.concat(_);x>-1&&x<_.children.length;){const w=_.children[x];if(m=a(w,x,v)(),m[0]===SG)return m;x=typeof m[1]=="number"?m[1]:x+o}}return f}}}function Gqe(i){return Array.isArray(i)?i:typeof i=="number"?[qqe,i]:i==null?Qke:[i]}function C7(i,e,t,n){let s,r,o;typeof e=="function"&&typeof t!="function"?(r=void 0,o=e,s=t):(r=e,o=t,s=n),Xke(i,r,a,s);function a(l,c){const u=c[c.length-1],h=u?u.children.indexOf(l):void 0;return o(l,h,u)}}const kG={}.hasOwnProperty,Yqe={};function Qqe(i,e){const t=e||Yqe,n=new Map,s=new Map,r=new Map,o={...Rqe,...t.handlers},a={all:c,applyData:Zqe,definitionById:n,footnoteById:s,footnoteCounts:r,footnoteOrder:[],handlers:o,one:l,options:t,patch:Xqe,wrap:eKe};return C7(i,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const h=u.type==="definition"?n:s,g=String(u.identifier).toUpperCase();h.has(g)||h.set(g,u)}}),a;function l(u,h){const g=u.type,f=a.handlers[g];if(kG.call(a.handlers,g)&&f)return f(a,u,h);if(a.options.passThrough&&a.options.passThrough.includes(g)){if("children"in u){const{children:x,...v}=u,_=BE(v);return _.children=a.all(u),_}return BE(u)}return(a.options.unknownHandler||Jqe)(a,u,h)}function c(u){const h=[];if("children"in u){const g=u.children;let f=-1;for(;++f0&&t.push({type:"text",value:` -`}),t}function Rfe(i){let e=0,t=i.charCodeAt(e);for(;t===9||t===32;)e++,t=i.charCodeAt(e);return i.slice(e)}function Mfe(i,e){const t=Qqe(i,e),n=t.one(i,void 0),s=Hqe(t),r=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return s&&r.children.push({type:"text",value:` -`},s),r}function tKe(i,e){return i&&"run"in i?async function(t,n){const s=Mfe(t,{file:n,...e});await i.run(s,n)}:function(t,n){return Mfe(t,{file:n,...i||e})}}function Pfe(i){if(i)throw i}var cU,Ofe;function nKe(){if(Ofe)return cU;Ofe=1;var i=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=function(c){return typeof Array.isArray=="function"?Array.isArray(c):e.call(c)==="[object Array]"},r=function(c){if(!c||e.call(c)!=="[object Object]")return!1;var u=i.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&i.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!u&&!h)return!1;var g;for(g in c);return typeof g>"u"||i.call(c,g)},o=function(c,u){t&&u.name==="__proto__"?t(c,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):c[u.name]=u.newValue},a=function(c,u){if(u==="__proto__")if(i.call(c,u)){if(n)return n(c,u).value}else return;return c[u]};return cU=function l(){var c,u,h,g,f,m,x=arguments[0],v=1,_=arguments.length,w=!1;for(typeof x=="boolean"&&(w=x,x=arguments[1]||{},v=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});v<_;++v)if(c=arguments[v],c!=null)for(u in c)h=a(x,u),g=a(c,u),x!==g&&(w&&g&&(r(g)||(f=s(g)))?(f?(f=!1,m=h&&s(h)?h:[]):m=h&&r(h)?h:{},o(x,{name:u,newValue:l(w,m,g)})):typeof g<"u"&&o(x,{name:u,newValue:g}));return x},cU}var iKe=nKe();const dU=t7(iKe);function NG(i){if(typeof i!="object"||i===null)return!1;const e=Object.getPrototypeOf(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in i)&&!(Symbol.iterator in i)}function sKe(){const i=[],e={run:t,use:n};return e;function t(...s){let r=-1;const o=s.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...s);function a(l,...c){const u=i[++r];let h=-1;if(l){o(l);return}for(;++ho.length;let l;a&&o.push(s);try{l=i.apply(this,o)}catch(c){const u=c;if(a&&t)throw u;return s(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(r,s):l instanceof Error?s(l):r(l))}function s(o,...a){t||(t=!0,e(o,...a))}function r(o){s(null,o)}}const af={basename:oKe,dirname:aKe,extname:lKe,join:cKe,sep:"/"};function oKe(i,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');zM(i);let t=0,n=-1,s=i.length,r;if(e===void 0||e.length===0||e.length>i.length){for(;s--;)if(i.codePointAt(s)===47){if(r){t=s+1;break}}else n<0&&(r=!0,n=s+1);return n<0?"":i.slice(t,n)}if(e===i)return"";let o=-1,a=e.length-1;for(;s--;)if(i.codePointAt(s)===47){if(r){t=s+1;break}}else o<0&&(r=!0,o=s+1),a>-1&&(i.codePointAt(s)===e.codePointAt(a--)?a<0&&(n=s):(a=-1,n=o));return t===n?n=o:n<0&&(n=i.length),i.slice(t,n)}function aKe(i){if(zM(i),i.length===0)return".";let e=-1,t=i.length,n;for(;--t;)if(i.codePointAt(t)===47){if(n){e=t;break}}else n||(n=!0);return e<0?i.codePointAt(0)===47?"/":".":e===1&&i.codePointAt(0)===47?"//":i.slice(0,e)}function lKe(i){zM(i);let e=i.length,t=-1,n=0,s=-1,r=0,o;for(;e--;){const a=i.codePointAt(e);if(a===47){if(o){n=e+1;break}continue}t<0&&(o=!0,t=e+1),a===46?s<0?s=e:r!==1&&(r=1):s>-1&&(r=-1)}return s<0||t<0||r===0||r===1&&s===t-1&&s===n+1?"":i.slice(s,t)}function cKe(...i){let e=-1,t;for(;++e0&&i.codePointAt(i.length-1)===47&&(t+="/"),e?"/"+t:t}function uKe(i,e){let t="",n=0,s=-1,r=0,o=-1,a,l;for(;++o<=i.length;){if(o2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",n=0):(t=t.slice(0,l),n=t.length-1-t.lastIndexOf("/")),s=o,r=0;continue}}else if(t.length>0){t="",n=0,s=o,r=0;continue}}e&&(t=t.length>0?t+"/..":"..",n=2)}else t.length>0?t+="/"+i.slice(s+1,o):t=i.slice(s+1,o),n=o-s-1;s=o,r=0}else a===46&&r>-1?r++:r=-1}return t}function zM(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}const hKe={cwd:gKe};function gKe(){return"/"}function EG(i){return!!(i!==null&&typeof i=="object"&&"href"in i&&i.href&&"protocol"in i&&i.protocol&&i.auth===void 0)}function fKe(i){if(typeof i=="string")i=new URL(i);else if(!EG(i)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+i+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(i.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return pKe(i)}function pKe(i){if(i.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const e=i.pathname;let t=-1;for(;++t0){let[f,...m]=u;const x=n[g][1];NG(x)&&NG(f)&&(f=dU(!0,x,f)),n[g]=[c,f,...m]}}}}const vKe=new pse().freeze();function fU(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `parser`")}function pU(i,e){if(typeof e!="function")throw new TypeError("Cannot `"+i+"` without `compiler`")}function mU(i,e){if(e)throw new Error("Cannot call `"+i+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ffe(i){if(!NG(i)||typeof i.type!="string")throw new TypeError("Expected node, got `"+i+"`")}function Bfe(i,e,t){if(!t)throw new Error("`"+i+"` finished async. Use `"+e+"` instead")}function m5(i){return _Ke(i)?i:new Zke(i)}function _Ke(i){return!!(i&&typeof i=="object"&&"message"in i&&"messages"in i)}function yKe(i){return typeof i=="string"||wKe(i)}function wKe(i){return!!(i&&typeof i=="object"&&"byteLength"in i&&"byteOffset"in i)}const CKe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Hfe=[],Wfe={allowDangerousHtml:!0},SKe=/^(https?|ircs?|mailto|xmpp)$/i,kKe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function mse(i){const e=NKe(i),t=EKe(i);return LKe(e.runSync(e.parse(t),t),i)}function NKe(i){const e=i.rehypePlugins||Hfe,t=i.remarkPlugins||Hfe,n=i.remarkRehypeOptions?{...i.remarkRehypeOptions,...Wfe}:Wfe;return vKe().use(aqe).use(t).use(tKe,n).use(e)}function EKe(i){const e=i.children||"",t=new Zke;return typeof e=="string"&&(t.value=e),t}function LKe(i,e){const t=e.allowedElements,n=e.allowElement,s=e.components,r=e.disallowedElements,o=e.skipHtml,a=e.unwrapDisallowed,l=e.urlTransform||DKe;for(const u of kKe)Object.hasOwn(e,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+CKe+u.id,void 0);return e.className&&(i={type:"element",tagName:"div",properties:{className:e.className},children:i.type==="root"?i.children:[i]}),C7(i,c),Uze(i,{Fragment:d.Fragment,components:s,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function c(u,h,g){if(u.type==="raw"&&g&&typeof h=="number")return o?g.children.splice(h,1):g.children[h]={type:"text",value:u.value},h;if(u.type==="element"){let f;for(f in oU)if(Object.hasOwn(oU,f)&&Object.hasOwn(u.properties,f)){const m=u.properties[f],x=oU[f];(x===null||x.includes(u.tagName))&&(u.properties[f]=l(String(m||""),f,u))}}if(u.type==="element"){let f=t?!t.includes(u.tagName):r?r.includes(u.tagName):!1;if(!f&&n&&typeof h=="number"&&(f=!n(u,h,g)),f&&g&&typeof h=="number")return a&&u.children?g.children.splice(h,1,...u.children):g.children.splice(h,1),h}}}function DKe(i){const e=i.indexOf(":"),t=i.indexOf("?"),n=i.indexOf("#"),s=i.indexOf("/");return e===-1||s!==-1&&e>s||t!==-1&&e>t||n!==-1&&e>n||SKe.test(i.slice(0,e))?i:""}function Vfe(i,e){const t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let n=0,s=t.indexOf(e);for(;s!==-1;)n++,s=t.indexOf(e,s+e.length);return n}function TKe(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function IKe(i,e,t){const s=y7((t||{}).ignore||[]),r=AKe(e);let o=-1;for(;++o0?{type:"text",value:D}:void 0),D===!1?g.lastIndex=C+1:(m!==C&&w.push({type:"text",value:c.value.slice(m,C)}),Array.isArray(D)?w.push(...D):D&&w.push(D),m=C+k[0].length,_=!0),!g.global)break;k=g.exec(c.value)}return _?(m?\]}]+$/.exec(i);if(!e)return[i,void 0];i=i.slice(0,e.index);let t=e[0],n=t.indexOf(")");const s=Vfe(i,"(");let r=Vfe(i,")");for(;n!==-1&&s>r;)i+=t.slice(0,n+1),t=t.slice(n+1),n=t.indexOf(")"),r++;return[i,t]}function Jke(i,e){const t=i.input.charCodeAt(i.index-1);return(i.index===0||Aw(t)||x7(t))&&(!e||t!==47)}eNe.peek=tGe;function KKe(){this.buffer()}function GKe(i){this.enter({type:"footnoteReference",identifier:"",label:""},i)}function YKe(){this.buffer()}function QKe(i){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},i)}function XKe(i){const e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=mg(this.sliceSerialize(i)).toLowerCase(),t.label=e}function ZKe(i){this.exit(i)}function JKe(i){const e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=mg(this.sliceSerialize(i)).toLowerCase(),t.label=e}function eGe(i){this.exit(i)}function tGe(){return"["}function eNe(i,e,t,n){const s=t.createTracker(n);let r=s.move("[^");const o=t.enter("footnoteReference"),a=t.enter("reference");return r+=s.move(t.safe(t.associationId(i),{after:"]",before:r})),a(),o(),r+=s.move("]"),r}function nGe(){return{enter:{gfmFootnoteCallString:KKe,gfmFootnoteCall:GKe,gfmFootnoteDefinitionLabelString:YKe,gfmFootnoteDefinition:QKe},exit:{gfmFootnoteCallString:XKe,gfmFootnoteCall:ZKe,gfmFootnoteDefinitionLabelString:JKe,gfmFootnoteDefinition:eGe}}}function iGe(i){let e=!1;return i&&i.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:t,footnoteReference:eNe},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(n,s,r,o){const a=r.createTracker(o);let l=a.move("[^");const c=r.enter("footnoteDefinition"),u=r.enter("label");return l+=a.move(r.safe(r.associationId(n),{before:l,after:"]"})),u(),l+=a.move("]:"),n.children&&n.children.length>0&&(a.shift(4),l+=a.move((e?` -`:" ")+r.indentLines(r.containerFlow(n,a.current()),e?tNe:sGe))),c(),l}}function sGe(i,e,t){return e===0?i:tNe(i,e,t)}function tNe(i,e,t){return(t?"":" ")+i}const rGe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nNe.peek=dGe;function oGe(){return{canContainEols:["delete"],enter:{strikethrough:lGe},exit:{strikethrough:cGe}}}function aGe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rGe}],handlers:{delete:nNe}}}function lGe(i){this.enter({type:"delete",children:[]},i)}function cGe(i){this.exit(i)}function nNe(i,e,t,n){const s=t.createTracker(n),r=t.enter("strikethrough");let o=s.move("~~");return o+=t.containerPhrasing(i,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),r(),o}function dGe(){return"~"}function uGe(i){return i.length}function hGe(i,e){const t=e||{},n=(t.align||[]).concat(),s=t.stringLength||uGe,r=[],o=[],a=[],l=[];let c=0,u=-1;for(;++uc&&(c=i[u].length);++_l[_])&&(l[_]=k)}x.push(w)}o[u]=x,a[u]=v}let h=-1;if(typeof n=="object"&&"length"in n)for(;++hl[h]&&(l[h]=w),f[h]=w),g[h]=k}o.splice(1,0,g),a.splice(1,0,f),u=-1;const m=[];for(;++u "),r.shift(2);const o=t.indentLines(t.containerFlow(i,r.current()),pGe);return s(),o}function pGe(i,e,t){return">"+(t?"":" ")+i}function mGe(i,e){return $fe(i,e.inConstruct,!0)&&!$fe(i,e.notInConstruct,!1)}function $fe(i,e,t){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return t;let n=-1;for(;++no&&(o=r):r=1,s=n+e.length,n=t.indexOf(e,s);return o}function xGe(i,e){return!!(e.options.fences===!1&&i.value&&!i.lang&&/[^ \r\n]/.test(i.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(i.value))}function vGe(i){const e=i.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function _Ge(i,e,t,n){const s=vGe(t),r=i.value||"",o=s==="`"?"GraveAccent":"Tilde";if(xGe(i,t)){const h=t.enter("codeIndented"),g=t.indentLines(r,yGe);return h(),g}const a=t.createTracker(n),l=s.repeat(Math.max(bGe(r,s)+1,3)),c=t.enter("codeFenced");let u=a.move(l);if(i.lang){const h=t.enter(`codeFencedLang${o}`);u+=a.move(t.safe(i.lang,{before:u,after:" ",encode:["`"],...a.current()})),h()}if(i.lang&&i.meta){const h=t.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(t.safe(i.meta,{before:u,after:` -`,encode:["`"],...a.current()})),h()}return u+=a.move(` -`),r&&(u+=a.move(r+` -`)),u+=a.move(l),c(),u}function yGe(i,e,t){return(t?"":" ")+i}function bse(i){const e=i.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function wGe(i,e,t,n){const s=bse(t),r=s==='"'?"Quote":"Apostrophe",o=t.enter("definition");let a=t.enter("label");const l=t.createTracker(n);let c=l.move("[");return c+=l.move(t.safe(t.associationId(i),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!i.url||/[\0- \u007F]/.test(i.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(i.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(i.url,{before:c,after:i.title?" ":` -`,...l.current()}))),a(),i.title&&(a=t.enter(`title${r}`),c+=l.move(" "+s),c+=l.move(t.safe(i.title,{before:c,after:s,...l.current()})),c+=l.move(s),a()),o(),c}function CGe(i){const e=i.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function vA(i){return"&#x"+i.toString(16).toUpperCase()+";"}function Ej(i,e,t){const n=FE(i),s=FE(e);return n===void 0?s===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}sNe.peek=SGe;function sNe(i,e,t,n){const s=CGe(t),r=t.enter("emphasis"),o=t.createTracker(n),a=o.move(s);let l=o.move(t.containerPhrasing(i,{after:s,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ej(n.before.charCodeAt(n.before.length-1),c,s);u.inside&&(l=vA(c)+l.slice(1));const h=l.charCodeAt(l.length-1),g=Ej(n.after.charCodeAt(0),h,s);g.inside&&(l=l.slice(0,-1)+vA(h));const f=o.move(s);return r(),t.attentionEncodeSurroundingInfo={after:g.outside,before:u.outside},a+l+f}function SGe(i,e,t){return t.options.emphasis||"*"}function kGe(i,e){let t=!1;return C7(i,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return t=!0,SG}),!!((!i.depth||i.depth<3)&&lse(i)&&(e.options.setext||t))}function NGe(i,e,t,n){const s=Math.max(Math.min(6,i.depth||1),1),r=t.createTracker(n);if(kGe(i,t)){const u=t.enter("headingSetext"),h=t.enter("phrasing"),g=t.containerPhrasing(i,{...r.current(),before:` -`,after:` -`});return h(),u(),g+` -`+(s===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(` -`))+1))}const o="#".repeat(s),a=t.enter("headingAtx"),l=t.enter("phrasing");r.move(o+" ");let c=t.containerPhrasing(i,{before:"# ",after:` -`,...r.current()});return/^[\t ]/.test(c)&&(c=vA(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),l(),a(),c}rNe.peek=EGe;function rNe(i){return i.value||""}function EGe(){return"<"}oNe.peek=LGe;function oNe(i,e,t,n){const s=bse(t),r=s==='"'?"Quote":"Apostrophe",o=t.enter("image");let a=t.enter("label");const l=t.createTracker(n);let c=l.move("![");return c+=l.move(t.safe(i.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(a=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(i.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=t.enter("destinationRaw"),c+=l.move(t.safe(i.url,{before:c,after:i.title?" ":")",...l.current()}))),a(),i.title&&(a=t.enter(`title${r}`),c+=l.move(" "+s),c+=l.move(t.safe(i.title,{before:c,after:s,...l.current()})),c+=l.move(s),a()),c+=l.move(")"),o(),c}function LGe(){return"!"}aNe.peek=DGe;function aNe(i,e,t,n){const s=i.referenceType,r=t.enter("imageReference");let o=t.enter("label");const a=t.createTracker(n);let l=a.move("![");const c=t.safe(i.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=t.stack;t.stack=[],o=t.enter("reference");const h=t.safe(t.associationId(i),{before:l,after:"]",...a.current()});return o(),t.stack=u,r(),s==="full"||!c||c!==h?l+=a.move(h+"]"):s==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function DGe(){return"!"}lNe.peek=TGe;function lNe(i,e,t){let n=i.value||"",s="`",r=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(n);)s+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++r\u007F]/.test(i.url))}dNe.peek=IGe;function dNe(i,e,t,n){const s=bse(t),r=s==='"'?"Quote":"Apostrophe",o=t.createTracker(n);let a,l;if(cNe(i,t)){const u=t.stack;t.stack=[],a=t.enter("autolink");let h=o.move("<");return h+=o.move(t.containerPhrasing(i,{before:h,after:">",...o.current()})),h+=o.move(">"),a(),t.stack=u,h}a=t.enter("link"),l=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(i,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!i.url&&i.title||/[\0- \u007F]/.test(i.url)?(l=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(i.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=t.enter("destinationRaw"),c+=o.move(t.safe(i.url,{before:c,after:i.title?" ":")",...o.current()}))),l(),i.title&&(l=t.enter(`title${r}`),c+=o.move(" "+s),c+=o.move(t.safe(i.title,{before:c,after:s,...o.current()})),c+=o.move(s),l()),c+=o.move(")"),a(),c}function IGe(i,e,t){return cNe(i,t)?"<":"["}uNe.peek=AGe;function uNe(i,e,t,n){const s=i.referenceType,r=t.enter("linkReference");let o=t.enter("label");const a=t.createTracker(n);let l=a.move("[");const c=t.containerPhrasing(i,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=t.stack;t.stack=[],o=t.enter("reference");const h=t.safe(t.associationId(i),{before:l,after:"]",...a.current()});return o(),t.stack=u,r(),s==="full"||!c||c!==h?l+=a.move(h+"]"):s==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function AGe(){return"["}function xse(i){const e=i.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function RGe(i){const e=xse(i),t=i.options.bulletOther;if(!t)return e==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+t+"`) to be different");return t}function MGe(i){const e=i.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function hNe(i){const e=i.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function PGe(i,e,t,n){const s=t.enter("list"),r=t.bulletCurrent;let o=i.ordered?MGe(t):xse(t);const a=i.ordered?o==="."?")":".":RGe(t);let l=e&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!i.ordered){const u=i.children?i.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),hNe(t)===o&&u){let h=-1;for(;++h-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(i))+r);let o=r.length+1;(s==="tab"||s==="mixed"&&(e&&e.type==="list"&&e.spread||i.spread))&&(o=Math.ceil(o/4)*4);const a=t.createTracker(n);a.move(r+" ".repeat(o-r.length)),a.shift(o);const l=t.enter("listItem"),c=t.indentLines(t.containerFlow(i,a.current()),u);return l(),c;function u(h,g,f){return g?(f?"":" ".repeat(o))+h:(f?r:r+" ".repeat(o-r.length))+h}}function FGe(i,e,t,n){const s=t.enter("paragraph"),r=t.enter("phrasing"),o=t.containerPhrasing(i,n);return r(),s(),o}const BGe=y7(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function HGe(i,e,t,n){return(i.children.some(function(o){return BGe(o)})?t.containerPhrasing:t.containerFlow).call(t,i,n)}function WGe(i){const e=i.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}gNe.peek=VGe;function gNe(i,e,t,n){const s=WGe(t),r=t.enter("strong"),o=t.createTracker(n),a=o.move(s+s);let l=o.move(t.containerPhrasing(i,{after:s,before:a,...o.current()}));const c=l.charCodeAt(0),u=Ej(n.before.charCodeAt(n.before.length-1),c,s);u.inside&&(l=vA(c)+l.slice(1));const h=l.charCodeAt(l.length-1),g=Ej(n.after.charCodeAt(0),h,s);g.inside&&(l=l.slice(0,-1)+vA(h));const f=o.move(s+s);return r(),t.attentionEncodeSurroundingInfo={after:g.outside,before:u.outside},a+l+f}function VGe(i,e,t){return t.options.strong||"*"}function zGe(i,e,t,n){return t.safe(i.value,n)}function UGe(i){const e=i.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function $Ge(i,e,t){const n=(hNe(t)+(t.options.ruleSpaces?" ":"")).repeat(UGe(t));return t.options.ruleSpaces?n.slice(0,-1):n}const fNe={blockquote:fGe,break:qfe,code:_Ge,definition:wGe,emphasis:sNe,hardBreak:qfe,heading:NGe,html:rNe,image:oNe,imageReference:aNe,inlineCode:lNe,link:dNe,linkReference:uNe,list:PGe,listItem:jGe,paragraph:FGe,root:HGe,strong:gNe,text:zGe,thematicBreak:$Ge};function qGe(){return{enter:{table:KGe,tableData:Kfe,tableHeader:Kfe,tableRow:YGe},exit:{codeText:QGe,table:GGe,tableData:_U,tableHeader:_U,tableRow:_U}}}function KGe(i){const e=i._align;this.enter({type:"table",align:e.map(function(t){return t==="none"?null:t}),children:[]},i),this.data.inTable=!0}function GGe(i){this.exit(i),this.data.inTable=void 0}function YGe(i){this.enter({type:"tableRow",children:[]},i)}function _U(i){this.exit(i)}function Kfe(i){this.enter({type:"tableCell",children:[]},i)}function QGe(i){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,XGe));const t=this.stack[this.stack.length-1];t.type,t.value=e,this.exit(i)}function XGe(i,e){return e==="|"?e:i}function ZGe(i){const e=i||{},t=e.tableCellPadding,n=e.tablePipeAlign,s=e.stringLength,r=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:o,tableCell:l,tableRow:a}};function o(f,m,x,v){return c(u(f,x,v),f.align)}function a(f,m,x,v){const _=h(f,x,v),w=c([_]);return w.slice(0,w.indexOf(` -`))}function l(f,m,x,v){const _=x.enter("tableCell"),w=x.enter("phrasing"),k=x.containerPhrasing(f,{...v,before:r,after:r});return w(),_(),k}function c(f,m){return hGe(f,{align:m,alignDelimiters:n,padding:t,stringLength:s})}function u(f,m,x){const v=f.children;let _=-1;const w=[],k=m.enter("table");for(;++_0&&!t&&(i[i.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const mYe={tokenize:SYe,partial:!0};function bYe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:yYe,continuation:{tokenize:wYe},exit:CYe}},text:{91:{name:"gfmFootnoteCall",tokenize:_Ye},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:xYe,resolveTo:vYe}}}}function xYe(i,e,t){const n=this;let s=n.events.length;const r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;s--;){const l=n.events[s][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return t(l);const c=mg(n.sliceSerialize({start:o.end,end:n.now()}));return c.codePointAt(0)!==94||!r.includes(c.slice(1))?t(l):(i.enter("gfmFootnoteCallLabelMarker"),i.consume(l),i.exit("gfmFootnoteCallLabelMarker"),e(l))}}function vYe(i,e){let t=i.length;for(;t--;)if(i[t][1].type==="labelImage"&&i[t][0]==="enter"){i[t][1];break}i[t+1][1].type="data",i[t+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},i[t+3][1].start),end:Object.assign({},i[i.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},i[t+3][1].end),end:Object.assign({},i[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const r={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},i[i.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},r.start),end:Object.assign({},r.end)},a=[i[t+1],i[t+2],["enter",n,e],i[t+3],i[t+4],["enter",s,e],["exit",s,e],["enter",r,e],["enter",o,e],["exit",o,e],["exit",r,e],i[i.length-2],i[i.length-1],["exit",n,e]];return i.splice(t,i.length-t+1,...a),i}function _Ye(i,e,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let r=0,o;return a;function a(h){return i.enter("gfmFootnoteCall"),i.enter("gfmFootnoteCallLabelMarker"),i.consume(h),i.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?t(h):(i.enter("gfmFootnoteCallMarker"),i.consume(h),i.exit("gfmFootnoteCallMarker"),i.enter("gfmFootnoteCallString"),i.enter("chunkString").contentType="string",c)}function c(h){if(r>999||h===93&&!o||h===null||h===91||Er(h))return t(h);if(h===93){i.exit("chunkString");const g=i.exit("gfmFootnoteCallString");return s.includes(mg(n.sliceSerialize(g)))?(i.enter("gfmFootnoteCallLabelMarker"),i.consume(h),i.exit("gfmFootnoteCallLabelMarker"),i.exit("gfmFootnoteCall"),e):t(h)}return Er(h)||(o=!0),r++,i.consume(h),h===92?u:c}function u(h){return h===91||h===92||h===93?(i.consume(h),r++,c):c(h)}}function yYe(i,e,t){const n=this,s=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let r,o=0,a;return l;function l(m){return i.enter("gfmFootnoteDefinition")._container=!0,i.enter("gfmFootnoteDefinitionLabel"),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(i.enter("gfmFootnoteDefinitionMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionMarker"),i.enter("gfmFootnoteDefinitionLabelString"),i.enter("chunkString").contentType="string",u):t(m)}function u(m){if(o>999||m===93&&!a||m===null||m===91||Er(m))return t(m);if(m===93){i.exit("chunkString");const x=i.exit("gfmFootnoteDefinitionLabelString");return r=mg(n.sliceSerialize(x)),i.enter("gfmFootnoteDefinitionLabelMarker"),i.consume(m),i.exit("gfmFootnoteDefinitionLabelMarker"),i.exit("gfmFootnoteDefinitionLabel"),g}return Er(m)||(a=!0),o++,i.consume(m),m===92?h:u}function h(m){return m===91||m===92||m===93?(i.consume(m),o++,u):u(m)}function g(m){return m===58?(i.enter("definitionMarker"),i.consume(m),i.exit("definitionMarker"),s.includes(r)||s.push(r),ds(i,f,"gfmFootnoteDefinitionWhitespace")):t(m)}function f(m){return e(m)}}function wYe(i,e,t){return i.check(VM,e,i.attempt(mYe,e,t))}function CYe(i){i.exit("gfmFootnoteDefinition")}function SYe(i,e,t){const n=this;return ds(i,s,"gfmFootnoteDefinitionIndent",5);function s(r){const o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?e(r):t(r)}}function kYe(i){let t=(i||{}).singleTilde;const n={name:"strikethrough",tokenize:r,resolveAll:s};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function s(o,a){let l=-1;for(;++l1?l(m):(o.consume(m),h++,f);if(h<2&&!t)return l(m);const v=o.exit("strikethroughSequenceTemporary"),_=FE(m);return v._open=!_||_===2&&!!x,v._close=!x||x===2&&!!_,a(m)}}}class NYe{constructor(){this.map=[]}add(e,t,n){EYe(this,e,t,n)}consume(e){if(this.map.sort(function(r,o){return r[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let s=n.pop();for(;s;){for(const r of s)e.push(r);s=n.pop()}this.map.length=0}}function EYe(i,e,t,n){let s=0;if(!(t===0&&n.length===0)){for(;s-1;){const $=n.events[j][1].type;if($==="lineEnding"||$==="linePrefix")j--;else break}const B=j>-1?n.events[j][1].type:null,U=B==="tableHead"||B==="tableRow"?D:l;return U===D&&n.parser.lazy[n.now().line]?t(P):U(P)}function l(P){return i.enter("tableHead"),i.enter("tableRow"),c(P)}function c(P){return P===124||(o=!0,r+=1),u(P)}function u(P){return P===null?t(P):In(P)?r>1?(r=0,n.interrupt=!0,i.exit("tableRow"),i.enter("lineEnding"),i.consume(P),i.exit("lineEnding"),f):t(P):Bi(P)?ds(i,u,"whitespace")(P):(r+=1,o&&(o=!1,s+=1),P===124?(i.enter("tableCellDivider"),i.consume(P),i.exit("tableCellDivider"),o=!0,u):(i.enter("data"),h(P)))}function h(P){return P===null||P===124||Er(P)?(i.exit("data"),u(P)):(i.consume(P),P===92?g:h)}function g(P){return P===92||P===124?(i.consume(P),h):h(P)}function f(P){return n.interrupt=!1,n.parser.lazy[n.now().line]?t(P):(i.enter("tableDelimiterRow"),o=!1,Bi(P)?ds(i,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):m(P))}function m(P){return P===45||P===58?v(P):P===124?(o=!0,i.enter("tableCellDivider"),i.consume(P),i.exit("tableCellDivider"),x):E(P)}function x(P){return Bi(P)?ds(i,v,"whitespace")(P):v(P)}function v(P){return P===58?(r+=1,o=!0,i.enter("tableDelimiterMarker"),i.consume(P),i.exit("tableDelimiterMarker"),_):P===45?(r+=1,_(P)):P===null||In(P)?C(P):E(P)}function _(P){return P===45?(i.enter("tableDelimiterFiller"),w(P)):E(P)}function w(P){return P===45?(i.consume(P),w):P===58?(o=!0,i.exit("tableDelimiterFiller"),i.enter("tableDelimiterMarker"),i.consume(P),i.exit("tableDelimiterMarker"),k):(i.exit("tableDelimiterFiller"),k(P))}function k(P){return Bi(P)?ds(i,C,"whitespace")(P):C(P)}function C(P){return P===124?m(P):P===null||In(P)?!o||s!==r?E(P):(i.exit("tableDelimiterRow"),i.exit("tableHead"),e(P)):E(P)}function E(P){return t(P)}function D(P){return i.enter("tableRow"),T(P)}function T(P){return P===124?(i.enter("tableCellDivider"),i.consume(P),i.exit("tableCellDivider"),T):P===null||In(P)?(i.exit("tableRow"),e(P)):Bi(P)?ds(i,T,"whitespace")(P):(i.enter("data"),I(P))}function I(P){return P===null||P===124||Er(P)?(i.exit("data"),T(P)):(i.consume(P),P===92?R:I)}function R(P){return P===92||P===124?(i.consume(P),I):I(P)}}function IYe(i,e){let t=-1,n=!0,s=0,r=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,u,h;const g=new NYe;for(;++tt[2]+1){const m=t[2]+1,x=t[3]-t[2]-1;i.add(m,x,[])}}i.add(t[3]+1,0,[["exit",h,e]])}return s!==void 0&&(r.end=Object.assign({},fk(e.events,s)),i.add(s,0,[["exit",r,e]]),r=void 0),r}function Yfe(i,e,t,n,s){const r=[],o=fk(e.events,t);s&&(s.end=Object.assign({},o),r.push(["exit",s,e])),n.end=Object.assign({},o),r.push(["exit",n,e]),i.add(t+1,0,r)}function fk(i,e){const t=i[e],n=t[0]==="enter"?"start":"end";return t[1][n]}const AYe={name:"tasklistCheck",tokenize:MYe};function RYe(){return{text:{91:AYe}}}function MYe(i,e,t){const n=this;return s;function s(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?t(l):(i.enter("taskListCheck"),i.enter("taskListCheckMarker"),i.consume(l),i.exit("taskListCheckMarker"),r)}function r(l){return Er(l)?(i.enter("taskListCheckValueUnchecked"),i.consume(l),i.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(i.enter("taskListCheckValueChecked"),i.consume(l),i.exit("taskListCheckValueChecked"),o):t(l)}function o(l){return l===93?(i.enter("taskListCheckMarker"),i.consume(l),i.exit("taskListCheckMarker"),i.exit("taskListCheck"),a):t(l)}function a(l){return In(l)?e(l):Bi(l)?i.check({tokenize:PYe},e,t)(l):t(l)}}function PYe(i,e,t){return ds(i,n,"whitespace");function n(s){return s===null?t(s):e(s)}}function OYe(i){return Ake([aYe(),bYe(),kYe(i),DYe(),RYe()])}const jYe={};function _se(i){const e=this,t=i||jYe,n=e.data(),s=n.micromarkExtensions||(n.micromarkExtensions=[]),r=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);s.push(OYe(t)),r.push(iYe()),o.push(sYe(t))}const Qfe=/[#.]/g;function FYe(i,e){const t=i||"",n={};let s=0,r,o;for(;s-1&&r<=e.length){let o=0;for(;;){let a=t[o];if(a===void 0){const l=Zfe(e,t[o-1]);a=l===-1?e.length+1:l+1,t[o]=a}if(a>r)return{line:o+1,column:r-(o>0?t[o-1]:0)+1,offset:r};o++}}}function s(r){if(r&&typeof r.line=="number"&&typeof r.column=="number"&&!Number.isNaN(r.line)&&!Number.isNaN(r.column)){for(;t.length1?t[r.line-2]:0)+r.column-1;if(o=55296&&i<=57343}function cQe(i){return i>=56320&&i<=57343}function dQe(i,e){return(i-55296)*1024+9216+e}function LNe(i){return i!==32&&i!==10&&i!==13&&i!==9&&i!==12&&i>=1&&i<=31||i>=127&&i<=159}function DNe(i){return i>=64976&&i<=65007||lQe.has(i)}var Je;(function(i){i.controlCharacterInInputStream="control-character-in-input-stream",i.noncharacterInInputStream="noncharacter-in-input-stream",i.surrogateInInputStream="surrogate-in-input-stream",i.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",i.endTagWithAttributes="end-tag-with-attributes",i.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",i.unexpectedSolidusInTag="unexpected-solidus-in-tag",i.unexpectedNullCharacter="unexpected-null-character",i.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",i.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",i.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",i.missingEndTagName="missing-end-tag-name",i.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",i.unknownNamedCharacterReference="unknown-named-character-reference",i.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",i.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",i.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",i.eofBeforeTagName="eof-before-tag-name",i.eofInTag="eof-in-tag",i.missingAttributeValue="missing-attribute-value",i.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",i.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",i.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",i.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",i.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",i.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",i.missingDoctypePublicIdentifier="missing-doctype-public-identifier",i.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",i.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",i.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",i.cdataInHtmlContent="cdata-in-html-content",i.incorrectlyOpenedComment="incorrectly-opened-comment",i.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",i.eofInDoctype="eof-in-doctype",i.nestedComment="nested-comment",i.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",i.eofInComment="eof-in-comment",i.incorrectlyClosedComment="incorrectly-closed-comment",i.eofInCdata="eof-in-cdata",i.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",i.nullCharacterReference="null-character-reference",i.surrogateCharacterReference="surrogate-character-reference",i.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",i.controlCharacterReference="control-character-reference",i.noncharacterCharacterReference="noncharacter-character-reference",i.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",i.missingDoctypeName="missing-doctype-name",i.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",i.duplicateAttribute="duplicate-attribute",i.nonConformingDoctype="non-conforming-doctype",i.missingDoctype="missing-doctype",i.misplacedDoctype="misplaced-doctype",i.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",i.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",i.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",i.openElementsLeftAfterEof="open-elements-left-after-eof",i.abandonedHeadElementChild="abandoned-head-element-child",i.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",i.nestedNoscriptInHead="nested-noscript-in-head",i.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Je||(Je={}));const uQe=65536;class hQe{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=uQe,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:s,offset:r}=this,o=s+t,a=r+t;return{code:e,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:a,endOffset:a}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(cQe(t))return this.pos++,this._addGap(),dQe(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,ae.EOF;return this._err(Je.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ae.EOF;const n=this.html.charCodeAt(t);return n===ae.CARRIAGE_RETURN?ae.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ae.EOF;let e=this.html.charCodeAt(this.pos);return e===ae.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,ae.LINE_FEED):e===ae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ENe(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===ae.LINE_FEED||e===ae.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){LNe(e)?this._err(Je.controlCharacterInInputStream):DNe(e)&&this._err(Je.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;t--)if(i.attrs[t].name===e)return i.attrs[t].value;return null}const gQe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(i=>i.charCodeAt(0))),fQe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function pQe(i){var e;return i>=55296&&i<=57343||i>1114111?65533:(e=fQe.get(i))!==null&&e!==void 0?e:i}var Qa;(function(i){i[i.NUM=35]="NUM",i[i.SEMI=59]="SEMI",i[i.EQUALS=61]="EQUALS",i[i.ZERO=48]="ZERO",i[i.NINE=57]="NINE",i[i.LOWER_A=97]="LOWER_A",i[i.LOWER_F=102]="LOWER_F",i[i.LOWER_X=120]="LOWER_X",i[i.LOWER_Z=122]="LOWER_Z",i[i.UPPER_A=65]="UPPER_A",i[i.UPPER_F=70]="UPPER_F",i[i.UPPER_Z=90]="UPPER_Z"})(Qa||(Qa={}));const mQe=32;var yv;(function(i){i[i.VALUE_LENGTH=49152]="VALUE_LENGTH",i[i.BRANCH_LENGTH=16256]="BRANCH_LENGTH",i[i.JUMP_TABLE=127]="JUMP_TABLE"})(yv||(yv={}));function TG(i){return i>=Qa.ZERO&&i<=Qa.NINE}function bQe(i){return i>=Qa.UPPER_A&&i<=Qa.UPPER_F||i>=Qa.LOWER_A&&i<=Qa.LOWER_F}function xQe(i){return i>=Qa.UPPER_A&&i<=Qa.UPPER_Z||i>=Qa.LOWER_A&&i<=Qa.LOWER_Z||TG(i)}function vQe(i){return i===Qa.EQUALS||xQe(i)}var Ba;(function(i){i[i.EntityStart=0]="EntityStart",i[i.NumericStart=1]="NumericStart",i[i.NumericDecimal=2]="NumericDecimal",i[i.NumericHex=3]="NumericHex",i[i.NamedEntity=4]="NamedEntity"})(Ba||(Ba={}));var jm;(function(i){i[i.Legacy=0]="Legacy",i[i.Strict=1]="Strict",i[i.Attribute=2]="Attribute"})(jm||(jm={}));class _Qe{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=Ba.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=jm.Strict}startEntity(e){this.decodeMode=e,this.state=Ba.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case Ba.EntityStart:return e.charCodeAt(t)===Qa.NUM?(this.state=Ba.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Ba.NamedEntity,this.stateNamedEntity(e,t));case Ba.NumericStart:return this.stateNumericStart(e,t);case Ba.NumericDecimal:return this.stateNumericDecimal(e,t);case Ba.NumericHex:return this.stateNumericHex(e,t);case Ba.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|mQe)===Qa.LOWER_X?(this.state=Ba.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Ba.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,s){if(t!==n){const r=n-t;this.result=this.result*Math.pow(s,r)+Number.parseInt(e.substr(t,r),s),this.consumed+=r}}stateNumericHex(e,t){const n=t;for(;t>14;for(;t>14,r!==0){if(o===Qa.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==jm.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,s=(n[t]&yv.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,s,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:s}=this;return this.emitCodePoint(t===1?s[e]&~yv.VALUE_LENGTH:s[e+1],n),t===3&&this.emitCodePoint(s[e+2],n),n}end(){var e;switch(this.state){case Ba.NamedEntity:return this.result!==0&&(this.decodeMode!==jm.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ba.NumericDecimal:return this.emitNumericEntity(0,2);case Ba.NumericHex:return this.emitNumericEntity(0,3);case Ba.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ba.EntityStart:return 0}}}function yQe(i,e,t,n){const s=(e&yv.BRANCH_LENGTH)>>7,r=e&yv.JUMP_TABLE;if(s===0)return r!==0&&n===r?t:-1;if(r){const l=n-r;return l<0||l>=s?-1:i[t+l]-1}let o=t,a=o+s-1;for(;o<=a;){const l=o+a>>>1,c=i[l];if(cn)a=l-1;else return i[l+s]}return-1}var bt;(function(i){i.HTML="http://www.w3.org/1999/xhtml",i.MATHML="http://www.w3.org/1998/Math/MathML",i.SVG="http://www.w3.org/2000/svg",i.XLINK="http://www.w3.org/1999/xlink",i.XML="http://www.w3.org/XML/1998/namespace",i.XMLNS="http://www.w3.org/2000/xmlns/"})(bt||(bt={}));var d1;(function(i){i.TYPE="type",i.ACTION="action",i.ENCODING="encoding",i.PROMPT="prompt",i.NAME="name",i.COLOR="color",i.FACE="face",i.SIZE="size"})(d1||(d1={}));var hh;(function(i){i.NO_QUIRKS="no-quirks",i.QUIRKS="quirks",i.LIMITED_QUIRKS="limited-quirks"})(hh||(hh={}));var Me;(function(i){i.A="a",i.ADDRESS="address",i.ANNOTATION_XML="annotation-xml",i.APPLET="applet",i.AREA="area",i.ARTICLE="article",i.ASIDE="aside",i.B="b",i.BASE="base",i.BASEFONT="basefont",i.BGSOUND="bgsound",i.BIG="big",i.BLOCKQUOTE="blockquote",i.BODY="body",i.BR="br",i.BUTTON="button",i.CAPTION="caption",i.CENTER="center",i.CODE="code",i.COL="col",i.COLGROUP="colgroup",i.DD="dd",i.DESC="desc",i.DETAILS="details",i.DIALOG="dialog",i.DIR="dir",i.DIV="div",i.DL="dl",i.DT="dt",i.EM="em",i.EMBED="embed",i.FIELDSET="fieldset",i.FIGCAPTION="figcaption",i.FIGURE="figure",i.FONT="font",i.FOOTER="footer",i.FOREIGN_OBJECT="foreignObject",i.FORM="form",i.FRAME="frame",i.FRAMESET="frameset",i.H1="h1",i.H2="h2",i.H3="h3",i.H4="h4",i.H5="h5",i.H6="h6",i.HEAD="head",i.HEADER="header",i.HGROUP="hgroup",i.HR="hr",i.HTML="html",i.I="i",i.IMG="img",i.IMAGE="image",i.INPUT="input",i.IFRAME="iframe",i.KEYGEN="keygen",i.LABEL="label",i.LI="li",i.LINK="link",i.LISTING="listing",i.MAIN="main",i.MALIGNMARK="malignmark",i.MARQUEE="marquee",i.MATH="math",i.MENU="menu",i.META="meta",i.MGLYPH="mglyph",i.MI="mi",i.MO="mo",i.MN="mn",i.MS="ms",i.MTEXT="mtext",i.NAV="nav",i.NOBR="nobr",i.NOFRAMES="noframes",i.NOEMBED="noembed",i.NOSCRIPT="noscript",i.OBJECT="object",i.OL="ol",i.OPTGROUP="optgroup",i.OPTION="option",i.P="p",i.PARAM="param",i.PLAINTEXT="plaintext",i.PRE="pre",i.RB="rb",i.RP="rp",i.RT="rt",i.RTC="rtc",i.RUBY="ruby",i.S="s",i.SCRIPT="script",i.SEARCH="search",i.SECTION="section",i.SELECT="select",i.SOURCE="source",i.SMALL="small",i.SPAN="span",i.STRIKE="strike",i.STRONG="strong",i.STYLE="style",i.SUB="sub",i.SUMMARY="summary",i.SUP="sup",i.TABLE="table",i.TBODY="tbody",i.TEMPLATE="template",i.TEXTAREA="textarea",i.TFOOT="tfoot",i.TD="td",i.TH="th",i.THEAD="thead",i.TITLE="title",i.TR="tr",i.TRACK="track",i.TT="tt",i.U="u",i.UL="ul",i.SVG="svg",i.VAR="var",i.WBR="wbr",i.XMP="xmp"})(Me||(Me={}));var O;(function(i){i[i.UNKNOWN=0]="UNKNOWN",i[i.A=1]="A",i[i.ADDRESS=2]="ADDRESS",i[i.ANNOTATION_XML=3]="ANNOTATION_XML",i[i.APPLET=4]="APPLET",i[i.AREA=5]="AREA",i[i.ARTICLE=6]="ARTICLE",i[i.ASIDE=7]="ASIDE",i[i.B=8]="B",i[i.BASE=9]="BASE",i[i.BASEFONT=10]="BASEFONT",i[i.BGSOUND=11]="BGSOUND",i[i.BIG=12]="BIG",i[i.BLOCKQUOTE=13]="BLOCKQUOTE",i[i.BODY=14]="BODY",i[i.BR=15]="BR",i[i.BUTTON=16]="BUTTON",i[i.CAPTION=17]="CAPTION",i[i.CENTER=18]="CENTER",i[i.CODE=19]="CODE",i[i.COL=20]="COL",i[i.COLGROUP=21]="COLGROUP",i[i.DD=22]="DD",i[i.DESC=23]="DESC",i[i.DETAILS=24]="DETAILS",i[i.DIALOG=25]="DIALOG",i[i.DIR=26]="DIR",i[i.DIV=27]="DIV",i[i.DL=28]="DL",i[i.DT=29]="DT",i[i.EM=30]="EM",i[i.EMBED=31]="EMBED",i[i.FIELDSET=32]="FIELDSET",i[i.FIGCAPTION=33]="FIGCAPTION",i[i.FIGURE=34]="FIGURE",i[i.FONT=35]="FONT",i[i.FOOTER=36]="FOOTER",i[i.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",i[i.FORM=38]="FORM",i[i.FRAME=39]="FRAME",i[i.FRAMESET=40]="FRAMESET",i[i.H1=41]="H1",i[i.H2=42]="H2",i[i.H3=43]="H3",i[i.H4=44]="H4",i[i.H5=45]="H5",i[i.H6=46]="H6",i[i.HEAD=47]="HEAD",i[i.HEADER=48]="HEADER",i[i.HGROUP=49]="HGROUP",i[i.HR=50]="HR",i[i.HTML=51]="HTML",i[i.I=52]="I",i[i.IMG=53]="IMG",i[i.IMAGE=54]="IMAGE",i[i.INPUT=55]="INPUT",i[i.IFRAME=56]="IFRAME",i[i.KEYGEN=57]="KEYGEN",i[i.LABEL=58]="LABEL",i[i.LI=59]="LI",i[i.LINK=60]="LINK",i[i.LISTING=61]="LISTING",i[i.MAIN=62]="MAIN",i[i.MALIGNMARK=63]="MALIGNMARK",i[i.MARQUEE=64]="MARQUEE",i[i.MATH=65]="MATH",i[i.MENU=66]="MENU",i[i.META=67]="META",i[i.MGLYPH=68]="MGLYPH",i[i.MI=69]="MI",i[i.MO=70]="MO",i[i.MN=71]="MN",i[i.MS=72]="MS",i[i.MTEXT=73]="MTEXT",i[i.NAV=74]="NAV",i[i.NOBR=75]="NOBR",i[i.NOFRAMES=76]="NOFRAMES",i[i.NOEMBED=77]="NOEMBED",i[i.NOSCRIPT=78]="NOSCRIPT",i[i.OBJECT=79]="OBJECT",i[i.OL=80]="OL",i[i.OPTGROUP=81]="OPTGROUP",i[i.OPTION=82]="OPTION",i[i.P=83]="P",i[i.PARAM=84]="PARAM",i[i.PLAINTEXT=85]="PLAINTEXT",i[i.PRE=86]="PRE",i[i.RB=87]="RB",i[i.RP=88]="RP",i[i.RT=89]="RT",i[i.RTC=90]="RTC",i[i.RUBY=91]="RUBY",i[i.S=92]="S",i[i.SCRIPT=93]="SCRIPT",i[i.SEARCH=94]="SEARCH",i[i.SECTION=95]="SECTION",i[i.SELECT=96]="SELECT",i[i.SOURCE=97]="SOURCE",i[i.SMALL=98]="SMALL",i[i.SPAN=99]="SPAN",i[i.STRIKE=100]="STRIKE",i[i.STRONG=101]="STRONG",i[i.STYLE=102]="STYLE",i[i.SUB=103]="SUB",i[i.SUMMARY=104]="SUMMARY",i[i.SUP=105]="SUP",i[i.TABLE=106]="TABLE",i[i.TBODY=107]="TBODY",i[i.TEMPLATE=108]="TEMPLATE",i[i.TEXTAREA=109]="TEXTAREA",i[i.TFOOT=110]="TFOOT",i[i.TD=111]="TD",i[i.TH=112]="TH",i[i.THEAD=113]="THEAD",i[i.TITLE=114]="TITLE",i[i.TR=115]="TR",i[i.TRACK=116]="TRACK",i[i.TT=117]="TT",i[i.U=118]="U",i[i.UL=119]="UL",i[i.SVG=120]="SVG",i[i.VAR=121]="VAR",i[i.WBR=122]="WBR",i[i.XMP=123]="XMP"})(O||(O={}));const wQe=new Map([[Me.A,O.A],[Me.ADDRESS,O.ADDRESS],[Me.ANNOTATION_XML,O.ANNOTATION_XML],[Me.APPLET,O.APPLET],[Me.AREA,O.AREA],[Me.ARTICLE,O.ARTICLE],[Me.ASIDE,O.ASIDE],[Me.B,O.B],[Me.BASE,O.BASE],[Me.BASEFONT,O.BASEFONT],[Me.BGSOUND,O.BGSOUND],[Me.BIG,O.BIG],[Me.BLOCKQUOTE,O.BLOCKQUOTE],[Me.BODY,O.BODY],[Me.BR,O.BR],[Me.BUTTON,O.BUTTON],[Me.CAPTION,O.CAPTION],[Me.CENTER,O.CENTER],[Me.CODE,O.CODE],[Me.COL,O.COL],[Me.COLGROUP,O.COLGROUP],[Me.DD,O.DD],[Me.DESC,O.DESC],[Me.DETAILS,O.DETAILS],[Me.DIALOG,O.DIALOG],[Me.DIR,O.DIR],[Me.DIV,O.DIV],[Me.DL,O.DL],[Me.DT,O.DT],[Me.EM,O.EM],[Me.EMBED,O.EMBED],[Me.FIELDSET,O.FIELDSET],[Me.FIGCAPTION,O.FIGCAPTION],[Me.FIGURE,O.FIGURE],[Me.FONT,O.FONT],[Me.FOOTER,O.FOOTER],[Me.FOREIGN_OBJECT,O.FOREIGN_OBJECT],[Me.FORM,O.FORM],[Me.FRAME,O.FRAME],[Me.FRAMESET,O.FRAMESET],[Me.H1,O.H1],[Me.H2,O.H2],[Me.H3,O.H3],[Me.H4,O.H4],[Me.H5,O.H5],[Me.H6,O.H6],[Me.HEAD,O.HEAD],[Me.HEADER,O.HEADER],[Me.HGROUP,O.HGROUP],[Me.HR,O.HR],[Me.HTML,O.HTML],[Me.I,O.I],[Me.IMG,O.IMG],[Me.IMAGE,O.IMAGE],[Me.INPUT,O.INPUT],[Me.IFRAME,O.IFRAME],[Me.KEYGEN,O.KEYGEN],[Me.LABEL,O.LABEL],[Me.LI,O.LI],[Me.LINK,O.LINK],[Me.LISTING,O.LISTING],[Me.MAIN,O.MAIN],[Me.MALIGNMARK,O.MALIGNMARK],[Me.MARQUEE,O.MARQUEE],[Me.MATH,O.MATH],[Me.MENU,O.MENU],[Me.META,O.META],[Me.MGLYPH,O.MGLYPH],[Me.MI,O.MI],[Me.MO,O.MO],[Me.MN,O.MN],[Me.MS,O.MS],[Me.MTEXT,O.MTEXT],[Me.NAV,O.NAV],[Me.NOBR,O.NOBR],[Me.NOFRAMES,O.NOFRAMES],[Me.NOEMBED,O.NOEMBED],[Me.NOSCRIPT,O.NOSCRIPT],[Me.OBJECT,O.OBJECT],[Me.OL,O.OL],[Me.OPTGROUP,O.OPTGROUP],[Me.OPTION,O.OPTION],[Me.P,O.P],[Me.PARAM,O.PARAM],[Me.PLAINTEXT,O.PLAINTEXT],[Me.PRE,O.PRE],[Me.RB,O.RB],[Me.RP,O.RP],[Me.RT,O.RT],[Me.RTC,O.RTC],[Me.RUBY,O.RUBY],[Me.S,O.S],[Me.SCRIPT,O.SCRIPT],[Me.SEARCH,O.SEARCH],[Me.SECTION,O.SECTION],[Me.SELECT,O.SELECT],[Me.SOURCE,O.SOURCE],[Me.SMALL,O.SMALL],[Me.SPAN,O.SPAN],[Me.STRIKE,O.STRIKE],[Me.STRONG,O.STRONG],[Me.STYLE,O.STYLE],[Me.SUB,O.SUB],[Me.SUMMARY,O.SUMMARY],[Me.SUP,O.SUP],[Me.TABLE,O.TABLE],[Me.TBODY,O.TBODY],[Me.TEMPLATE,O.TEMPLATE],[Me.TEXTAREA,O.TEXTAREA],[Me.TFOOT,O.TFOOT],[Me.TD,O.TD],[Me.TH,O.TH],[Me.THEAD,O.THEAD],[Me.TITLE,O.TITLE],[Me.TR,O.TR],[Me.TRACK,O.TRACK],[Me.TT,O.TT],[Me.U,O.U],[Me.UL,O.UL],[Me.SVG,O.SVG],[Me.VAR,O.VAR],[Me.WBR,O.WBR],[Me.XMP,O.XMP]]);function HL(i){var e;return(e=wQe.get(i))!==null&&e!==void 0?e:O.UNKNOWN}const _t=O,CQe={[bt.HTML]:new Set([_t.ADDRESS,_t.APPLET,_t.AREA,_t.ARTICLE,_t.ASIDE,_t.BASE,_t.BASEFONT,_t.BGSOUND,_t.BLOCKQUOTE,_t.BODY,_t.BR,_t.BUTTON,_t.CAPTION,_t.CENTER,_t.COL,_t.COLGROUP,_t.DD,_t.DETAILS,_t.DIR,_t.DIV,_t.DL,_t.DT,_t.EMBED,_t.FIELDSET,_t.FIGCAPTION,_t.FIGURE,_t.FOOTER,_t.FORM,_t.FRAME,_t.FRAMESET,_t.H1,_t.H2,_t.H3,_t.H4,_t.H5,_t.H6,_t.HEAD,_t.HEADER,_t.HGROUP,_t.HR,_t.HTML,_t.IFRAME,_t.IMG,_t.INPUT,_t.LI,_t.LINK,_t.LISTING,_t.MAIN,_t.MARQUEE,_t.MENU,_t.META,_t.NAV,_t.NOEMBED,_t.NOFRAMES,_t.NOSCRIPT,_t.OBJECT,_t.OL,_t.P,_t.PARAM,_t.PLAINTEXT,_t.PRE,_t.SCRIPT,_t.SECTION,_t.SELECT,_t.SOURCE,_t.STYLE,_t.SUMMARY,_t.TABLE,_t.TBODY,_t.TD,_t.TEMPLATE,_t.TEXTAREA,_t.TFOOT,_t.TH,_t.THEAD,_t.TITLE,_t.TR,_t.TRACK,_t.UL,_t.WBR,_t.XMP]),[bt.MATHML]:new Set([_t.MI,_t.MO,_t.MN,_t.MS,_t.MTEXT,_t.ANNOTATION_XML]),[bt.SVG]:new Set([_t.TITLE,_t.FOREIGN_OBJECT,_t.DESC]),[bt.XLINK]:new Set,[bt.XML]:new Set,[bt.XMLNS]:new Set},IG=new Set([_t.H1,_t.H2,_t.H3,_t.H4,_t.H5,_t.H6]);Me.STYLE,Me.SCRIPT,Me.XMP,Me.IFRAME,Me.NOEMBED,Me.NOFRAMES,Me.PLAINTEXT;var ce;(function(i){i[i.DATA=0]="DATA",i[i.RCDATA=1]="RCDATA",i[i.RAWTEXT=2]="RAWTEXT",i[i.SCRIPT_DATA=3]="SCRIPT_DATA",i[i.PLAINTEXT=4]="PLAINTEXT",i[i.TAG_OPEN=5]="TAG_OPEN",i[i.END_TAG_OPEN=6]="END_TAG_OPEN",i[i.TAG_NAME=7]="TAG_NAME",i[i.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",i[i.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",i[i.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",i[i.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",i[i.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",i[i.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",i[i.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",i[i.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",i[i.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",i[i.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",i[i.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",i[i.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",i[i.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",i[i.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",i[i.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",i[i.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",i[i.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",i[i.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",i[i.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",i[i.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",i[i.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",i[i.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",i[i.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",i[i.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",i[i.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",i[i.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",i[i.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",i[i.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",i[i.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",i[i.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",i[i.BOGUS_COMMENT=40]="BOGUS_COMMENT",i[i.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",i[i.COMMENT_START=42]="COMMENT_START",i[i.COMMENT_START_DASH=43]="COMMENT_START_DASH",i[i.COMMENT=44]="COMMENT",i[i.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",i[i.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",i[i.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",i[i.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",i[i.COMMENT_END_DASH=49]="COMMENT_END_DASH",i[i.COMMENT_END=50]="COMMENT_END",i[i.COMMENT_END_BANG=51]="COMMENT_END_BANG",i[i.DOCTYPE=52]="DOCTYPE",i[i.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",i[i.DOCTYPE_NAME=54]="DOCTYPE_NAME",i[i.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",i[i.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",i[i.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",i[i.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",i[i.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",i[i.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",i[i.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",i[i.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",i[i.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",i[i.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",i[i.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",i[i.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",i[i.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",i[i.CDATA_SECTION=68]="CDATA_SECTION",i[i.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",i[i.CDATA_SECTION_END=70]="CDATA_SECTION_END",i[i.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",i[i.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(ce||(ce={}));const Bo={DATA:ce.DATA,RCDATA:ce.RCDATA,RAWTEXT:ce.RAWTEXT,SCRIPT_DATA:ce.SCRIPT_DATA,PLAINTEXT:ce.PLAINTEXT,CDATA_SECTION:ce.CDATA_SECTION};function SQe(i){return i>=ae.DIGIT_0&&i<=ae.DIGIT_9}function p2(i){return i>=ae.LATIN_CAPITAL_A&&i<=ae.LATIN_CAPITAL_Z}function kQe(i){return i>=ae.LATIN_SMALL_A&&i<=ae.LATIN_SMALL_Z}function Ox(i){return kQe(i)||p2(i)}function epe(i){return Ox(i)||SQe(i)}function x5(i){return i+32}function INe(i){return i===ae.SPACE||i===ae.LINE_FEED||i===ae.TABULATION||i===ae.FORM_FEED}function tpe(i){return INe(i)||i===ae.SOLIDUS||i===ae.GREATER_THAN_SIGN}function NQe(i){return i===ae.NULL?Je.nullCharacterReference:i>1114111?Je.characterReferenceOutsideUnicodeRange:ENe(i)?Je.surrogateCharacterReference:DNe(i)?Je.noncharacterCharacterReference:LNe(i)||i===ae.CARRIAGE_RETURN?Je.controlCharacterReference:null}class EQe{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=ce.DATA,this.returnState=ce.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new hQe(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new _Qe(gQe,(n,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(n)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Je.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(Je.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const s=NQe(n);s&&this._err(s,1)}}:void 0)}_err(e,t=0){var n,s;(s=(n=this.handler).onParseError)===null||s===void 0||s.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n==null||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(Je.endTagWithAttributes),e.selfClosing&&this._err(Je.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Di.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Di.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Di.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Di.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){const t=INe(e)?Di.WHITESPACE_CHARACTER:e===ae.NULL?Di.NULL_CHARACTER:Di.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Di.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=ce.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?jm.Attribute:jm.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===ce.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===ce.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case ce.DATA:{this._stateData(e);break}case ce.RCDATA:{this._stateRcdata(e);break}case ce.RAWTEXT:{this._stateRawtext(e);break}case ce.SCRIPT_DATA:{this._stateScriptData(e);break}case ce.PLAINTEXT:{this._statePlaintext(e);break}case ce.TAG_OPEN:{this._stateTagOpen(e);break}case ce.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case ce.TAG_NAME:{this._stateTagName(e);break}case ce.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case ce.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case ce.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case ce.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case ce.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case ce.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case ce.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case ce.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case ce.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case ce.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case ce.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case ce.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case ce.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case ce.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case ce.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case ce.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case ce.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case ce.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case ce.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case ce.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case ce.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case ce.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case ce.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case ce.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case ce.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case ce.BOGUS_COMMENT:{this._stateBogusComment(e);break}case ce.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case ce.COMMENT_START:{this._stateCommentStart(e);break}case ce.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case ce.COMMENT:{this._stateComment(e);break}case ce.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case ce.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case ce.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case ce.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case ce.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case ce.COMMENT_END:{this._stateCommentEnd(e);break}case ce.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case ce.DOCTYPE:{this._stateDoctype(e);break}case ce.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case ce.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case ce.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case ce.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case ce.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case ce.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case ce.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case ce.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case ce.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case ce.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case ce.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case ce.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case ce.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case ce.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case ce.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case ce.CDATA_SECTION:{this._stateCdataSection(e);break}case ce.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case ce.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case ce.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case ce.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case ae.LESS_THAN_SIGN:{this.state=ce.TAG_OPEN;break}case ae.AMPERSAND:{this._startCharacterReference();break}case ae.NULL:{this._err(Je.unexpectedNullCharacter),this._emitCodePoint(e);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case ae.AMPERSAND:{this._startCharacterReference();break}case ae.LESS_THAN_SIGN:{this.state=ce.RCDATA_LESS_THAN_SIGN;break}case ae.NULL:{this._err(Je.unexpectedNullCharacter),this._emitChars(Gr);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case ae.LESS_THAN_SIGN:{this.state=ce.RAWTEXT_LESS_THAN_SIGN;break}case ae.NULL:{this._err(Je.unexpectedNullCharacter),this._emitChars(Gr);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case ae.LESS_THAN_SIGN:{this.state=ce.SCRIPT_DATA_LESS_THAN_SIGN;break}case ae.NULL:{this._err(Je.unexpectedNullCharacter),this._emitChars(Gr);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case ae.NULL:{this._err(Je.unexpectedNullCharacter),this._emitChars(Gr);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Ox(e))this._createStartTagToken(),this.state=ce.TAG_NAME,this._stateTagName(e);else switch(e){case ae.EXCLAMATION_MARK:{this.state=ce.MARKUP_DECLARATION_OPEN;break}case ae.SOLIDUS:{this.state=ce.END_TAG_OPEN;break}case ae.QUESTION_MARK:{this._err(Je.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=ce.BOGUS_COMMENT,this._stateBogusComment(e);break}case ae.EOF:{this._err(Je.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Je.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=ce.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Ox(e))this._createEndTagToken(),this.state=ce.TAG_NAME,this._stateTagName(e);else switch(e){case ae.GREATER_THAN_SIGN:{this._err(Je.missingEndTagName),this.state=ce.DATA;break}case ae.EOF:{this._err(Je.eofBeforeTagName),this._emitChars("");break}case ae.NULL:{this._err(Je.unexpectedNullCharacter),this.state=ce.SCRIPT_DATA_ESCAPED,this._emitChars(Gr);break}case ae.EOF:{this._err(Je.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ce.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===ae.SOLIDUS?this.state=ce.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ox(e)?(this._emitChars("<"),this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Ox(e)?(this.state=ce.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break}case ae.NULL:{this._err(Je.unexpectedNullCharacter),this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Gr);break}case ae.EOF:{this._err(Je.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===ae.SOLIDUS?(this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Jc.SCRIPT,!1)&&tpe(this.preprocessor.peek(Jc.SCRIPT.length))){this._emitCodePoint(e);for(let t=0;t0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const s=this._indexOf(e)+1;this.items.splice(s,0,t),this.tagIDs.splice(s,0,n),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==bt.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(AQe,bt.HTML)}clearBackToTableBodyContext(){this.clearBackTo(IQe,bt.HTML)}clearBackToTableRowContext(){this.clearBackTo(TQe,bt.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===O.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===O.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const s=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case bt.HTML:{if(s===e)return!0;if(t.has(s))return!1;break}case bt.SVG:{if(spe.has(s))return!1;break}case bt.MATHML:{if(ipe.has(s))return!1;break}}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Lj)}hasInListItemScope(e){return this.hasInDynamicScope(e,LQe)}hasInButtonScope(e){return this.hasInDynamicScope(e,DQe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case bt.HTML:{if(IG.has(t))return!0;if(Lj.has(t))return!1;break}case bt.SVG:{if(spe.has(t))return!1;break}case bt.MATHML:{if(ipe.has(t))return!1;break}}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===bt.HTML)switch(this.tagIDs[t]){case e:return!0;case O.TABLE:case O.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===bt.HTML)switch(this.tagIDs[e]){case O.TBODY:case O.THEAD:case O.TFOOT:return!0;case O.TABLE:case O.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===bt.HTML)switch(this.tagIDs[t]){case e:return!0;case O.OPTION:case O.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&ANe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&npe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&npe.has(this.currentTagId);)this.pop()}}const yU=3;var wf;(function(i){i[i.Marker=0]="Marker",i[i.Element=1]="Element"})(wf||(wf={}));const rpe={type:wf.Marker};class PQe{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],s=t.length,r=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let a=0;a[o.name,o.value]));let r=0;for(let o=0;os.get(l.name)===l.value)&&(r+=1,r>=yU&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(rpe)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:wf.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:wf.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(rpe);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find(n=>n.type===wf.Marker||this.treeAdapter.getTagName(n.element)===e);return t&&t.type===wf.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===wf.Element&&t.element===e)}}const jx={createDocument(){return{nodeName:"#document",mode:hh.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(i,e,t){return{nodeName:i,tagName:i,attrs:t,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(i){return{nodeName:"#comment",data:i,parentNode:null}},createTextNode(i){return{nodeName:"#text",value:i,parentNode:null}},appendChild(i,e){i.childNodes.push(e),e.parentNode=i},insertBefore(i,e,t){const n=i.childNodes.indexOf(t);i.childNodes.splice(n,0,e),e.parentNode=i},setTemplateContent(i,e){i.content=e},getTemplateContent(i){return i.content},setDocumentType(i,e,t,n){const s=i.childNodes.find(r=>r.nodeName==="#documentType");if(s)s.name=e,s.publicId=t,s.systemId=n;else{const r={nodeName:"#documentType",name:e,publicId:t,systemId:n,parentNode:null};jx.appendChild(i,r)}},setDocumentMode(i,e){i.mode=e},getDocumentMode(i){return i.mode},detachNode(i){if(i.parentNode){const e=i.parentNode.childNodes.indexOf(i);i.parentNode.childNodes.splice(e,1),i.parentNode=null}},insertText(i,e){if(i.childNodes.length>0){const t=i.childNodes[i.childNodes.length-1];if(jx.isTextNode(t)){t.value+=e;return}}jx.appendChild(i,jx.createTextNode(e))},insertTextBefore(i,e,t){const n=i.childNodes[i.childNodes.indexOf(t)-1];n&&jx.isTextNode(n)?n.value+=e:jx.insertBefore(i,jx.createTextNode(e),t)},adoptAttributes(i,e){const t=new Set(i.attrs.map(n=>n.name));for(let n=0;ni.startsWith(t))}function WQe(i){return i.name===RNe&&i.publicId===null&&(i.systemId===null||i.systemId===OQe)}function VQe(i){if(i.name!==RNe)return hh.QUIRKS;const{systemId:e}=i;if(e&&e.toLowerCase()===jQe)return hh.QUIRKS;let{publicId:t}=i;if(t!==null){if(t=t.toLowerCase(),BQe.has(t))return hh.QUIRKS;let n=e===null?FQe:MNe;if(ope(t,n))return hh.QUIRKS;if(n=e===null?PNe:HQe,ope(t,n))return hh.LIMITED_QUIRKS}return hh.NO_QUIRKS}const ape={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},zQe="definitionurl",UQe="definitionURL",$Qe=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(i=>[i.toLowerCase(),i])),qQe=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:bt.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:bt.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:bt.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:bt.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:bt.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:bt.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:bt.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:bt.XML}],["xml:space",{prefix:"xml",name:"space",namespace:bt.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:bt.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:bt.XMLNS}]]),KQe=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(i=>[i.toLowerCase(),i])),GQe=new Set([O.B,O.BIG,O.BLOCKQUOTE,O.BODY,O.BR,O.CENTER,O.CODE,O.DD,O.DIV,O.DL,O.DT,O.EM,O.EMBED,O.H1,O.H2,O.H3,O.H4,O.H5,O.H6,O.HEAD,O.HR,O.I,O.IMG,O.LI,O.LISTING,O.MENU,O.META,O.NOBR,O.OL,O.P,O.PRE,O.RUBY,O.S,O.SMALL,O.SPAN,O.STRONG,O.STRIKE,O.SUB,O.SUP,O.TABLE,O.TT,O.U,O.UL,O.VAR]);function YQe(i){const e=i.tagID;return e===O.FONT&&i.attrs.some(({name:n})=>n===d1.COLOR||n===d1.SIZE||n===d1.FACE)||GQe.has(e)}function ONe(i){for(let e=0;e0&&this._setContextModes(e,t)}onItemPop(e,t){var n,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(s=(n=this.treeAdapter).onItemPop)===null||s===void 0||s.call(n,e,this.openElements.current),t){let r,o;this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,o=this.fragmentContextID):{current:r,currentTagId:o}=this.openElements,this._setContextModes(r,o)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===bt.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,bt.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=fe.TEXT}switchToPlaintextParsing(){this.insertionMode=fe.TEXT,this.originalInsertionMode=fe.IN_BODY,this.tokenizer.state=Bo.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Me.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==bt.HTML))switch(this.fragmentContextID){case O.TITLE:case O.TEXTAREA:{this.tokenizer.state=Bo.RCDATA;break}case O.STYLE:case O.XMP:case O.IFRAME:case O.NOEMBED:case O.NOFRAMES:case O.NOSCRIPT:{this.tokenizer.state=Bo.RAWTEXT;break}case O.SCRIPT:{this.tokenizer.state=Bo.SCRIPT_DATA;break}case O.PLAINTEXT:{this.tokenizer.state=Bo.PLAINTEXT;break}}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",s=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,s),e.location){const o=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));o&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,bt.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,bt.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(Me.HTML,bt.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,O.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const s=this.treeAdapter.getChildNodes(t),r=n?s.lastIndexOf(n):s.length,o=s[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:l,endCol:c,endOffset:u}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:l,endCol:c,endOffset:u})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,s=this.treeAdapter.getTagName(e),r=t.type===Di.END_TAG&&s===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,r)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===O.SVG&&this.treeAdapter.getTagName(t)===Me.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===bt.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===O.MGLYPH||e.tagID===O.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,bt.HTML)}_processToken(e){switch(e.type){case Di.CHARACTER:{this.onCharacter(e);break}case Di.NULL_CHARACTER:{this.onNullCharacter(e);break}case Di.COMMENT:{this.onComment(e);break}case Di.DOCTYPE:{this.onDoctype(e);break}case Di.START_TAG:{this._processStartTag(e);break}case Di.END_TAG:{this.onEndTag(e);break}case Di.EOF:{this.onEof(e);break}case Di.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,t,n){const s=this.treeAdapter.getNamespaceURI(t),r=this.treeAdapter.getAttrList(t);return JQe(e,s,r,n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex(s=>s.type===wf.Marker||this.openElements.contains(s.element)),n=t===-1?e-1:t-1;for(let s=n;s>=0;s--){const r=this.activeFormattingElements.entries[s];this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=fe.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(O.P),this.openElements.popUntilTagNamePopped(O.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case O.TR:{this.insertionMode=fe.IN_ROW;return}case O.TBODY:case O.THEAD:case O.TFOOT:{this.insertionMode=fe.IN_TABLE_BODY;return}case O.CAPTION:{this.insertionMode=fe.IN_CAPTION;return}case O.COLGROUP:{this.insertionMode=fe.IN_COLUMN_GROUP;return}case O.TABLE:{this.insertionMode=fe.IN_TABLE;return}case O.BODY:{this.insertionMode=fe.IN_BODY;return}case O.FRAMESET:{this.insertionMode=fe.IN_FRAMESET;return}case O.SELECT:{this._resetInsertionModeForSelect(e);return}case O.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case O.HTML:{this.insertionMode=this.headElement?fe.AFTER_HEAD:fe.BEFORE_HEAD;return}case O.TD:case O.TH:{if(e>0){this.insertionMode=fe.IN_CELL;return}break}case O.HEAD:{if(e>0){this.insertionMode=fe.IN_HEAD;return}break}}this.insertionMode=fe.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const n=this.openElements.tagIDs[t];if(n===O.TEMPLATE)break;if(n===O.TABLE){this.insertionMode=fe.IN_SELECT_IN_TABLE;return}}this.insertionMode=fe.IN_SELECT}_isElementCausesFosterParenting(e){return FNe.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case O.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(t)===bt.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break}case O.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return CQe[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){RZe(this,e);return}switch(this.insertionMode){case fe.INITIAL:{_T(this,e);break}case fe.BEFORE_HTML:{W2(this,e);break}case fe.BEFORE_HEAD:{V2(this,e);break}case fe.IN_HEAD:{z2(this,e);break}case fe.IN_HEAD_NO_SCRIPT:{U2(this,e);break}case fe.AFTER_HEAD:{$2(this,e);break}case fe.IN_BODY:case fe.IN_CAPTION:case fe.IN_CELL:case fe.IN_TEMPLATE:{HNe(this,e);break}case fe.TEXT:case fe.IN_SELECT:case fe.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case fe.IN_TABLE:case fe.IN_TABLE_BODY:case fe.IN_ROW:{wU(this,e);break}case fe.IN_TABLE_TEXT:{qNe(this,e);break}case fe.IN_COLUMN_GROUP:{Dj(this,e);break}case fe.AFTER_BODY:{Tj(this,e);break}case fe.AFTER_AFTER_BODY:{y4(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){AZe(this,e);return}switch(this.insertionMode){case fe.INITIAL:{_T(this,e);break}case fe.BEFORE_HTML:{W2(this,e);break}case fe.BEFORE_HEAD:{V2(this,e);break}case fe.IN_HEAD:{z2(this,e);break}case fe.IN_HEAD_NO_SCRIPT:{U2(this,e);break}case fe.AFTER_HEAD:{$2(this,e);break}case fe.TEXT:{this._insertCharacters(e);break}case fe.IN_TABLE:case fe.IN_TABLE_BODY:case fe.IN_ROW:{wU(this,e);break}case fe.IN_COLUMN_GROUP:{Dj(this,e);break}case fe.AFTER_BODY:{Tj(this,e);break}case fe.AFTER_AFTER_BODY:{y4(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){AG(this,e);return}switch(this.insertionMode){case fe.INITIAL:case fe.BEFORE_HTML:case fe.BEFORE_HEAD:case fe.IN_HEAD:case fe.IN_HEAD_NO_SCRIPT:case fe.AFTER_HEAD:case fe.IN_BODY:case fe.IN_TABLE:case fe.IN_CAPTION:case fe.IN_COLUMN_GROUP:case fe.IN_TABLE_BODY:case fe.IN_ROW:case fe.IN_CELL:case fe.IN_SELECT:case fe.IN_SELECT_IN_TABLE:case fe.IN_TEMPLATE:case fe.IN_FRAMESET:case fe.AFTER_FRAMESET:{AG(this,e);break}case fe.IN_TABLE_TEXT:{yT(this,e);break}case fe.AFTER_BODY:{dXe(this,e);break}case fe.AFTER_AFTER_BODY:case fe.AFTER_AFTER_FRAMESET:{uXe(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case fe.INITIAL:{hXe(this,e);break}case fe.BEFORE_HEAD:case fe.IN_HEAD:case fe.IN_HEAD_NO_SCRIPT:case fe.AFTER_HEAD:{this._err(e,Je.misplacedDoctype);break}case fe.IN_TABLE_TEXT:{yT(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Je.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?MZe(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case fe.INITIAL:{_T(this,e);break}case fe.BEFORE_HTML:{gXe(this,e);break}case fe.BEFORE_HEAD:{pXe(this,e);break}case fe.IN_HEAD:{Pg(this,e);break}case fe.IN_HEAD_NO_SCRIPT:{xXe(this,e);break}case fe.AFTER_HEAD:{_Xe(this,e);break}case fe.IN_BODY:{dc(this,e);break}case fe.IN_TABLE:{HE(this,e);break}case fe.IN_TABLE_TEXT:{yT(this,e);break}case fe.IN_CAPTION:{mZe(this,e);break}case fe.IN_COLUMN_GROUP:{Nse(this,e);break}case fe.IN_TABLE_BODY:{N7(this,e);break}case fe.IN_ROW:{E7(this,e);break}case fe.IN_CELL:{vZe(this,e);break}case fe.IN_SELECT:{YNe(this,e);break}case fe.IN_SELECT_IN_TABLE:{yZe(this,e);break}case fe.IN_TEMPLATE:{CZe(this,e);break}case fe.AFTER_BODY:{kZe(this,e);break}case fe.IN_FRAMESET:{NZe(this,e);break}case fe.AFTER_FRAMESET:{LZe(this,e);break}case fe.AFTER_AFTER_BODY:{TZe(this,e);break}case fe.AFTER_AFTER_FRAMESET:{IZe(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?PZe(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case fe.INITIAL:{_T(this,e);break}case fe.BEFORE_HTML:{fXe(this,e);break}case fe.BEFORE_HEAD:{mXe(this,e);break}case fe.IN_HEAD:{bXe(this,e);break}case fe.IN_HEAD_NO_SCRIPT:{vXe(this,e);break}case fe.AFTER_HEAD:{yXe(this,e);break}case fe.IN_BODY:{k7(this,e);break}case fe.TEXT:{oZe(this,e);break}case fe.IN_TABLE:{_A(this,e);break}case fe.IN_TABLE_TEXT:{yT(this,e);break}case fe.IN_CAPTION:{bZe(this,e);break}case fe.IN_COLUMN_GROUP:{xZe(this,e);break}case fe.IN_TABLE_BODY:{RG(this,e);break}case fe.IN_ROW:{GNe(this,e);break}case fe.IN_CELL:{_Ze(this,e);break}case fe.IN_SELECT:{QNe(this,e);break}case fe.IN_SELECT_IN_TABLE:{wZe(this,e);break}case fe.IN_TEMPLATE:{SZe(this,e);break}case fe.AFTER_BODY:{ZNe(this,e);break}case fe.IN_FRAMESET:{EZe(this,e);break}case fe.AFTER_FRAMESET:{DZe(this,e);break}case fe.AFTER_AFTER_BODY:{y4(this,e);break}}}onEof(e){switch(this.insertionMode){case fe.INITIAL:{_T(this,e);break}case fe.BEFORE_HTML:{W2(this,e);break}case fe.BEFORE_HEAD:{V2(this,e);break}case fe.IN_HEAD:{z2(this,e);break}case fe.IN_HEAD_NO_SCRIPT:{U2(this,e);break}case fe.AFTER_HEAD:{$2(this,e);break}case fe.IN_BODY:case fe.IN_TABLE:case fe.IN_CAPTION:case fe.IN_COLUMN_GROUP:case fe.IN_TABLE_BODY:case fe.IN_ROW:case fe.IN_CELL:case fe.IN_SELECT:case fe.IN_SELECT_IN_TABLE:{UNe(this,e);break}case fe.TEXT:{aZe(this,e);break}case fe.IN_TABLE_TEXT:{yT(this,e);break}case fe.IN_TEMPLATE:{XNe(this,e);break}case fe.AFTER_BODY:case fe.IN_FRAMESET:case fe.AFTER_FRAMESET:case fe.AFTER_AFTER_BODY:case fe.AFTER_AFTER_FRAMESET:{kse(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===ae.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case fe.IN_HEAD:case fe.IN_HEAD_NO_SCRIPT:case fe.AFTER_HEAD:case fe.TEXT:case fe.IN_COLUMN_GROUP:case fe.IN_SELECT:case fe.IN_SELECT_IN_TABLE:case fe.IN_FRAMESET:case fe.AFTER_FRAMESET:{this._insertCharacters(e);break}case fe.IN_BODY:case fe.IN_CAPTION:case fe.IN_CELL:case fe.IN_TEMPLATE:case fe.AFTER_BODY:case fe.AFTER_AFTER_BODY:case fe.AFTER_AFTER_FRAMESET:{BNe(this,e);break}case fe.IN_TABLE:case fe.IN_TABLE_BODY:case fe.IN_ROW:{wU(this,e);break}case fe.IN_TABLE_TEXT:{$Ne(this,e);break}}}};function sXe(i,e){let t=i.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return t?i.openElements.contains(t.element)?i.openElements.hasInScope(e.tagID)||(t=null):(i.activeFormattingElements.removeEntry(t),t=null):zNe(i,e),t}function rXe(i,e){let t=null,n=i.openElements.stackTop;for(;n>=0;n--){const s=i.openElements.items[n];if(s===e.element)break;i._isSpecialElement(s,i.openElements.tagIDs[n])&&(t=s)}return t||(i.openElements.shortenToLength(Math.max(n,0)),i.activeFormattingElements.removeEntry(e)),t}function oXe(i,e,t){let n=e,s=i.openElements.getCommonAncestor(e);for(let r=0,o=s;o!==t;r++,o=s){s=i.openElements.getCommonAncestor(o);const a=i.activeFormattingElements.getElementEntry(o),l=a&&r>=nXe;!a||l?(l&&i.activeFormattingElements.removeEntry(a),i.openElements.remove(o)):(o=aXe(i,a),n===e&&(i.activeFormattingElements.bookmark=a),i.treeAdapter.detachNode(n),i.treeAdapter.appendChild(o,n),n=o)}return n}function aXe(i,e){const t=i.treeAdapter.getNamespaceURI(e.element),n=i.treeAdapter.createElement(e.token.tagName,t,e.token.attrs);return i.openElements.replace(e.element,n),e.element=n,n}function lXe(i,e,t){const n=i.treeAdapter.getTagName(e),s=HL(n);if(i._isElementCausesFosterParenting(s))i._fosterParentElement(t);else{const r=i.treeAdapter.getNamespaceURI(e);s===O.TEMPLATE&&r===bt.HTML&&(e=i.treeAdapter.getTemplateContent(e)),i.treeAdapter.appendChild(e,t)}}function cXe(i,e,t){const n=i.treeAdapter.getNamespaceURI(t.element),{token:s}=t,r=i.treeAdapter.createElement(s.tagName,n,s.attrs);i._adoptNodes(e,r),i.treeAdapter.appendChild(e,r),i.activeFormattingElements.insertElementAfterBookmark(r,s),i.activeFormattingElements.removeEntry(t),i.openElements.remove(t.element),i.openElements.insertAfter(e,r,s.tagID)}function Sse(i,e){for(let t=0;t=t;n--)i._setEndLocation(i.openElements.items[n],e);if(!i.fragmentContext&&i.openElements.stackTop>=0){const n=i.openElements.items[0],s=i.treeAdapter.getNodeSourceCodeLocation(n);if(s&&!s.endTag&&(i._setEndLocation(n,e),i.openElements.stackTop>=1)){const r=i.openElements.items[1],o=i.treeAdapter.getNodeSourceCodeLocation(r);o&&!o.endTag&&i._setEndLocation(r,e)}}}}function hXe(i,e){i._setDocumentType(e);const t=e.forceQuirks?hh.QUIRKS:VQe(e);WQe(e)||i._err(e,Je.nonConformingDoctype),i.treeAdapter.setDocumentMode(i.document,t),i.insertionMode=fe.BEFORE_HTML}function _T(i,e){i._err(e,Je.missingDoctype,!0),i.treeAdapter.setDocumentMode(i.document,hh.QUIRKS),i.insertionMode=fe.BEFORE_HTML,i._processToken(e)}function gXe(i,e){e.tagID===O.HTML?(i._insertElement(e,bt.HTML),i.insertionMode=fe.BEFORE_HEAD):W2(i,e)}function fXe(i,e){const t=e.tagID;(t===O.HTML||t===O.HEAD||t===O.BODY||t===O.BR)&&W2(i,e)}function W2(i,e){i._insertFakeRootElement(),i.insertionMode=fe.BEFORE_HEAD,i._processToken(e)}function pXe(i,e){switch(e.tagID){case O.HTML:{dc(i,e);break}case O.HEAD:{i._insertElement(e,bt.HTML),i.headElement=i.openElements.current,i.insertionMode=fe.IN_HEAD;break}default:V2(i,e)}}function mXe(i,e){const t=e.tagID;t===O.HEAD||t===O.BODY||t===O.HTML||t===O.BR?V2(i,e):i._err(e,Je.endTagWithoutMatchingOpenElement)}function V2(i,e){i._insertFakeElement(Me.HEAD,O.HEAD),i.headElement=i.openElements.current,i.insertionMode=fe.IN_HEAD,i._processToken(e)}function Pg(i,e){switch(e.tagID){case O.HTML:{dc(i,e);break}case O.BASE:case O.BASEFONT:case O.BGSOUND:case O.LINK:case O.META:{i._appendElement(e,bt.HTML),e.ackSelfClosing=!0;break}case O.TITLE:{i._switchToTextParsing(e,Bo.RCDATA);break}case O.NOSCRIPT:{i.options.scriptingEnabled?i._switchToTextParsing(e,Bo.RAWTEXT):(i._insertElement(e,bt.HTML),i.insertionMode=fe.IN_HEAD_NO_SCRIPT);break}case O.NOFRAMES:case O.STYLE:{i._switchToTextParsing(e,Bo.RAWTEXT);break}case O.SCRIPT:{i._switchToTextParsing(e,Bo.SCRIPT_DATA);break}case O.TEMPLATE:{i._insertTemplate(e),i.activeFormattingElements.insertMarker(),i.framesetOk=!1,i.insertionMode=fe.IN_TEMPLATE,i.tmplInsertionModeStack.unshift(fe.IN_TEMPLATE);break}case O.HEAD:{i._err(e,Je.misplacedStartTagForHeadElement);break}default:z2(i,e)}}function bXe(i,e){switch(e.tagID){case O.HEAD:{i.openElements.pop(),i.insertionMode=fe.AFTER_HEAD;break}case O.BODY:case O.BR:case O.HTML:{z2(i,e);break}case O.TEMPLATE:{yC(i,e);break}default:i._err(e,Je.endTagWithoutMatchingOpenElement)}}function yC(i,e){i.openElements.tmplCount>0?(i.openElements.generateImpliedEndTagsThoroughly(),i.openElements.currentTagId!==O.TEMPLATE&&i._err(e,Je.closingOfElementWithOpenChildElements),i.openElements.popUntilTagNamePopped(O.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i.tmplInsertionModeStack.shift(),i._resetInsertionMode()):i._err(e,Je.endTagWithoutMatchingOpenElement)}function z2(i,e){i.openElements.pop(),i.insertionMode=fe.AFTER_HEAD,i._processToken(e)}function xXe(i,e){switch(e.tagID){case O.HTML:{dc(i,e);break}case O.BASEFONT:case O.BGSOUND:case O.HEAD:case O.LINK:case O.META:case O.NOFRAMES:case O.STYLE:{Pg(i,e);break}case O.NOSCRIPT:{i._err(e,Je.nestedNoscriptInHead);break}default:U2(i,e)}}function vXe(i,e){switch(e.tagID){case O.NOSCRIPT:{i.openElements.pop(),i.insertionMode=fe.IN_HEAD;break}case O.BR:{U2(i,e);break}default:i._err(e,Je.endTagWithoutMatchingOpenElement)}}function U2(i,e){const t=e.type===Di.EOF?Je.openElementsLeftAfterEof:Je.disallowedContentInNoscriptInHead;i._err(e,t),i.openElements.pop(),i.insertionMode=fe.IN_HEAD,i._processToken(e)}function _Xe(i,e){switch(e.tagID){case O.HTML:{dc(i,e);break}case O.BODY:{i._insertElement(e,bt.HTML),i.framesetOk=!1,i.insertionMode=fe.IN_BODY;break}case O.FRAMESET:{i._insertElement(e,bt.HTML),i.insertionMode=fe.IN_FRAMESET;break}case O.BASE:case O.BASEFONT:case O.BGSOUND:case O.LINK:case O.META:case O.NOFRAMES:case O.SCRIPT:case O.STYLE:case O.TEMPLATE:case O.TITLE:{i._err(e,Je.abandonedHeadElementChild),i.openElements.push(i.headElement,O.HEAD),Pg(i,e),i.openElements.remove(i.headElement);break}case O.HEAD:{i._err(e,Je.misplacedStartTagForHeadElement);break}default:$2(i,e)}}function yXe(i,e){switch(e.tagID){case O.BODY:case O.HTML:case O.BR:{$2(i,e);break}case O.TEMPLATE:{yC(i,e);break}default:i._err(e,Je.endTagWithoutMatchingOpenElement)}}function $2(i,e){i._insertFakeElement(Me.BODY,O.BODY),i.insertionMode=fe.IN_BODY,S7(i,e)}function S7(i,e){switch(e.type){case Di.CHARACTER:{HNe(i,e);break}case Di.WHITESPACE_CHARACTER:{BNe(i,e);break}case Di.COMMENT:{AG(i,e);break}case Di.START_TAG:{dc(i,e);break}case Di.END_TAG:{k7(i,e);break}case Di.EOF:{UNe(i,e);break}}}function BNe(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e)}function HNe(i,e){i._reconstructActiveFormattingElements(),i._insertCharacters(e),i.framesetOk=!1}function wXe(i,e){i.openElements.tmplCount===0&&i.treeAdapter.adoptAttributes(i.openElements.items[0],e.attrs)}function CXe(i,e){const t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i.openElements.tmplCount===0&&(i.framesetOk=!1,i.treeAdapter.adoptAttributes(t,e.attrs))}function SXe(i,e){const t=i.openElements.tryPeekProperlyNestedBodyElement();i.framesetOk&&t&&(i.treeAdapter.detachNode(t),i.openElements.popAllUpToHtmlElement(),i._insertElement(e,bt.HTML),i.insertionMode=fe.IN_FRAMESET)}function kXe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML)}function NXe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i.openElements.currentTagId!==void 0&&IG.has(i.openElements.currentTagId)&&i.openElements.pop(),i._insertElement(e,bt.HTML)}function EXe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML),i.skipNextNewLine=!0,i.framesetOk=!1}function LXe(i,e){const t=i.openElements.tmplCount>0;(!i.formElement||t)&&(i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML),t||(i.formElement=i.openElements.current))}function DXe(i,e){i.framesetOk=!1;const t=e.tagID;for(let n=i.openElements.stackTop;n>=0;n--){const s=i.openElements.tagIDs[n];if(t===O.LI&&s===O.LI||(t===O.DD||t===O.DT)&&(s===O.DD||s===O.DT)){i.openElements.generateImpliedEndTagsWithExclusion(s),i.openElements.popUntilTagNamePopped(s);break}if(s!==O.ADDRESS&&s!==O.DIV&&s!==O.P&&i._isSpecialElement(i.openElements.items[n],s))break}i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML)}function TXe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML),i.tokenizer.state=Bo.PLAINTEXT}function IXe(i,e){i.openElements.hasInScope(O.BUTTON)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(O.BUTTON)),i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML),i.framesetOk=!1}function AXe(i,e){const t=i.activeFormattingElements.getElementEntryInScopeWithTagName(Me.A);t&&(Sse(i,e),i.openElements.remove(t.element),i.activeFormattingElements.removeEntry(t)),i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function RXe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function MXe(i,e){i._reconstructActiveFormattingElements(),i.openElements.hasInScope(O.NOBR)&&(Sse(i,e),i._reconstructActiveFormattingElements()),i._insertElement(e,bt.HTML),i.activeFormattingElements.pushElement(i.openElements.current,e)}function PXe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML),i.activeFormattingElements.insertMarker(),i.framesetOk=!1}function OXe(i,e){i.treeAdapter.getDocumentMode(i.document)!==hh.QUIRKS&&i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._insertElement(e,bt.HTML),i.framesetOk=!1,i.insertionMode=fe.IN_TABLE}function WNe(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,bt.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function VNe(i){const e=TNe(i,d1.TYPE);return e!=null&&e.toLowerCase()===eXe}function jXe(i,e){i._reconstructActiveFormattingElements(),i._appendElement(e,bt.HTML),VNe(e)||(i.framesetOk=!1),e.ackSelfClosing=!0}function FXe(i,e){i._appendElement(e,bt.HTML),e.ackSelfClosing=!0}function BXe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._appendElement(e,bt.HTML),i.framesetOk=!1,e.ackSelfClosing=!0}function HXe(i,e){e.tagName=Me.IMG,e.tagID=O.IMG,WNe(i,e)}function WXe(i,e){i._insertElement(e,bt.HTML),i.skipNextNewLine=!0,i.tokenizer.state=Bo.RCDATA,i.originalInsertionMode=i.insertionMode,i.framesetOk=!1,i.insertionMode=fe.TEXT}function VXe(i,e){i.openElements.hasInButtonScope(O.P)&&i._closePElement(),i._reconstructActiveFormattingElements(),i.framesetOk=!1,i._switchToTextParsing(e,Bo.RAWTEXT)}function zXe(i,e){i.framesetOk=!1,i._switchToTextParsing(e,Bo.RAWTEXT)}function dpe(i,e){i._switchToTextParsing(e,Bo.RAWTEXT)}function UXe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML),i.framesetOk=!1,i.insertionMode=i.insertionMode===fe.IN_TABLE||i.insertionMode===fe.IN_CAPTION||i.insertionMode===fe.IN_TABLE_BODY||i.insertionMode===fe.IN_ROW||i.insertionMode===fe.IN_CELL?fe.IN_SELECT_IN_TABLE:fe.IN_SELECT}function $Xe(i,e){i.openElements.currentTagId===O.OPTION&&i.openElements.pop(),i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML)}function qXe(i,e){i.openElements.hasInScope(O.RUBY)&&i.openElements.generateImpliedEndTags(),i._insertElement(e,bt.HTML)}function KXe(i,e){i.openElements.hasInScope(O.RUBY)&&i.openElements.generateImpliedEndTagsWithExclusion(O.RTC),i._insertElement(e,bt.HTML)}function GXe(i,e){i._reconstructActiveFormattingElements(),ONe(e),Cse(e),e.selfClosing?i._appendElement(e,bt.MATHML):i._insertElement(e,bt.MATHML),e.ackSelfClosing=!0}function YXe(i,e){i._reconstructActiveFormattingElements(),jNe(e),Cse(e),e.selfClosing?i._appendElement(e,bt.SVG):i._insertElement(e,bt.SVG),e.ackSelfClosing=!0}function upe(i,e){i._reconstructActiveFormattingElements(),i._insertElement(e,bt.HTML)}function dc(i,e){switch(e.tagID){case O.I:case O.S:case O.B:case O.U:case O.EM:case O.TT:case O.BIG:case O.CODE:case O.FONT:case O.SMALL:case O.STRIKE:case O.STRONG:{RXe(i,e);break}case O.A:{AXe(i,e);break}case O.H1:case O.H2:case O.H3:case O.H4:case O.H5:case O.H6:{NXe(i,e);break}case O.P:case O.DL:case O.OL:case O.UL:case O.DIV:case O.DIR:case O.NAV:case O.MAIN:case O.MENU:case O.ASIDE:case O.CENTER:case O.FIGURE:case O.FOOTER:case O.HEADER:case O.HGROUP:case O.DIALOG:case O.DETAILS:case O.ADDRESS:case O.ARTICLE:case O.SEARCH:case O.SECTION:case O.SUMMARY:case O.FIELDSET:case O.BLOCKQUOTE:case O.FIGCAPTION:{kXe(i,e);break}case O.LI:case O.DD:case O.DT:{DXe(i,e);break}case O.BR:case O.IMG:case O.WBR:case O.AREA:case O.EMBED:case O.KEYGEN:{WNe(i,e);break}case O.HR:{BXe(i,e);break}case O.RB:case O.RTC:{qXe(i,e);break}case O.RT:case O.RP:{KXe(i,e);break}case O.PRE:case O.LISTING:{EXe(i,e);break}case O.XMP:{VXe(i,e);break}case O.SVG:{YXe(i,e);break}case O.HTML:{wXe(i,e);break}case O.BASE:case O.LINK:case O.META:case O.STYLE:case O.TITLE:case O.SCRIPT:case O.BGSOUND:case O.BASEFONT:case O.TEMPLATE:{Pg(i,e);break}case O.BODY:{CXe(i,e);break}case O.FORM:{LXe(i,e);break}case O.NOBR:{MXe(i,e);break}case O.MATH:{GXe(i,e);break}case O.TABLE:{OXe(i,e);break}case O.INPUT:{jXe(i,e);break}case O.PARAM:case O.TRACK:case O.SOURCE:{FXe(i,e);break}case O.IMAGE:{HXe(i,e);break}case O.BUTTON:{IXe(i,e);break}case O.APPLET:case O.OBJECT:case O.MARQUEE:{PXe(i,e);break}case O.IFRAME:{zXe(i,e);break}case O.SELECT:{UXe(i,e);break}case O.OPTION:case O.OPTGROUP:{$Xe(i,e);break}case O.NOEMBED:case O.NOFRAMES:{dpe(i,e);break}case O.FRAMESET:{SXe(i,e);break}case O.TEXTAREA:{WXe(i,e);break}case O.NOSCRIPT:{i.options.scriptingEnabled?dpe(i,e):upe(i,e);break}case O.PLAINTEXT:{TXe(i,e);break}case O.COL:case O.TH:case O.TD:case O.TR:case O.HEAD:case O.FRAME:case O.TBODY:case O.TFOOT:case O.THEAD:case O.CAPTION:case O.COLGROUP:break;default:upe(i,e)}}function QXe(i,e){if(i.openElements.hasInScope(O.BODY)&&(i.insertionMode=fe.AFTER_BODY,i.options.sourceCodeLocationInfo)){const t=i.openElements.tryPeekProperlyNestedBodyElement();t&&i._setEndLocation(t,e)}}function XXe(i,e){i.openElements.hasInScope(O.BODY)&&(i.insertionMode=fe.AFTER_BODY,ZNe(i,e))}function ZXe(i,e){const t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t))}function JXe(i){const e=i.openElements.tmplCount>0,{formElement:t}=i;e||(i.formElement=null),(t||e)&&i.openElements.hasInScope(O.FORM)&&(i.openElements.generateImpliedEndTags(),e?i.openElements.popUntilTagNamePopped(O.FORM):t&&i.openElements.remove(t))}function eZe(i){i.openElements.hasInButtonScope(O.P)||i._insertFakeElement(Me.P,O.P),i._closePElement()}function tZe(i){i.openElements.hasInListItemScope(O.LI)&&(i.openElements.generateImpliedEndTagsWithExclusion(O.LI),i.openElements.popUntilTagNamePopped(O.LI))}function nZe(i,e){const t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTagsWithExclusion(t),i.openElements.popUntilTagNamePopped(t))}function iZe(i){i.openElements.hasNumberedHeaderInScope()&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilNumberedHeaderPopped())}function sZe(i,e){const t=e.tagID;i.openElements.hasInScope(t)&&(i.openElements.generateImpliedEndTags(),i.openElements.popUntilTagNamePopped(t),i.activeFormattingElements.clearToLastMarker())}function rZe(i){i._reconstructActiveFormattingElements(),i._insertFakeElement(Me.BR,O.BR),i.openElements.pop(),i.framesetOk=!1}function zNe(i,e){const t=e.tagName,n=e.tagID;for(let s=i.openElements.stackTop;s>0;s--){const r=i.openElements.items[s],o=i.openElements.tagIDs[s];if(n===o&&(n!==O.UNKNOWN||i.treeAdapter.getTagName(r)===t)){i.openElements.generateImpliedEndTagsWithExclusion(n),i.openElements.stackTop>=s&&i.openElements.shortenToLength(s);break}if(i._isSpecialElement(r,o))break}}function k7(i,e){switch(e.tagID){case O.A:case O.B:case O.I:case O.S:case O.U:case O.EM:case O.TT:case O.BIG:case O.CODE:case O.FONT:case O.NOBR:case O.SMALL:case O.STRIKE:case O.STRONG:{Sse(i,e);break}case O.P:{eZe(i);break}case O.DL:case O.UL:case O.OL:case O.DIR:case O.DIV:case O.NAV:case O.PRE:case O.MAIN:case O.MENU:case O.ASIDE:case O.BUTTON:case O.CENTER:case O.FIGURE:case O.FOOTER:case O.HEADER:case O.HGROUP:case O.DIALOG:case O.ADDRESS:case O.ARTICLE:case O.DETAILS:case O.SEARCH:case O.SECTION:case O.SUMMARY:case O.LISTING:case O.FIELDSET:case O.BLOCKQUOTE:case O.FIGCAPTION:{ZXe(i,e);break}case O.LI:{tZe(i);break}case O.DD:case O.DT:{nZe(i,e);break}case O.H1:case O.H2:case O.H3:case O.H4:case O.H5:case O.H6:{iZe(i);break}case O.BR:{rZe(i);break}case O.BODY:{QXe(i,e);break}case O.HTML:{XXe(i,e);break}case O.FORM:{JXe(i);break}case O.APPLET:case O.OBJECT:case O.MARQUEE:{sZe(i,e);break}case O.TEMPLATE:{yC(i,e);break}default:zNe(i,e)}}function UNe(i,e){i.tmplInsertionModeStack.length>0?XNe(i,e):kse(i,e)}function oZe(i,e){var t;e.tagID===O.SCRIPT&&((t=i.scriptHandler)===null||t===void 0||t.call(i,i.openElements.current)),i.openElements.pop(),i.insertionMode=i.originalInsertionMode}function aZe(i,e){i._err(e,Je.eofInElementThatCanContainOnlyText),i.openElements.pop(),i.insertionMode=i.originalInsertionMode,i.onEof(e)}function wU(i,e){if(i.openElements.currentTagId!==void 0&&FNe.has(i.openElements.currentTagId))switch(i.pendingCharacterTokens.length=0,i.hasNonWhitespacePendingCharacterToken=!1,i.originalInsertionMode=i.insertionMode,i.insertionMode=fe.IN_TABLE_TEXT,e.type){case Di.CHARACTER:{qNe(i,e);break}case Di.WHITESPACE_CHARACTER:{$Ne(i,e);break}}else UM(i,e)}function lZe(i,e){i.openElements.clearBackToTableContext(),i.activeFormattingElements.insertMarker(),i._insertElement(e,bt.HTML),i.insertionMode=fe.IN_CAPTION}function cZe(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,bt.HTML),i.insertionMode=fe.IN_COLUMN_GROUP}function dZe(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(Me.COLGROUP,O.COLGROUP),i.insertionMode=fe.IN_COLUMN_GROUP,Nse(i,e)}function uZe(i,e){i.openElements.clearBackToTableContext(),i._insertElement(e,bt.HTML),i.insertionMode=fe.IN_TABLE_BODY}function hZe(i,e){i.openElements.clearBackToTableContext(),i._insertFakeElement(Me.TBODY,O.TBODY),i.insertionMode=fe.IN_TABLE_BODY,N7(i,e)}function gZe(i,e){i.openElements.hasInTableScope(O.TABLE)&&(i.openElements.popUntilTagNamePopped(O.TABLE),i._resetInsertionMode(),i._processStartTag(e))}function fZe(i,e){VNe(e)?i._appendElement(e,bt.HTML):UM(i,e),e.ackSelfClosing=!0}function pZe(i,e){!i.formElement&&i.openElements.tmplCount===0&&(i._insertElement(e,bt.HTML),i.formElement=i.openElements.current,i.openElements.pop())}function HE(i,e){switch(e.tagID){case O.TD:case O.TH:case O.TR:{hZe(i,e);break}case O.STYLE:case O.SCRIPT:case O.TEMPLATE:{Pg(i,e);break}case O.COL:{dZe(i,e);break}case O.FORM:{pZe(i,e);break}case O.TABLE:{gZe(i,e);break}case O.TBODY:case O.TFOOT:case O.THEAD:{uZe(i,e);break}case O.INPUT:{fZe(i,e);break}case O.CAPTION:{lZe(i,e);break}case O.COLGROUP:{cZe(i,e);break}default:UM(i,e)}}function _A(i,e){switch(e.tagID){case O.TABLE:{i.openElements.hasInTableScope(O.TABLE)&&(i.openElements.popUntilTagNamePopped(O.TABLE),i._resetInsertionMode());break}case O.TEMPLATE:{yC(i,e);break}case O.BODY:case O.CAPTION:case O.COL:case O.COLGROUP:case O.HTML:case O.TBODY:case O.TD:case O.TFOOT:case O.TH:case O.THEAD:case O.TR:break;default:UM(i,e)}}function UM(i,e){const t=i.fosterParentingEnabled;i.fosterParentingEnabled=!0,S7(i,e),i.fosterParentingEnabled=t}function $Ne(i,e){i.pendingCharacterTokens.push(e)}function qNe(i,e){i.pendingCharacterTokens.push(e),i.hasNonWhitespacePendingCharacterToken=!0}function yT(i,e){let t=0;if(i.hasNonWhitespacePendingCharacterToken)for(;t0&&i.openElements.currentTagId===O.OPTION&&i.openElements.tagIDs[i.openElements.stackTop-1]===O.OPTGROUP&&i.openElements.pop(),i.openElements.currentTagId===O.OPTGROUP&&i.openElements.pop();break}case O.OPTION:{i.openElements.currentTagId===O.OPTION&&i.openElements.pop();break}case O.SELECT:{i.openElements.hasInSelectScope(O.SELECT)&&(i.openElements.popUntilTagNamePopped(O.SELECT),i._resetInsertionMode());break}case O.TEMPLATE:{yC(i,e);break}}}function yZe(i,e){const t=e.tagID;t===O.CAPTION||t===O.TABLE||t===O.TBODY||t===O.TFOOT||t===O.THEAD||t===O.TR||t===O.TD||t===O.TH?(i.openElements.popUntilTagNamePopped(O.SELECT),i._resetInsertionMode(),i._processStartTag(e)):YNe(i,e)}function wZe(i,e){const t=e.tagID;t===O.CAPTION||t===O.TABLE||t===O.TBODY||t===O.TFOOT||t===O.THEAD||t===O.TR||t===O.TD||t===O.TH?i.openElements.hasInTableScope(t)&&(i.openElements.popUntilTagNamePopped(O.SELECT),i._resetInsertionMode(),i.onEndTag(e)):QNe(i,e)}function CZe(i,e){switch(e.tagID){case O.BASE:case O.BASEFONT:case O.BGSOUND:case O.LINK:case O.META:case O.NOFRAMES:case O.SCRIPT:case O.STYLE:case O.TEMPLATE:case O.TITLE:{Pg(i,e);break}case O.CAPTION:case O.COLGROUP:case O.TBODY:case O.TFOOT:case O.THEAD:{i.tmplInsertionModeStack[0]=fe.IN_TABLE,i.insertionMode=fe.IN_TABLE,HE(i,e);break}case O.COL:{i.tmplInsertionModeStack[0]=fe.IN_COLUMN_GROUP,i.insertionMode=fe.IN_COLUMN_GROUP,Nse(i,e);break}case O.TR:{i.tmplInsertionModeStack[0]=fe.IN_TABLE_BODY,i.insertionMode=fe.IN_TABLE_BODY,N7(i,e);break}case O.TD:case O.TH:{i.tmplInsertionModeStack[0]=fe.IN_ROW,i.insertionMode=fe.IN_ROW,E7(i,e);break}default:i.tmplInsertionModeStack[0]=fe.IN_BODY,i.insertionMode=fe.IN_BODY,dc(i,e)}}function SZe(i,e){e.tagID===O.TEMPLATE&&yC(i,e)}function XNe(i,e){i.openElements.tmplCount>0?(i.openElements.popUntilTagNamePopped(O.TEMPLATE),i.activeFormattingElements.clearToLastMarker(),i.tmplInsertionModeStack.shift(),i._resetInsertionMode(),i.onEof(e)):kse(i,e)}function kZe(i,e){e.tagID===O.HTML?dc(i,e):Tj(i,e)}function ZNe(i,e){var t;if(e.tagID===O.HTML){if(i.fragmentContext||(i.insertionMode=fe.AFTER_AFTER_BODY),i.options.sourceCodeLocationInfo&&i.openElements.tagIDs[0]===O.HTML){i._setEndLocation(i.openElements.items[0],e);const n=i.openElements.items[1];n&&!(!((t=i.treeAdapter.getNodeSourceCodeLocation(n))===null||t===void 0)&&t.endTag)&&i._setEndLocation(n,e)}}else Tj(i,e)}function Tj(i,e){i.insertionMode=fe.IN_BODY,S7(i,e)}function NZe(i,e){switch(e.tagID){case O.HTML:{dc(i,e);break}case O.FRAMESET:{i._insertElement(e,bt.HTML);break}case O.FRAME:{i._appendElement(e,bt.HTML),e.ackSelfClosing=!0;break}case O.NOFRAMES:{Pg(i,e);break}}}function EZe(i,e){e.tagID===O.FRAMESET&&!i.openElements.isRootHtmlElementCurrent()&&(i.openElements.pop(),!i.fragmentContext&&i.openElements.currentTagId!==O.FRAMESET&&(i.insertionMode=fe.AFTER_FRAMESET))}function LZe(i,e){switch(e.tagID){case O.HTML:{dc(i,e);break}case O.NOFRAMES:{Pg(i,e);break}}}function DZe(i,e){e.tagID===O.HTML&&(i.insertionMode=fe.AFTER_AFTER_FRAMESET)}function TZe(i,e){e.tagID===O.HTML?dc(i,e):y4(i,e)}function y4(i,e){i.insertionMode=fe.IN_BODY,S7(i,e)}function IZe(i,e){switch(e.tagID){case O.HTML:{dc(i,e);break}case O.NOFRAMES:{Pg(i,e);break}}}function AZe(i,e){e.chars=Gr,i._insertCharacters(e)}function RZe(i,e){i._insertCharacters(e),i.framesetOk=!1}function JNe(i){for(;i.treeAdapter.getNamespaceURI(i.openElements.current)!==bt.HTML&&i.openElements.currentTagId!==void 0&&!i._isIntegrationPoint(i.openElements.currentTagId,i.openElements.current);)i.openElements.pop()}function MZe(i,e){if(YQe(e))JNe(i),i._startTagOutsideForeignContent(e);else{const t=i._getAdjustedCurrentElement(),n=i.treeAdapter.getNamespaceURI(t);n===bt.MATHML?ONe(e):n===bt.SVG&&(QQe(e),jNe(e)),Cse(e),e.selfClosing?i._appendElement(e,n):i._insertElement(e,n),e.ackSelfClosing=!0}}function PZe(i,e){if(e.tagID===O.P||e.tagID===O.BR){JNe(i),i._endTagOutsideForeignContent(e);return}for(let t=i.openElements.stackTop;t>0;t--){const n=i.openElements.items[t];if(i.treeAdapter.getNamespaceURI(n)===bt.HTML){i._endTagOutsideForeignContent(e);break}const s=i.treeAdapter.getTagName(n);if(s.toLowerCase()===e.tagName){e.tagName=s,i.openElements.shortenToLength(t);break}}}Me.AREA,Me.BASE,Me.BASEFONT,Me.BGSOUND,Me.BR,Me.COL,Me.EMBED,Me.FRAME,Me.HR,Me.IMG,Me.INPUT,Me.KEYGEN,Me.LINK,Me.META,Me.PARAM,Me.SOURCE,Me.TRACK,Me.WBR;const OZe=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,jZe=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),hpe={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function eEe(i,e){const t=KZe(i),n=iNe("type",{handlers:{root:FZe,element:BZe,text:HZe,comment:nEe,doctype:WZe,raw:zZe},unknown:UZe}),s={parser:t?new cpe(hpe):cpe.getFragmentParser(void 0,hpe),handle(a){n(a,s)},stitches:!1,options:e||{}};n(i,s),WL(s,vp());const r=t?s.parser.document:s.parser.getFragment(),o=GYe(r,{file:s.options.file});return s.stitches&&C7(o,"comment",function(a,l,c){const u=a;if(u.value.stitch&&c&&l!==void 0){const h=c.children;return h[l]=u.value.stitch,l}}),o.type==="root"&&o.children.length===1&&o.children[0].type===i.type?o.children[0]:o}function tEe(i,e){let t=-1;if(i)for(;++t4&&(e.parser.tokenizer.state=0);const t={type:Di.CHARACTER,chars:i.value,location:$M(i)};WL(e,vp(i)),e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)}function WZe(i,e){const t={type:Di.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:$M(i)};WL(e,vp(i)),e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)}function VZe(i,e){e.stitches=!0;const t=GZe(i);if("children"in i&&"children"in t){const n=eEe({type:"root",children:i.children},e.options);t.children=n.children}nEe({type:"comment",value:{stitch:t}},e)}function nEe(i,e){const t=i.value,n={type:Di.COMMENT,data:t,location:$M(i)};WL(e,vp(i)),e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)}function zZe(i,e){if(e.parser.tokenizer.preprocessor.html="",e.parser.tokenizer.preprocessor.pos=-1,e.parser.tokenizer.preprocessor.lastGapPos=-2,e.parser.tokenizer.preprocessor.gapStack=[],e.parser.tokenizer.preprocessor.skipNextNewLine=!1,e.parser.tokenizer.preprocessor.lastChunkWritten=!1,e.parser.tokenizer.preprocessor.endOfChunkHit=!1,e.parser.tokenizer.preprocessor.isEol=!1,iEe(e,vp(i)),e.parser.tokenizer.write(e.options.tagfilter?i.value.replace(OZe,"<$1$2"):i.value,!1),e.parser.tokenizer._runParsingLoop(),e.parser.tokenizer.state===72||e.parser.tokenizer.state===78){e.parser.tokenizer.preprocessor.lastChunkWritten=!0;const t=e.parser.tokenizer._consume();e.parser.tokenizer._callState(t)}}function UZe(i,e){const t=i;if(e.options.passThrough&&e.options.passThrough.includes(t.type))VZe(t,e);else{let n="";throw jZe.has(t.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+t.type+"` node"+n)}}function WL(i,e){iEe(i,e);const t=i.parser.tokenizer.currentCharacterToken;t&&t.location&&(t.location.endLine=i.parser.tokenizer.preprocessor.line,t.location.endCol=i.parser.tokenizer.preprocessor.col+1,t.location.endOffset=i.parser.tokenizer.preprocessor.offset+1,i.parser.currentToken=t,i.parser._processToken(i.parser.currentToken)),i.parser.tokenizer.paused=!1,i.parser.tokenizer.inLoop=!1,i.parser.tokenizer.active=!1,i.parser.tokenizer.returnState=Bo.DATA,i.parser.tokenizer.charRefCode=-1,i.parser.tokenizer.consumedAfterSnapshot=-1,i.parser.tokenizer.currentLocation=null,i.parser.tokenizer.currentCharacterToken=null,i.parser.tokenizer.currentToken=null,i.parser.tokenizer.currentAttr={name:"",value:""}}function iEe(i,e){if(e&&e.offset!==void 0){const t={startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:-1,endCol:-1,endOffset:-1};i.parser.tokenizer.preprocessor.lineStartPos=-e.column+1,i.parser.tokenizer.preprocessor.droppedBufferSize=e.offset,i.parser.tokenizer.preprocessor.line=e.line,i.parser.tokenizer.currentLocation=t}}function $Ze(i,e){const t=i.tagName.toLowerCase();if(e.parser.tokenizer.state===Bo.PLAINTEXT)return;WL(e,vp(i));const n=e.parser.openElements.current;let s="namespaceURI"in n?n.namespaceURI:Oy.html;s===Oy.html&&t==="svg"&&(s=Oy.svg);const r=JYe({...i,children:[]},{space:s===Oy.svg?"svg":"html"}),o={type:Di.START_TAG,tagName:t,tagID:HL(t),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in r?r.attrs:[],location:$M(i)};e.parser.currentToken=o,e.parser._processToken(e.parser.currentToken),e.parser.tokenizer.lastStartTagName=t}function qZe(i,e){const t=i.tagName.toLowerCase();if(!e.parser.tokenizer.inForeignNode&&aQe.includes(t)||e.parser.tokenizer.state===Bo.PLAINTEXT)return;WL(e,b7(i));const n={type:Di.END_TAG,tagName:t,tagID:HL(t),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:$M(i)};e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken),t===e.parser.tokenizer.lastStartTagName&&(e.parser.tokenizer.state===Bo.RCDATA||e.parser.tokenizer.state===Bo.RAWTEXT||e.parser.tokenizer.state===Bo.SCRIPT_DATA)&&(e.parser.tokenizer.state=Bo.DATA)}function KZe(i){const e=i.type==="root"?i.children[0]:i;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName.toLowerCase()==="html"))}function $M(i){const e=vp(i)||{line:void 0,column:void 0,offset:void 0},t=b7(i)||{line:void 0,column:void 0,offset:void 0};return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:t.line,endCol:t.column,endOffset:t.offset}}function GZe(i){return"children"in i?BE({...i,children:[]}):BE(i)}function Ese(i){return function(e,t){return eEe(e,{...i,file:t})}}function YZe(i){return new Date(i).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function QZe(i){return new Date(i).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}const sEe=L.memo(function({message:e}){const t=e.role==="user",[n,s]=L.useState(!1);return d.jsxs("div",{className:be("group relative flex gap-3 px-4 py-3",t?"flex-row-reverse":"flex-row"),onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[d.jsx("div",{className:be("flex h-8 w-8 shrink-0 items-center justify-center rounded-full",t?"bg-primary text-primary-foreground":"bg-accent/20 text-accent"),children:t?d.jsx($ie,{className:"h-4 w-4"}):d.jsx(ai,{className:"h-4 w-4"})}),d.jsxs("div",{className:be("flex flex-col gap-1 max-w-[75%]",t&&"items-end"),children:[d.jsx("div",{className:be("rounded-2xl px-4 py-2.5 text-sm leading-relaxed",t?"bg-primary text-primary-foreground rounded-ee-md":"bg-card border border-border text-card-foreground rounded-es-md",e.isStreaming&&"animate-pulse"),children:t?d.jsx("p",{className:"whitespace-pre-wrap",children:e.content}):d.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3 [&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:text-xs",children:e.content?d.jsx(mse,{remarkPlugins:[_se],rehypePlugins:[Ese],children:e.content}):e.isStreaming?d.jsx(ZZe,{}):d.jsx("p",{className:"text-muted-foreground italic",children:"No response"})})}),d.jsxs("div",{className:be("flex items-center gap-1.5 px-1",t?"flex-row-reverse":"flex-row"),children:[d.jsx("span",{className:"text-[10px] text-muted-foreground/60 select-none",title:QZe(e.timestamp),children:YZe(e.timestamp)}),!t&&e.content&&n&&d.jsx(XZe,{content:e.content})]})]})]})});function XZe({content:i}){const[e,t]=L.useState(!1),n=L.useCallback(()=>{navigator.clipboard.writeText(i),t(!0),setTimeout(()=>t(!1),1500)},[i]);return d.jsx("button",{onClick:n,className:be("inline-flex items-center gap-0.5 rounded-md px-1.5 py-0.5 text-[10px] transition-colors",e?"text-emerald-500":"text-muted-foreground/50 hover:text-foreground hover:bg-muted/50"),title:"Copy message","data-testid":"copy-message",children:e?d.jsxs(d.Fragment,{children:[d.jsx(Ns,{className:"h-3 w-3"}),d.jsx("span",{children:"Copied"})]}):d.jsxs(d.Fragment,{children:[d.jsx(mo,{className:"h-3 w-3"}),d.jsx("span",{children:"Copy"})]})})}function ZZe(){const{t:i}=xe();return d.jsxs("div",{className:"flex items-center gap-1 py-1","aria-label":i("chat.agentTyping","Agent is typing"),children:[d.jsx("span",{className:"h-2 w-2 animate-bounce rounded-full bg-muted-foreground/50 [animation-delay:0ms]"}),d.jsx("span",{className:"h-2 w-2 animate-bounce rounded-full bg-muted-foreground/50 [animation-delay:150ms]"}),d.jsx("span",{className:"h-2 w-2 animate-bounce rounded-full bg-muted-foreground/50 [animation-delay:300ms]"})]})}function rEe(){const{t:i}=xe(),e=Oi(n=>n.streamingEnabled),t=Oi(n=>n.toggleStreaming);return d.jsxs("button",{onClick:t,className:be("flex items-center gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs font-medium transition-colors",e?"border-primary/30 bg-primary/10 text-primary":"border-border bg-muted text-muted-foreground"),title:i("chat.streaming"),"aria-label":i("chat.streaming"),"aria-pressed":e,"data-testid":"streaming-toggle",children:[e?d.jsx(nc,{className:"h-3.5 w-3.5"}):d.jsx(bWe,{className:"h-3.5 w-3.5"}),i("chat.streaming")]})}const oEe="/auditstore";async function L7(i,e=0,t=100){return Oe.get(`${oEe}/${i}?skip=${e}&limit=${t}`)}async function JZe(i,e,t=0,n=100){const s=new URLSearchParams({skip:String(t),limit:String(n)});return e!=null&&s.set("agentVersion",String(e)),Oe.get(`${oEe}/agent/${i}?${s.toString()}`)}const eJe={parser:"bg-blue-500/80",expressions:"bg-blue-500/80",behavior:"bg-violet-500/80",rules:"bg-violet-500/80",httpcalls:"bg-amber-500/80",apicalls:"bg-amber-500/80",langchain:"bg-emerald-500/80",llm:"bg-emerald-500/80",output:"bg-rose-500/80",property:"bg-cyan-500/80",propertysetter:"bg-cyan-500/80",mcpcalls:"bg-orange-500/80",dictionary:"bg-indigo-500/80",rag:"bg-teal-500/80"};function tJe(i){const e=i.toLowerCase().replace("ai.labs.","");return eJe[e]??"bg-muted-foreground/60"}function nJe(i){return i.replace("ai.labs.","").replace(/store$/,"")}function iJe({conversationId:i}){const{t:e}=xe(),t=bu(g=>g.turns),n=bu(g=>g.currentTurnEvents),s=bu(g=>g.selectedTurnIndex),r=bu(g=>g.setSelectedTurn),{data:o,isError:a}=hn({queryKey:["audit","debugger",i],queryFn:()=>L7(i,0,200),enabled:!!i&&t.length===0,staleTime:3e4}),l=L.useMemo(()=>o!=null&&o.length?oJe(o):[],[o]),c=t.length>0?t:l,u=s!==null?c[s]:c[c.length-1],h=s===null&&n.length>0;return d.jsxs("div",{className:"flex flex-col gap-3 p-3","data-testid":"pipeline-trace",children:[c.length>1&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:e("debugDrawer.turn","Turn")}),d.jsxs("select",{value:s??"latest",onChange:g=>{const f=g.target.value;r(f==="latest"?null:Number(f))},"aria-label":e("debugDrawer.turn","Turn"),className:"rounded-md border border-input bg-card px-2 py-1 text-xs","data-testid":"turn-selector",children:[d.jsxs("option",{value:"latest",children:[e("debugDrawer.latest","Latest")," (",e("debugDrawer.turn","Turn")," ",c.length,")"]}),c.map((g,f)=>d.jsxs("option",{value:f,children:[e("debugDrawer.turn","Turn")," ",f+1," — ",jE(g.totalDurationMs)]},f))]})]}),a&&c.length===0&&!h&&d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center","data-testid":"pipeline-trace-error",children:[d.jsx(Vi,{className:"h-8 w-8 text-destructive/50"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:e("debugDrawer.pipelineError","Failed to load pipeline trace")})]}),!a||c.length>0||h?h?d.jsx(rJe,{events:n}):u?d.jsx(sJe,{turn:u}):d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[d.jsx(nc,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:e("debugDrawer.noPipeline","Send a message to see the pipeline trace")})]}):null]})}function sJe({turn:i}){const{t:e}=xe(),t=L.useMemo(()=>lEe(i.events),[i.events]),n=Math.max(...t.map(s=>s.durationMs),1);return d.jsxs("div",{className:"space-y-1.5",children:[d.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[d.jsxs("span",{className:"flex items-center gap-1",children:[d.jsx(Zr,{className:"h-3 w-3"}),e("debugDrawer.turn","Turn")," ",i.turnIndex+1]}),d.jsx("span",{className:"font-mono",children:jE(i.totalDurationMs)})]}),t.map((s,r)=>d.jsx(aEe,{task:s,maxDuration:n},r)),i.events.some(s=>{var r;return(r=s.actions)==null?void 0:r.length})&&d.jsxs("div",{className:"flex flex-wrap gap-1 pt-1",children:[d.jsxs("span",{className:"text-[10px] font-medium text-muted-foreground me-1",children:[e("debugDrawer.actions","Actions"),":"]}),i.events.flatMap(s=>s.actions??[]).filter((s,r,o)=>o.indexOf(s)===r).map(s=>d.jsx("span",{className:"rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:s},s))]})]})}function rJe({events:i}){const{t:e}=xe(),t=L.useMemo(()=>lEe(i),[i]),n=Math.max(...t.map(s=>s.durationMs||100),1);return d.jsxs("div",{className:"space-y-1.5",children:[d.jsxs("div",{className:"flex items-center gap-1 text-xs text-primary animate-pulse",children:[d.jsx(nc,{className:"h-3 w-3"}),e("debugDrawer.processing","Processing...")]}),t.map((s,r)=>d.jsx(aEe,{task:s,maxDuration:n},r))]})}function aEe({task:i,maxDuration:e}){var o;const{t}=xe(),[n,s]=L.useState(!1),r=Math.max(i.durationMs/e*100,8);return d.jsxs("div",{children:[d.jsxs("button",{onClick:()=>s(!n),"aria-expanded":n,className:"group flex w-full items-center gap-2 rounded-md px-1 py-0.5 text-start transition-colors hover:bg-muted/50","data-testid":"task-bar",children:[d.jsx("span",{className:"w-20 shrink-0 truncate text-[11px] font-medium text-foreground",children:nJe(i.taskType)}),d.jsx("div",{className:"flex-1 h-4 rounded-sm bg-muted/30 overflow-hidden",children:d.jsx("div",{className:be("h-full rounded-sm transition-all duration-500",tJe(i.taskType),i.isRunning&&"animate-pulse"),style:{width:`${r}%`}})}),d.jsx("span",{className:"w-14 shrink-0 text-end font-mono text-[10px] text-muted-foreground",children:i.isRunning?"...":jE(i.durationMs)}),d.jsx(Rn,{className:be("h-3 w-3 shrink-0 text-muted-foreground/50 transition-transform",n&&"rotate-180")})]}),n&&d.jsxs("div",{className:"ms-22 mb-1 rounded-md border border-border bg-card p-2 text-[10px] text-muted-foreground space-y-0.5",children:[(o=i.actions)!=null&&o.length?d.jsxs("p",{children:[d.jsxs("span",{className:"font-medium",children:[t("debugDrawer.actions","Actions"),":"]})," ",i.actions.join(", ")]}):null,i.confidence!=null&&d.jsxs("p",{children:[d.jsxs("span",{className:"font-medium",children:[t("debugDrawer.confidence","Confidence"),":"]})," ",(i.confidence*100).toFixed(0),"%"]}),d.jsxs("p",{children:[d.jsxs("span",{className:"font-medium",children:[t("debugDrawer.duration","Duration"),":"]})," ",jE(i.durationMs)]})]})]})}function lEe(i){const e=[],t=new Map;for(const n of i){const s=`${n.taskType}-${n.index}`;if(n.type==="task_start")t.set(s,n);else if(n.type==="task_complete"){const r=t.get(s);e.push({taskType:n.taskType,durationMs:n.durationMs??(r?n.timestamp-r.timestamp:0),actions:n.actions,confidence:n.confidence,isRunning:!1}),t.delete(s)}}for(const[,n]of t)e.push({taskType:n.taskType,durationMs:Date.now()-n.timestamp,isRunning:!0});return e}function oJe(i){const e=new Map;for(const n of i){const s=n.stepIndex??0;e.has(s)||e.set(s,[]),e.get(s).push(n)}const t=[];for(const[n,s]of e){const r=s.flatMap(a=>[{type:"task_start",taskId:a.taskId,taskType:a.taskType,index:a.taskIndex,timestamp:new Date(a.timestamp).getTime()},{type:"task_complete",taskId:a.taskId,taskType:a.taskType,index:a.taskIndex,durationMs:a.durationMs,actions:a.actions??void 0,timestamp:new Date(a.timestamp).getTime()+(a.durationMs??0)}]),o=s.reduce((a,l)=>a+(l.durationMs??0),0);t.push({turnIndex:n,events:r,totalDurationMs:o,startTime:new Date(s[0].timestamp).getTime()})}return t.sort((n,s)=>n.turnIndex-s.turnIndex)}const cEe="/llm/tools";async function aJe(i){try{return await Oe.get(`${cEe}/costs/conversation/${i}`)}catch(e){if(Iie(e)&&e.status===404)return null;throw e}}async function lJe(){return Oe.get(`${cEe}/cache/stats`)}const dEe=["toolMetrics"];function cJe(i,e=!0){return hn({queryKey:[...dEe,"costs",i],queryFn:()=>aJe(i),enabled:!!i&&e,refetchInterval:e?5e3:!1,staleTime:4e3})}function dJe(i=!1){return hn({queryKey:[...dEe,"cacheStats"],queryFn:lJe,enabled:i,staleTime:3e4})}function uJe({conversationId:i,isActive:e=!1}){const{t}=xe(),{data:n,isError:s}=cJe(i,e),{data:r}=dJe(e),{data:o}=hn({queryKey:["audit","costDash",i],queryFn:()=>L7(i,0,200),enabled:!!i,staleTime:1e4}),a=L.useMemo(()=>o!=null&&o.length?gJe(o):null,[o]),l=a==null?void 0:a.turns[a.turns.length-1];return d.jsxs("div",{className:"flex flex-col gap-3 p-3","data-testid":"cost-dashboard",children:[l&&d.jsxs(v5,{title:t("costDashboard.thisTurn","This Turn"),icon:d.jsx(nc,{className:"h-3.5 w-3.5"}),children:[d.jsx(I0,{label:t("costDashboard.tokens","Tokens"),value:`${TS(l.inputTokens)} ${t("costDashboard.in","in")} · ${TS(l.outputTokens)} ${t("costDashboard.out","out")} · ${TS(l.totalTokens)} ${t("costDashboard.total","total")}`}),l.cost>0&&d.jsx(I0,{label:t("costDashboard.cost","Cost"),value:gpe(l.cost)}),d.jsx(I0,{label:t("costDashboard.duration","Duration"),value:jE(l.durationMs)}),l.modelName&&d.jsx(I0,{label:t("costDashboard.model","Model"),value:l.modelName})]}),a&&d.jsxs(v5,{title:t("costDashboard.conversationTotal","Conversation Total"),icon:d.jsx(YSe,{className:"h-3.5 w-3.5"}),children:[d.jsx(I0,{label:t("costDashboard.tokens","Tokens"),value:`${TS(a.totalInput)} ${t("costDashboard.in","in")} · ${TS(a.totalOutput)} ${t("costDashboard.out","out")} · ${TS(a.totalTokens)} ${t("costDashboard.total","total")}`}),d.jsx(I0,{label:t("costDashboard.cost","Cost"),value:gpe(a.totalCost)}),(n==null?void 0:n.toolCallCount)!=null&&n.toolCallCount>0&&d.jsx(I0,{label:t("costDashboard.toolCalls","Tool Calls"),value:`${n.toolCallCount}`})]}),(n==null?void 0:n.toolUsage)&&Object.keys(n.toolUsage).length>0&&d.jsx(v5,{title:t("costDashboard.toolUsage","Tool Usage"),icon:d.jsx(l7,{className:"h-3.5 w-3.5"}),children:Object.entries(n.toolUsage).map(([c,u])=>d.jsx("div",{className:"space-y-0.5",children:d.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[d.jsx("span",{className:"font-medium text-foreground truncate",children:c}),d.jsxs("span",{className:"text-muted-foreground font-mono",children:[u," ",t("costDashboard.calls","calls")]})]})},c))}),r&&r.hitRate>0&&d.jsx(v5,{title:t("costDashboard.cacheStats","Cache"),icon:d.jsx(rb,{className:"h-3.5 w-3.5"}),children:d.jsxs("div",{className:"space-y-1",children:[d.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[d.jsx("span",{className:"text-foreground",children:t("costDashboard.hitRate","Hit Rate")}),d.jsxs("span",{className:"font-mono text-muted-foreground",children:[(r.hitRate*100).toFixed(1),"%"]})]}),d.jsx(hJe,{value:r.hitRate,variant:"success"})]})}),s&&!n&&d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center","data-testid":"cost-dashboard-error",children:[d.jsx(Vi,{className:"h-8 w-8 text-destructive/50"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:t("costDashboard.error","Unable to load cost data from server")})]}),!a&&!n&&!s&&d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[d.jsx(DSe,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:t("costDashboard.empty","Send a message to see cost metrics")})]})]})}function v5({title:i,icon:e,children:t}){return d.jsxs("div",{className:"rounded-lg border border-border bg-card/50 p-2.5 space-y-1.5",children:[d.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold text-foreground/80",children:[e,i]}),d.jsx("div",{className:"space-y-1",children:t})]})}function I0({label:i,value:e}){return d.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[d.jsx("span",{className:"text-muted-foreground",children:i}),d.jsx("span",{className:"font-mono text-foreground",children:e})]})}function hJe({value:i,max:e=1,variant:t="default"}){const n=Math.min(i/e*100,100),s=t==="critical"?"bg-destructive":t==="warning"?"bg-amber-500":t==="success"?"bg-emerald-500":"bg-primary";return d.jsx("div",{className:"h-1.5 w-full rounded-full bg-muted/40 overflow-hidden",children:d.jsx("div",{className:be("h-full rounded-full transition-all duration-500",s),style:{width:`${n}%`}})})}function gJe(i){const e=new Map;for(const a of i){const l=a.stepIndex??0;e.has(l)||e.set(l,[]),e.get(l).push(a)}const t=[];let n=0,s=0,r=0;const o=Array.from(e.entries()).sort(([a],[l])=>a-l);for(const[,a]of o){let l=0,c=0,u=0,h=0,g=null;for(const f of a){const m=f.llmDetail;if(m){const x=m.tokenUsage;x&&(l+=x.inputTokens??0,c+=x.outputTokens??0),m.modelName&&(g=String(m.modelName))}u+=f.cost??0,h+=f.durationMs??0}t.push({inputTokens:l,outputTokens:c,totalTokens:l+c,cost:u,durationMs:h,modelName:g}),n+=l,s+=c,r+=u}return{turns:t,totalInput:n,totalOutput:s,totalTokens:n+s,totalCost:r}}function TS(i){return i.toLocaleString()}function gpe(i){return i===0?"$0.00":i<.01?`$${i.toFixed(4)}`:`$${i.toFixed(2)}`}function fJe({conversationId:i}){const{t:e}=xe(),{data:t,isLoading:n,isError:s,refetch:r}=hn({queryKey:["memory","detailed",i],queryFn:()=>ize(i),enabled:!!i,staleTime:1e4});if(!i)return d.jsx(fpe,{message:e("memoryInspector.noConversation","Start a conversation to inspect memory")});if(n)return d.jsx("div",{className:"flex items-center justify-center py-8",children:d.jsx(xi,{className:"h-5 w-5 animate-spin text-muted-foreground"})});if(s&&!t)return d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center","data-testid":"memory-inspector-error",children:[d.jsx(Vi,{className:"h-8 w-8 text-destructive/50"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:e("memoryInspector.error","Failed to load memory data")})]});const o=(t==null?void 0:t.conversationSteps)??[];return d.jsxs("div",{className:"flex flex-col gap-2 p-3","data-testid":"memory-inspector",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:e("memoryInspector.title","Conversation Memory")}),d.jsx("button",{onClick:()=>r(),className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground",title:e("common.retry","Refresh"),"data-testid":"memory-refresh",children:d.jsx(xi,{className:"h-3 w-3"})})]}),o.length===0?d.jsx(fpe,{message:e("memoryInspector.empty","No memory data available")}):o.map((a,l)=>d.jsx(pJe,{step:a,stepIndex:l},l)),(t==null?void 0:t.conversationProperties)&&Object.keys(t.conversationProperties).length>0&&d.jsx(uEe,{label:e("memoryInspector.properties","Properties"),defaultOpen:!1,children:d.jsx("pre",{className:"text-[10px] font-mono text-muted-foreground whitespace-pre-wrap break-all",children:JSON.stringify(t.conversationProperties,null,2)})})]})}function pJe({step:i,stepIndex:e}){const{t}=xe(),n=L.useMemo(()=>{const s=new Map;for(const r of i.conversationStep??[]){const o=r.originWorkflowId??"input";s.has(o)||s.set(o,[]),s.get(o).push(r)}return Array.from(s.entries())},[i.conversationStep]);return d.jsx(uEe,{label:`${t("memoryInspector.step","Step")} ${e+1}`,badge:`${(i.conversationStep??[]).length} ${t("memoryInspector.keys","keys")}`,defaultOpen:e===0,children:n.map(([s,r])=>d.jsxs("div",{className:"ms-2 border-s border-border ps-2 space-y-0.5",children:[d.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground uppercase tracking-wide",children:s==="input"?t("memoryInspector.input","Input"):s}),r.map((o,a)=>d.jsx(mJe,{item:o},a))]},s))})}function mJe({item:i}){const[e,t]=L.useState(!1),n=typeof i.value=="object"&&i.value!==null,s=!i.key.includes("private"),r=n?JSON.stringify(i.value,null,2):String(i.value),o=r.length>80;return d.jsxs("div",{className:"rounded-sm",children:[d.jsxs("button",{onClick:()=>o&&t(!e),className:be("flex w-full items-center gap-1 py-0.5 text-start text-[10px]",o&&"cursor-pointer hover:bg-muted/30 rounded px-1 -mx-1"),children:[s?d.jsx(Sh,{className:"h-2.5 w-2.5 shrink-0 text-emerald-500/60"}):d.jsx(_b,{className:"h-2.5 w-2.5 shrink-0 text-amber-500/60"}),d.jsx("span",{className:"font-mono font-medium text-primary/80 shrink-0",children:i.key}),d.jsx("span",{className:"text-muted-foreground/60 mx-0.5",children:"="}),!e&&d.jsxs("span",{className:"truncate font-mono text-foreground/70",children:[r.slice(0,80),o&&"…"]})]}),e&&d.jsx("pre",{className:"ms-5 mt-0.5 rounded border border-border bg-card p-1.5 text-[10px] font-mono text-foreground/70 whitespace-pre-wrap break-all max-h-48 overflow-y-auto",children:r})]})}function uEe({label:i,badge:e,defaultOpen:t=!1,children:n}){const[s,r]=L.useState(t);return d.jsxs("div",{className:"rounded-md border border-border bg-card/30",children:[d.jsxs("button",{onClick:()=>r(!s),"aria-expanded":s,className:"flex w-full items-center gap-1.5 px-2 py-1.5 text-xs font-medium text-foreground hover:bg-muted/30 rounded-t-md","data-testid":"expandable-node",children:[d.jsx(hs,{className:be("h-3 w-3 shrink-0 text-muted-foreground transition-transform",s&&"rotate-90")}),i,e&&d.jsx("span",{className:"ms-auto text-[10px] font-normal text-muted-foreground",children:e})]}),s&&d.jsx("div",{className:"px-2 pb-2 space-y-1",children:n})]})}function fpe({message:i}){return d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[d.jsx(C_,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:i})]})}class hEe{constructor(e,t={}){kt(this,"abortController",null);kt(this,"reconnectTimer",null);kt(this,"listeners",new Map);kt(this,"_closed",!1);kt(this,"onmessage",null);kt(this,"onerror",null);kt(this,"onopen",null);this.url=e,this.headers=t,this.connect()}addEventListener(e,t){this.listeners.has(e)||this.listeners.set(e,[]),this.listeners.get(e).push(t)}close(){var e;this._closed=!0,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(e=this.abortController)==null||e.abort(),this.abortController=null}async connect(){var e;if(!this._closed){this.abortController=new AbortController;try{const t=await fetch(this.url,{headers:{Accept:"text/event-stream",...this.headers},signal:this.abortController.signal});if(!t.ok||!t.body){this.scheduleReconnect();return}(e=this.onopen)==null||e.call(this);const n=t.body.getReader(),s=new TextDecoder;let r="";for(;!this._closed;){const{done:o,value:a}=await n.read();if(o)break;r+=s.decode(a,{stream:!0});const l=r.split(` - -`);r=l.pop()??"";for(const c of l){const u=this.parseBlock(c.trim());u&&this.dispatch(u)}}this._closed||this.scheduleReconnect()}catch(t){if(this._closed||t instanceof DOMException&&t.name==="AbortError")return;this.scheduleReconnect()}}}scheduleReconnect(){var e;(e=this.onerror)==null||e.call(this),this._closed||(this.reconnectTimer=setTimeout(()=>this.connect(),5e3))}parseBlock(e){if(!e)return null;let t="message";const n=[];for(const s of e.split(` -`))s.startsWith("event:")?t=s.slice(6).trim():s.startsWith("data:")&&n.push(s.slice(5).trimStart());return n.length===0?null:new MessageEvent(t,{data:n.join(` -`)})}dispatch(e){var n;const t=this.listeners.get(e.type);t&&t.forEach(s=>s(e)),(n=this.onmessage)==null||n.call(this,e)}}const D7="/administration/logs";async function bJe(i={}){const e=new URLSearchParams;i.agentId&&e.set("agentId",i.agentId),i.conversationId&&e.set("conversationId",i.conversationId),i.level&&e.set("level",i.level),i.limit&&e.set("limit",String(i.limit));const t=e.toString();return Oe.get(`${D7}${t?`?${t}`:""}`)}async function xJe(i={}){const e=new URLSearchParams;i.environment&&e.set("environment",i.environment),i.agentId&&e.set("agentId",i.agentId),i.agentVersion&&e.set("agentVersion",String(i.agentVersion)),i.conversationId&&e.set("conversationId",i.conversationId),i.userId&&e.set("userId",i.userId),i.instanceId&&e.set("instanceId",i.instanceId),i.skip&&e.set("skip",String(i.skip)),i.limit&&e.set("limit",String(i.limit));const t=e.toString();return Oe.get(`${D7}/history${t?`?${t}`:""}`)}async function vJe(){return Oe.get(`${D7}/instance`)}function Lse(i={}){const e=new URLSearchParams;i.agentId&&e.set("agentId",i.agentId),i.conversationId&&e.set("conversationId",i.conversationId),i.level&&e.set("level",i.level);const t=e.toString(),n=`${window.location.origin}${D7}/stream${t?`?${t}`:""}`;return new hEe(n,Oe.getAuthHeader())}const ppe=500,gEe={ERROR:"text-destructive",WARN:"text-amber-500",INFO:"text-emerald-500",DEBUG:"text-muted-foreground",TRACE:"text-muted-foreground/50"},fEe={ERROR:"bg-destructive/10",WARN:"bg-amber-500/10",INFO:"bg-emerald-500/10",DEBUG:"bg-muted/30",TRACE:"bg-muted/20"};function _Je({agentId:i,conversationId:e}){const{t}=xe(),[n,s]=L.useState([]),[r,o]=L.useState(!1),a=L.useRef(!1),[l,c]=L.useState(null),[u,h]=L.useState(""),[g,f]=L.useState(!1),m=L.useRef(null),x=L.useRef(null);L.useEffect(()=>{a.current=r},[r]),L.useEffect(()=>{if(!i)return;const w=Lse({agentId:i,conversationId:e??void 0}),k=C=>{if(!a.current)try{const E=JSON.parse(C.data);s(D=>{const T=[...D,E];return T.length>ppe?T.slice(-ppe):T})}catch{}};return w.addEventListener("log",k),w.onmessage=k,w.onopen=()=>f(!0),w.onerror=()=>f(!1),x.current=w,()=>{w.close(),x.current=null,f(!1)}},[i,e]),L.useEffect(()=>{i&&bJe({agentId:i,conversationId:e??void 0,limit:50}).then(w=>s(w)).catch(()=>{})},[i,e]),L.useEffect(()=>{var w;r||(w=m.current)==null||w.scrollTo({top:m.current.scrollHeight,behavior:"smooth"})},[n,r]);const v=L.useCallback(()=>s([]),[]),_=L.useMemo(()=>{let w=n;if(l&&(w=w.filter(k=>k.level===l)),u.trim()){const k=u.toLowerCase();w=w.filter(C=>C.message.toLowerCase().includes(k)||C.loggerName.toLowerCase().includes(k))}return w},[n,l,u]);return i?d.jsxs("div",{className:"flex flex-col","data-testid":"live-log-viewer",children:[d.jsxs("div",{className:"flex items-center gap-1.5 border-b border-border px-3 py-1.5",children:[d.jsx(RE,{className:be("h-2 w-2 shrink-0 fill-current",g?"text-emerald-500":"text-destructive"),"aria-label":g?t("logViewer.connected","Connected"):t("logViewer.disconnected","Disconnected"),role:"status"}),["ERROR","WARN","INFO","DEBUG"].map(w=>d.jsx("button",{onClick:()=>c(l===w?null:w),"aria-pressed":l===w,className:be("rounded-full px-2 py-0.5 text-[10px] font-medium transition-colors",l===w?`${fEe[w]} ${gEe[w]}`:"text-muted-foreground hover:bg-muted"),"data-testid":`filter-${w}`,children:w},w)),d.jsx("div",{className:"flex-1"}),d.jsxs("div",{className:"relative",children:[d.jsx(br,{className:"absolute inset-s-1.5 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),d.jsx("input",{type:"text",value:u,onChange:w=>h(w.target.value),placeholder:t("logViewer.search","Search..."),className:"w-32 rounded border border-input bg-card py-0.5 ps-6 pe-2 text-[10px] focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"log-search"})]}),d.jsx("button",{onClick:()=>o(!r),className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground",title:r?t("logViewer.resume","Resume"):t("logViewer.pause","Pause"),"data-testid":"log-pause",children:r?d.jsx(Hie,{className:"h-3 w-3"}):d.jsx(Bie,{className:"h-3 w-3"})}),d.jsx("button",{onClick:v,className:"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground",title:t("logViewer.clear","Clear"),"data-testid":"log-clear",children:d.jsx(_n,{className:"h-3 w-3"})})]}),d.jsx("div",{ref:m,role:"log","aria-live":"polite","aria-label":t("logViewer.logOutput","Log output"),className:"overflow-y-auto font-mono text-[10px] leading-relaxed",style:{maxHeight:"35vh"},children:_.length===0?d.jsx("div",{className:"flex items-center justify-center py-8 text-muted-foreground text-xs",children:t("logViewer.waiting","Waiting for logs...")}):_.map((w,k)=>d.jsx(yJe,{entry:w},k))})]}):d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[d.jsx($v,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:t("logViewer.noAgent","Select an agent to view logs")})]})}function yJe({entry:i}){const e=i.level??"INFO",t=i.timestamp?new Date(i.timestamp).toLocaleTimeString(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3}):"",n=i.loggerName?i.loggerName.split(".").pop()??i.loggerName:"";return d.jsxs("div",{className:be("flex items-start gap-1.5 border-b border-border/30 px-3 py-0.5 leading-tight",fEe[e]??"bg-transparent"),"data-testid":"log-entry",children:[d.jsx("span",{className:"shrink-0 text-muted-foreground/70 min-w-[70px]",children:t}),d.jsx("span",{className:be("shrink-0 w-10 font-bold",gEe[e]??"text-foreground"),children:e.padEnd(5)}),d.jsxs("span",{className:"shrink-0 text-primary/60 w-24 truncate",children:["[",n,"]"]}),d.jsx("span",{className:"text-foreground/80 break-all",children:i.message})]})}function wJe({conversationId:i}){const{t:e}=xe(),{data:t,isError:n}=hn({queryKey:["audit","promptViewer",i],queryFn:()=>L7(i,0,200),enabled:!!i,staleTime:1e4}),s=L.useMemo(()=>t?t.filter(l=>l.llmDetail!=null).sort((l,c)=>new Date(l.timestamp).getTime()-new Date(c.timestamp).getTime()):[],[t]),[r,o]=L.useState(null),a=r!==null?s[r]:s[s.length-1];return i?n&&!t?d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center","data-testid":"prompt-viewer-error",children:[d.jsx(Vi,{className:"h-8 w-8 text-destructive/50"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:e("promptViewer.error","Failed to load prompt data")})]}):s.length===0?d.jsx(xpe,{message:e("promptViewer.noLlm","No LLM interactions found yet")}):d.jsxs("div",{className:"flex flex-col gap-3 p-3","data-testid":"prompt-viewer",children:[s.length>1&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:e("promptViewer.turn","Turn")}),d.jsxs("select",{value:r??"latest",onChange:l=>{const c=l.target.value;o(c==="latest"?null:Number(c))},className:"rounded-md border border-input bg-card px-2 py-1 text-xs","data-testid":"prompt-turn-selector",children:[d.jsxs("option",{value:"latest",children:[e("promptViewer.latest","Latest")," (",e("promptViewer.step","Step")," ",s.length,")"]}),s.map((l,c)=>d.jsxs("option",{value:c,children:[e("promptViewer.step","Step")," ",l.stepIndex+1," — ",l.taskType]},c))]})]}),a&&d.jsx(CJe,{entry:a,conversationId:i})]}):d.jsx(xpe,{message:e("promptViewer.noConversation","Start a conversation to inspect prompts")})}function CJe({entry:i,conversationId:e}){const{t}=xe(),[n,s]=L.useState(!1),[r,o]=L.useState(!1),a=i.llmDetail,l=a==null?void 0:a.compiledPrompt,c=a==null?void 0:a.modelResponse,u=a==null?void 0:a.modelName,h=a==null?void 0:a.tokenUsage,g=i.toolCalls,f=L.useMemo(()=>l?kJe(l):[],[l]),m=async()=>{const v=l??JSON.stringify(a,null,2);try{await navigator.clipboard.writeText(v),s(!0),setTimeout(()=>s(!1),2e3)}catch{}},x=async()=>{try{o(!0),await Oe.post(`/agents/${e}/rerun`)}catch{}finally{o(!1)}};return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsxs("span",{className:"font-medium text-foreground",children:[t("promptViewer.step","Step")," ",i.stepIndex+1]}),d.jsx("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] font-medium text-emerald-500",children:i.taskType}),i.durationMs>0&&d.jsx("span",{className:"font-mono",children:jE(i.durationMs)})]}),f.length>0?d.jsx("div",{className:"space-y-2",children:f.map((v,_)=>d.jsx(bpe,{role:v.role,content:v.content},_))}):l?d.jsx("div",{className:"rounded-lg border border-border bg-card p-3",children:d.jsx("pre",{className:"text-[11px] font-mono text-foreground/80 whitespace-pre-wrap break-all max-h-64 overflow-y-auto",children:l})}):null,c&&d.jsx(bpe,{role:"assistant",content:c}),g&&g.length>0&&d.jsx(SJe,{toolCalls:g}),d.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 rounded-lg border border-border bg-card/50 px-3 py-2 text-[10px] text-muted-foreground",children:[h&&d.jsxs("span",{children:[d.jsxs("strong",{className:"text-foreground",children:[t("promptViewer.tokens","Tokens"),":"]})," ",(h.inputTokens??0).toLocaleString()," ",t("costDashboard.in","in")," / ",(h.outputTokens??0).toLocaleString()," ",t("costDashboard.out","out")]}),u&&d.jsxs("span",{children:[d.jsxs("strong",{className:"text-foreground",children:[t("promptViewer.model","Model"),":"]})," ",u]}),i.cost>0&&d.jsxs("span",{children:[d.jsxs("strong",{className:"text-foreground",children:[t("promptViewer.cost","Cost"),":"]})," ","$",i.cost<.01?i.cost.toFixed(4):i.cost.toFixed(2)]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("button",{onClick:m,className:"inline-flex items-center gap-1 rounded-md border border-input px-2.5 py-1.5 text-xs font-medium text-foreground transition-colors hover:bg-secondary","data-testid":"copy-prompt",children:[n?d.jsx(Ns,{className:"h-3 w-3 text-emerald-500"}):d.jsx(mo,{className:"h-3 w-3"}),n?t("promptViewer.copied","Copied!"):t("promptViewer.copy","Copy Prompt")]}),d.jsxs("button",{onClick:x,disabled:r,className:"inline-flex items-center gap-1 rounded-md border border-input px-2.5 py-1.5 text-xs font-medium text-foreground transition-colors hover:bg-secondary disabled:opacity-50","data-testid":"replay-turn",children:[d.jsx(S_,{className:be("h-3 w-3",r&&"animate-spin")}),t("promptViewer.replay","Replay This Turn")]})]})]})}const mpe={system:{icon:Mie,labelKey:"promptViewer.roleSystem",fallback:"System Prompt",color:"border-emerald-500/30 bg-emerald-500/5"},user:{icon:$ie,labelKey:"promptViewer.roleUser",fallback:"User",color:"border-blue-500/30 bg-blue-500/5"},assistant:{icon:ai,labelKey:"promptViewer.roleAssistant",fallback:"Assistant",color:"border-primary/30 bg-primary/5"},tool:{icon:zb,labelKey:"promptViewer.roleTool",fallback:"Tool Result",color:"border-amber-500/30 bg-amber-500/5"}};function bpe({role:i,content:e}){const{t}=xe(),[n,s]=L.useState(i==="system"||i==="user"),r=mpe[i]??mpe.assistant,o=r.icon,a=t(r.labelKey,r.fallback),l=e.length>300;return d.jsxs("div",{className:be("rounded-lg border p-2.5",r.color),children:[d.jsxs("button",{onClick:()=>s(!n),"aria-expanded":n,className:"flex w-full items-center gap-1.5 text-start",children:[d.jsx(o,{className:"h-3.5 w-3.5 shrink-0 text-foreground/60"}),d.jsx("span",{className:"text-[11px] font-semibold text-foreground/80",children:a}),l&&d.jsx(Rn,{className:be("ms-auto h-3 w-3 text-muted-foreground transition-transform",n&&"rotate-180")})]}),n&&d.jsx("pre",{className:"mt-1.5 text-[10px] font-mono text-foreground/70 whitespace-pre-wrap break-all max-h-48 overflow-y-auto",children:e})]})}function SJe({toolCalls:i}){const{t:e}=xe();return d.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-2.5 space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-foreground/80",children:[d.jsx(zb,{className:"h-3.5 w-3.5"}),e("promptViewer.toolCalls","Tool Calls")," (",i.length,")"]}),i.map((t,n)=>d.jsx("pre",{className:"text-[10px] font-mono text-foreground/70 whitespace-pre-wrap break-all",children:JSON.stringify(t,null,2)},n))]})}function kJe(i){try{const r=JSON.parse(i);if(Array.isArray(r))return r.map(o=>({role:o.role??"user",content:o.content??JSON.stringify(o)}))}catch{}const e=[],t=i.split(` -`);let n="system",s=[];for(const r of t){const o=r.toLowerCase().trim();let a=null;if(o.startsWith("system:")||o==="[system]"?a="system":o.startsWith("user:")||o==="[user]"?a="user":o.startsWith("assistant:")||o==="[assistant]"?a="assistant":(o.startsWith("tool:")||o==="[tool]")&&(a="tool"),a){s.length>0&&(e.push({role:n,content:s.join(` -`).trim()}),s=[]),n=a;const l=r.indexOf(":");l>=0&&l0&&e.push({role:n,content:s.join(` -`).trim()}),e.length===1&&e[0].role==="system"?[{role:"system",content:i}]:e}function xpe({message:i}){return d.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center",children:[d.jsx(OSe,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:i})]})}const A0=[{id:"pipeline",labelKey:"debugDrawer.tabPipeline",fallback:"Pipeline",icon:d.jsx(Vb,{className:"h-3.5 w-3.5"})},{id:"costs",labelKey:"debugDrawer.tabCosts",fallback:"Costs",icon:d.jsx(DSe,{className:"h-3.5 w-3.5"})},{id:"memory",labelKey:"debugDrawer.tabMemory",fallback:"Memory",icon:d.jsx(C_,{className:"h-3.5 w-3.5"})},{id:"logs",labelKey:"debugDrawer.tabLogs",fallback:"Logs",icon:d.jsx($v,{className:"h-3.5 w-3.5"})},{id:"prompt",labelKey:"debugDrawer.tabPrompt",fallback:"Prompt",icon:d.jsx(OSe,{className:"h-3.5 w-3.5"})}];function pEe({conversationId:i,agentId:e}){const{t}=xe(),n=bu(l=>l.isDebugOpen),s=bu(l=>l.activeTab),r=bu(l=>l.setActiveTab),o=bu(l=>l.toggleDebug),a=L.useCallback(l=>{const c=A0.findIndex(f=>f.id===s);let u=null;switch(l.key){case"ArrowRight":case"ArrowDown":u=(c+1)%A0.length;break;case"ArrowLeft":case"ArrowUp":u=(c-1+A0.length)%A0.length;break;case"Home":u=0;break;case"End":u=A0.length-1;break;default:return}l.preventDefault();const h=A0[u];r(h.id);const g=document.getElementById(`debug-tab-${h.id}`);g==null||g.focus()},[s,r]);return d.jsxs("div",{"data-testid":"debug-drawer",children:[d.jsxs("button",{onClick:o,"aria-expanded":n,"aria-controls":"debug-drawer-content",className:be("flex w-full items-center justify-center gap-1.5 border-t border-border px-4 py-1.5 text-xs font-medium transition-colors",n?"bg-primary/5 text-primary hover:bg-primary/10":"text-muted-foreground hover:bg-muted hover:text-foreground"),"data-testid":"debug-toggle",children:[n?d.jsx(Rn,{className:"h-3.5 w-3.5"}):d.jsx(Y_,{className:"h-3.5 w-3.5"}),t("debugDrawer.title","Debug")]}),n&&d.jsxs("div",{id:"debug-drawer-content",className:"flex flex-col border-t border-border bg-background",children:[d.jsx("div",{className:"flex border-b border-border overflow-x-auto",role:"tablist","aria-label":t("debugDrawer.title","Debug"),children:A0.map(l=>d.jsxs("button",{role:"tab","aria-selected":s===l.id,"aria-controls":`debug-tabpanel-${l.id}`,id:`debug-tab-${l.id}`,tabIndex:s===l.id?0:-1,onClick:()=>r(l.id),onKeyDown:a,className:be("flex items-center gap-1 whitespace-nowrap px-3 py-2 text-xs font-medium transition-colors",s===l.id?"border-b-2 border-primary text-primary":"text-muted-foreground hover:text-foreground"),"data-testid":`debug-tab-${l.id}`,children:[l.icon,d.jsx("span",{className:"hidden sm:inline",children:t(l.labelKey,l.fallback)})]},l.id))}),d.jsxs("div",{role:"tabpanel",id:`debug-tabpanel-${s}`,"aria-labelledby":`debug-tab-${s}`,className:"overflow-y-auto",style:{maxHeight:"40vh"},children:[s==="pipeline"&&d.jsx(iJe,{conversationId:i}),s==="costs"&&d.jsx(uJe,{conversationId:i,isActive:!0}),s==="memory"&&d.jsx(fJe,{conversationId:i}),s==="logs"&&d.jsx(_Je,{agentId:e,conversationId:i}),s==="prompt"&&d.jsx(wJe,{conversationId:i})]})]})]})}const NJe=["saving","deploying","starting","ready"];function vpe({current:i,error:e}){const{t}=xe(),n=[{key:"saving",label:t("chatDrawer.saving","Saving changes…")},{key:"deploying",label:t("chatDrawer.deploying","Deploying agent…")},{key:"starting",label:t("chatDrawer.starting","Starting conversation…")}];if(i==="error")return d.jsxs("div",{className:"flex flex-col items-center gap-3 py-8 text-center",children:[d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10",children:d.jsx(Lo,{className:"h-6 w-6 text-destructive"})}),d.jsx("p",{className:"text-sm font-medium text-destructive",children:e||t("chatDrawer.error","Something went wrong")})]});const s=NJe.indexOf(i);return d.jsx("div",{className:"space-y-3 py-6",children:n.map((r,o)=>{const a=s>o,l=s===o;return d.jsxs("div",{className:"flex items-center gap-3 px-4",children:[a?d.jsx(Xl,{className:"h-5 w-5 shrink-0 text-emerald-500"}):l?d.jsx(ni,{className:"h-5 w-5 shrink-0 animate-spin text-primary"}):d.jsx("div",{className:"h-5 w-5 shrink-0 rounded-full border-2 border-muted-foreground/30"}),d.jsx("span",{className:be("text-sm",a&&"text-emerald-600 dark:text-emerald-400 line-through opacity-70",l&&"font-medium text-foreground",!a&&!l&&"text-muted-foreground"),children:r.label})]},r.key)})})}function EJe(){const{t:i}=xe(),e=_c(w=>w.isOpen),t=_c(w=>w.agentName),n=_c(w=>w.agentId),s=_c(w=>w.step),r=_c(w=>w.errorMessage),o=_c(w=>w.close),a=Oi(w=>w.messages),l=Oi(w=>w.conversationId),c=Oi(w=>w.isProcessing),u=Oi(w=>w.isThinking),h=BM(),g=L.useRef(null);L.useEffect(()=>{var w;(w=g.current)==null||w.scrollIntoView({behavior:"smooth"})},[a]);const f=L.useCallback(()=>{n&&(Oi.getState().clearMessages(),_c.getState().setStep("starting"),h.mutate({agentId:n},{onSuccess:()=>_c.getState().setStep("ready")}))},[n,h]),m=L.useCallback(()=>{_c.getState().setStep("idle"),_c.getState().close()},[]),x=s==="ready",v=s==="saving"||s==="deploying"||s==="starting",_=s==="error";return d.jsx("div",{className:be("flex shrink-0 flex-col bg-background overflow-hidden transition-[width,opacity] duration-300 ease-in-out",e?"w-[420px] opacity-100 border-s border-border":"w-0 opacity-0"),"data-testid":"chat-drawer",role:"complementary","aria-label":i("chatDrawer.title","Test Chat"),children:e&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-4 py-2.5 shrink-0",children:[d.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-primary/10",children:d.jsx(ai,{className:"h-4 w-4 text-primary","aria-hidden":"true"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-semibold text-foreground truncate",children:i("chatDrawer.title","Test Chat")}),d.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t})]}),x&&d.jsx(rEe,{}),x&&d.jsx("button",{onClick:f,className:"flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:i("chatDrawer.newConversation","New Conversation"),"aria-label":i("chatDrawer.newConversation","New Conversation"),"data-testid":"drawer-new-conversation",children:d.jsx(Fie,{className:"h-4 w-4","aria-hidden":"true"})}),d.jsx("button",{onClick:o,className:"flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:i("common.close","Close"),"aria-label":i("common.close","Close"),"data-testid":"drawer-close",children:d.jsx(An,{className:"h-4 w-4","aria-hidden":"true"})})]}),d.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[v&&d.jsx("div",{className:"flex flex-1 items-center justify-center",children:d.jsx(vpe,{current:s,error:null})}),_&&d.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4 p-6",children:[d.jsx(vpe,{current:"error",error:r}),d.jsxs("button",{onClick:m,className:"inline-flex items-center gap-1.5 rounded-lg border border-input px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-secondary","data-testid":"drawer-retry",children:[d.jsx(xi,{className:"h-4 w-4"}),i("chatDrawer.retry","Try again")]})]}),s==="idle"&&!l&&d.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center",children:[d.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-primary/10",children:d.jsx(Ih,{className:"h-8 w-8 text-primary"})}),d.jsx("p",{className:"text-sm text-muted-foreground",children:i("chatDrawer.ready","Ready — type a message to test")})]}),(x||s==="idle"&&l)&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"flex-1 overflow-y-auto","aria-live":"polite","aria-relevant":"additions",children:a.length===0?d.jsx("div",{className:"flex h-full items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx(ai,{className:"mx-auto h-10 w-10 text-muted-foreground/30"}),d.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:i("chatDrawer.ready","Ready — type a message to test")})]})}):d.jsxs("div",{className:"py-3",children:[a.map(w=>d.jsx(sEe,{message:w},w.id)),u&&d.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm text-muted-foreground animate-pulse",children:[d.jsx(ni,{className:"h-4 w-4 animate-spin"}),d.jsx("span",{className:"italic",children:i("chat.thinking")})]}),d.jsx("div",{ref:g})]})}),d.jsx(LJe,{}),l&&d.jsx(pEe,{conversationId:l,agentId:n}),d.jsx(DJe,{disabled:!l,isProcessing:c})]})]})]})})}function LJe(){const i=Oi(n=>n.quickReplies),e=Oi(n=>n.isProcessing),t=ise();return i.length===0||e?null:d.jsx("div",{className:"flex flex-wrap gap-1.5 border-t border-border px-3 py-2 shrink-0",children:i.map((n,s)=>d.jsx("button",{type:"button",onClick:()=>t.mutate({message:n}),className:"rounded-full border border-primary/30 bg-primary/5 px-2.5 py-1 text-xs font-medium text-primary transition-colors hover:bg-primary/15","data-testid":"drawer-quick-reply",children:n},`${n}-${s}`))})}function DJe({disabled:i=!1,isProcessing:e=!1}){const{t}=xe(),[n,s]=L.useState(""),r=L.useRef(null),o=ise(),a=L.useCallback(()=>{const u=n.trim();!u||i||e||(o.mutate({message:u}),s(""),r.current&&(r.current.style.height="auto"))},[n,i,e,o]),l=L.useCallback(()=>{const u=r.current;u&&(u.style.height="auto",u.style.height=`${Math.min(u.scrollHeight,120)}px`)},[]),c=n.trim().length>0&&!i&&!e;return d.jsx("div",{className:"border-t border-border bg-background p-3 shrink-0",children:d.jsxs("div",{className:"flex items-end gap-2",children:[d.jsx("textarea",{ref:r,"data-testid":"drawer-chat-input",value:n,onChange:u=>{s(u.target.value),l()},onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),a())},placeholder:t("chat.placeholder"),disabled:i,rows:1,className:be("flex-1 resize-none rounded-xl border border-input bg-card px-3 py-2.5 text-sm","placeholder:text-muted-foreground","focus:outline-none focus:ring-2 focus:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","max-h-[120px] min-h-[40px]")}),d.jsx("button",{onClick:a,disabled:!c,className:be("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl transition-colors",c?"bg-primary text-primary-foreground hover:bg-primary/90 cursor-pointer":"bg-muted text-muted-foreground cursor-not-allowed"),"aria-label":t("chat.send"),"data-testid":"drawer-chat-send",children:e?d.jsx(ni,{className:"h-4 w-4 animate-spin"}):d.jsx(mA,{className:"h-4 w-4"})})]})})}const TJe=[{icon:ai,titleKey:"onboarding.welcome.buildAgents",descKey:"onboarding.welcome.buildAgentsDesc",gradient:"from-violet-500 to-indigo-600"},{icon:zb,titleKey:"onboarding.welcome.designWorkflows",descKey:"onboarding.welcome.designWorkflowsDesc",gradient:"from-emerald-500 to-teal-600"},{icon:Jf,titleKey:"onboarding.welcome.testRealtime",descKey:"onboarding.welcome.testRealtimeDesc",gradient:"from-blue-500 to-cyan-600"},{icon:l7,titleKey:"onboarding.welcome.monitorOperate",descKey:"onboarding.welcome.monitorOperateDesc",gradient:"from-amber-500 to-orange-600"}],wT=3;function IJe(){const{t:i}=xe(),e=$s(c=>c.showWelcome),t=$s(c=>c.dismissWelcome),n=$s(c=>c.startChapter),[s,r]=L.useState(0),o=L.useCallback(()=>{t(),n("dashboard")},[t,n]),a=L.useCallback(()=>{t()},[t]),l=L.useRef(null);return L.useEffect(()=>{var h;if(!e)return;const c=document.body.style.overflow;document.body.style.overflow="hidden";const u=g=>{switch(g.key){case"ArrowRight":g.preventDefault(),r(f=>Math.min(f+1,wT-1));break;case"ArrowLeft":g.preventDefault(),r(f=>Math.max(f-1,0));break;case"Escape":g.preventDefault(),a();break;case"Tab":{if(!l.current)break;const f=l.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(f.length===0)break;const m=f[0],x=f[f.length-1];if(!m||!x)break;g.shiftKey&&document.activeElement===m?(g.preventDefault(),x.focus()):!g.shiftKey&&document.activeElement===x&&(g.preventDefault(),m.focus());break}}};return document.addEventListener("keydown",u),(h=l.current)==null||h.focus(),()=>{document.removeEventListener("keydown",u),document.body.style.overflow=c}},[e,a]),e?hg.createPortal(d.jsx("div",{className:"welcome-modal-backdrop fixed inset-0 z-10000 flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-label":i("onboarding.welcome.title"),"data-testid":"welcome-modal",children:d.jsxs("div",{ref:l,className:"welcome-modal-card w-full max-w-xl rounded-2xl shadow-2xl outline-none",tabIndex:-1,children:[d.jsxs("div",{className:"relative min-h-[380px] p-8",children:[s===0&&d.jsxs("div",{className:"flex flex-col items-center text-center animate-[fadeIn_300ms_ease-out]",children:[d.jsxs("div",{className:"relative mb-6",children:[d.jsx("div",{className:"absolute -inset-4 rounded-full bg-primary/10 blur-xl"}),d.jsx("div",{className:"relative flex h-20 w-20 items-center justify-center rounded-2xl bg-linear-to-br from-primary to-primary/60 shadow-lg shadow-primary/25",children:d.jsx(Ll,{className:"h-10 w-10 text-primary-foreground"})})]}),d.jsx("h2",{className:"text-2xl font-bold text-white",children:i("onboarding.welcome.title")}),d.jsx("p",{className:"mt-2 text-lg text-sidebar-foreground/70",children:i("onboarding.welcome.subtitle")}),d.jsx("div",{className:"mt-4 h-0.5 w-16 rounded-full bg-linear-to-r from-transparent via-primary to-transparent"}),d.jsx("p",{className:"mt-4 max-w-sm text-sm leading-relaxed text-sidebar-foreground/50",children:i("onboarding.welcome.introText","EDDI Manager is your command center for building, testing, and operating conversational AI agents.")})]}),s===1&&d.jsxs("div",{className:"animate-[fadeIn_300ms_ease-out]",children:[d.jsx("h2",{className:"mb-2 text-center text-xl font-bold text-white",children:i("onboarding.welcome.capabilitiesTitle")}),d.jsx("p",{className:"mb-5 text-center text-sm text-sidebar-foreground/50",children:i("onboarding.welcome.capabilitiesSubtitle","Everything you need to build production-ready AI agents")}),d.jsx("div",{className:"grid grid-cols-2 gap-3",children:TJe.map(c=>{const u=c.icon;return d.jsxs("div",{className:"rounded-xl border border-sidebar-border/50 bg-sidebar-border/10 p-4",children:[d.jsx("div",{className:be("mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-linear-to-br text-white shadow-md",c.gradient),children:d.jsx(u,{className:"h-5 w-5"})}),d.jsx("p",{className:"text-sm font-semibold text-white",children:i(c.titleKey)}),d.jsx("p",{className:"mt-1 text-xs leading-relaxed text-sidebar-foreground/60",children:i(c.descKey)})]},c.titleKey)})})]}),s===2&&d.jsxs("div",{className:"flex flex-col items-center text-center animate-[fadeIn_300ms_ease-out]",children:[d.jsxs("div",{className:"relative mb-6",children:[d.jsx("div",{className:"absolute -inset-4 rounded-full bg-emerald-500/10 blur-xl"}),d.jsx("div",{className:"relative flex h-20 w-20 items-center justify-center rounded-2xl bg-linear-to-br from-emerald-500 to-teal-600 shadow-lg",children:d.jsx(wg,{className:"h-10 w-10 text-white"})})]}),d.jsx("h2",{className:"text-2xl font-bold text-white",children:i("onboarding.welcome.readyTitle")}),d.jsx("p",{className:"mt-2 text-sm text-sidebar-foreground/60",children:i("onboarding.welcome.readySubtitle")}),d.jsxs("div",{className:"mt-8 flex flex-col items-center gap-3 sm:flex-row",children:[d.jsxs("button",{onClick:o,className:"inline-flex items-center gap-2 rounded-xl bg-primary px-6 py-3 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/25 transition-all hover:bg-primary/90 hover:shadow-xl hover:shadow-primary/30 active:scale-[0.97]","data-testid":"welcome-start-tour",children:[d.jsx(Ll,{className:"h-4 w-4"}),i("onboarding.welcome.startTour")]}),d.jsx("button",{onClick:a,className:"inline-flex items-center gap-2 rounded-xl border border-sidebar-border px-6 py-3 text-sm font-medium text-sidebar-foreground/70 transition-colors hover:border-sidebar-foreground/30 hover:text-sidebar-foreground","data-testid":"welcome-explore",children:i("onboarding.welcome.exploreOwn")})]})]})]}),d.jsxs("div",{className:"flex items-center justify-between border-t border-sidebar-border px-6 py-4",children:[d.jsx("button",{onClick:()=>r(c=>Math.max(c-1,0)),disabled:s===0,className:be("rounded-lg p-1.5 transition-colors",s===0?"invisible":"text-sidebar-foreground/50 hover:text-sidebar-foreground hover:bg-sidebar-accent/10"),"aria-label":i("onboarding.tour.back"),children:d.jsx(El,{className:"h-4 w-4"})}),d.jsx("div",{className:"flex items-center gap-2",children:Array.from({length:wT}).map((c,u)=>d.jsx("button",{onClick:()=>r(u),className:be("carousel-dot h-2 rounded-full transition-all",u===s?"carousel-dot-active w-6 bg-primary":"w-2 bg-sidebar-foreground/30 hover:bg-sidebar-foreground/50"),"aria-label":`Panel ${u+1}`},u))}),d.jsx("button",{onClick:()=>r(c=>Math.min(c+1,wT-1)),disabled:s===wT-1,className:be("rounded-lg p-1.5 transition-colors",s===wT-1?"invisible":"text-sidebar-foreground/50 hover:text-sidebar-foreground hover:bg-sidebar-accent/10"),"aria-label":i("onboarding.tour.next"),children:d.jsx(wg,{className:"h-4 w-4"})})]})]})}),document.body):null}function AJe(i,e=8){const[t,n]=L.useState(null),s=L.useCallback(()=>{if(!i){n(null);return}const r=document.querySelector(i);if(!r){n(null);return}const o=r.getBoundingClientRect();n({top:o.top-e,left:o.left-e,width:o.width+e*2,height:o.height+e*2})},[i,e]);return L.useEffect(()=>{s();const r=()=>requestAnimationFrame(s);return window.addEventListener("resize",r),window.addEventListener("scroll",r,!0),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",r,!0)}},[s]),t}function RJe({targetSelector:i,padding:e=8,onOverlayClick:t}){const[n,s]=L.useState(null),r=L.useCallback(()=>{const o=document.querySelector(i);if(!o){s(null);return}const a=o.getBoundingClientRect(),l=window.innerHeight,c=window.innerWidth,u=Math.max(0,a.top)-e,h=Math.max(0,a.left)-e,g=Math.min(l,a.bottom)+e,f=Math.min(c,a.right)+e;s({top:u,left:h,width:f-h,height:g-u})},[i,e]);return L.useEffect(()=>{r();let o=0;const a=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(r)};return window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{cancelAnimationFrame(o),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}},[r]),L.useEffect(()=>{const o=document.querySelector(i);if(!o)return;const a=o.getBoundingClientRect(),l=window.innerHeight,c=window.innerWidth,u=a.top>=-50&&a.top<=l-100,h=a.left>=0&&a.right<=c;(!u||!h)&&(o.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(r,400))},[i,r]),n?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-9997",onClick:t,"data-testid":"tour-overlay-backdrop","aria-hidden":"true"}),d.jsx("div",{className:"tour-spotlight",style:{position:"fixed",top:n.top,left:n.left,width:n.width,height:n.height,zIndex:9998,pointerEvents:"none"},"data-testid":"tour-spotlight","aria-hidden":"true"})]}):null}const G0=340,$g=200,Yu=12,IS=16;function MJe(i,e){const t=window.innerWidth,n=window.innerHeight,s=Math.max(0,i.top),r=Math.min(n,i.top+i.height),o=Math.max(0,r-s),a=s+o/2,l=Math.max(0,i.left),c=Math.min(t,i.left+i.width),u=Math.max(0,c-l),h=l+u/2,g=n-r,f=s,m=t-c,x=l;let v;e==="auto"?g>=$g+Yu?v="bottom":f>=$g+Yu?v="top":m>=G0+Yu*2?v="right":x>=G0+Yu*2?v="left":v="bottom":(v=e,v==="bottom"&&g<$g+Yu?f>=$g+Yu&&(v="top"):v==="top"&&f<$g+Yu&&g>=$g+Yu&&(v="bottom"));let _=0,w=0;switch(v){case"bottom":_=r+Yu,w=h-G0/2;break;case"top":_=s-Yu,w=h-G0/2;break;case"right":_=a-$g/2,w=c+Yu;break;case"left":_=a-$g/2,w=l-G0-Yu;break}return w=Math.max(IS,Math.min(w,t-G0-IS)),v!=="top"?_=Math.max(IS,Math.min(_,n-$g-IS)):_=Math.max($g+IS,Math.min(_,n-IS)),{top:_,left:w,resolved:v}}function PJe({chapterTitleKey:i,titleKey:e,descriptionKey:t,currentStep:n,totalSteps:s,placement:r,targetRect:o,onNext:a,onPrev:l,onSkip:c,isFirstStep:u,isLastStep:h}){const{t:g}=xe(),{top:f,left:m,resolved:x}=MJe(o,r),v=(n+1)/s*100;return d.jsx("div",{className:be("tour-tooltip fixed z-9999",x==="top"&&"-translate-y-full"),style:{top:f,left:m,width:G0},role:"dialog","aria-label":g(e),"data-testid":"tour-tooltip",children:d.jsxs("div",{className:"rounded-xl border border-primary/20 bg-sidebar text-sidebar-foreground shadow-2xl shadow-black/30 overflow-hidden",children:[d.jsx("div",{className:"h-1 w-full bg-sidebar-border",children:d.jsx("div",{className:"h-full bg-primary transition-all duration-500 ease-out",style:{width:`${v}%`}})}),d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-primary",children:g(i)}),d.jsx("span",{className:"text-[11px] font-medium text-sidebar-foreground/50",children:g("onboarding.tour.stepOf",{current:n+1,total:s})})]}),d.jsx("h3",{className:"text-[15px] font-semibold text-white leading-tight",children:g(e)}),d.jsx("p",{className:"mt-1.5 text-[13px] leading-relaxed text-sidebar-foreground/70",children:g(t)}),d.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[d.jsxs("button",{onClick:l,disabled:u,className:be("inline-flex items-center gap-1 rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",u?"invisible":"text-sidebar-foreground/60 hover:text-sidebar-foreground hover:bg-sidebar-accent/10"),"data-testid":"tour-back",children:[d.jsx(El,{className:"h-3.5 w-3.5"}),g("onboarding.tour.back")]}),d.jsxs("button",{onClick:c,className:"inline-flex items-center gap-1 rounded-lg px-3 py-1.5 text-xs font-medium text-sidebar-foreground/40 hover:text-sidebar-foreground/70 transition-colors","data-testid":"tour-skip",children:[d.jsx(An,{className:"h-3 w-3"}),g("onboarding.tour.skip")]}),d.jsx("button",{onClick:a,className:"inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-1.5 text-xs font-semibold text-primary-foreground shadow-sm transition-all hover:bg-primary/90 active:scale-[0.97]","data-testid":"tour-next",children:h?d.jsxs(d.Fragment,{children:[d.jsx(Ll,{className:"h-3.5 w-3.5"}),g("onboarding.tour.finish")]}):d.jsxs(d.Fragment,{children:[g("onboarding.tour.next"),d.jsx(wg,{className:"h-3.5 w-3.5"})]})})]})]})]})})}function OJe(){const i=$s(m=>m.activeChapter),e=$s(m=>m.currentStep),t=$s(m=>m.nextStep),n=$s(m=>m.prevStep),s=$s(m=>m.skipChapter),r=$s(m=>m.completeChapter),o=i?Xie[i]:null,a=(o==null?void 0:o.steps.length)??0,l=Math.min(e,Math.max(0,a-1)),c=(o==null?void 0:o.steps[l])??null,u=l===0,h=l===a-1,g=AJe((c==null?void 0:c.target)??"",(c==null?void 0:c.padding)??8),f=L.useCallback(()=>{h?r():t()},[h,r,t]);return L.useEffect(()=>{if(!i)return;const m=x=>{var _;const v=(_=x.target)==null?void 0:_.tagName;if(!(v==="INPUT"||v==="TEXTAREA"||v==="SELECT"))switch(x.key){case"ArrowRight":case"Enter":x.preventDefault(),f();break;case"ArrowLeft":x.preventDefault(),u||n();break;case"Escape":x.preventDefault(),s();break}};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[i,f,u,n,s]),L.useEffect(()=>{if(!i)return;const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=m}},[i]),!i||!o||!c||!g?null:hg.createPortal(d.jsxs(d.Fragment,{children:[d.jsx(RJe,{targetSelector:c.target,padding:c.padding??8}),d.jsx(PJe,{chapterTitleKey:o.titleKey,titleKey:c.titleKey,descriptionKey:c.descriptionKey,currentStep:l,totalSteps:a,placement:c.placement,targetRect:g,onNext:f,onPrev:n,onSkip:s,isFirstStep:u,isLastStep:h})]}),document.body)}function jJe(){const{t:i}=xe(),e=$s(f=>f.offeredChapter),t=$s(f=>f.acceptOffer),n=$s(f=>f.dismissOffer),s=$s(f=>f.dismissAllOffers),[r,o]=L.useState(!1),[a,l]=L.useState(!1),c=e?Xie[e]:null;L.useEffect(()=>{if(!e){o(!1),l(!1);return}const f=setTimeout(()=>o(!0),600),m=setTimeout(()=>{u()},12e3);return()=>{clearTimeout(f),clearTimeout(m)}},[e]);const u=()=>{l(!0),setTimeout(()=>{n(),l(!1),o(!1)},300)},h=()=>{l(!0),setTimeout(()=>{s(),l(!1),o(!1)},300)},g=()=>{o(!1),t()};return!e||!c||!r?null:hg.createPortal(d.jsx("div",{className:`fixed bottom-6 inset-x-0 z-50 flex justify-center pointer-events-none transition-all duration-300 ${a?"translate-y-4 opacity-0":"translate-y-0 opacity-100"}`,"data-testid":"tour-offer-bar",children:d.jsxs("div",{className:"pointer-events-auto flex items-center gap-3 rounded-xl border border-primary/20 bg-sidebar px-4 py-2.5 shadow-xl shadow-black/20 backdrop-blur-sm",children:[d.jsx(Ll,{className:"h-4 w-4 text-primary shrink-0"}),d.jsx("span",{className:"text-sm text-sidebar-foreground/80",children:i("onboarding.offer.message",{page:i(c.titleKey),defaultValue:"New here? Take the {{page}}"})}),d.jsx("button",{onClick:g,className:"rounded-lg bg-primary px-3 py-1 text-xs font-semibold text-primary-foreground transition-all hover:bg-primary/90 active:scale-[0.97]","data-testid":"tour-offer-accept",children:i("onboarding.offer.accept","Show me")}),d.jsx("button",{onClick:h,className:"text-[11px] text-sidebar-foreground/40 hover:text-sidebar-foreground/70 transition-colors whitespace-nowrap","data-testid":"tour-offer-dismiss-all",children:i("onboarding.offer.dontAsk","Don't ask again")}),d.jsx("button",{onClick:u,className:"rounded p-0.5 text-sidebar-foreground/30 hover:text-sidebar-foreground/60 transition-colors","aria-label":i("common.close","Close"),"data-testid":"tour-offer-dismiss",children:d.jsx(An,{className:"h-3.5 w-3.5"})})]})}),document.body)}function FJe(){const{t:i}=xe(),[e,t]=L.useState(!1);return!window.__EDDI_MOCK_ACTIVE__||new URLSearchParams(window.location.search).get("hideMockBanner")==="true"||e?null:d.jsxs("div",{className:"relative flex items-center justify-center gap-2 bg-amber-500/90 px-4 py-1.5 text-xs font-medium text-amber-950 dark:bg-amber-600/90 dark:text-amber-50",children:[d.jsx(Vi,{className:"h-3.5 w-3.5 shrink-0"}),d.jsx("span",{children:i("mockBanner.message","Demo Mode — Displaying sample data. Connect an EDDI backend for real data.")}),d.jsx("button",{onClick:()=>t(!0),className:"absolute inset-e-2 top-1/2 -translate-y-1/2 rounded p-0.5 hover:bg-amber-600/30 dark:hover:bg-amber-800/40 transition-colors","aria-label":i("common.dismiss","Dismiss"),children:d.jsx(An,{className:"h-3.5 w-3.5"})})]})}function BJe(){const i=mp(),{t:e}=xe();L.useEffect(()=>{const t=i.pathname.replace(/^\/manage\/?/,"").split("/").filter(Boolean),n={agents:e("nav.agents"),workflows:e("nav.packages"),conversations:e("nav.conversations"),chat:e("nav.chat"),resources:e("nav.resources"),groups:e("nav.groups","Groups"),coordinator:e("nav.coordinator","Coordinator"),schedules:e("nav.schedules","Schedules"),logs:e("nav.logs","Logs"),orphans:e("nav.orphans","Orphans"),secrets:e("nav.secrets","Secrets"),audit:e("nav.audit","Audit Trail"),quotas:e("nav.quotas","Quotas"),userdata:e("userData.title","User Data"),triggers:e("nav.triggers","Triggers"),capabilities:e("nav.capabilities","Capabilities"),sync:e("nav.sync","Sync"),gdpr:e("nav.gdpr","GDPR"),wizard:e("wizard.title","Agent Wizard"),studio:e("nav.studio","Agent Studio"),properties:e("nav.properties","Properties")};if(t.length===0)document.title=`${e("nav.dashboard")} — EDDI Manager`;else{const s=t[0].replace(/view$/,""),r=n[s]??s;document.title=`${r} — EDDI Manager`}},[i.pathname,e])}function HJe(){const{t:i}=xe();BJe();const[e,t]=L.useState(!1),[n,s]=L.useState(!1),[r,o]=L.useState(!1);return L.useEffect(()=>{const a=()=>o(window.innerWidth<768);return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]),L.useEffect(()=>{r||s(!1)},[r]),L.useEffect(()=>{if(!n)return;const a=l=>{l.key==="Escape"&&s(!1)};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[n]),d.jsxs("div",{className:"flex h-screen overflow-hidden","data-testid":"app-layout",children:[d.jsx("a",{href:"#main-content",className:"skip-to-main",children:i("common.skipToMain","Skip to main content")}),!r&&d.jsx(nfe,{collapsed:e,onToggle:()=>t(a=>!a)}),r&&n&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 transition-opacity",onClick:()=>s(!1),"aria-hidden":"true","data-testid":"sidebar-overlay"}),d.jsx("div",{className:"fixed inset-y-0 start-0 z-50 w-64",children:d.jsx(nfe,{collapsed:!1,onToggle:()=>s(!1)})})]}),d.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[d.jsx(FJe,{}),d.jsx(VVe,{onMenuClick:()=>s(!0),sidebarVisible:n}),d.jsx("main",{id:"main-content",className:be("flex-1 overflow-auto bg-background p-6","transition-all duration-300"),children:d.jsx("div",{className:"@container/main mx-auto max-w-screen-2xl",children:d.jsx(T6e,{})})})]}),d.jsx(EJe,{}),d.jsx(IJe,{}),d.jsx(OJe,{}),d.jsx(jJe,{})]})}class WJe extends L.Component{constructor(t){super(t);kt(this,"reset",()=>{this.setState({error:null})});this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){}componentDidUpdate(t){this.props.resetKey!==t.resetKey&&this.state.error!==null&&this.setState({error:null})}render(){return this.state.error?this.props.fallback?this.props.fallback(this.state.error,this.reset):d.jsx(VJe,{error:this.state.error,onReset:this.reset}):this.props.children}}function VJe({error:i,onReset:e}){const{t}=xe();return d.jsxs("div",{className:"flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-xl border border-destructive/30 bg-destructive/5 p-8",role:"alert","data-testid":"error-boundary-fallback",children:[d.jsx("div",{className:"rounded-full bg-destructive/10 p-3",children:d.jsx(Vi,{className:"h-6 w-6 text-destructive"})}),d.jsxs("div",{className:"text-center",children:[d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:t("errorBoundary.title","Something went wrong")}),d.jsx("p",{className:"mt-1 max-w-md text-xs text-muted-foreground",children:i.message})]}),d.jsxs("button",{onClick:e,className:"inline-flex items-center gap-1.5 rounded-lg border border-border px-4 py-2 text-xs font-medium text-foreground transition-colors hover:bg-muted",children:[d.jsx(S_,{className:"h-3.5 w-3.5"}),t("errorBoundary.retry","Try Again")]})]})}function T7(i=100,e=0,t=""){const n=new URLSearchParams({limit:String(i),index:String(e)});return t&&n.set("filter",t),Oe.get(`/workflowstore/workflows/descriptors?${n.toString()}`)}function qM(i,e){return Oe.get(`/workflowstore/workflows/${i}?version=${e}`)}function zJe(i){return Oe.post("/workflowstore/workflows",i)}function Dse(i,e,t){return Oe.put(`/workflowstore/workflows/${i}?version=${e}`,t)}function UJe(i,e,t){const n=new URLSearchParams({version:String(e)});return Oe.delete(`/workflowstore/workflows/${i}?${n}`)}async function $Je(i){const t=await Oe.get(`/workflowstore/workflows/${i}/currentversion`)??1,s=(await Promise.all(Array.from({length:t},(r,o)=>o+1).map(async r=>{try{return await Oe.get(`/workflowstore/workflows/descriptors?filter=${i}&version=${r}`)}catch{return[]}}))).flat();return s.length===0?Oe.get(`/workflowstore/workflows/descriptors?filter=${i}`):s}function qJe(i,e,t=!1){const n=new URLSearchParams({version:String(e),deepCopy:String(t)});return Oe.post(`/workflowstore/workflows/${i}?${n}`)}async function KJe(){const[i,e,t]=await Promise.all([OL(1e3,0).catch(()=>[]),T7(1e3,0).catch(()=>[]),PL(1e3,0).catch(()=>[])]),n=new Set(i.map(r=>uo(r.resource).id)),s=new Set(e.map(r=>uo(r.resource).id));return{agentCount:n.size,workflowCount:s.size,conversationCount:t.length,resourceCount:0}}function Tse(i,e,t){const n={operation:"SET",document:t};return Oe.patch(`/descriptorstore/descriptors/${i}?version=${e}`,n)}const Ah=["agents"],CU=50;function e0(i=20,e=0,t=""){return hn({queryKey:[...Ah,"descriptors",{limit:i,index:e,filter:t}],queryFn:()=>OL(i,e,t)})}function I7(i=""){return rSe({queryKey:[...Ah,"descriptors-infinite",{filter:i}],queryFn:({pageParam:e=0})=>OL(CU,e,i),initialPageParam:0,getNextPageParam:(e,t)=>{if(e.length===CU)return t.length*CU}})}function GJe(i,e){return hn({queryKey:[...Ah,i,e],queryFn:()=>vC(i,e),enabled:!!i,placeholderData:Nie})}function mEe(i,e,t="production"){return hn({queryKey:[...Ah,"deployment",t,i,e],queryFn:()=>FM(t,i,e),enabled:!!i&&e>0,placeholderData:Nie,refetchInterval:n=>{var s;return((s=n.state.data)==null?void 0:s.status)==="IN_PROGRESS"?3e3:!1}})}function bEe(i){return hn({queryKey:[...Ah,"versions",i],queryFn:()=>sze(i),enabled:!!i,select:e=>e.map(t=>({version:uo(t.resource).version,lastModifiedOn:t.lastModifiedOn,name:t.name})).sort((t,n)=>n.version-t.version)})}function wC(){const i=cn();return Kt({mutationFn:({id:e,version:t,agent:n})=>jM(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:Ah})}})}function YJe(i,e){return hn({queryKey:[...Ah,"deploymentStatuses",i,e],queryFn:()=>lze(i,e),enabled:!!i&&e>0,placeholderData:Nie,refetchInterval:t=>{const n=t.state.data;return n!=null&&n.some(s=>s.status==="IN_PROGRESS")?3e3:!1}})}function QJe(){const i=cn();return Kt({mutationFn:async({agent:e,name:t,description:n})=>{const s=await rze(e);if((t||n)&&s.location){const r=new URL(s.location,"http://dummy"),o=r.pathname.split("/").filter(Boolean),a=o[o.length-1],l=parseInt(r.searchParams.get("version")||"1",10);await Tse(a,l,{name:t,description:n})}return s},onSuccess:()=>{i.invalidateQueries({queryKey:Ah})}})}function xEe(){const i=cn();return Kt({mutationFn:({id:e,version:t})=>mke(e,t),onSuccess:()=>{i.invalidateQueries({queryKey:Ah})}})}function vEe(){const i=cn();return Kt({mutationFn:({id:e,version:t,deepCopy:n})=>oze(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:Ah})}})}function _Ee(){const i=cn();return Kt({mutationFn:({environment:e="production",agentId:t,version:n})=>ese(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:Ah}),i.invalidateQueries({queryKey:["chat","deployedAgents"]})}})}function yEe(){const i=cn();return Kt({mutationFn:({environment:e="production",agentId:t,version:n})=>aze(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:Ah}),i.invalidateQueries({queryKey:["chat","deployedAgents"]})}})}function Cg(i){const e=new Map;for(const t of i){const{id:n,version:s}=uo(t.resource),r=e.get(n);(!r||s>r.version)&&e.set(n,{...t,id:n,version:s})}return Array.from(e.values()).sort((t,n)=>n.lastModifiedOn-t.lastModifiedOn)}const VL="/administration/coordinator";async function wEe(){return Oe.get(`${VL}/status`)}async function XJe(){return Oe.get(`${VL}/dead-letters`)}async function ZJe(i){return Oe.post(`${VL}/dead-letters/${i}/replay`)}async function JJe(i){return Oe.delete(`${VL}/dead-letters/${i}`)}async function eet(){return Oe.delete(`${VL}/dead-letters`)}function tet(){return new hEe(`${window.location.origin}${VL}/stream`,Oe.getAuthHeader())}function net(){return hn({queryKey:["dashboard","stats"],queryFn:KJe,staleTime:3e4})}function iet(){return e0(4,0)}function set(i=5){return hn({queryKey:["dashboard","recent-conversations",i],queryFn:()=>PL(i),staleTime:3e4})}function ret(){return hn({queryKey:["dashboard","coordinator-status"],queryFn:wEe,staleTime:6e4,retry:1})}const KM="/secretstore/secrets";async function oet(i){const e=await fetch(`${Oe.getBaseUrl()}${KM}/${i}`,{headers:Oe.getAuthHeader()});return e.ok?e.json():[]}async function CEe(i,e,t,n,s){const r={value:t};n&&(r.description=n),s&&(r.allowedAgents=s);const o=await fetch(`${Oe.getBaseUrl()}${KM}/${i}/${e}`,{method:"PUT",headers:{"Content-Type":"application/json",...Oe.getAuthHeader()},body:JSON.stringify(r)});if(!o.ok){if(o.status===503)throw new Error("Secrets vault is not configured. Set up a secret provider in the EDDI backend.");const a=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(a.error||`Failed to store secret (HTTP ${o.status})`)}return o.json()}async function aet(i,e){const t=await fetch(`${Oe.getBaseUrl()}${KM}/${i}/${e}`,{method:"DELETE",headers:Oe.getAuthHeader()});if(!t.ok&&t.status!==204){if(t.status===503)throw new Error("Secrets vault is not configured. Set up a secret provider in the EDDI backend.");const n=await t.json().catch(()=>({error:"Unknown error"}));throw new Error(n.error||`Failed to delete secret (HTTP ${t.status})`)}}async function cet(){try{const i=await fetch(`${Oe.getBaseUrl()}${KM}/health`,{headers:Oe.getAuthHeader()}),e=await i.json();return i.status===503?{status:"DOWN",provider:e.provider??"unknown",available:!1,error:e.error,reason:e.reason,action:e.action,docs:e.docs}:e}catch{return{status:"DOWN",provider:"unknown",available:!1}}}async function det(i,e,t,n){const s={value:t};n&&(s.description=n);const r=await fetch(`${Oe.getBaseUrl()}${KM}/${i}/${e}/rotate`,{method:"POST",headers:{"Content-Type":"application/json",...Oe.getAuthHeader()},body:JSON.stringify(s)});if(!r.ok){if(r.status===503)throw new Error("Secrets vault is not configured. Set up a secret provider in the EDDI backend.");if(r.status===404||r.status===405)return CEe(i,e,t,n);const o=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`Failed to rotate secret (HTTP ${r.status})`)}return r.json()}const GM={all:["secrets"],list:i=>["secrets","list",i],health:["secrets","health"]};function SEe(i){return hn({queryKey:GM.list(i),queryFn:()=>oet(i),enabled:!!i})}function kEe(){const i=cn();return Kt({mutationFn:e=>CEe(e.tenantId,e.keyName,e.value,e.description,e.allowedAgents),onSuccess:(e,t)=>{i.invalidateQueries({queryKey:GM.list(t.tenantId)})}})}function uet(){const i=cn();return Kt({mutationFn:e=>aet(e.tenantId,e.keyName),onSuccess:(e,t)=>{i.invalidateQueries({queryKey:GM.list(t.tenantId)})}})}function Ise(){return hn({queryKey:GM.health,queryFn:cet,refetchInterval:3e4})}function het(){const i=cn();return Kt({mutationFn:e=>det(e.tenantId,e.keyName,e.newValue,e.description),onSuccess:(e,t)=>{i.invalidateQueries({queryKey:GM.list(t.tenantId)})}})}const cm=L.forwardRef(({className:i,...e},t)=>d.jsx("div",{ref:t,className:be("rounded-xl border border-border bg-card text-card-foreground shadow-sm",i),...e}));cm.displayName="Card";const NEe=L.forwardRef(({className:i,...e},t)=>d.jsx("div",{ref:t,className:be("flex flex-col space-y-1.5 p-5 pb-0",i),...e}));NEe.displayName="CardHeader";const EEe=L.forwardRef(({className:i,...e},t)=>d.jsx("h3",{ref:t,className:be("text-lg font-semibold leading-none tracking-tight",i),...e}));EEe.displayName="CardTitle";const get=L.forwardRef(({className:i,...e},t)=>d.jsx("p",{ref:t,className:be("text-sm text-muted-foreground",i),...e}));get.displayName="CardDescription";const dm=L.forwardRef(({className:i,...e},t)=>d.jsx("div",{ref:t,className:be("p-5",i),...e}));dm.displayName="CardContent";const fet=L.forwardRef(({className:i,...e},t)=>d.jsx("div",{ref:t,className:be("flex items-center p-5 pt-0",i),...e}));fet.displayName="CardFooter";function _pe(i,e){if(typeof i=="function")return i(e);i!=null&&(i.current=e)}function yb(...i){return e=>{let t=!1;const n=i.map(s=>{const r=_pe(s,e);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let s=0;s{let{children:r,...o}=n;LEe(r)&&typeof Ij=="function"&&(r=Ij(r._payload));const a=L.Children.toArray(r),l=a.find(yet);if(l){const c=l.props.children,u=a.map(h=>h===l?L.Children.count(c)>1?L.Children.only(null):L.isValidElement(c)?c.props.children:null:h);return d.jsx(e,{...o,ref:s,children:L.isValidElement(c)?L.cloneElement(c,void 0,u):null})}return d.jsx(e,{...o,ref:s,children:r})});return t.displayName=`${i}.Slot`,t}var xet=bet("Slot");function vet(i){const e=L.forwardRef((t,n)=>{let{children:s,...r}=t;if(LEe(s)&&typeof Ij=="function"&&(s=Ij(s._payload)),L.isValidElement(s)){const o=Cet(s),a=wet(r,s.props);return s.type!==L.Fragment&&(a.ref=n?yb(n,o):o),L.cloneElement(s,a)}return L.Children.count(s)>1?L.Children.only(null):null});return e.displayName=`${i}.SlotClone`,e}var _et=Symbol("radix.slottable");function yet(i){return L.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===_et}function wet(i,e){const t={...e};for(const n in e){const s=i[n],r=e[n];/^on[A-Z]/.test(n)?s&&r?t[n]=(...a)=>{const l=r(...a);return s(...a),l}:s&&(t[n]=s):n==="style"?t[n]={...s,...r}:n==="className"&&(t[n]=[s,r].filter(Boolean).join(" "))}return{...i,...t}}function Cet(i){var n,s;let e=(n=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:n.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=(s=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}const ype=i=>typeof i=="boolean"?`${i}`:i===0?"0":i,wpe=XSe,DEe=(i,e)=>t=>{var n;if((e==null?void 0:e.variants)==null)return wpe(i,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:s,defaultVariants:r}=e,o=Object.keys(s).map(c=>{const u=t==null?void 0:t[c],h=r==null?void 0:r[c];if(u===null)return null;const g=ype(u)||ype(h);return s[c][g]}),a=t&&Object.entries(t).reduce((c,u)=>{let[h,g]=u;return g===void 0||(c[h]=g),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:h,className:g,...f}=u;return Object.entries(f).every(m=>{let[x,v]=m;return Array.isArray(v)?v.includes({...r,...a}[x]):{...r,...a}[x]===v})?[...c,h,g]:c},[]);return wpe(i,o,l,t==null?void 0:t.class,t==null?void 0:t.className)},ket=DEe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0",{variants:{variant:{primary:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 hover:shadow-md",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-secondary hover:text-secondary-foreground",ghost:"hover:bg-secondary hover:text-secondary-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 py-2.5",lg:"h-11 px-6 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"primary",size:"md"}}),Yt=L.forwardRef(({className:i,variant:e,size:t,asChild:n=!1,...s},r)=>{const o=n?xet:"button";return d.jsx(o,{className:be(ket({variant:e,size:t,className:i})),ref:r,...s})});Yt.displayName="Button";function bi({className:i,...e}){return d.jsx("div",{className:be("animate-pulse rounded-md bg-muted",i),...e})}const Cpe={READY:"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",IN_PROGRESS:"bg-blue-500/10 text-blue-600 dark:text-blue-400",ERROR:"bg-red-500/10 text-red-600 dark:text-red-400",ENDED:"bg-gray-500/10 text-gray-500"};function Net(){const{t:i}=xe(),{data:e,isLoading:t}=net(),{data:n,isLoading:s}=iet(),{data:r,isLoading:o}=set(5),{data:a}=ret(),l=gke(),{data:c}=Ise(),{data:u=[]}=e0(50),h=L.useMemo(()=>n?Cg(n).slice(0,4):[],[n]),g=L.useMemo(()=>{const v=new Map;if(u.length>0)for(const _ of Cg(u))_.name&&v.set(_.id,_.name);return v},[u]),f=$s(v=>v.maybeAutoStart);L.useEffect(()=>{const v=setTimeout(()=>f("dashboard"),500);return()=>clearTimeout(v)},[f]);const x=[{label:i("pages.dashboard.activeAgents"),value:(e==null?void 0:e.agentCount)??0,icon:ai,gradient:"from-amber-500/10 to-primary/5",iconColor:"text-primary bg-primary/10",to:"/manage/agents"},{label:i("pages.dashboard.totalWorkflows"),value:(e==null?void 0:e.workflowCount)??0,icon:Ed,gradient:"from-emerald-500/10 to-emerald-500/5",iconColor:"text-emerald-600 dark:text-emerald-400 bg-emerald-500/10",to:"/manage/workflows"},{label:i("pages.dashboard.totalConversations"),value:(e==null?void 0:e.conversationCount)??0,icon:Zl,gradient:"from-blue-500/10 to-blue-500/5",iconColor:"text-blue-600 dark:text-blue-400 bg-blue-500/10",to:"/manage/conversations"},{label:i("pages.dashboard.totalResources"),value:(e==null?void 0:e.resourceCount)??0,icon:bp,gradient:"from-violet-500/10 to-violet-500/5",iconColor:"text-violet-600 dark:text-violet-400 bg-violet-500/10",to:"/manage/resources"}].filter(v=>v.to!=="/manage/resources"||v.value>0);return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"flex items-center gap-2 text-3xl font-bold text-foreground",children:[d.jsx(_j,{className:"h-8 w-8 text-primary"}),i("pages.dashboard.title")]}),d.jsx("p",{className:"mt-1 text-muted-foreground",children:i("pages.dashboard.subtitle")})]}),d.jsxs("div",{className:"flex w-fit flex-wrap items-center gap-3 rounded-xl border border-border bg-card/50 px-4 py-2.5",role:"status","aria-label":i("dashboard.platformHealth","Platform health"),"data-testid":"platform-health-strip",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[d.jsx("span",{className:`inline-flex h-2 w-2 rounded-full ${l.status==="online"?"bg-emerald-500 animate-pulse":l.status==="offline"?"bg-red-500":"bg-muted-foreground animate-pulse"}`}),d.jsx("span",{className:"font-medium text-foreground",children:i("dashboard.platform","Platform")}),d.jsx("span",{className:"text-muted-foreground",children:l.status==="online"?i("dashboard.online","Online"):l.status==="offline"?i("dashboard.offline","Offline"):i("dashboard.checking","Checking…")})]}),d.jsx("div",{className:"h-4 w-px bg-border"}),d.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[a?a.coordinatorType==="nats"?d.jsx(ESe,{className:"h-3.5 w-3.5 text-blue-500"}):d.jsx(rb,{className:"h-3.5 w-3.5 text-purple-500"}):d.jsx(AE,{className:"h-3.5 w-3.5 text-muted-foreground"}),d.jsx("span",{className:"text-muted-foreground",children:a?a.connected?i("dashboard.coordConnected","Coordinator connected"):i("dashboard.coordDisconnected","Coordinator disconnected"):i("dashboard.coordUnknown","Coordinator —")})]}),d.jsx("div",{className:"h-4 w-px bg-border"}),d.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[c!=null&&c.available?d.jsx(Xl,{className:"h-3.5 w-3.5 text-emerald-500"}):d.jsx(Vi,{className:"h-3.5 w-3.5 text-amber-500"}),d.jsx("span",{className:"text-muted-foreground",children:c!=null&&c.available?i("dashboard.vaultUp","Vault ready"):i("dashboard.vaultDown","Vault unavailable")})]})]}),d.jsx("div",{className:"cq-stat-grid","data-tour":"dashboard-stats",children:t?Array.from({length:4}).map((v,_)=>d.jsx(cm,{children:d.jsxs(dm,{className:"flex items-center gap-4",children:[d.jsx(bi,{className:"h-12 w-12 rounded-lg"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(bi,{className:"h-3 w-20"}),d.jsx(bi,{className:"h-7 w-12"})]})]})},_)):x.map(v=>d.jsx(Kn,{to:v.to,"aria-label":`${v.label}: ${v.value}`,children:d.jsxs(cm,{className:"group relative overflow-hidden transition-all hover:shadow-lg hover:-translate-y-0.5 active:translate-y-0",children:[d.jsx("div",{className:be("absolute inset-0 bg-linear-to-br opacity-0 transition-opacity group-hover:opacity-100",v.gradient)}),d.jsxs(dm,{className:"relative flex items-center gap-4",children:[d.jsx("div",{className:be("rounded-lg p-3",v.iconColor),children:d.jsx(v.icon,{className:"h-6 w-6"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:v.label}),d.jsx("p",{className:"text-2xl font-bold text-foreground tabular-nums",children:v.value>0?v.value.toLocaleString():d.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground/50",children:["0 ",d.jsx(Gt,{className:"h-3 w-3"})]})})]})]})]})},v.label))}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:i("pages.dashboard.quickActions")}),d.jsxs("div",{className:"flex flex-wrap gap-2","data-tour":"dashboard-actions",children:[d.jsx(Yt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/agents/wizard",children:[d.jsx(RL,{className:"h-4 w-4"}),i("wizard.title")]})}),d.jsx(Yt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/chat",children:[d.jsx(Jf,{className:"h-4 w-4"}),i("nav.chat")]})}),d.jsx(Yt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/logs",children:[d.jsx(IL,{className:"h-4 w-4"}),i("dashboard.viewLogs","View Logs")]})}),d.jsx(Yt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/audit",children:[d.jsx(bh,{className:"h-4 w-4"}),i("dashboard.auditTrail","Audit Trail")]})}),d.jsx(Yt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/secrets",children:[d.jsx(Uv,{className:"h-4 w-4"}),i("dashboard.secretVault","Secret Vault")]})}),d.jsx(Yt,{variant:"outline",asChild:!0,children:d.jsxs(Kn,{to:"/manage/groups/wizard",children:[d.jsx(pA,{className:"h-4 w-4"}),i("dashboard.createGroup","Create Group")]})})]})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[d.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:i("dashboard.recentConversations","Recent Conversations")}),d.jsxs(Kn,{to:"/manage/conversations",className:"inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",children:[i("nav.conversations"),d.jsx(wg,{className:"h-3 w-3"})]})]}),o?d.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((v,_)=>d.jsx(cm,{children:d.jsxs(dm,{className:"flex items-center gap-3 py-3",children:[d.jsx(bi,{className:"h-8 w-8 rounded-lg"}),d.jsxs("div",{className:"flex-1 space-y-1.5",children:[d.jsx(bi,{className:"h-3 w-40"}),d.jsx(bi,{className:"h-3 w-24"})]})]})},_))}):!r||r.length===0?d.jsx(cm,{children:d.jsxs(dm,{className:"flex items-center gap-3 py-6 text-muted-foreground",children:[d.jsx(Zl,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm",children:i("dashboard.noConversations","No conversations yet")})]})}):d.jsx("div",{className:"flex flex-col gap-4","data-testid":"recent-conversations",children:r.map(v=>{const _=dg(v.resource),w=g.get(v.agentId),k=v.name||w||i("agents.unnamed","Unnamed Agent");return d.jsx(Kn,{to:`/manage/conversationview/${_}`,children:d.jsx(cm,{className:"transition-all hover:shadow-sm hover:border-primary/20",children:d.jsxs(dm,{className:"flex items-center gap-3 py-3",children:[d.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10",children:d.jsx(ai,{className:"h-4 w-4 text-primary"})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:k}),d.jsxs("p",{className:"truncate text-xs text-muted-foreground",children:[_.slice(0,12),"… · v",v.agentVersion]})]}),d.jsx("span",{className:be("shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide",Cpe[v.conversationState]??Cpe.ENDED),children:v.conversationState}),d.jsx("span",{className:"shrink-0 text-xs text-muted-foreground tabular-nums",children:v.lastModifiedOn?Tw(v.lastModifiedOn):"—"})]})})},_)})})]}),d.jsxs("div",{"data-testid":"recent-agents",children:[d.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[d.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:i("pages.dashboard.recentAgents")}),d.jsxs(Kn,{to:"/manage/agents",className:"inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",children:[i("nav.agents"),d.jsx(wg,{className:"h-3 w-3"})]})]}),s?d.jsx("div",{className:"cq-stat-grid",children:Array.from({length:4}).map((v,_)=>d.jsx(cm,{children:d.jsxs(dm,{className:"space-y-3",children:[d.jsx(bi,{className:"h-5 w-3/4"}),d.jsx(bi,{className:"h-4 w-1/2"}),d.jsx(bi,{className:"h-4 w-full"})]})},_))}):h.length===0?d.jsx(cm,{children:d.jsxs(dm,{className:"flex flex-col items-center py-8",children:[d.jsx(ai,{className:"h-10 w-10 text-muted-foreground/50"}),d.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:i("pages.dashboard.noRecentAgents")}),d.jsx(Yt,{variant:"outline",size:"sm",className:"mt-3",asChild:!0,children:d.jsxs(Kn,{to:"/manage/agents/wizard",children:[d.jsx(Gt,{className:"h-4 w-4"}),i("agents.createAgent")]})})]})}):d.jsx("div",{className:"cq-card-grid",children:h.map(v=>d.jsx(Kn,{to:`/manage/agentview/${v.id}`,children:d.jsxs(cm,{className:"group relative overflow-hidden transition-all hover:shadow-md hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0",children:[d.jsx("div",{className:"absolute inset-0 bg-linear-to-br from-primary/5 to-transparent opacity-0 transition-opacity group-hover:opacity-100"}),d.jsx(NEe,{className:"relative",children:d.jsx(EEe,{className:"truncate text-base",children:v.name||i("agents.unnamed","Unnamed Agent")})}),d.jsxs(dm,{className:"relative pt-0",children:[d.jsx("p",{className:"text-xs text-muted-foreground truncate",children:v.description||"—"}),d.jsx("p",{className:"mt-2 text-xs text-muted-foreground/70",children:v.lastModifiedOn?Tw(v.lastModifiedOn):"—"})]})]})},v.id))})]})]})}const Eet={READY:{icon:Ih,color:"text-emerald-500",bg:"bg-emerald-500/10",ring:"ring-emerald-500/20"},IN_PROGRESS:{icon:Zr,color:"text-amber-500",bg:"bg-amber-500/10",ring:"ring-amber-500/20"},ERROR:{icon:Vi,color:"text-destructive",bg:"bg-destructive/10",ring:"ring-destructive/20"},NOT_FOUND:{icon:qSe,color:"text-muted-foreground",bg:"bg-muted",ring:"ring-border"}};function Let({agent:i,onDuplicate:e,onDelete:t,onExport:n}){const{t:s}=xe(),[r,o]=L.useState(!1),a=L.useRef(null),{data:l}=mEe(i.id,i.version),c=_Ee(),u=yEe(),h=BM(),g=L.useCallback(()=>{o(!1),requestAnimationFrame(()=>{var T;return(T=a.current)==null?void 0:T.focus()})},[]),f=(l==null?void 0:l.status)??"NOT_FOUND",m=Eet[f],x=m.icon,_={READY:s("status.deployed","Deployed"),IN_PROGRESS:s("status.deploying","Deploying..."),ERROR:s("status.error","Error"),NOT_FOUND:s("status.notDeployed","Not deployed")}[f]??f,w=f==="READY",k=c.isPending||u.isPending||f==="IN_PROGRESS";function C(){c.mutate({agentId:i.id,version:i.version},{onSuccess:()=>ze.success(s("agents.deploySuccess","Agent deployed successfully")),onError:()=>ze.error(s("agents.deployError","Deploy failed"))})}function E(){u.mutate({agentId:i.id,version:i.version},{onSuccess:()=>ze.success(s("agents.undeploySuccess","Agent undeployed")),onError:()=>ze.error(s("agents.undeployError","Undeploy failed"))})}const D=Tw(i.lastModifiedOn);return d.jsxs("div",{className:be("group relative flex flex-col rounded-xl border bg-card p-5 shadow-sm transition-all duration-200","hover:shadow-md hover:border-primary/30",`ring-1 ${m.ring}`),"data-testid":`agent-card-${i.id}`,children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{className:be("inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-medium ring-1",m.bg,m.color,m.ring),children:[d.jsx(x,{className:"h-3.5 w-3.5"}),_]}),d.jsxs("div",{className:"relative",children:[d.jsx("button",{ref:a,onClick:()=>o(!r),className:"rounded-md p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-secondary hover:text-foreground group-hover:opacity-100 focus:opacity-100 group-focus-within:opacity-100","data-testid":`agent-menu-${i.id}`,"aria-label":s("common.moreActions","More actions"),"aria-haspopup":"true","aria-expanded":r,children:d.jsx(c7,{className:"h-4 w-4","aria-hidden":"true"})}),r&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40",onClick:g,"aria-hidden":"true"}),d.jsx(Det,{onDuplicate:()=>{e(i.id,i.version),o(!1)},onExport:()=>{n==null||n(i.id,i.version),o(!1)},onDelete:()=>{t(i.id,i.version),o(!1)},onClose:g})]})]})]}),d.jsxs("div",{className:"mt-4 flex-1",children:[d.jsxs(Kn,{to:`/manage/agentview/${i.id}`,className:"text-lg font-semibold text-foreground hover:text-primary transition-colors",children:[i.name||s("agents.unnamed","Unnamed Agent"),d.jsx(To,{className:"ms-1 inline h-3.5 w-3.5 opacity-0 group-hover:opacity-50"})]}),d.jsx("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground/70 truncate",title:i.id,children:i.id}),d.jsx("p",{className:"mt-1 line-clamp-2 text-sm text-muted-foreground",children:i.description||s("agents.noDescription","No description")})]}),d.jsxs("div",{className:"mt-4 flex items-center justify-between border-t border-border pt-3",children:[d.jsx("span",{className:"text-xs text-muted-foreground",title:new Date(i.lastModifiedOn).toLocaleString(),children:D}),d.jsxs("div",{className:"flex items-center gap-2",children:[w&&d.jsxs("div",{className:"inline-flex",children:[d.jsxs("button",{onClick:async()=>{const T=_c.getState(),I=Oi.getState(),R=i.name||s("agents.unnamed","Unnamed Agent");T.open(i.id,R),T.setStep("starting"),I.clearMessages(),I.setSelectedAgent(i.id,R);try{await h.mutateAsync({agentId:i.id}),T.setStep("ready")}catch(P){T.setStep("error",Vs(P))}},className:"inline-flex items-center gap-1.5 rounded-s-lg bg-emerald-500/10 px-3 py-1.5 text-xs font-medium text-emerald-600 hover:bg-emerald-500/20 transition-colors dark:text-emerald-400","data-testid":`agent-chat-${i.id}`,"aria-label":s("agents.chat","Chat"),children:[d.jsx(Zl,{className:"h-3.5 w-3.5","aria-hidden":"true"}),s("agents.chat","Chat")]}),d.jsx("a",{href:`/chat/production/${i.id}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center rounded-e-lg border-s border-emerald-500/20 bg-emerald-500/10 px-1.5 py-1.5 text-emerald-600 hover:bg-emerald-500/20 transition-colors dark:text-emerald-400",title:s("agents.openExternalChat","Open in new tab"),"aria-label":s("agents.openExternalChat","Open in new tab"),"data-testid":`agent-external-chat-${i.id}`,children:d.jsx(To,{className:"h-3 w-3","aria-hidden":"true"})})]}),d.jsx("button",{onClick:w?E:C,disabled:k,className:be("rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",w?"bg-destructive/10 text-destructive hover:bg-destructive/20":"bg-primary/10 text-primary hover:bg-primary/20",k&&"cursor-not-allowed opacity-50"),children:k?s("common.loading"):w?s("agents.undeploy","Undeploy"):s("agents.deploy","Deploy")})]})]})]})}function Det({onDuplicate:i,onExport:e,onDelete:t,onClose:n}){const{t:s}=xe(),r=L.useRef(null);L.useEffect(()=>{requestAnimationFrame(()=>{var l;const a=(l=r.current)==null?void 0:l.querySelector('[role="menuitem"]');a==null||a.focus()})},[]);const o=L.useCallback(a=>{var g,f;if(a.key==="Escape"){a.preventDefault(),n();return}const l=(g=r.current)==null?void 0:g.querySelectorAll('[role="menuitem"]');if(!l||l.length===0)return;const c=Array.from(l),u=c.indexOf(document.activeElement);let h=null;switch(a.key){case"ArrowDown":h=(u+1)%c.length;break;case"ArrowUp":h=(u-1+c.length)%c.length;break;case"Home":h=0;break;case"End":h=c.length-1;break;default:return}a.preventDefault(),(f=c[h])==null||f.focus()},[n]);return d.jsxs("div",{ref:r,className:"absolute inset-e-0 z-50 mt-1 w-44 rounded-lg border bg-popover py-1 shadow-lg",role:"menu","aria-label":s("common.moreActions","More actions"),onKeyDown:o,children:[d.jsxs("button",{onClick:i,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-popover-foreground hover:bg-secondary focus:bg-secondary",role:"menuitem",tabIndex:-1,children:[d.jsx(mo,{className:"h-4 w-4","aria-hidden":"true"}),s("common.duplicate","Duplicate")]}),d.jsxs("button",{onClick:e,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-popover-foreground hover:bg-secondary focus:bg-secondary disabled:opacity-50",role:"menuitem",tabIndex:-1,children:[d.jsx(Q_,{className:"h-4 w-4","aria-hidden":"true"}),s("agents.export","Export")]}),d.jsxs("button",{onClick:t,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-destructive hover:bg-destructive/10 focus:bg-destructive/10",role:"menuitem",tabIndex:-1,children:[d.jsx(_n,{className:"h-4 w-4","aria-hidden":"true"}),s("common.delete")]})]})}function YM({open:i,onClose:e,title:t,children:n,testId:s,maxWidth:r="max-w-md",showClose:o=!0}){const{t:a}=xe(),l=L.useRef(null),c=L.useRef(null),u=L.useId();L.useEffect(()=>{var g;i?(c.current=document.activeElement,requestAnimationFrame(()=>{var m;const f=(m=l.current)==null?void 0:m.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');f==null||f.focus()})):(g=c.current)==null||g.focus()},[i]),L.useEffect(()=>{if(!i)return;const g=f=>{f.key==="Escape"&&(f.stopPropagation(),e())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[i,e]);const h=L.useCallback(g=>{if(g.key!=="Tab")return;const f=l.current;if(!f)return;const m=f.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(m.length===0)return;const x=m[0],v=m[m.length-1];g.shiftKey&&document.activeElement===x?(g.preventDefault(),v.focus()):!g.shiftKey&&document.activeElement===v&&(g.preventDefault(),x.focus())},[]);return i?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:e,"aria-hidden":"true"}),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:d.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":u,className:`w-full ${r} rounded-xl border bg-card shadow-2xl`,onClick:g=>g.stopPropagation(),onKeyDown:h,"data-testid":s,children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-border p-5",children:[d.jsx("h2",{id:u,className:"text-lg font-semibold text-foreground",children:t}),o&&d.jsx("button",{onClick:e,"aria-label":a("common.close","Close"),className:"rounded-md p-1 text-muted-foreground hover:bg-secondary hover:text-foreground",children:d.jsx(An,{className:"h-5 w-5"})})]}),n]})})]}):null}function Tet({open:i,onClose:e}){const{t}=xe(),n=il(),[s,r]=L.useState(""),[o,a]=L.useState(""),l=QJe();async function c(u){u.preventDefault();try{const h=await l.mutateAsync({agent:{workflows:[],channels:[]},name:s,description:o});if(ze.success(t("agents.createSuccess","Agent created successfully")),r(""),a(""),e(),h.location){const f=new URL(h.location,"http://dummy").pathname.split("/").filter(Boolean),m=f[f.length-1];m&&n(`/manage/agents/${m}`)}}catch(h){ze.error(Vs(h))}}return d.jsx(YM,{open:i,onClose:e,title:t("agents.createTitle","Create New Agent"),testId:"create-agent-dialog",children:d.jsxs("form",{onSubmit:c,className:"space-y-4 p-5",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"agent-name",className:"mb-1.5 block text-sm font-medium text-foreground",children:t("agents.name","Name")}),d.jsx("input",{id:"agent-name",type:"text",value:s,onChange:u=>r(u.target.value),placeholder:t("agents.namePlaceholder","My Agent"),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring",autoFocus:!0})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"agent-description",className:"mb-1.5 block text-sm font-medium text-foreground",children:t("agents.description","Description")}),d.jsx("textarea",{id:"agent-description",value:o,onChange:u=>a(u.target.value),placeholder:t("agents.descriptionPlaceholder","Describe what this agent does..."),rows:3,className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring resize-none"})]}),l.isError&&d.jsx("p",{className:"text-sm text-destructive",role:"alert",children:t("common.error")}),d.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[d.jsx("button",{type:"button",onClick:e,className:"rounded-lg px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-secondary transition-colors",children:t("common.cancel")}),d.jsx("button",{type:"submit",disabled:l.isPending,className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-50",children:l.isPending?t("common.loading"):t("common.create")})]})]})})}function w4(i){try{const e=i.startsWith("eddi://")?i.replace("eddi://","http://"):i,t=new URL(e,"http://dummy"),n=t.pathname.split("/").filter(Boolean),s=n[n.length-1]||i,r=t.searchParams.get("version"),o=r?parseInt(r,10):NaN,a=Number.isFinite(o)?o:null;return{id:s,version:a}}catch{const e=i.split("/");return{id:e[e.length-1]||i,version:null}}}function QM(i){return{...Oe.getAuthHeader(),...i?{"X-Source-Authorization":i}:{}}}async function Iet(i){const e=i.startsWith("http")?i:`${Oe.getBaseUrl()}${i}`,t=await fetch(e,{headers:Oe.getAuthHeader()});if(!t.ok)throw new Error(`Download failed: ${t.statusText}`);const n=await t.blob(),s=i.split("/").pop()||"agent-export.zip",r=document.createElement("a");r.href=URL.createObjectURL(n),r.download=s,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(r.href)}async function Aet(i){const e=await fetch(`${Oe.getBaseUrl()}/backup/import`,{method:"POST",headers:{"Content-Type":"application/zip",...Oe.getAuthHeader()},body:i});if(!e.ok)throw new Error(`Import failed: ${e.statusText}`);return e.headers.get("Location")||""}async function Ret(i){const e=await fetch(`${Oe.getBaseUrl()}/backup/import/preview`,{method:"POST",headers:{"Content-Type":"application/zip",...Oe.getAuthHeader()},body:i});if(!e.ok)throw new Error(`Preview failed: ${e.statusText}`);return e.json()}async function Met(i,e){const t=new URLSearchParams({strategy:"merge"});e&&e.length>0&&t.set("selectedResources",e.join(","));const n=await fetch(`${Oe.getBaseUrl()}/backup/import?${t}`,{method:"POST",headers:{"Content-Type":"application/zip",...Oe.getAuthHeader()},body:i});if(!n.ok)throw new Error(`Merge import failed: ${n.statusText}`);return n.headers.get("Location")||""}async function Pet(i,e=1){return Oe.post(`/backup/export/${i}/preview?agentVersion=${e}`)}async function Oet(i,e,t){const n=new URLSearchParams({agentVersion:String(e)});t.length>0&&n.set("selectedResources",t.join(","));const s=await fetch(`${Oe.getBaseUrl()}/backup/export/${i}?${n}`,{method:"POST",headers:Oe.getAuthHeader()});if(!s.ok)throw new Error(`Export failed: ${s.statusText}`);const r=s.headers.get("Location");r&&await Iet(r)}async function jet(i,e){const t=new URLSearchParams({targetAgentId:e}),n=await fetch(`${Oe.getBaseUrl()}/backup/import/preview?${t}`,{method:"POST",headers:{"Content-Type":"application/zip",...Oe.getAuthHeader()},body:i});if(!n.ok)throw new Error(`Upgrade preview failed: ${n.statusText}`);return n.json()}async function Fet(i,e,t,n){const s=new URLSearchParams({strategy:"upgrade",targetAgentId:e});t!=null&&t.length&&s.set("selectedResources",t.join(",")),n!=null&&n.length&&s.set("workflowOrder",n.join(","));const r=await fetch(`${Oe.getBaseUrl()}/backup/import?${s}`,{method:"POST",headers:{"Content-Type":"application/zip",...Oe.getAuthHeader()},body:i});if(!r.ok)throw new Error(`Upgrade import failed: ${r.statusText}`);return r.headers.get("Location")||""}async function Bet(i,e){const t=new URLSearchParams({sourceUrl:i}),n=await fetch(`${Oe.getBaseUrl()}/backup/import/sync/agents?${t}`,{headers:QM(e)});if(!n.ok)throw new Error(`Failed to list remote agents: ${n.statusText}`);return n.json()}async function Het(i,e,t,n,s){const r=new URLSearchParams({sourceUrl:i,sourceAgentId:e});t!=null&&r.set("sourceAgentVersion",String(t)),n&&r.set("targetAgentId",n);const o=await fetch(`${Oe.getBaseUrl()}/backup/import/sync/preview?${r}`,{method:"POST",headers:QM(s)});if(!o.ok)throw new Error(`Sync preview failed: ${o.statusText}`);return o.json()}async function Wet(i,e,t){const n=new URLSearchParams({sourceUrl:i}),s=await fetch(`${Oe.getBaseUrl()}/backup/import/sync/preview/batch?${n}`,{method:"POST",headers:{"Content-Type":"application/json",...QM(t)},body:JSON.stringify(e)});if(!s.ok)throw new Error(`Batch preview failed: ${s.statusText}`);return s.json()}async function Vet(i,e,t,n,s,r,o){const a=new URLSearchParams({sourceUrl:i,sourceAgentId:e});t!=null&&a.set("sourceAgentVersion",String(t)),n&&a.set("targetAgentId",n),s!=null&&s.length&&a.set("selectedResources",s.join(",")),r!=null&&r.length&&a.set("workflowOrder",r.join(","));const l=await fetch(`${Oe.getBaseUrl()}/backup/import/sync?${a}`,{method:"POST",headers:QM(o)});if(!l.ok)throw new Error(`Sync execute failed: ${l.statusText}`)}async function zet(i,e,t){const n=new URLSearchParams({sourceUrl:i}),s=await fetch(`${Oe.getBaseUrl()}/backup/import/sync/batch?${n}`,{method:"POST",headers:{"Content-Type":"application/json",...QM(t)},body:JSON.stringify(e)});if(!s.ok)throw new Error(`Batch sync failed: ${s.statusText}`)}const XM=["agents"];function Uet(){const i=cn();return Kt({mutationFn:e=>Aet(e),onSuccess:()=>{i.invalidateQueries({queryKey:XM})}})}function $et(){return Kt({mutationFn:i=>Ret(i)})}function qet(){const i=cn();return Kt({mutationFn:({file:e,selectedSourceIds:t})=>Met(e,t),onSuccess:()=>{i.invalidateQueries({queryKey:XM})}})}function Ket(i,e,t){return hn({queryKey:["export-preview",i,e],queryFn:()=>Pet(i,e),enabled:t,staleTime:3e4})}function Get(){return Kt({mutationFn:({agentId:i,version:e,selectedResourceIds:t})=>Oet(i,e,t)})}function Yet(){return Kt({mutationFn:({file:i,targetAgentId:e})=>jet(i,e)})}function Qet(){const i=cn();return Kt({mutationFn:({file:e,targetAgentId:t,selectedSourceIds:n,workflowOrder:s})=>Fet(e,t,n,s),onSuccess:()=>{i.invalidateQueries({queryKey:XM})}})}function Xet(){return Kt({mutationFn:({sourceUrl:i,sourceAuth:e})=>Bet(i,e)})}function Zet(){return Kt({mutationFn:({sourceUrl:i,sourceAgentId:e,sourceVersion:t,targetAgentId:n,sourceAuth:s})=>Het(i,e,t,n,s)})}function Jet(){return Kt({mutationFn:({sourceUrl:i,mappings:e,sourceAuth:t})=>Wet(i,e,t)})}function ett(){const i=cn();return Kt({mutationFn:({sourceUrl:e,sourceAgentId:t,sourceVersion:n,targetAgentId:s,selectedResources:r,workflowOrder:o,sourceAuth:a})=>Vet(e,t,n,s,r,o,a),onSuccess:()=>{i.invalidateQueries({queryKey:XM})}})}function ttt(){const i=cn();return Kt({mutationFn:({sourceUrl:e,requests:t,sourceAuth:n})=>zet(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:XM})}})}function TEe({url:i,auth:e,onUrlChange:t,onAuthChange:n,onConnected:s}){const{t:r}=xe(),[o,a]=L.useState(!1),[l,c]=L.useState("idle"),[u,h]=L.useState(0),[g,f]=L.useState(null),m=Xet();function x(){i.trim()&&(c("connecting"),f(null),m.mutate({sourceUrl:i.trim(),sourceAuth:e.trim()},{onSuccess:v=>{c("connected"),h(v.length),s(v)},onError:v=>{c("error"),f(v.message)}}))}return d.jsxs("form",{className:"space-y-3","data-testid":"sync-config-panel",onSubmit:v=>{v.preventDefault(),x()},children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:r("syncPage.sourceUrl","Source EDDI Instance URL")}),d.jsx("input",{type:"url",value:i,onChange:v=>{t(v.target.value),l!=="idle"&&c("idle")},placeholder:"https://staging.eddi.example.com",className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"sync-url-input"})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:r("syncPage.authToken","Authorization Token")}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:o?"text":"password",value:e,onChange:v=>n(v.target.value),placeholder:"Bearer eyJhb...",className:"w-full rounded-lg border border-input bg-background px-3 py-2 pe-10 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"sync-auth-input"}),d.jsx("button",{type:"button",onClick:()=>a(!o),className:"absolute end-2 top-1/2 -translate-y-1/2 rounded p-1 text-muted-foreground hover:text-foreground",children:o?d.jsx(_b,{className:"h-4 w-4"}):d.jsx(Sh,{className:"h-4 w-4"})})]}),d.jsx("p",{className:"text-[11px] text-muted-foreground",children:r("syncPage.authHint","Optional. Sent as X-Source-Authorization header.")})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs(Yt,{type:"submit",disabled:!i.trim()||m.isPending,"data-testid":"sync-connect-btn",children:[m.isPending?d.jsx(ni,{className:"h-4 w-4 animate-spin"}):d.jsx(Su,{className:"h-4 w-4"}),r("syncPage.connect","Connect")]}),l==="connected"&&d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-medium text-emerald-600 dark:text-emerald-400",children:[d.jsx(Rie,{className:"h-4 w-4"}),r("syncPage.connected","Connected")," — ",u," ",r("syncPage.agentsFound","agents")]}),l==="error"&&d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-medium text-destructive",children:[d.jsx(Lo,{className:"h-4 w-4"}),g||r("syncPage.connectionFailed","Connection failed")]})]})]})}function ntt({dragging:i,onDragging:e,onFile:t}){const{t:n}=xe(),s=L.useRef(null);function r(a){a.preventDefault(),e(!1);const l=a.dataTransfer.files[0];l!=null&&l.name.endsWith(".zip")&&t(l)}function o(a){var c;const l=(c=a.target.files)==null?void 0:c[0];l!=null&&l.name.endsWith(".zip")&&t(l)}return d.jsxs("div",{className:`flex-1 flex flex-col items-center justify-center gap-4 rounded-lg border-2 border-dashed p-8 transition-colors cursor-pointer ${i?"border-primary bg-primary/5 scale-[1.01]":"border-border hover:border-primary/50"}`,onDragOver:a=>a.preventDefault(),onDragEnter:()=>e(!0),onDragLeave:()=>e(!1),onDrop:r,onClick:()=>{var a;return(a=s.current)==null?void 0:a.click()},"data-testid":"import-drop-zone",children:[d.jsx(Pie,{className:"h-12 w-12 text-muted-foreground"}),d.jsxs("div",{className:"text-center",children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:n("importDialog.dropZone","Drop a .zip file here or click to browse")}),d.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n("importDialog.dropZoneHint","Exported agent archive (.zip)")})]}),d.jsx("input",{ref:s,type:"file",accept:".zip",onChange:o,className:"hidden","data-testid":"import-file-input"})]})}function itt({file:i,strategy:e,onStrategyChange:t,onBack:n,onNext:s,isLoading:r,isPreviewing:o,error:a}){const{t:l}=xe();return d.jsxs("div",{className:"flex-1 space-y-4",children:[d.jsxs("div",{className:"flex items-center gap-3 rounded-lg bg-secondary/50 p-3",children:[d.jsx(Pie,{className:"h-5 w-5 text-primary shrink-0"}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:i.name}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:[(i.size/1024).toFixed(1)," KB"]})]})]}),d.jsxs("fieldset",{className:"space-y-2",children:[d.jsx("legend",{className:"text-sm font-medium text-foreground mb-2",children:l("importDialog.strategyLabel","Import Strategy")}),d.jsx(_5,{value:"create",current:e,onChange:t,icon:d.jsx(Gt,{className:"h-4 w-4 text-emerald-500"}),label:l("importDialog.createNew","Create as new agent"),desc:l("importDialog.createNewDesc","Creates a fresh copy with new IDs. Best for first-time import."),testId:"strategy-create"}),d.jsx(_5,{value:"merge",current:e,onChange:t,icon:d.jsx(xi,{className:"h-4 w-4 text-blue-500"}),label:l("importDialog.mergeSync","Merge / sync with existing"),desc:l("importDialog.mergeSyncDesc","Updates existing resources if previously imported. Creates new ones if not found."),testId:"strategy-merge"}),d.jsx(_5,{value:"upgrade",current:e,onChange:t,icon:d.jsx(qv,{className:"h-4 w-4 text-amber-500"}),label:l("importDialog.upgradeExisting","Upgrade existing agent"),desc:l("importDialog.upgradeDesc","Match resources structurally against a target agent. Best for promoting across environments."),testId:"strategy-upgrade"}),d.jsx(_5,{value:"sync",current:e,onChange:t,icon:d.jsx(Su,{className:"h-4 w-4 text-violet-500"}),label:l("importDialog.syncRemote","Sync from remote instance"),desc:l("importDialog.syncDesc","Connect to another EDDI instance and sync a specific agent live."),testId:"strategy-sync"})]}),a&&d.jsx("p",{className:"text-sm text-destructive",children:a}),d.jsxs("div",{className:"flex justify-between pt-2",children:[d.jsxs(Yt,{variant:"ghost",onClick:n,disabled:r,children:[d.jsx(El,{className:"h-4 w-4"}),l("common.back","Back")]}),d.jsxs(Yt,{onClick:s,disabled:r,"data-testid":"import-confirm-strategy",children:[o?l("common.loading","Loading..."):e==="create"?l("importDialog.importNow","Import Now"):e==="merge"?l("importDialog.previewChanges","Preview Changes"):l("common.next","Next"),d.jsx(wg,{className:"h-4 w-4"})]})]})]})}function _5({value:i,current:e,onChange:t,icon:n,label:s,desc:r,testId:o}){return d.jsxs("label",{className:`flex items-start gap-3 rounded-lg border p-3 cursor-pointer transition-colors ${e===i?"border-primary bg-primary/5":"border-border hover:border-primary/30"}`,"data-testid":o,children:[d.jsx("input",{type:"radio",name:"strategy",value:i,checked:e===i,onChange:()=>t(i),className:"mt-0.5 accent-primary"}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[n,d.jsx("span",{className:"text-sm font-medium text-foreground",children:s})]}),d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:r})]})]})}const stt={agent:"bg-purple-500/10 text-purple-500",workflow:"bg-blue-500/10 text-blue-500",behavior:"bg-amber-500/10 text-amber-500",rules:"bg-amber-500/10 text-amber-500",httpcalls:"bg-green-500/10 text-green-500",apicalls:"bg-green-500/10 text-green-500",langchain:"bg-pink-500/10 text-pink-500",llm:"bg-pink-500/10 text-pink-500",output:"bg-cyan-500/10 text-cyan-500",property:"bg-orange-500/10 text-orange-500",propertysetter:"bg-orange-500/10 text-orange-500",dictionary:"bg-teal-500/10 text-teal-500",regulardictionary:"bg-teal-500/10 text-teal-500",mcpcalls:"bg-indigo-500/10 text-indigo-500",rag:"bg-violet-500/10 text-violet-500",snippet:"bg-rose-500/10 text-rose-500",snippets:"bg-rose-500/10 text-rose-500"};function Ase({type:i}){const e=i.replace(/\.json$/,"");return d.jsx("span",{className:`inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${stt[e]||"bg-secondary text-muted-foreground"}`,children:e})}function IEe({action:i}){const{t:e}=xe();switch(i){case"CREATE":return d.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-emerald-500",children:[d.jsx(Gt,{className:"h-3 w-3"})," ",e("sync.actionCreate","New")]});case"UPDATE":return d.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-blue-500",children:[d.jsx(xi,{className:"h-3 w-3"})," ",e("sync.actionUpdate","Update")]});case"SKIP":return d.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-muted-foreground",children:[d.jsx(Ns,{className:"h-3 w-3"})," ",e("sync.actionSkip","Up to date")]});case"CONFLICT":return d.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-destructive",children:[d.jsx(Vi,{className:"h-3 w-3"})," ",e("sync.actionConflict","Conflict")]});default:return d.jsx("span",{className:"text-xs text-muted-foreground",children:i})}}class rtt{diff(e,t,n={}){let s;typeof n=="function"?(s=n,n={}):"callback"in n&&(s=n.callback);const r=this.castInput(e,n),o=this.castInput(t,n),a=this.removeEmpty(this.tokenize(r,n)),l=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(a,l,n,s)}diffWithOptionsObj(e,t,n,s){var r;const o=w=>{if(w=this.postProcess(w,n),s){setTimeout(function(){s(w)},0);return}else return w},a=t.length,l=e.length;let c=1,u=a+l;n.maxEditLength!=null&&(u=Math.min(u,n.maxEditLength));const h=(r=n.timeout)!==null&&r!==void 0?r:1/0,g=Date.now()+h,f=[{oldPos:-1,lastComponent:void 0}];let m=this.extractCommon(f[0],t,e,0,n);if(f[0].oldPos+1>=l&&m+1>=a)return o(this.buildValues(f[0].lastComponent,t,e));let x=-1/0,v=1/0;const _=()=>{for(let w=Math.max(x,-c);w<=Math.min(v,c);w+=2){let k;const C=f[w-1],E=f[w+1];C&&(f[w-1]=void 0);let D=!1;if(E){const I=E.oldPos-w;D=E&&0<=I&&I=l&&m+1>=a)return o(this.buildValues(k.lastComponent,t,e))||!0;f[w]=k,k.oldPos+1>=l&&(v=Math.min(v,w-1)),m+1>=a&&(x=Math.max(x,w+1))}c++};if(s)(function w(){setTimeout(function(){if(c>u||Date.now()>g)return s(void 0);_()||w()},0)})();else for(;c<=u&&Date.now()<=g;){const w=_();if(w)return w}}addToPath(e,t,n,s,r){const o=e.lastComponent;return o&&!r.oneChangePerToken&&o.added===t&&o.removed===n?{oldPos:e.oldPos+s,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+s,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}}extractCommon(e,t,n,s,r){const o=t.length,a=n.length;let l=e.oldPos,c=l-s,u=0;for(;c+1g.length?m:g}),u.value=this.join(h)}else u.value=this.join(t.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return s}}class ott extends rtt{constructor(){super(...arguments),this.tokenize=ctt}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(` -`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(` -`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(` -`)&&(e=e.slice(0,-1)),t.endsWith(` -`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}}const att=new ott;function ltt(i,e,t){return att.diff(i,e,t)}function ctt(i,e){e.stripTrailingCr&&(i=i.replace(/\r\n/g,` -`));const t=[],n=i.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(let s=0;s{if(!i&&!e)return null;const s=Spe(i),r=Spe(e);return s===r?"identical":ltt(r||"",s||"")},[i,e]);return n===null?null:n==="identical"?d.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 text-sm text-muted-foreground bg-secondary/30 rounded-lg",children:[d.jsx(WBe,{className:"h-4 w-4"}),t("importDialog.contentIdentical","Content identical")]}):d.jsxs("div",{className:"overflow-auto rounded-lg border bg-card text-xs font-mono max-h-80",children:[d.jsx("div",{className:"flex items-center justify-between px-3 py-1.5 border-b bg-secondary/50 text-[10px] text-muted-foreground",children:d.jsxs("span",{children:[t("importDialog.targetContent","Target")," → ",t("importDialog.sourceContent","Source")]})}),d.jsx("div",{className:"p-0",children:n.map((s,r)=>s.value.split(` -`).filter((a,l,c)=>!(l===c.length-1&&a==="")).map((a,l)=>d.jsxs("div",{className:s.added?"bg-emerald-500/10 text-emerald-700 dark:text-emerald-400 border-s-2 border-emerald-500":s.removed?"bg-red-500/10 text-red-700 dark:text-red-400 border-s-2 border-red-500":"text-muted-foreground border-s-2 border-transparent",children:[d.jsx("span",{className:"inline-block w-6 text-end pe-2 text-muted-foreground/50 select-none",children:s.added?"+":s.removed?"−":" "}),a]},`${r}-${l}`)))})]})}function Spe(i){if(!i)return"";try{const e=JSON.parse(i);return JSON.stringify(MG(e),null,2)}catch{return i}}function MG(i){return Array.isArray(i)?i.map(MG):i!==null&&typeof i=="object"?Object.keys(i).sort().reduce((e,t)=>(e[t]=MG(i[t]),e),{}):i}function dtt({preview:i,strategy:e,selected:t,expandedDiff:n,workflowOrder:s,isLoading:r,error:o,onToggleResource:a,onToggleAll:l,onExpandDiff:c,onMoveWorkflow:u,onBack:h,onExecute:g}){const{t:f}=xe(),m=e==="upgrade"||e==="sync";return d.jsxs("div",{className:"flex-1 flex flex-col space-y-4 min-h-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Pie,{className:"h-5 w-5 text-primary shrink-0"}),d.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[i.sourceAgentName||i.sourceAgentId||"Agent",i.targetAgentName&&d.jsxs("span",{className:"text-muted-foreground font-normal",children:[" → ",i.targetAgentName]})]})]}),d.jsx("div",{className:"flex-1 overflow-auto rounded-lg border min-h-0",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{className:"sticky top-0 bg-secondary/80 backdrop-blur-sm",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-3 py-2 text-start w-8",children:d.jsx("input",{type:"checkbox",checked:t.size===i.resources.length,onChange:l,className:"accent-primary"})}),d.jsx("th",{className:"px-3 py-2 text-start text-xs font-medium text-muted-foreground uppercase",children:f("importDialog.resource","Resource")}),d.jsx("th",{className:"px-3 py-2 text-start text-xs font-medium text-muted-foreground uppercase",children:f("importDialog.type","Type")}),m&&d.jsx("th",{className:"px-3 py-2 text-start text-xs font-medium text-muted-foreground uppercase",children:f("importDialog.match","Match")}),d.jsx("th",{className:"px-3 py-2 text-start text-xs font-medium text-muted-foreground uppercase",children:f("importDialog.action","Action")}),m&&d.jsx("th",{className:"px-3 py-2 text-start text-xs font-medium text-muted-foreground uppercase w-8"})]})}),d.jsx("tbody",{className:"divide-y divide-border",children:i.resources.map(x=>d.jsx(htt,{resource:x,checked:t.has(x.sourceId),onToggle:()=>a(x.sourceId),showMatch:m,showDiff:m,expanded:n===x.sourceId,onExpand:()=>c(n===x.sourceId?null:x.sourceId),workflowOrder:s,onMoveWorkflow:u},x.sourceId))})]})}),d.jsxs("div",{className:"flex gap-3 text-xs text-muted-foreground",children:[d.jsxs("span",{children:[i.resources.filter(x=>x.action==="CREATE").length," ",f("importDialog.new","new")]}),d.jsxs("span",{children:[i.resources.filter(x=>x.action==="UPDATE").length," ",f("importDialog.updated","updated")]}),d.jsxs("span",{children:[i.resources.filter(x=>x.action==="SKIP").length," ",f("importDialog.unchanged","unchanged")]}),d.jsxs("span",{children:[t.size," ",f("importDialog.selected","selected")]})]}),o&&d.jsx("p",{className:"text-sm text-destructive",children:o}),d.jsxs("div",{className:"flex justify-between pt-2",children:[d.jsxs(Yt,{variant:"ghost",onClick:h,disabled:r,children:[d.jsx(El,{className:"h-4 w-4"}),f("common.back","Back")]}),d.jsxs(Yt,{onClick:g,disabled:r||t.size===0,"data-testid":"import-confirm-merge",children:[e==="sync"?f("importDialog.syncNow","Sync Now"):e==="upgrade"?f("importDialog.upgradeNow","Upgrade Now"):f("importDialog.mergeNow","Import Selected"),d.jsx(Ns,{className:"h-4 w-4"})]})]})]})}function utt({strategy:i}){if(!i)return null;const e={position:"pos",type:"type",name:"name",originId:"ID"};return d.jsx("span",{className:"inline-flex rounded-full bg-secondary px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:e[i]||i})}function htt({resource:i,checked:e,onToggle:t,showMatch:n,showDiff:s,expanded:r,onExpand:o,workflowOrder:a,onMoveWorkflow:l}){const c=i.action==="UPDATE"&&(i.sourceContent||i.targetContent),u=i.resourceType==="workflow"&&i.action==="CREATE",h=a.indexOf(i.sourceId);return d.jsxs(L.Fragment,{children:[d.jsxs("tr",{className:`transition-colors ${e?"bg-primary/5":""}`,children:[d.jsx("td",{className:"px-3 py-2",children:d.jsx("input",{type:"checkbox",checked:e,onChange:t,className:"accent-primary"})}),d.jsx("td",{className:"px-3 py-2 font-medium text-foreground",children:d.jsxs("div",{className:"flex items-center gap-1.5",children:[i.name||i.sourceId.substring(0,12),u&&h>=0&&d.jsxs("span",{className:"flex items-center gap-0.5 ms-1",children:[d.jsx("button",{onClick:()=>l(i.sourceId,-1),disabled:h===0,className:"rounded p-0.5 text-muted-foreground hover:text-foreground disabled:opacity-30",title:"Move up",children:d.jsx(zv,{className:"h-3 w-3"})}),d.jsx("button",{onClick:()=>l(i.sourceId,1),disabled:h===a.length-1,className:"rounded p-0.5 text-muted-foreground hover:text-foreground disabled:opacity-30",title:"Move down",children:d.jsx(zf,{className:"h-3 w-3"})})]})]})}),d.jsx("td",{className:"px-3 py-2",children:d.jsx(Ase,{type:i.resourceType})}),n&&d.jsx("td",{className:"px-3 py-2",children:d.jsx(utt,{strategy:i.matchStrategy})}),d.jsx("td",{className:"px-3 py-2",children:d.jsx(IEe,{action:i.action})}),s&&d.jsx("td",{className:"px-3 py-2",children:c&&d.jsx("button",{onClick:o,className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:r?d.jsx(Rn,{className:"h-4 w-4"}):d.jsx(hs,{className:"h-4 w-4"})})})]}),r&&c&&d.jsx("tr",{children:d.jsx("td",{colSpan:n?6:5,className:"px-3 py-2",children:d.jsx(AEe,{sourceContent:i.sourceContent,targetContent:i.targetContent})})})]})}function gtt({open:i,onClose:e,onSuccess:t}){const{t:n}=xe(),[s,r]=L.useState("upload"),[o,a]=L.useState(null),[l,c]=L.useState("create"),[u,h]=L.useState(null),[g,f]=L.useState(new Set),[m,x]=L.useState(null),[v,_]=L.useState(null),[w,k]=L.useState([]),[C,E]=L.useState(!1),[D,T]=L.useState(null),[I,R]=L.useState(""),[P,j]=L.useState(""),[B,U]=L.useState([]),[$,K]=L.useState(null),[z,G]=L.useState(null),[ne,te]=L.useState(null),H=Uet(),Q=$et(),Y=qet(),V=Yet(),ue=Qet(),he=Zet(),Te=ett(),nt=L.useCallback(()=>{r("upload"),a(null),c("create"),h(null),f(new Set),x(null),_(null),k([]),E(!1),T(null),R(""),j(""),U([]),K(null),G(null),te(null)},[]);function ge(){nt(),e()}function _e(It){a(It),r("strategy")}function $e(){x(null),l==="create"&&o?(r("importing"),H.mutate(o,{onSuccess:()=>{t(),ge()},onError:It=>{x(It.message),r("strategy")}})):l==="merge"&&o?Q.mutate(o,{onSuccess:It=>{h(It);const Zt=new Set(It.resources.map(En=>En.sourceId));f(Zt),r("preview")},onError:It=>x(It.message)}):(l==="upgrade"||l==="sync")&&r("target")}function Ke(){x(null),l==="upgrade"&&o&&D?V.mutate({file:o,targetAgentId:D},{onSuccess:It=>{h(It);const Zt=new Set(It.resources.map(Xi=>Xi.sourceId));f(Zt);const En=It.resources.filter(Xi=>Xi.resourceType==="workflow"&&Xi.action==="CREATE").sort((Xi,zi)=>Xi.workflowIndex-zi.workflowIndex).map(Xi=>Xi.sourceId);k(En),r("preview")},onError:It=>x(It.message)}):l==="sync"&&$&&I&&he.mutate({sourceUrl:I,sourceAgentId:$,sourceVersion:z,targetAgentId:ne,sourceAuth:P},{onSuccess:It=>{h(It);const Zt=new Set(It.resources.map(En=>En.sourceId));f(Zt),r("preview")},onError:It=>x(It.message)})}function ht(){x(null),r("importing");const It=Array.from(g);l==="merge"&&o?Y.mutate({file:o,selectedSourceIds:It},{onSuccess:()=>{t(),ge()},onError:Zt=>{x(Zt.message),r("preview")}}):l==="upgrade"&&o&&D?ue.mutate({file:o,targetAgentId:D,selectedSourceIds:It,workflowOrder:w},{onSuccess:()=>{t(),ge()},onError:Zt=>{x(Zt.message),r("preview")}}):l==="sync"&&$&&I&&Te.mutate({sourceUrl:I,sourceAgentId:$,sourceVersion:z,targetAgentId:ne,selectedResources:It,workflowOrder:w.length>0?w:null,sourceAuth:P},{onSuccess:()=>{t(),ge()},onError:Zt=>{x(Zt.message),r("preview")}})}function Ct(It){f(Zt=>{const En=new Set(Zt);return En.has(It)?En.delete(It):En.add(It),En})}function Ft(){u&&(g.size===u.resources.length?f(new Set):f(new Set(u.resources.map(It=>It.sourceId))))}function Ve(It,Zt){k(En=>{const Xi=En.indexOf(It);if(Xi<0)return En;const zi=Xi+Zt;if(zi<0||zi>=En.length)return En;const Tr=[...En];return[Tr[Xi],Tr[zi]]=[Tr[zi],Tr[Xi]],Tr})}if(!i)return null;const tt=H.isPending||Q.isPending||Y.isPending||V.isPending||ue.isPending||he.isPending||Te.isPending,qt=l==="upgrade"&&!!D||l==="sync"&&!!$;return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:tt?void 0:ge}),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:d.jsxs("div",{className:"w-full max-w-2xl rounded-xl border bg-card p-6 shadow-2xl max-h-[85vh] flex flex-col",onClick:It=>It.stopPropagation(),"data-testid":"import-agent-dialog",children:[d.jsxs("div",{className:"flex items-center justify-between mb-6",children:[d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n("importDialog.title","Import Agent")}),d.jsx("button",{onClick:ge,disabled:tt,className:"rounded-md p-1 text-muted-foreground hover:bg-secondary hover:text-foreground disabled:opacity-50",children:d.jsx(An,{className:"h-5 w-5"})})]}),s==="upload"&&d.jsx(ntt,{dragging:C,onDragging:E,onFile:_e}),s==="strategy"&&o&&d.jsx(itt,{file:o,strategy:l,onStrategyChange:c,onBack:()=>{a(null),r("upload")},onNext:$e,isLoading:tt,isPreviewing:Q.isPending,error:m}),s==="target"&&d.jsx(ftt,{strategy:l,targetAgentId:D,onSelectTarget:T,syncUrl:I,syncAuth:P,remoteAgents:B,sourceAgent:$,syncTargetId:ne,onSyncUrlChange:R,onSyncAuthChange:j,onRemoteAgents:U,onSourceAgent:(It,Zt)=>{K(It),G(Zt)},onSyncTarget:te,error:m,isLoading:tt,isPreviewing:V.isPending||he.isPending,canNext:qt,onBack:()=>r("strategy"),onNext:Ke}),s==="preview"&&u&&d.jsx(dtt,{preview:u,strategy:l,selected:g,expandedDiff:v,workflowOrder:w,isLoading:tt,error:m,onToggleResource:Ct,onToggleAll:Ft,onExpandDiff:_,onMoveWorkflow:Ve,onBack:()=>r(l==="merge"?"strategy":"target"),onExecute:ht}),s==="importing"&&d.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 py-8",children:[d.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-muted-foreground border-t-primary"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:n("importDialog.importing","Importing agent...")})]})]})})]})}function ftt({strategy:i,targetAgentId:e,onSelectTarget:t,syncUrl:n,syncAuth:s,remoteAgents:r,sourceAgent:o,syncTargetId:a,onSyncUrlChange:l,onSyncAuthChange:c,onRemoteAgents:u,onSourceAgent:h,onSyncTarget:g,error:f,isLoading:m,isPreviewing:x,canNext:v,onBack:_,onNext:w}){const{t:k}=xe();return d.jsxs("div",{className:"flex-1 space-y-4",children:[i==="upgrade"&&d.jsx(ptt,{targetAgentId:e,onSelect:t}),i==="sync"&&d.jsx(mtt,{syncUrl:n,syncAuth:s,remoteAgents:r,sourceAgent:o,syncTargetId:a,onUrlChange:l,onAuthChange:c,onRemoteAgents:u,onSourceAgent:h,onSyncTarget:g}),f&&d.jsx("p",{className:"text-sm text-destructive",children:f}),d.jsxs("div",{className:"flex justify-between pt-2",children:[d.jsxs(Yt,{variant:"ghost",onClick:_,disabled:m,children:[d.jsx(El,{className:"h-4 w-4"}),k("common.back","Back")]}),d.jsxs(Yt,{onClick:w,disabled:m||!v,"data-testid":"import-target-next",children:[x?k("common.loading","Loading..."):k("importDialog.previewChanges","Preview Changes"),d.jsx(wg,{className:"h-4 w-4"})]})]})]})}function ptt({targetAgentId:i,onSelect:e}){const{t}=xe(),{data:n}=I7(),s=Cg((n==null?void 0:n.pages.flat())??[]);return d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:t("importDialog.selectTargetAgent","Select target agent")}),d.jsx("p",{className:"text-xs text-muted-foreground",children:t("importDialog.upgradeTargetHint","The imported resources will be structurally matched against this agent.")}),d.jsxs("select",{value:i||"",onChange:r=>e(r.target.value),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"upgrade-target-select",children:[d.jsx("option",{value:"",children:t("importDialog.chooseAgent","— Choose an agent —")}),s.map(r=>d.jsxs("option",{value:r.id,children:[r.name||r.id," (v",r.version,")"]},r.id))]})]})}function mtt({syncUrl:i,syncAuth:e,remoteAgents:t,sourceAgent:n,syncTargetId:s,onUrlChange:r,onAuthChange:o,onRemoteAgents:a,onSourceAgent:l,onSyncTarget:c}){const{t:u}=xe(),{data:h}=I7(),g=Cg((h==null?void 0:h.pages.flat())??[]);return d.jsxs("div",{className:"space-y-4",children:[d.jsx(TEe,{url:i,auth:e,onUrlChange:r,onAuthChange:o,onConnected:a}),t.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:u("importDialog.sourceAgent","Source agent (remote)")}),d.jsxs("select",{value:n||"",onChange:f=>{const m=t.find(x=>{const{id:v}=w4(x.resource);return v===f.target.value});if(m){const{id:x,version:v}=w4(m.resource);l(x,v)}},className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"sync-source-select",children:[d.jsx("option",{value:"",children:u("importDialog.chooseAgent","— Choose an agent —")}),t.map(f=>{const{id:m}=w4(f.resource);return d.jsx("option",{value:m,children:f.name||m},m)})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:u("importDialog.targetAgent","Target agent (local)")}),d.jsxs("select",{value:s||"",onChange:f=>c(f.target.value||null),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"sync-target-select",children:[d.jsx("option",{value:"",children:u("importDialog.createNewTarget","Create new agent")}),g.map(f=>d.jsxs("option",{value:f.id,children:[f.name||f.id," (v",f.version,")"]},f.id))]})]})]})]})}function REe({open:i,onClose:e,agentId:t,agentVersion:n}){const{t:s}=xe(),[r,o]=L.useState(new Set),{data:a,isLoading:l,isError:c,error:u}=Ket(t,n,i),h=Get(),g=L.useMemo(()=>a?a.resources.map(D=>D.resourceId):[],[a]);L.useEffect(()=>{g.length>0&&o(new Set(g))},[g]);const f=L.useMemo(()=>a?new Set(a.resources.filter(D=>D.required).map(D=>D.resourceId)):new Set,[a]),m=L.useMemo(()=>{if(!a)return[];const D=new Map;for(const T of a.resources){if(T.resourceType==="agent")continue;const I=T.parentWorkflowId||"__snippets__";if(!D.has(I)){const R=T.parentWorkflowId?a.resources.find(P=>P.resourceId===T.parentWorkflowId&&P.resourceType==="workflow"):null;D.set(I,{workflowId:T.parentWorkflowId,workflowName:(R==null?void 0:R.name)||T.parentWorkflowId,workflowIndex:(R==null?void 0:R.workflowIndex)??-1,resources:[]})}T.resourceType!=="workflow"&&D.get(I).resources.push(T)}return Array.from(D.values()).sort((T,I)=>T.workflowIndex-I.workflowIndex)},[a]),x=a==null?void 0:a.resources.find(D=>D.resourceType==="agent"),v=(a==null?void 0:a.resources.filter(D=>D.resourceType==="workflow"))??[];function _(D){f.has(D)||o(T=>{const I=new Set(T);return I.has(D)?I.delete(D):I.add(D),I})}function w(){r.size===g.length?o(new Set(f)):o(new Set(g))}function k(){h.mutate({agentId:t,version:n,selectedResourceIds:Array.from(r)},{onSuccess:()=>C()})}function C(){o(new Set),e()}if(!i)return null;const E=h.isPending;return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:E?void 0:C}),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:d.jsxs("div",{className:"w-full max-w-lg rounded-xl border bg-card p-6 shadow-2xl max-h-[80vh] flex flex-col",onClick:D=>D.stopPropagation(),"data-testid":"export-agent-dialog",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:s("exportDialog.title","Export Agent")}),d.jsx("button",{onClick:C,disabled:E,className:"rounded-md p-1 text-muted-foreground hover:bg-secondary hover:text-foreground disabled:opacity-50",children:d.jsx(An,{className:"h-5 w-5"})})]}),l&&d.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 py-12",children:[d.jsx(ni,{className:"h-8 w-8 animate-spin text-primary"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:s("exportDialog.loading","Loading resource tree...")})]}),c&&d.jsx("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 py-12",children:d.jsx("p",{className:"text-sm text-destructive",children:(u==null?void 0:u.message)||s("common.error")})}),a&&!l&&d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:s("exportDialog.selectResources","Select resources to export")}),d.jsxs("div",{className:"flex-1 overflow-auto min-h-0 space-y-1 rounded-lg border p-3 bg-secondary/20",children:[x&&d.jsx(y5,{resource:x,checked:r.has(x.resourceId),required:!0,indent:0}),v.map(D=>{const T=m.find(I=>I.workflowId===D.resourceId);return d.jsxs("div",{children:[d.jsx(y5,{resource:D,checked:r.has(D.resourceId),required:D.required,indent:1}),T==null?void 0:T.resources.map(I=>d.jsx(y5,{resource:I,checked:r.has(I.resourceId),required:I.required,indent:2,onToggle:()=>_(I.resourceId)},I.resourceId))]},D.resourceId)}),m.filter(D=>!D.workflowId).map(D=>D.resources.length>0?d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mt-2 mb-1 ps-2",children:s("exportDialog.snippets","Snippets")}),D.resources.map(T=>d.jsx(y5,{resource:T,checked:r.has(T.resourceId),required:T.required,indent:1,onToggle:()=>_(T.resourceId)},T.resourceId))]},"snippets"):null)]}),d.jsxs("div",{className:"flex items-center justify-between pt-4 border-t mt-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{type:"checkbox",checked:r.size===g.length,onChange:w,className:"accent-primary"}),d.jsx("span",{className:"text-xs text-muted-foreground",children:r.size===g.length?s("exportDialog.allSelected","All resources selected"):s("exportDialog.countSelected","{{count}} of {{total}} resources selected",{count:r.size,total:g.length})})]}),d.jsxs(Yt,{onClick:k,disabled:E||r.size===0,"data-testid":"export-confirm-btn",children:[E?d.jsx(ni,{className:"h-4 w-4 animate-spin"}):d.jsx(Q_,{className:"h-4 w-4"}),s("exportDialog.exportSelected","Export Selected")]})]})]})]})})]})}function y5({resource:i,checked:e,required:t,indent:n,onToggle:s}){const r=n===0?"ps-2":n===1?"ps-6":"ps-10";return d.jsxs("label",{className:`flex items-center gap-2 rounded-md px-2 py-1.5 text-sm cursor-pointer hover:bg-secondary/50 transition-colors ${r} ${e?"text-foreground":"text-muted-foreground"}`,children:[d.jsx("input",{type:"checkbox",checked:e,disabled:t,onChange:s,className:"accent-primary disabled:opacity-60"}),d.jsx(Ase,{type:i.resourceType}),d.jsx("span",{className:"truncate flex-1",children:i.name||i.resourceId.slice(0,12)}),t&&d.jsx(d7,{className:"h-3 w-3 text-muted-foreground/50 shrink-0"})]})}function MEe({open:i,onClose:e,type:t,wizardPath:n,onQuickCreate:s}){const{t:r}=xe(),o=il(),a=()=>{e(),o(n)},l=t==="agent"?r("common.agent","Agent"):r("common.group","Group");return d.jsx(YM,{open:i,onClose:e,title:r("createOrWizard.title",{type:l,defaultValue:`New ${l}`}),testId:"create-or-wizard-dialog",maxWidth:"max-w-2xl",children:d.jsx("div",{className:"p-6 sm:p-8",children:d.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-6",children:[d.jsxs("button",{onClick:s,className:"group flex flex-col items-start gap-4 rounded-xl border-2 border-border bg-card p-6 text-start transition-all hover:-translate-y-1 hover:border-primary/60 hover:shadow-xl","data-testid":"choice-quick-create",children:[d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-lg bg-primary/10 text-primary transition-colors group-hover:bg-primary/20",children:d.jsx(Gt,{className:"h-6 w-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-base font-semibold text-foreground",children:r("createOrWizard.quickCreate","Quick Create")}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-relaxed",children:r("createOrWizard.quickCreateDesc","Set a name and description, configure details later.")})]})]}),d.jsxs("button",{onClick:a,className:"group flex flex-col items-start gap-4 rounded-xl border-2 border-border bg-card p-6 text-start transition-all hover:-translate-y-1 hover:border-amber-500/60 hover:shadow-xl","data-testid":"choice-wizard",children:[d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-lg bg-amber-500/10 text-amber-500 transition-colors group-hover:bg-amber-500/20",children:d.jsx(RL,{className:"h-6 w-6"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-base font-semibold text-foreground",children:r("createOrWizard.guidedSetup","Guided Setup")}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-relaxed",children:r("createOrWizard.guidedSetupDesc","Step-by-step wizard with LLM provider, prompts, and deployment.")})]})]})]})})})}function Kv(i,e,{checkForDefaultPrevented:t=!0}={}){return function(s){if(i==null||i(s),t===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function btt(i,e){const t=L.createContext(e),n=r=>{const{children:o,...a}=r,l=L.useMemo(()=>a,Object.values(a));return d.jsx(t.Provider,{value:l,children:o})};n.displayName=i+"Provider";function s(r){const o=L.useContext(t);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${r}\` must be used within \`${i}\``)}return[n,s]}function xtt(i,e=[]){let t=[];function n(r,o){const a=L.createContext(o),l=t.length;t=[...t,o];const c=h=>{var _;const{scope:g,children:f,...m}=h,x=((_=g==null?void 0:g[i])==null?void 0:_[l])||a,v=L.useMemo(()=>m,Object.values(m));return d.jsx(x.Provider,{value:v,children:f})};c.displayName=r+"Provider";function u(h,g){var x;const f=((x=g==null?void 0:g[i])==null?void 0:x[l])||a,m=L.useContext(f);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${r}\``)}return[c,u]}const s=()=>{const r=t.map(o=>L.createContext(o));return function(a){const l=(a==null?void 0:a[i])||r;return L.useMemo(()=>({[`__scope${i}`]:{...a,[i]:l}}),[a,l])}};return s.scopeName=i,[n,vtt(s,...e)]}function vtt(...i){const e=i[0];if(i.length===1)return e;const t=()=>{const n=i.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(r){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const h=l(r)[`__scope${c}`];return{...a,...h}},{});return L.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}var yA=globalThis!=null&&globalThis.document?L.useLayoutEffect:()=>{},_tt=n7[" useId ".trim().toString()]||(()=>{}),ytt=0;function ob(i){const[e,t]=L.useState(_tt());return yA(()=>{t(n=>n??String(ytt++))},[i]),i||(e?`radix-${e}`:"")}var wtt=n7[" useInsertionEffect ".trim().toString()]||yA;function Ctt({prop:i,defaultProp:e,onChange:t=()=>{},caller:n}){const[s,r,o]=Stt({defaultProp:e,onChange:t}),a=i!==void 0,l=a?i:s;{const u=L.useRef(i!==void 0);L.useEffect(()=>{const h=u.current;h!==a&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,n])}const c=L.useCallback(u=>{var h;if(a){const g=ktt(u)?u(i):u;g!==i&&((h=o.current)==null||h.call(o,g))}else r(u)},[a,i,r,o]);return[l,c]}function Stt({defaultProp:i,onChange:e}){const[t,n]=L.useState(i),s=L.useRef(t),r=L.useRef(e);return wtt(()=>{r.current=e},[e]),L.useEffect(()=>{var o;s.current!==t&&((o=r.current)==null||o.call(r,t),s.current=t)},[t,s]),[t,n,r]}function ktt(i){return typeof i=="function"}function Ntt(i){const e=Ett(i),t=L.forwardRef((n,s)=>{const{children:r,...o}=n,a=L.Children.toArray(r),l=a.find(Dtt);if(l){const c=l.props.children,u=a.map(h=>h===l?L.Children.count(c)>1?L.Children.only(null):L.isValidElement(c)?c.props.children:null:h);return d.jsx(e,{...o,ref:s,children:L.isValidElement(c)?L.cloneElement(c,void 0,u):null})}return d.jsx(e,{...o,ref:s,children:r})});return t.displayName=`${i}.Slot`,t}function Ett(i){const e=L.forwardRef((t,n)=>{const{children:s,...r}=t;if(L.isValidElement(s)){const o=Itt(s),a=Ttt(r,s.props);return s.type!==L.Fragment&&(a.ref=n?yb(n,o):o),L.cloneElement(s,a)}return L.Children.count(s)>1?L.Children.only(null):null});return e.displayName=`${i}.SlotClone`,e}var Ltt=Symbol("radix.slottable");function Dtt(i){return L.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===Ltt}function Ttt(i,e){const t={...e};for(const n in e){const s=i[n],r=e[n];/^on[A-Z]/.test(n)?s&&r?t[n]=(...a)=>{const l=r(...a);return s(...a),l}:s&&(t[n]=s):n==="style"?t[n]={...s,...r}:n==="className"&&(t[n]=[s,r].filter(Boolean).join(" "))}return{...i,...t}}function Itt(i){var n,s;let e=(n=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:n.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=(s=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}var Att=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rl=Att.reduce((i,e)=>{const t=Ntt(`Primitive.${e}`),n=L.forwardRef((s,r)=>{const{asChild:o,...a}=s,l=o?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...a,ref:r})});return n.displayName=`Primitive.${e}`,{...i,[e]:n}},{});function Rtt(i,e){i&&hg.flushSync(()=>i.dispatchEvent(e))}function wA(i){const e=L.useRef(i);return L.useEffect(()=>{e.current=i}),L.useMemo(()=>(...t)=>{var n;return(n=e.current)==null?void 0:n.call(e,...t)},[])}function Mtt(i,e=globalThis==null?void 0:globalThis.document){const t=wA(i);L.useEffect(()=>{const n=s=>{s.key==="Escape"&&t(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[t,e])}var Ptt="DismissableLayer",PG="dismissableLayer.update",Ott="dismissableLayer.pointerDownOutside",jtt="dismissableLayer.focusOutside",kpe,PEe=L.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),OEe=L.forwardRef((i,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:r,onInteractOutside:o,onDismiss:a,...l}=i,c=L.useContext(PEe),[u,h]=L.useState(null),g=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=L.useState({}),m=CC(e,T=>h(T)),x=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),_=x.indexOf(v),w=u?x.indexOf(u):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,C=w>=_,E=Htt(T=>{const I=T.target,R=[...c.branches].some(P=>P.contains(I));!C||R||(s==null||s(T),o==null||o(T),T.defaultPrevented||a==null||a())},g),D=Wtt(T=>{const I=T.target;[...c.branches].some(P=>P.contains(I))||(r==null||r(T),o==null||o(T),T.defaultPrevented||a==null||a())},g);return Mtt(T=>{w===c.layers.size-1&&(n==null||n(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},g),L.useEffect(()=>{if(u)return t&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(kpe=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Npe(),()=>{t&&c.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=kpe)}},[u,g,t,c]),L.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Npe())},[u,c]),L.useEffect(()=>{const T=()=>f({});return document.addEventListener(PG,T),()=>document.removeEventListener(PG,T)},[]),d.jsx(Rl.div,{...l,ref:m,style:{pointerEvents:k?C?"auto":"none":void 0,...i.style},onFocusCapture:Kv(i.onFocusCapture,D.onFocusCapture),onBlurCapture:Kv(i.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Kv(i.onPointerDownCapture,E.onPointerDownCapture)})});OEe.displayName=Ptt;var Ftt="DismissableLayerBranch",Btt=L.forwardRef((i,e)=>{const t=L.useContext(PEe),n=L.useRef(null),s=CC(e,n);return L.useEffect(()=>{const r=n.current;if(r)return t.branches.add(r),()=>{t.branches.delete(r)}},[t.branches]),d.jsx(Rl.div,{...i,ref:s})});Btt.displayName=Ftt;function Htt(i,e=globalThis==null?void 0:globalThis.document){const t=wA(i),n=L.useRef(!1),s=L.useRef(()=>{});return L.useEffect(()=>{const r=a=>{if(a.target&&!n.current){let l=function(){jEe(Ott,t,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",r),e.removeEventListener("click",s.current)}},[e,t]),{onPointerDownCapture:()=>n.current=!0}}function Wtt(i,e=globalThis==null?void 0:globalThis.document){const t=wA(i),n=L.useRef(!1);return L.useEffect(()=>{const s=r=>{r.target&&!n.current&&jEe(jtt,t,{originalEvent:r},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Npe(){const i=new CustomEvent(PG);document.dispatchEvent(i)}function jEe(i,e,t,{discrete:n}){const s=t.originalEvent.target,r=new CustomEvent(i,{bubbles:!1,cancelable:!0,detail:t});e&&s.addEventListener(i,e,{once:!0}),n?Rtt(s,r):s.dispatchEvent(r)}var SU="focusScope.autoFocusOnMount",kU="focusScope.autoFocusOnUnmount",Epe={bubbles:!1,cancelable:!0},Vtt="FocusScope",FEe=L.forwardRef((i,e)=>{const{loop:t=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:r,...o}=i,[a,l]=L.useState(null),c=wA(s),u=wA(r),h=L.useRef(null),g=CC(e,x=>l(x)),f=L.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;L.useEffect(()=>{if(n){let x=function(k){if(f.paused||!a)return;const C=k.target;a.contains(C)?h.current=C:Fx(h.current,{select:!0})},v=function(k){if(f.paused||!a)return;const C=k.relatedTarget;C!==null&&(a.contains(C)||Fx(h.current,{select:!0}))},_=function(k){if(document.activeElement===document.body)for(const E of k)E.removedNodes.length>0&&Fx(a)};document.addEventListener("focusin",x),document.addEventListener("focusout",v);const w=new MutationObserver(_);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",v),w.disconnect()}}},[n,a,f.paused]),L.useEffect(()=>{if(a){Dpe.add(f);const x=document.activeElement;if(!a.contains(x)){const _=new CustomEvent(SU,Epe);a.addEventListener(SU,c),a.dispatchEvent(_),_.defaultPrevented||(ztt(Gtt(BEe(a)),{select:!0}),document.activeElement===x&&Fx(a))}return()=>{a.removeEventListener(SU,c),setTimeout(()=>{const _=new CustomEvent(kU,Epe);a.addEventListener(kU,u),a.dispatchEvent(_),_.defaultPrevented||Fx(x??document.body,{select:!0}),a.removeEventListener(kU,u),Dpe.remove(f)},0)}}},[a,c,u,f]);const m=L.useCallback(x=>{if(!t&&!n||f.paused)return;const v=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,_=document.activeElement;if(v&&_){const w=x.currentTarget,[k,C]=Utt(w);k&&C?!x.shiftKey&&_===C?(x.preventDefault(),t&&Fx(k,{select:!0})):x.shiftKey&&_===k&&(x.preventDefault(),t&&Fx(C,{select:!0})):_===w&&x.preventDefault()}},[t,n,f.paused]);return d.jsx(Rl.div,{tabIndex:-1,...o,ref:g,onKeyDown:m})});FEe.displayName=Vtt;function ztt(i,{select:e=!1}={}){const t=document.activeElement;for(const n of i)if(Fx(n,{select:e}),document.activeElement!==t)return}function Utt(i){const e=BEe(i),t=Lpe(e,i),n=Lpe(e.reverse(),i);return[t,n]}function BEe(i){const e=[],t=document.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function Lpe(i,e){for(const t of i)if(!$tt(t,{upTo:e}))return t}function $tt(i,{upTo:e}){if(getComputedStyle(i).visibility==="hidden")return!0;for(;i;){if(e!==void 0&&i===e)return!1;if(getComputedStyle(i).display==="none")return!0;i=i.parentElement}return!1}function qtt(i){return i instanceof HTMLInputElement&&"select"in i}function Fx(i,{select:e=!1}={}){if(i&&i.focus){const t=document.activeElement;i.focus({preventScroll:!0}),i!==t&&qtt(i)&&e&&i.select()}}var Dpe=Ktt();function Ktt(){let i=[];return{add(e){const t=i[0];e!==t&&(t==null||t.pause()),i=Tpe(i,e),i.unshift(e)},remove(e){var t;i=Tpe(i,e),(t=i[0])==null||t.resume()}}}function Tpe(i,e){const t=[...i],n=t.indexOf(e);return n!==-1&&t.splice(n,1),t}function Gtt(i){return i.filter(e=>e.tagName!=="A")}var Ytt="Portal",HEe=L.forwardRef((i,e)=>{var a;const{container:t,...n}=i,[s,r]=L.useState(!1);yA(()=>r(!0),[]);const o=t||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?TCe.createPortal(d.jsx(Rl.div,{...n,ref:e}),o):null});HEe.displayName=Ytt;function Qtt(i,e){return L.useReducer((t,n)=>e[t][n]??t,i)}var A7=i=>{const{present:e,children:t}=i,n=Xtt(e),s=typeof t=="function"?t({present:n.isPresent}):L.Children.only(t),r=CC(n.ref,Ztt(s));return typeof t=="function"||n.isPresent?L.cloneElement(s,{ref:r}):null};A7.displayName="Presence";function Xtt(i){const[e,t]=L.useState(),n=L.useRef(null),s=L.useRef(i),r=L.useRef("none"),o=i?"mounted":"unmounted",[a,l]=Qtt(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return L.useEffect(()=>{const c=w5(n.current);r.current=a==="mounted"?c:"none"},[a]),yA(()=>{const c=n.current,u=s.current;if(u!==i){const g=r.current,f=w5(c);i?l("MOUNT"):f==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&g!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=i}},[i,l]),yA(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,h=f=>{const x=w5(n.current).includes(CSS.escape(f.animationName));if(f.target===e&&x&&(l("ANIMATION_END"),!s.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},g=f=>{f.target===e&&(r.current=w5(n.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:L.useCallback(c=>{n.current=c?getComputedStyle(c):null,t(c)},[])}}function w5(i){return(i==null?void 0:i.animationName)||"none"}function Ztt(i){var n,s;let e=(n=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:n.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=(s=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}var NU=0;function Jtt(){L.useEffect(()=>{const i=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",i[0]??Ipe()),document.body.insertAdjacentElement("beforeend",i[1]??Ipe()),NU++,()=>{NU===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),NU--}},[])}function Ipe(){const i=document.createElement("span");return i.setAttribute("data-radix-focus-guard",""),i.tabIndex=0,i.style.outline="none",i.style.opacity="0",i.style.position="fixed",i.style.pointerEvents="none",i}var Df=function(){return Df=Object.assign||function(e){for(var t,n=1,s=arguments.length;n"u")return mnt;var e=bnt(i),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-t+e[2]-e[0])}},vnt=UEe(),bN="data-scroll-locked",_nt=function(i,e,t,n){var s=i.left,r=i.top,o=i.right,a=i.gap;return t===void 0&&(t="margin"),` - .`.concat(tnt,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(a,"px ").concat(n,`; - } - body[`).concat(bN,`] { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([e&&"position: relative ".concat(n,";"),t==="margin"&&` - padding-left: `.concat(s,`px; - padding-top: `).concat(r,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(a,"px ").concat(n,`; - `),t==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(C4,` { - right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(S4,` { - margin-right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(C4," .").concat(C4,` { - right: 0 `).concat(n,`; - } - - .`).concat(S4," .").concat(S4,` { - margin-right: 0 `).concat(n,`; - } - - body[`).concat(bN,`] { - `).concat(nnt,": ").concat(a,`px; - } -`)},Rpe=function(){var i=parseInt(document.body.getAttribute(bN)||"0",10);return isFinite(i)?i:0},ynt=function(){L.useEffect(function(){return document.body.setAttribute(bN,(Rpe()+1).toString()),function(){var i=Rpe()-1;i<=0?document.body.removeAttribute(bN):document.body.setAttribute(bN,i.toString())}},[])},wnt=function(i){var e=i.noRelative,t=i.noImportant,n=i.gapMode,s=n===void 0?"margin":n;ynt();var r=L.useMemo(function(){return xnt(s)},[s]);return L.createElement(vnt,{styles:_nt(r,!e,s,t?"":"!important")})},OG=!1;if(typeof window<"u")try{var C5=Object.defineProperty({},"passive",{get:function(){return OG=!0,!0}});window.addEventListener("test",C5,C5),window.removeEventListener("test",C5,C5)}catch{OG=!1}var AS=OG?{passive:!1}:!1,Cnt=function(i){return i.tagName==="TEXTAREA"},$Ee=function(i,e){if(!(i instanceof Element))return!1;var t=window.getComputedStyle(i);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!Cnt(i)&&t[e]==="visible")},Snt=function(i){return $Ee(i,"overflowY")},knt=function(i){return $Ee(i,"overflowX")},Mpe=function(i,e){var t=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=qEe(i,n);if(s){var r=KEe(i,n),o=r[1],a=r[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==t.body);return!1},Nnt=function(i){var e=i.scrollTop,t=i.scrollHeight,n=i.clientHeight;return[e,t,n]},Ent=function(i){var e=i.scrollLeft,t=i.scrollWidth,n=i.clientWidth;return[e,t,n]},qEe=function(i,e){return i==="v"?Snt(e):knt(e)},KEe=function(i,e){return i==="v"?Nnt(e):Ent(e)},Lnt=function(i,e){return i==="h"&&e==="rtl"?-1:1},Dnt=function(i,e,t,n,s){var r=Lnt(i,window.getComputedStyle(e).direction),o=r*n,a=t.target,l=e.contains(a),c=!1,u=o>0,h=0,g=0;do{if(!a)break;var f=KEe(i,a),m=f[0],x=f[1],v=f[2],_=x-v-r*m;(m||_)&&qEe(i,a)&&(h+=_,g+=m);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&Math.abs(h)<1||!u&&Math.abs(g)<1)&&(c=!0),c},S5=function(i){return"changedTouches"in i?[i.changedTouches[0].clientX,i.changedTouches[0].clientY]:[0,0]},Ppe=function(i){return[i.deltaX,i.deltaY]},Ope=function(i){return i&&"current"in i?i.current:i},Tnt=function(i,e){return i[0]===e[0]&&i[1]===e[1]},Int=function(i){return` - .block-interactivity-`.concat(i,` {pointer-events: none;} - .allow-interactivity-`).concat(i,` {pointer-events: all;} -`)},Ant=0,RS=[];function Rnt(i){var e=L.useRef([]),t=L.useRef([0,0]),n=L.useRef(),s=L.useState(Ant++)[0],r=L.useState(UEe)[0],o=L.useRef(i);L.useEffect(function(){o.current=i},[i]),L.useEffect(function(){if(i.inert){document.body.classList.add("block-interactivity-".concat(s));var x=ent([i.lockRef.current],(i.shards||[]).map(Ope),!0).filter(Boolean);return x.forEach(function(v){return v.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),x.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(s))})}}},[i.inert,i.lockRef.current,i.shards]);var a=L.useCallback(function(x,v){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!o.current.allowPinchZoom;var _=S5(x),w=t.current,k="deltaX"in x?x.deltaX:w[0]-_[0],C="deltaY"in x?x.deltaY:w[1]-_[1],E,D=x.target,T=Math.abs(k)>Math.abs(C)?"h":"v";if("touches"in x&&T==="h"&&D.type==="range")return!1;var I=window.getSelection(),R=I&&I.anchorNode,P=R?R===D||R.contains(D):!1;if(P)return!1;var j=Mpe(T,D);if(!j)return!0;if(j?E=T:(E=T==="v"?"h":"v",j=Mpe(T,D)),!j)return!1;if(!n.current&&"changedTouches"in x&&(k||C)&&(n.current=E),!E)return!0;var B=n.current||E;return Dnt(B,v,x,B==="h"?k:C)},[]),l=L.useCallback(function(x){var v=x;if(!(!RS.length||RS[RS.length-1]!==r)){var _="deltaY"in v?Ppe(v):S5(v),w=e.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&Tnt(E.delta,_)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var k=(o.current.shards||[]).map(Ope).filter(Boolean).filter(function(E){return E.contains(v.target)}),C=k.length>0?a(v,k[0]):!o.current.noIsolation;C&&v.cancelable&&v.preventDefault()}}},[]),c=L.useCallback(function(x,v,_,w){var k={name:x,delta:v,target:_,should:w,shadowParent:Mnt(_)};e.current.push(k),setTimeout(function(){e.current=e.current.filter(function(C){return C!==k})},1)},[]),u=L.useCallback(function(x){t.current=S5(x),n.current=void 0},[]),h=L.useCallback(function(x){c(x.type,Ppe(x),x.target,a(x,i.lockRef.current))},[]),g=L.useCallback(function(x){c(x.type,S5(x),x.target,a(x,i.lockRef.current))},[]);L.useEffect(function(){return RS.push(r),i.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:g}),document.addEventListener("wheel",l,AS),document.addEventListener("touchmove",l,AS),document.addEventListener("touchstart",u,AS),function(){RS=RS.filter(function(x){return x!==r}),document.removeEventListener("wheel",l,AS),document.removeEventListener("touchmove",l,AS),document.removeEventListener("touchstart",u,AS)}},[]);var f=i.removeScrollBar,m=i.inert;return L.createElement(L.Fragment,null,m?L.createElement(r,{styles:Int(s)}):null,f?L.createElement(wnt,{noRelative:i.noRelative,gapMode:i.gapMode}):null)}function Mnt(i){for(var e=null;i!==null;)i instanceof ShadowRoot&&(e=i.host,i=i.host),i=i.parentNode;return e}const Pnt=cnt(zEe,Rnt);var GEe=L.forwardRef(function(i,e){return L.createElement(R7,Df({},i,{ref:e,sideCar:Pnt}))});GEe.classNames=R7.classNames;var Ont=function(i){if(typeof document>"u")return null;var e=Array.isArray(i)?i[0]:i;return e.ownerDocument.body},MS=new WeakMap,k5=new WeakMap,N5={},TU=0,YEe=function(i){return i&&(i.host||YEe(i.parentNode))},jnt=function(i,e){return e.map(function(t){if(i.contains(t))return t;var n=YEe(t);return n&&i.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",i,". Doing nothing"),null)}).filter(function(t){return!!t})},Fnt=function(i,e,t,n){var s=jnt(e,Array.isArray(i)?i:[i]);N5[t]||(N5[t]=new WeakMap);var r=N5[t],o=[],a=new Set,l=new Set(s),c=function(h){!h||a.has(h)||(a.add(h),c(h.parentNode))};s.forEach(c);var u=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(g){if(a.has(g))u(g);else try{var f=g.getAttribute(n),m=f!==null&&f!=="false",x=(MS.get(g)||0)+1,v=(r.get(g)||0)+1;MS.set(g,x),r.set(g,v),o.push(g),x===1&&m&&k5.set(g,!0),v===1&&g.setAttribute(t,"true"),m||g.setAttribute(n,"true")}catch(_){console.error("aria-hidden: cannot operate on ",g,_)}})};return u(e),a.clear(),TU++,function(){o.forEach(function(h){var g=MS.get(h)-1,f=r.get(h)-1;MS.set(h,g),r.set(h,f),g||(k5.has(h)||h.removeAttribute(n),k5.delete(h)),f||h.removeAttribute(t)}),TU--,TU||(MS=new WeakMap,MS=new WeakMap,k5=new WeakMap,N5={})}},Bnt=function(i,e,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(i)?i:[i]),s=Ont(i);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Fnt(n,s,t,"aria-hidden")):function(){return null}};function Hnt(i){const e=Wnt(i),t=L.forwardRef((n,s)=>{const{children:r,...o}=n,a=L.Children.toArray(r),l=a.find(znt);if(l){const c=l.props.children,u=a.map(h=>h===l?L.Children.count(c)>1?L.Children.only(null):L.isValidElement(c)?c.props.children:null:h);return d.jsx(e,{...o,ref:s,children:L.isValidElement(c)?L.cloneElement(c,void 0,u):null})}return d.jsx(e,{...o,ref:s,children:r})});return t.displayName=`${i}.Slot`,t}function Wnt(i){const e=L.forwardRef((t,n)=>{const{children:s,...r}=t;if(L.isValidElement(s)){const o=$nt(s),a=Unt(r,s.props);return s.type!==L.Fragment&&(a.ref=n?yb(n,o):o),L.cloneElement(s,a)}return L.Children.count(s)>1?L.Children.only(null):null});return e.displayName=`${i}.SlotClone`,e}var Vnt=Symbol("radix.slottable");function znt(i){return L.isValidElement(i)&&typeof i.type=="function"&&"__radixId"in i.type&&i.type.__radixId===Vnt}function Unt(i,e){const t={...e};for(const n in e){const s=i[n],r=e[n];/^on[A-Z]/.test(n)?s&&r?t[n]=(...a)=>{const l=r(...a);return s(...a),l}:s&&(t[n]=s):n==="style"?t[n]={...s,...r}:n==="className"&&(t[n]=[s,r].filter(Boolean).join(" "))}return{...i,...t}}function $nt(i){var n,s;let e=(n=Object.getOwnPropertyDescriptor(i.props,"ref"))==null?void 0:n.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?i.ref:(e=(s=Object.getOwnPropertyDescriptor(i,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?i.props.ref:i.props.ref||i.ref)}var M7="Dialog",[QEe]=xtt(M7),[qnt,Og]=QEe(M7),XEe=i=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:s,onOpenChange:r,modal:o=!0}=i,a=L.useRef(null),l=L.useRef(null),[c,u]=Ctt({prop:n,defaultProp:s??!1,onChange:r,caller:M7});return d.jsx(qnt,{scope:e,triggerRef:a,contentRef:l,contentId:ob(),titleId:ob(),descriptionId:ob(),open:c,onOpenChange:u,onOpenToggle:L.useCallback(()=>u(h=>!h),[u]),modal:o,children:t})};XEe.displayName=M7;var ZEe="DialogTrigger",Knt=L.forwardRef((i,e)=>{const{__scopeDialog:t,...n}=i,s=Og(ZEe,t),r=CC(e,s.triggerRef);return d.jsx(Rl.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Pse(s.open),...n,ref:r,onClick:Kv(i.onClick,s.onOpenToggle)})});Knt.displayName=ZEe;var Rse="DialogPortal",[Gnt,JEe]=QEe(Rse,{forceMount:void 0}),eLe=i=>{const{__scopeDialog:e,forceMount:t,children:n,container:s}=i,r=Og(Rse,e);return d.jsx(Gnt,{scope:e,forceMount:t,children:L.Children.map(n,o=>d.jsx(A7,{present:t||r.open,children:d.jsx(HEe,{asChild:!0,container:s,children:o})}))})};eLe.displayName=Rse;var Aj="DialogOverlay",tLe=L.forwardRef((i,e)=>{const t=JEe(Aj,i.__scopeDialog),{forceMount:n=t.forceMount,...s}=i,r=Og(Aj,i.__scopeDialog);return r.modal?d.jsx(A7,{present:n||r.open,children:d.jsx(Qnt,{...s,ref:e})}):null});tLe.displayName=Aj;var Ynt=Hnt("DialogOverlay.RemoveScroll"),Qnt=L.forwardRef((i,e)=>{const{__scopeDialog:t,...n}=i,s=Og(Aj,t);return d.jsx(GEe,{as:Ynt,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(Rl.div,{"data-state":Pse(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),Rw="DialogContent",nLe=L.forwardRef((i,e)=>{const t=JEe(Rw,i.__scopeDialog),{forceMount:n=t.forceMount,...s}=i,r=Og(Rw,i.__scopeDialog);return d.jsx(A7,{present:n||r.open,children:r.modal?d.jsx(Xnt,{...s,ref:e}):d.jsx(Znt,{...s,ref:e})})});nLe.displayName=Rw;var Xnt=L.forwardRef((i,e)=>{const t=Og(Rw,i.__scopeDialog),n=L.useRef(null),s=CC(e,t.contentRef,n);return L.useEffect(()=>{const r=n.current;if(r)return Bnt(r)},[]),d.jsx(iLe,{...i,ref:s,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Kv(i.onCloseAutoFocus,r=>{var o;r.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Kv(i.onPointerDownOutside,r=>{const o=r.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&r.preventDefault()}),onFocusOutside:Kv(i.onFocusOutside,r=>r.preventDefault())})}),Znt=L.forwardRef((i,e)=>{const t=Og(Rw,i.__scopeDialog),n=L.useRef(!1),s=L.useRef(!1);return d.jsx(iLe,{...i,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var o,a;(o=i.onCloseAutoFocus)==null||o.call(i,r),r.defaultPrevented||(n.current||(a=t.triggerRef.current)==null||a.focus(),r.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:r=>{var l,c;(l=i.onInteractOutside)==null||l.call(i,r),r.defaultPrevented||(n.current=!0,r.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=r.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&s.current&&r.preventDefault()}})}),iLe=L.forwardRef((i,e)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:r,...o}=i,a=Og(Rw,t),l=L.useRef(null),c=CC(e,l);return Jtt(),d.jsxs(d.Fragment,{children:[d.jsx(FEe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:r,children:d.jsx(OEe,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Pse(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(Jnt,{titleId:a.titleId}),d.jsx(tit,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Mse="DialogTitle",sLe=L.forwardRef((i,e)=>{const{__scopeDialog:t,...n}=i,s=Og(Mse,t);return d.jsx(Rl.h2,{id:s.titleId,...n,ref:e})});sLe.displayName=Mse;var rLe="DialogDescription",oLe=L.forwardRef((i,e)=>{const{__scopeDialog:t,...n}=i,s=Og(rLe,t);return d.jsx(Rl.p,{id:s.descriptionId,...n,ref:e})});oLe.displayName=rLe;var aLe="DialogClose",lLe=L.forwardRef((i,e)=>{const{__scopeDialog:t,...n}=i,s=Og(aLe,t);return d.jsx(Rl.button,{type:"button",...n,ref:e,onClick:Kv(i.onClick,()=>s.onOpenChange(!1))})});lLe.displayName=aLe;function Pse(i){return i?"open":"closed"}var cLe="DialogTitleWarning",[Brn,dLe]=btt(cLe,{contentName:Rw,titleName:Mse,docsSlug:"dialog"}),Jnt=({titleId:i})=>{const e=dLe(cLe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return L.useEffect(()=>{i&&(document.getElementById(i)||console.error(t))},[t,i]),null},eit="DialogDescriptionWarning",tit=({contentRef:i,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dLe(eit).contentName}}.`;return L.useEffect(()=>{var r;const s=(r=i.current)==null?void 0:r.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(n))},[n,i,e]),null},Ose=XEe,jse=eLe,Fse=tLe,Bse=nLe,uLe=sLe,hLe=oLe,gLe=lLe;function sl({open:i,onOpenChange:e,title:t,description:n,confirmLabel:s="Delete",cancelLabel:r="Cancel",onConfirm:o,variant:a="destructive",isPending:l=!1}){const c=a==="destructive"?"text-destructive":"text-amber-500",u=a==="destructive"?"bg-destructive/10":"bg-amber-500/10";return d.jsx(Ose,{open:i,onOpenChange:e,children:d.jsxs(jse,{children:[d.jsx(Fse,{className:"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),d.jsxs(Bse,{className:be("fixed inset-x-0 top-[50%] z-50 mx-auto w-full max-w-md translate-y-[-50%]","rounded-xl border border-border bg-card p-6 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:[d.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[d.jsx("div",{className:be("rounded-full p-3",u),children:d.jsx(Vi,{className:be("h-6 w-6",c)})}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(uLe,{className:"text-lg font-semibold text-foreground",children:t}),d.jsx(hLe,{className:"text-sm text-muted-foreground",children:n})]})]}),d.jsxs("div",{className:"mt-6 flex gap-3",children:[d.jsx(Yt,{variant:"outline",className:"flex-1",onClick:()=>e(!1),disabled:l,children:r}),d.jsx(Yt,{variant:"destructive",className:"flex-1",onClick:()=>{o()},disabled:l,children:l?"…":s})]}),d.jsxs(gLe,{className:"absolute inset-e-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[d.jsx(An,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})})}function ZM({icon:i,title:e,description:t,actionLabel:n,onAction:s}){return d.jsxs("div",{className:"flex flex-col items-center justify-center rounded-xl border-2 border-dashed border-border py-16",children:[d.jsx(i,{className:"h-12 w-12 text-muted-foreground/50"}),d.jsx("p",{className:"mt-4 text-lg font-medium text-muted-foreground",children:e}),t&&d.jsx("p",{className:"mt-1 text-sm text-muted-foreground/70",children:t}),n&&s&&d.jsx(Yt,{className:"mt-4",size:"md",onClick:s,children:n})]})}function ep({message:i,onRetry:e,retryLabel:t="Retry"}){return d.jsxs("div",{className:"flex flex-col items-center justify-center rounded-xl border border-destructive/30 bg-destructive/5 py-16",children:[d.jsx(Lo,{className:"h-12 w-12 text-destructive"}),d.jsx("p",{className:"mt-4 text-lg font-medium text-destructive",children:i}),e&&d.jsx(Yt,{variant:"ghost",className:"mt-4 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:e,children:t})]})}function fLe({onLoadMore:i,isFetchingMore:e,hasMore:t}){const n=L.useRef(null);return L.useEffect(()=>{if(!t||e)return;const s=n.current;if(!s)return;const r=new IntersectionObserver(([o])=>{o!=null&&o.isIntersecting&&i()},{rootMargin:"200px"});return r.observe(s),()=>r.disconnect()},[t,e,i]),t?d.jsx("div",{ref:n,className:"flex items-center justify-center py-6","aria-live":"polite",children:e&&d.jsxs(d.Fragment,{children:[d.jsx(ni,{className:"h-5 w-5 animate-spin text-muted-foreground","aria-hidden":"true"}),d.jsx("span",{className:"sr-only",children:"Loading more items…"})]})}):null}function zL({view:i,onChange:e}){const{t}=xe(),n=L.useCallback(s=>{if(s.key==="ArrowLeft"||s.key==="ArrowRight"){s.preventDefault();const r=i==="card"?"list":"card";e(r),requestAnimationFrame(()=>{const o=document.querySelector(`[data-testid="view-toggle-${r}"]`);o==null||o.focus()})}},[i,e]);return d.jsxs("div",{className:"inline-flex items-center rounded-lg border border-input bg-background p-0.5",role:"radiogroup","aria-label":t("common.viewMode","View mode"),"data-testid":"view-toggle",onKeyDown:n,children:[d.jsx("button",{type:"button",role:"radio","aria-checked":i==="card","aria-label":t("common.cardView","Card view"),tabIndex:i==="card"?0:-1,onClick:()=>e("card"),className:be("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",i==="card"?"bg-secondary text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),"data-testid":"view-toggle-card",children:d.jsx(N7e,{className:"h-4 w-4","aria-hidden":"true"})}),d.jsx("button",{type:"button",role:"radio","aria-checked":i==="list","aria-label":t("common.listView","List view"),tabIndex:i==="list"?0:-1,onClick:()=>e("list"),className:be("inline-flex items-center justify-center rounded-md p-1.5 transition-colors",i==="list"?"bg-secondary text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),"data-testid":"view-toggle-list",children:d.jsx(MSe,{className:"h-4 w-4","aria-hidden":"true"})})]})}const pLe="eddi-view-mode";function WE(i){try{const e=localStorage.getItem(`${pLe}-${i}`);if(e==="card"||e==="list")return e}catch{}return"card"}function JM(i,e){try{localStorage.setItem(`${pLe}-${i}`,e)}catch{}}function nit(){const{t:i}=xe(),[e,t]=L.useState(""),[n,s]=L.useState(!1),[r,o]=L.useState(!1),[a,l]=L.useState(!1),[c,u]=L.useState(null),[h,g]=L.useState(null),[f,m]=L.useState(()=>WE("agents")),[x,v]=L.useState("modified"),[_,w]=L.useState("desc"),k=$s(H=>H.maybeAutoStart);L.useEffect(()=>{const H=setTimeout(()=>k("agents"),500);return()=>clearTimeout(H)},[k]);const{data:C,isLoading:E,isError:D,refetch:T,fetchNextPage:I,hasNextPage:R,isFetchingNextPage:P}=I7(e),j=xEe(),B=vEe(),U=L.useMemo(()=>{const H=(C==null?void 0:C.pages.flat())??[];return[...Cg(H)].sort((Y,V)=>{let ue=0;return x==="name"?ue=(Y.name??"").localeCompare(V.name??""):x==="version"?ue=Y.version-V.version:ue=new Date(Y.lastModifiedOn).getTime()-new Date(V.lastModifiedOn).getTime(),_==="asc"?ue:-ue})},[C,x,_]),$=L.useCallback(H=>{x===H?w(Q=>Q==="asc"?"desc":"asc"):(v(H),w(H==="modified"?"desc":"asc"))},[x]);function K(){ze.success(i("agents.importSuccess","Agent imported successfully"))}function z(H,Q){u({id:H,version:Q})}function G(){c&&j.mutate(c,{onSuccess:()=>{ze.success(i("common.delete")+" ✓"),u(null)},onError:H=>ze.error(Vs(H))})}function ne(H,Q){B.mutate({id:H,version:Q,deepCopy:!0},{onSuccess:()=>ze.success(i("agentDetail.duplicateSuccess")),onError:Y=>ze.error(Vs(Y))})}function te(H){m(H),JM("agents",H)}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"flex items-center gap-2 text-3xl font-bold text-foreground",children:[d.jsx(ai,{className:"h-8 w-8 text-primary"}),i("pages.agents.title")]}),d.jsx("p",{className:"mt-1 text-muted-foreground",children:i("pages.agents.subtitle")})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs(Yt,{variant:"outline",onClick:()=>l(!0),"data-testid":"import-agent-btn",children:[d.jsx(qv,{className:"h-4 w-4"}),i("agents.import","Import")]}),d.jsxs(Yt,{onClick:()=>s(!0),"data-testid":"create-agent-btn",children:[d.jsx(Gt,{className:"h-4 w-4"}),i("createOrWizard.newAgent","New Agent")]})]})]}),d.jsxs("div",{className:"flex items-center gap-3","data-tour":"agents-search",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx(br,{className:"absolute inset-s-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),d.jsx("input",{type:"text",value:e,onChange:H=>t(H.target.value),placeholder:i("common.search"),"aria-label":i("common.search"),className:"w-full rounded-lg border border-input bg-background py-2.5 ps-10 pe-4 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring transition-shadow","data-testid":"agent-search"})]}),d.jsx(zL,{view:f,onChange:te})]}),d.jsxs("div",{"data-tour":"agents-content",children:[E&&d.jsx("div",{className:"cq-card-grid",children:Array.from({length:4}).map((H,Q)=>d.jsxs("div",{className:"rounded-xl border border-border bg-card p-5 space-y-3",children:[d.jsx(bi,{className:"h-5 w-3/4"}),d.jsx(bi,{className:"h-4 w-1/2"}),d.jsx(bi,{className:"h-4 w-full"}),d.jsx(bi,{className:"h-8 w-1/3"})]},Q))}),D&&d.jsx(ep,{message:i("common.error"),onRetry:()=>T(),retryLabel:i("common.retry")}),!E&&!D&&U.length===0&&d.jsx(ZM,{icon:ai,title:i(e?"common.noResults":"agents.empty"),description:e?void 0:i("agents.emptyDescription","Use the wizard to create a fully configured agent in minutes."),actionLabel:e?void 0:i("agents.createAgent"),onAction:e?void 0:()=>s(!0)}),!E&&!D&&U.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[i("agents.count",{count:U.length}),R&&"+"]}),f==="card"?d.jsx("div",{className:"cq-card-grid","data-testid":"agent-grid",children:U.map(H=>d.jsx(Let,{agent:H,onDuplicate:ne,onDelete:z,onExport:(Q,Y)=>g({id:Q,version:Y})},H.id))}):d.jsx("div",{className:"overflow-hidden rounded-xl border bg-card shadow-sm","data-testid":"agent-list",children:d.jsxs("table",{className:"w-full",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border bg-secondary/50",children:[d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground","aria-sort":x==="name"?_==="asc"?"ascending":"descending":void 0,children:d.jsxs("button",{onClick:()=>$("name"),className:"inline-flex items-center gap-1 hover:text-foreground transition-colors","aria-label":i("common.sortByName","Sort by name"),children:[i("common.name","Name"),x==="name"?_==="asc"?d.jsx(zv,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(zf,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(pN,{className:"h-3 w-3 opacity-30","aria-hidden":"true"})]})}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground",children:i("common.id","ID")}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground","aria-sort":x==="version"?_==="asc"?"ascending":"descending":void 0,children:d.jsxs("button",{onClick:()=>$("version"),className:"inline-flex items-center gap-1 hover:text-foreground transition-colors","aria-label":i("common.sortByVersion","Sort by version"),children:[i("common.version","Version"),x==="version"?_==="asc"?d.jsx(zv,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(zf,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(pN,{className:"h-3 w-3 opacity-30","aria-hidden":"true"})]})}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground","aria-sort":x==="modified"?_==="asc"?"ascending":"descending":void 0,children:d.jsxs("button",{onClick:()=>$("modified"),className:"inline-flex items-center gap-1 hover:text-foreground transition-colors","aria-label":i("common.sortByModified","Sort by last modified"),children:[i("common.modified","Modified"),x==="modified"?_==="asc"?d.jsx(zv,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(zf,{className:"h-3 w-3","aria-hidden":"true"}):d.jsx(pN,{className:"h-3 w-3 opacity-30","aria-hidden":"true"})]})}),d.jsx("th",{className:"px-5 py-3 text-end text-xs font-medium uppercase tracking-wider text-muted-foreground",children:i("conversations.actions","Actions")})]})}),d.jsx("tbody",{className:"divide-y divide-border",children:U.map(H=>d.jsxs("tr",{className:"hover:bg-secondary/30 transition-colors",children:[d.jsx("td",{className:"px-5 py-3",children:d.jsxs(Kn,{to:`/manage/agentview/${H.id}`,className:"text-sm font-medium text-foreground hover:text-primary transition-colors",children:[H.name||i("agents.unnamed","Unnamed Agent"),d.jsx(To,{className:"ms-1 inline h-3 w-3 opacity-40"})]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[H.id.slice(0,12),"…"]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsxs("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:["v",H.version]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsx("span",{className:"text-sm text-muted-foreground",children:new Date(H.lastModifiedOn).toLocaleString()})}),d.jsx("td",{className:"px-5 py-3 text-end",children:d.jsxs("div",{className:"inline-flex items-center gap-1",children:[d.jsx("button",{onClick:()=>ne(H.id,H.version),className:"rounded-md p-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground transition-colors",title:i("common.duplicate","Duplicate"),"aria-label":i("common.duplicate","Duplicate"),children:d.jsx(mo,{className:"h-4 w-4","aria-hidden":"true"})}),d.jsx("button",{onClick:()=>g({id:H.id,version:H.version}),className:"rounded-md p-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground transition-colors",title:i("agents.export","Export"),"aria-label":i("agents.export","Export"),children:d.jsx(Q_,{className:"h-4 w-4","aria-hidden":"true"})}),d.jsx("button",{onClick:()=>z(H.id,H.version),className:"rounded-md p-1.5 text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",title:i("common.delete"),"aria-label":i("common.delete"),children:d.jsx(_n,{className:"h-4 w-4","aria-hidden":"true"})})]})})]},H.id))})]})}),d.jsx(fLe,{onLoadMore:()=>I(),isFetchingMore:P,hasMore:!!R})]})]}),d.jsx(MEe,{open:n,onClose:()=>s(!1),type:"agent",wizardPath:"/manage/agents/wizard",onQuickCreate:()=>{s(!1),o(!0)}}),d.jsx(Tet,{open:r,onClose:()=>o(!1)}),d.jsx(gtt,{open:a,onClose:()=>l(!1),onSuccess:K}),d.jsx(sl,{open:c!==null,onOpenChange:H=>!H&&u(null),title:i("agents.confirmDelete"),description:i("agents.confirmDeleteDescription","This action cannot be undone. The agent and all its data will be permanently removed."),confirmLabel:i("common.delete"),cancelLabel:i("common.cancel"),onConfirm:G,isPending:j.isPending}),h&&d.jsx(REe,{open:!0,onClose:()=>g(null),agentId:h.id,agentVersion:h.version})]})}const t0=["workflows"],IU=50;function iit(i=100,e=0,t=""){return hn({queryKey:[...t0,"descriptors",{limit:i,index:e,filter:t}],queryFn:()=>T7(i,e,t)})}function sit(i=""){return rSe({queryKey:[...t0,"descriptors-infinite",{filter:i}],queryFn:({pageParam:e=0})=>T7(IU,e,i),initialPageParam:0,getNextPageParam:(e,t)=>{if(e.length===IU)return t.length*IU}})}function rit(i,e){return hn({queryKey:[...t0,i,e],queryFn:()=>qM(i,e),enabled:!!i&&e>0})}function oit(i){return hn({queryKey:[...t0,i,"versions"],queryFn:()=>$Je(i),enabled:!!i})}function ait(i){const e=new URL(i,"http://dummy"),t=e.pathname.split("/").filter(Boolean),n=t[t.length-1],s=parseInt(e.searchParams.get("version")||"1",10);return{id:n,version:s}}function lit(){const i=cn();return Kt({mutationFn:async({config:e,name:t,description:n})=>{const s=await zJe(e);if((t||n)&&s.location){const{id:r,version:o}=ait(s.location);await Tse(r,o,{name:t,description:n})}return s},onSuccess:()=>{i.invalidateQueries({queryKey:t0})}})}function cit(){const i=cn();return Kt({mutationFn:({id:e,version:t,config:n})=>Dse(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:t0})}})}function mLe(){const i=cn();return Kt({mutationFn:({id:e,version:t})=>UJe(e,t),onSuccess:()=>{i.invalidateQueries({queryKey:t0})}})}function dit(){const i=cn();return Kt({mutationFn:({id:e,version:t,deepCopy:n})=>qJe(e,t,n),onSuccess:()=>{i.invalidateQueries({queryKey:t0})}})}function uit(){const i=cn();return Kt({mutationFn:async({agentId:e,version:t,workflows:n})=>{const s=await vC(e,t);return jM(e,t,{...s,workflows:n})},onSuccess:()=>{i.invalidateQueries({queryKey:["agents"]})}})}function hit(i){const e=new Map;for(const t of i){const{id:n,version:s}=uo(t.resource),r=e.get(n);(!r||s>r.version)&&e.set(n,{...t,id:n,version:s})}return Array.from(e.values()).sort((t,n)=>n.lastModifiedOn-t.lastModifiedOn)}function bLe(i){return hn({queryKey:["latest-versions",...i.slice().sort()],queryFn:async()=>{const e={},t=new Set,n=[];for(const s of i)if(!(!s||!s.includes("://")))try{const{id:r}=uo(s);if(t.has(r))continue;t.add(r);const o=s.startsWith("eddi://")?s.replace("eddi://","http://"):s,l=new URL(o,"http://dummy").pathname.split("/").filter(Boolean);l.length>=3&&n.push({uri:s,id:r,store:l[0],plural:l[1]})}catch{}return await Promise.all(n.map(async({id:s,store:r,plural:o})=>{try{const a=await Oe.get(`/${r}/${o}/descriptors?filter=${s}&includePreviousVersions=true`);let l=1;for(const c of a)try{const{version:u}=uo(c.resource);u>l&&(l=u)}catch{}e[s]=l}catch{}})),e},enabled:i.length>0,staleTime:3e4})}const xLe="/capabilities";async function vLe(i,e="highest_confidence"){return Oe.get(`${xLe}?skill=${encodeURIComponent(i)}&strategy=${encodeURIComponent(e)}`)}async function git(){const i=await Oe.get(`${xLe}/skills`);return Array.isArray(i)?i:[]}function Hse(){return hn({queryKey:["capabilities","skills"],queryFn:git})}function fit(i,e){return hn({queryKey:["capabilities","search",i,e],queryFn:()=>vLe(i,e),enabled:!!i.trim()})}function pit(){const{data:i,isLoading:e,isError:t,refetch:n}=Hse(),s=k8e({queries:(i??[]).map(l=>({queryKey:["capabilities","search",l,"all"],queryFn:()=>vLe(l,"all"),enabled:!!i,staleTime:3e4}))}),r=(i??[]).map((l,c)=>{var u,h;return{skill:l,matches:((u=s[c])==null?void 0:u.data)??[],isLoading:((h=s[c])==null?void 0:h.isLoading)??!0}}),o=e||s.some(l=>l.isLoading),a=s.some(l=>l.isError);return{registry:r,isLoading:o,isError:t||a,refetchSkills:n,refetchMatches:()=>s.forEach(l=>{l.isError&&l.refetch()})}}function ls({label:i,defaultOpen:e=!0,icon:t,accent:n,variant:s="inline",children:r}){const[o,a]=L.useState(e);return s==="card"?d.jsxs("section",{className:"rounded-xl border bg-card shadow-sm",children:[d.jsxs("button",{type:"button",onClick:()=>a(!o),className:"flex w-full items-center gap-2 border-b border-border p-5 text-start",children:[o?d.jsx(Rn,{className:"h-4 w-4 text-muted-foreground"}):d.jsx(hs,{className:"h-4 w-4 text-muted-foreground"}),t&&d.jsx(t,{className:`h-5 w-5 ${n??"text-primary"}`}),d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:i})]}),o&&d.jsx("div",{className:"p-5 space-y-4",children:r})]}):d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>a(!o),className:"mb-1.5 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground hover:text-foreground transition-colors",children:[o?d.jsx(Rn,{className:"h-3 w-3"}):d.jsx(hs,{className:"h-3 w-3"}),t&&d.jsx(t,{className:`h-3.5 w-3.5 ${n??""}`}),i]}),o&&d.jsx("div",{className:"space-y-2",children:r})]})}const jG="vault:",FG="${vault:",BG="eddivault:",HG="${eddivault:";function jpe(i){return i.startsWith(jG)||i.startsWith(FG)||i.startsWith(BG)||i.startsWith(HG)}function mit(i){return i.startsWith(FG)?i.slice(FG.length,i.endsWith("}")?-1:void 0):i.startsWith(HG)?i.slice(HG.length,i.endsWith("}")?-1:void 0):i.startsWith(jG)?i.slice(jG.length):i.startsWith(BG)?i.slice(BG.length):i}function bit(i){const e=i.indexOf("/");return e>=0?i.slice(e+1):i}function xit(i){const e=i.indexOf("/");return e>=0?i.slice(0,e):void 0}function Fpe(i){return`\${vault:${i}}`}function vit({onClose:i,tenantId:e,onSuccess:t}){const{t:n}=xe(),[s,r]=L.useState(""),[o,a]=L.useState(""),[l,c]=L.useState(""),[u,h]=L.useState(!1),g=kEe(),f=L.useCallback(()=>{r(""),a(""),c(""),h(!1)},[]),m=L.useCallback(()=>{f(),i()},[f,i]),x=()=>{!s.trim()||!o.trim()||g.mutate({tenantId:e,keyName:s.trim(),value:o.trim(),description:l.trim()||void 0},{onSuccess:()=>{ze.success(n("secrets.storeSuccess",{key:s.trim(),defaultValue:`Secret "${s.trim()}" stored`}));const _=s.trim();f(),t(_),i()},onError:_=>ze.error(_ instanceof Error?_.message:String(_))})},v=d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:m,onKeyDown:_=>{_.key==="Escape"&&m()},children:d.jsxs("div",{className:"w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-2xl",onClick:_=>_.stopPropagation(),role:"dialog","aria-modal":"true",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n("secrets.createTitle","Add Secret")}),d.jsx("button",{onClick:m,className:"rounded-lg p-1.5 text-muted-foreground hover:bg-muted transition-colors",children:d.jsx(An,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"mt-4 space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-muted-foreground",children:n("secrets.keyNameLabel","Key Name")}),d.jsx("input",{type:"text",value:s,onChange:_=>r(_.target.value),placeholder:n("secrets.keyNamePlaceholder","e.g. openaiKey"),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",autoFocus:!0,autoComplete:"off"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-muted-foreground",children:n("secrets.valueLabel","Secret Value")}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:u?"text":"password",value:o,onChange:_=>a(_.target.value),placeholder:n("secrets.valuePlaceholder","Enter secret value…"),className:"h-9 w-full rounded-lg border border-input bg-background pe-10 ps-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",autoComplete:"off"}),d.jsx("button",{type:"button",onClick:()=>h(!u),className:"absolute inset-e-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:u?d.jsx(Sh,{className:"h-4 w-4"}):d.jsx(_b,{className:"h-4 w-4"})})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-xs font-medium text-muted-foreground",children:n("secrets.descriptionLabel","Description (optional)")}),d.jsx("input",{type:"text",value:l,onChange:_=>c(_.target.value),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50",autoComplete:"off"})]})]}),d.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[d.jsx("button",{onClick:m,className:"rounded-lg px-4 py-2 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted",children:n("common.cancel","Cancel")}),d.jsxs("button",{onClick:x,disabled:!s.trim()||!o.trim()||g.isPending,className:"inline-flex items-center gap-2 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-50",children:[g.isPending?d.jsx(ni,{className:"h-4 w-4 animate-spin"}):null,n("secrets.store","Store Secret")]})]})]})});return hg.createPortal(v,document.body)}function _it({secrets:i,secretsLoading:e,vaultAvailable:t,filter:n,onFilterChange:s,highlightedIndex:r,onSelect:o,onCreate:a,onClose:l,vaultError:c}){const{t:u}=xe(),h=L.useRef(null),g=L.useRef(null);L.useEffect(()=>{const x=setTimeout(()=>{var v;return(v=h.current)==null?void 0:v.focus()},50);return()=>clearTimeout(x)},[]),L.useEffect(()=>{var v;if(r<0||!g.current)return;(v=g.current.querySelectorAll("[data-vault-item]")[r])==null||v.scrollIntoView({block:"nearest"})},[r]);const f=L.useMemo(()=>{if(!n.trim())return i;const x=n.toLowerCase();return i.filter(v=>v.keyName.toLowerCase().includes(x)||(v.description??"").toLowerCase().includes(x))},[i,n]),m=x=>{x.key==="Escape"?(x.preventDefault(),l()):x.key==="ArrowDown"||x.key==="ArrowUp"?x.preventDefault():x.key==="Enter"&&(x.preventDefault(),r>=0&&rs(x.target.value),placeholder:u("secretPicker.filterPlaceholder","Search vault keys…"),className:"h-6 flex-1 border-none bg-transparent text-xs text-foreground placeholder:text-muted-foreground/60 focus:outline-none",autoComplete:"off","data-testid":"vault-popup-filter"})]}),d.jsx("div",{ref:g,className:"max-h-48 overflow-y-auto",children:t?e?d.jsxs("div",{className:"flex items-center justify-center gap-2 py-4 text-xs text-muted-foreground",children:[d.jsx(ni,{className:"h-3.5 w-3.5 animate-spin"}),u("secretPicker.loading","Loading keys…")]}):f.length===0?d.jsx("div",{className:"px-3 py-3 text-center text-xs text-muted-foreground",children:n.trim()?u("secretPicker.noMatch",'No keys matching "{{filter}}"',{filter:n}):u("secretPicker.emptyVault","No secrets stored yet")}):f.map((x,v)=>d.jsxs("button",{type:"button","data-vault-item":!0,onClick:()=>o(x.keyName),className:`flex w-full items-start gap-2 px-3 py-2 text-start text-xs transition-colors ${v===r?"bg-primary/10 text-foreground":"text-foreground hover:bg-secondary/50"}`,"data-testid":`vault-key-${x.keyName}`,children:[d.jsx(Uv,{className:"mt-0.5 h-3 w-3 shrink-0 text-amber-500"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate font-mono font-medium",children:x.keyName}),x.description&&d.jsx("span",{className:"block truncate text-[10px] text-muted-foreground",children:x.description})]})]},x.keyName)):d.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 text-xs text-muted-foreground",children:[d.jsx(Vi,{className:"h-3.5 w-3.5 shrink-0 text-amber-500"}),d.jsx("span",{children:c||u("secretPicker.vaultDown","Vault is not configured — set up a secret provider in the EDDI backend")})]})}),t&&d.jsx("div",{className:"border-t border-border",children:d.jsxs("button",{type:"button",onClick:a,className:"flex w-full items-center gap-2 px-3 py-2 text-xs text-muted-foreground transition-colors hover:bg-secondary/50 hover:text-foreground","data-testid":"vault-popup-create",children:[d.jsx(Gt,{className:"h-3 w-3"}),u("secretPicker.createNew","Create new secret")]})})]})}function Rd({value:i,onChange:e,readOnly:t,tenantId:n="default",placeholder:s,testId:r="secret-key-picker"}){var Y;const{t:o}=xe(),[a,l]=L.useState(!1),[c,u]=L.useState(!1),[h,g]=L.useState(""),[f,m]=L.useState(-1),[x,v]=L.useState(!1),_=L.useRef(null),{data:w,isLoading:k}=SEe(n),{data:C}=Ise(),E=(C==null?void 0:C.available)!==!1,D=(C==null?void 0:C.reason)||(C==null?void 0:C.error),T=L.useMemo(()=>(w??[]).map(V=>({keyName:V.keyName,description:V.description})).sort((V,ue)=>V.keyName.localeCompare(ue.keyName)),[w]),I=L.useMemo(()=>new Set(T.map(V=>V.keyName)),[T]),R=jpe(i),P=R?mit(i):"",j=xit(P),B=j===void 0||j===n?bit(P):P,U=I.has(B),$=R?((Y=T.find(V=>V.keyName===B))==null?void 0:Y.description)??null:null,K=L.useMemo(()=>{if(!h.trim())return T;const V=h.toLowerCase();return T.filter(ue=>ue.keyName.toLowerCase().includes(V)||(ue.description??"").toLowerCase().includes(V))},[T,h]),z=L.useCallback(()=>{t||(g(""),m(-1),u(!0))},[t]),G=L.useCallback(()=>{u(!1),g(""),m(-1)},[]),ne=L.useCallback(V=>{e(Fpe(V)),G()},[e,G]),te=L.useCallback(()=>{t||e("")},[t,e]),H=L.useCallback(V=>{e(V),jpe(V)&&V.endsWith("}")&&G()},[e,G]),Q=L.useCallback(V=>{if(!c){V.key==="ArrowDown"&&E&&(V.preventDefault(),z());return}V.key==="Escape"?(V.preventDefault(),G()):V.key==="ArrowDown"?(V.preventDefault(),m(ue=>ueue>0?ue-1:K.length-1)):V.key==="Enter"&&(V.preventDefault(),f>=0&&f{if(!c)return;const V=ue=>{_.current&&!_.current.contains(ue.target)&&G()};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[c,G]),R?d.jsx("div",{ref:_,className:"relative","data-testid":r,children:d.jsxs("div",{className:`flex h-7 items-center gap-1.5 rounded-md border px-2 ${t?"border-amber-500/30 bg-amber-500/5":"border-amber-500/50 bg-amber-500/10"}`,title:$?`${P} — ${$}`:P,children:[d.jsx(Uv,{className:"h-3 w-3 shrink-0 text-amber-600 dark:text-amber-400"}),d.jsx("span",{className:"flex-1 truncate font-mono text-xs font-medium text-amber-700 dark:text-amber-300",children:P}),!k&&!U&&P&&d.jsx("span",{title:o("secretPicker.keyNotFound","This key was not found in the vault"),children:d.jsx(Vi,{className:"h-3 w-3 shrink-0 text-amber-500"})}),!t&&d.jsx("button",{type:"button",onClick:te,className:"rounded p-0.5 text-amber-600/70 transition-colors hover:text-amber-700 dark:text-amber-400/70 dark:hover:text-amber-300","aria-label":o("secretPicker.clearVault","Clear vault reference"),"data-testid":`${r}-clear`,children:d.jsx(An,{className:"h-3 w-3"})})]})}):d.jsxs("div",{ref:_,className:"relative","data-testid":r,children:[d.jsxs("div",{className:"flex items-stretch",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx("input",{type:a?"text":"password",value:i,onChange:V=>H(V.target.value),onKeyDown:Q,readOnly:t,placeholder:s??o("secretPicker.placeholder","API key or ${vault:key-name}"),dir:"ltr",className:`h-7 w-full border border-input bg-background pe-14 ps-2 font-mono text-xs text-foreground placeholder:text-muted-foreground/60 focus:outline-none focus:ring-1 focus:ring-ring ${E&&!t?"rounded-s-md rounded-e-none":"rounded-md"}`,"data-testid":`${r}-input`}),d.jsx("button",{type:"button",onClick:()=>l(V=>!V),disabled:t,className:"absolute inset-e-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",tabIndex:-1,"aria-label":a?"Hide":"Show",children:a?d.jsx(_b,{className:"h-3 w-3"}):d.jsx(Sh,{className:"h-3 w-3"})})]}),E&&!t&&d.jsxs("button",{type:"button",onClick:()=>c?G():z(),title:o("secretPicker.pickFromVault","Pick from vault"),className:`flex h-7 items-center gap-0.5 border border-s-0 border-input px-1.5 text-xs transition-colors ${c?"rounded-e-md bg-primary/10 text-primary":"rounded-e-md bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,"data-testid":`${r}-vault-btn`,children:[d.jsx(Uv,{className:"h-3 w-3"}),d.jsx(Rn,{className:`h-2.5 w-2.5 transition-transform ${c?"rotate-180":""}`})]})]}),c&&d.jsx(_it,{secrets:T,secretsLoading:k,vaultAvailable:E,filter:h,onFilterChange:V=>{g(V),m(-1)},highlightedIndex:f,onSelect:ne,onCreate:()=>{G(),v(!0)},onClose:G,vaultError:D}),x&&d.jsx(vit,{onClose:()=>v(!1),tenantId:n,onSuccess:V=>{e(Fpe(V))}})]})}function k4({value:i,onCommit:e,delay:t=600,...n}){const[s,r]=L.useState(i),o=L.useRef(null);L.useEffect(()=>r(i),[i]);const a=L.useCallback(l=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>e(l),t)},[e,t]);return L.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),d.jsx("input",{...n,value:s,onChange:l=>{r(l.target.value),a(l.target.value)}})}function um({value:i,onCommit:e,delay:t=600,fallback:n=0,...s}){const[r,o]=L.useState(String(i)),a=L.useRef(null);L.useEffect(()=>o(String(i)),[i]);const l=L.useCallback(c=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{e(parseFloat(c)||n)},t)},[e,t,n]);return L.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]),d.jsx("input",{...s,type:"number",value:r,onChange:c=>{o(c.target.value),l(c.target.value)}})}const yit=["signInterAgentMessages","signMcpInvocations","requirePeerVerification"],wit=L.memo(function({agent:e,agentId:t,version:n}){var m,x,v,_,w,k,C,E;const{t:s}=xe(),r=wC(),[o,a]=L.useState(null),[l,c]=L.useState(null);L.useEffect(()=>{if(l){const D=setTimeout(()=>c(null),8e3);return()=>clearTimeout(D)}},[l]);const u=yit.some(D=>{var T;return(T=e.security)==null?void 0:T[D]});function h(D){var I;if(!(((I=e.security)==null?void 0:I[D])??!1)){a(D);return}g(D,!0)}function g(D,T){c(null),r.mutate({id:t,version:n,agent:{...e,security:{...e.security,[D]:!T}}},{onError:I=>{Iie(I)&&I.status===400?c(I.message):c(I instanceof Error?I.message:String(I))}})}function f(){o&&(g(o,!1),a(null))}return d.jsxs(ls,{label:s("agentDetail.securityIdentity","Security & Identity"),icon:bh,accent:"text-rose-500",variant:"card",defaultOpen:!!((m=e.security)!=null&&m.signInterAgentMessages||(x=e.security)!=null&&x.signMcpInvocations||(v=e.identity)!=null&&v.agentDid),children:[d.jsxs("div",{className:"space-y-3","data-testid":"identity-section",children:[d.jsxs("h3",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[d.jsx(ME,{className:"h-3.5 w-3.5"}),s("agentDetail.identity","Cryptographic Identity")]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:s("agentDetail.agentDid","Agent DID")}),d.jsx(k4,{type:"text",value:((_=e.identity)==null?void 0:_.agentDid)??"",onCommit:D=>r.mutate({id:t,version:n,agent:{...e,identity:{...e.identity,agentDid:D||void 0}}}),placeholder:"did:eddi:agent:...",className:"h-8 w-full rounded-md border border-input bg-background px-2 text-xs text-foreground font-mono focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:s("agentDetail.publicKey","Public Key")}),d.jsx("input",{type:"text",value:((w=e.identity)==null?void 0:w.publicKey)??"",readOnly:!0,placeholder:s("agentDetail.publicKeyHint","Auto-generated on first signing"),className:"h-8 w-full rounded-md border border-input bg-muted/50 px-2 text-xs text-muted-foreground font-mono"})]})]}),(((C=(k=e.identity)==null?void 0:k.keys)==null?void 0:C.length)??0)>0?d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"mb-1 block text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:s("agentDetail.publicKeys","Public Keys")}),d.jsx("div",{className:"space-y-1",children:e.identity.keys.map((D,T)=>d.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border bg-muted/30 px-2.5 py-1.5",children:[d.jsx("span",{className:"inline-flex items-center rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-semibold text-primary",children:s("agentDetail.keyVersion","Key v{{version}}",{version:D.version??T})}),d.jsx("span",{className:"flex-1 truncate font-mono text-[10px] text-muted-foreground",dir:"ltr",children:D.publicKeyB64?`${D.publicKeyB64.slice(0,24)}…`:"—"}),D.validUntilMs!=null&&D.validUntilMs>0&&D.validUntilMs{var R;return d.jsxs("label",{className:"flex items-start gap-2.5 py-1",children:[d.jsx("input",{type:"checkbox",checked:((R=e.security)==null?void 0:R[D])??!1,onChange:()=>h(D),disabled:r.isPending,className:"mt-0.5 h-3.5 w-3.5 rounded border-input accent-primary"}),d.jsxs("div",{children:[d.jsx("span",{className:"text-xs font-medium text-foreground",children:T}),d.jsx("p",{className:"text-[10px] text-muted-foreground",children:I})]})]},D)})]}),d.jsx(sl,{open:!!o,onOpenChange:D=>{D||a(null)},title:s("agentDetail.securityFlagConfirmTitle","Enable security flag?"),description:s("agentDetail.securityFlagConfirmDesc","Cryptographic signing is not yet available in this version. Enabling this flag will cause the backend to reject saves with HTTP 400. Are you sure you want to proceed?"),confirmLabel:s("agentDetail.securityFlagConfirmBtn","Enable anyway"),cancelLabel:s("common.cancel","Cancel"),onConfirm:f})]})}),Cit=pke;function Sit({value:i,onChange:e,onSelect:t,placeholder:n}){const{data:s}=Hse(),[r,o]=L.useState(!1),[a,l]=L.useState(-1),c=L.useRef(null),u=L.useMemo(()=>{if(!s||!i.trim())return[];const g=i.trim().toLowerCase();return s.filter(f=>f.toLowerCase().includes(g))},[s,i]);L.useEffect(()=>{function g(f){c.current&&!c.current.contains(f.target)&&o(!1)}return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]);function h(g){g.key==="ArrowDown"?(g.preventDefault(),l(f=>Math.min(f+1,u.length-1)),o(!0)):g.key==="ArrowUp"?(g.preventDefault(),l(f=>Math.max(f-1,0))):g.key==="Enter"?(g.preventDefault(),a>=0&&a{e(g.target.value),o(!0),l(-1)},onFocus:()=>{i.trim()&&o(!0)},onKeyDown:h,placeholder:n,className:"h-8 w-full rounded-md border border-input bg-background ps-7 pe-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"skill-autocomplete-input",autoComplete:"off"}),r&&u.length>0&&d.jsx("div",{className:"absolute z-50 mt-1 max-h-40 w-full overflow-auto rounded-lg border border-border bg-card shadow-lg","data-testid":"skill-autocomplete-dropdown",children:u.map((g,f)=>d.jsx("button",{type:"button",onMouseDown:m=>{m.preventDefault(),t(g),o(!1)},onMouseEnter:()=>l(f),className:`w-full px-3 py-1.5 text-start text-xs transition-colors ${f===a?"bg-primary/10 text-primary":"text-foreground hover:bg-secondary"}`,children:g},g))})]})}function kit({attributes:i,onChange:e,disabled:t}){const{t:n}=xe(),s=Object.entries(i),[r,o]=L.useState(""),[a,l]=L.useState(""),c=L.useRef(i);L.useEffect(()=>{c.current=i},[i]);const u=L.useRef(null);L.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);function h(){r.trim()&&(e({...c.current,[r.trim()]:a.trim()}),o(""),l(""))}function g(m){u.current&&(clearTimeout(u.current),u.current=null);const x={...c.current};delete x[m],e(x)}function f(m,x){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{e({...c.current,[m]:x})},600)}return d.jsxs("div",{className:"space-y-1.5 ps-3 border-s-2 border-violet-500/20",children:[s.map(([m,x])=>d.jsx(Nit,{attrKey:m,attrValue:x,onCommit:v=>f(m,v),onRemove:()=>g(m),disabled:t},m)),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("input",{type:"text",value:r,onChange:m=>o(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),h())},placeholder:n("agentDetail.attributeKey","key"),disabled:t,className:"h-6 w-20 rounded border border-input bg-background px-1.5 text-[10px] text-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50","data-testid":"attribute-key-input"}),d.jsx("input",{type:"text",value:a,onChange:m=>l(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),h())},placeholder:n("agentDetail.attributeValue","value"),disabled:t,className:"h-6 flex-1 rounded border border-input bg-background px-1.5 text-[10px] text-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50","data-testid":"attribute-value-input"}),d.jsx("button",{type:"button",onClick:h,disabled:!r.trim()||t,className:"rounded p-0.5 text-muted-foreground hover:text-primary transition-colors disabled:opacity-50",title:n("agentDetail.addAttribute","Add attribute"),children:d.jsx(Gt,{className:"h-3 w-3"})})]})]})}function Nit({attrKey:i,attrValue:e,onCommit:t,onRemove:n,disabled:s}){const[r,o]=L.useState(e),a=L.useRef(null);L.useEffect(()=>o(e),[e]),L.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]);function l(c){o(c),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>t(c),600)}return d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"shrink-0 rounded bg-violet-500/10 px-1.5 py-0.5 text-[10px] font-medium text-violet-600 dark:text-violet-400",children:i}),d.jsx("input",{type:"text",value:r,onChange:c=>l(c.target.value),disabled:s,className:"h-6 flex-1 rounded border border-input bg-background px-1.5 text-[10px] text-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-50"}),d.jsx("button",{type:"button",onClick:n,disabled:s,className:"rounded p-0.5 text-muted-foreground hover:text-destructive transition-colors disabled:opacity-50",children:d.jsx(An,{className:"h-3 w-3"})})]})}const Eit=L.memo(function({agent:e,agentId:t,version:n}){const{t:s}=xe(),r=wC(),[o,a]=L.useState(""),[l,c]=L.useState(null),u=e.capabilities??[];function h(x){if(!x.trim())return;if(u.some(_=>_.skill===x.trim())){ze.error(s("agentDetail.skillAlreadyExists","This skill is already declared"));return}const v=[...u,{skill:x.trim(),confidence:"medium",attributes:{}}];r.mutate({id:t,version:n,agent:{...e,capabilities:v}}),a("")}function g(x){const v=u.filter((_,w)=>w!==x);r.mutate({id:t,version:n,agent:{...e,capabilities:v}}),l===x&&c(null)}function f(x,v){const _=u.map((w,k)=>k===x?{...w,confidence:v}:w);r.mutate({id:t,version:n,agent:{...e,capabilities:_}})}function m(x,v){const _=u.map((w,k)=>k===x?{...w,attributes:v}:w);r.mutate({id:t,version:n,agent:{...e,capabilities:_}})}return d.jsx(ls,{label:s("agentDetail.capabilities","Capabilities"),icon:Ll,accent:"text-violet-500",variant:"card",defaultOpen:u.length>0,children:d.jsxs("div",{className:"space-y-3","data-testid":"capabilities-section",children:[d.jsx("p",{className:"text-[10px] text-muted-foreground",children:s("agentDetail.capabilitiesDesc","Declared skills for A2A agent card and capability registry. Other agents discover these when choosing delegation targets.")}),u.length>0&&d.jsx("div",{className:"space-y-2",children:u.map((x,v)=>d.jsxs("div",{className:"rounded-lg border border-border bg-background overflow-hidden","data-testid":`capability-entry-${v}`,children:[d.jsxs("div",{className:"flex items-center gap-2 p-2.5",children:[d.jsx("button",{type:"button",onClick:()=>c(l===v?null:v),className:"text-muted-foreground hover:text-foreground transition-colors",title:s("agentDetail.toggleAttributes","Toggle attributes"),children:d.jsx(Ll,{className:"h-3.5 w-3.5 text-violet-500"})}),d.jsx("span",{className:"flex-1 text-xs font-medium text-foreground",children:x.skill}),d.jsxs("select",{value:x.confidence??"medium",onChange:_=>f(v,_.target.value),className:`h-7 rounded-full border px-2 text-[10px] font-semibold focus:outline-none focus:ring-1 focus:ring-ring ${Cit[x.confidence??"medium"]??""}`,"data-testid":`confidence-select-${v}`,children:[d.jsx("option",{value:"low",children:s("agentDetail.confidenceLow","Low")}),d.jsx("option",{value:"medium",children:s("agentDetail.confidenceMedium","Medium")}),d.jsx("option",{value:"high",children:s("agentDetail.confidenceHigh","High")})]}),x.attributes&&Object.keys(x.attributes).length>0&&d.jsxs("button",{type:"button",onClick:()=>c(l===v?null:v),className:"rounded-full bg-violet-500/10 px-1.5 py-0.5 text-[9px] font-medium text-violet-600 dark:text-violet-400 hover:bg-violet-500/20 transition-colors",children:[Object.keys(x.attributes).length," ",s("agentDetail.attrs","attrs")]}),d.jsx("button",{type:"button",onClick:()=>g(v),disabled:r.isPending,className:"rounded p-1 text-muted-foreground hover:text-destructive transition-colors",children:d.jsx(An,{className:"h-3.5 w-3.5"})})]}),l===v&&d.jsxs("div",{className:"border-t border-border bg-violet-500/[0.02] px-3 py-2.5",children:[d.jsx("p",{className:"mb-1.5 text-[10px] font-medium text-muted-foreground",children:s("agentDetail.attributesLabel","Attributes")}),d.jsx(kit,{attributes:x.attributes??{},onChange:_=>m(v,_),disabled:r.isPending})]})]},`${x.skill}-${v}`))}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx(Sit,{value:o,onChange:a,onSelect:h,placeholder:s("agentDetail.capabilityPlaceholder","Search or type a skill name...")}),d.jsx("button",{type:"button",onClick:()=>h(o),disabled:!o.trim()||r.isPending,className:"inline-flex h-8 items-center gap-1 rounded-md border border-input px-2 text-xs font-medium text-foreground transition-colors hover:bg-secondary disabled:opacity-50","data-testid":"add-capability-btn",children:d.jsx(Gt,{className:"h-3 w-3"})})]})]})})}),Lit=L.memo(function({agent:e,agentId:t,version:n}){const{t:s}=xe(),r=wC(),o=e.enableMemoryTools??!1,a=e.userMemoryConfig??{},l=a.dream??{},c=a.guardrails??{};function u(m){r.mutate({id:t,version:n,agent:{...e,...m}})}function h(m){u({userMemoryConfig:{...a,...m}})}function g(m){h({dream:{...l,...m}})}function f(m){h({guardrails:{...c,...m}})}return d.jsx(ls,{label:s("agentDetail.userMemory","User Memory"),icon:Nl,accent:"text-teal-500",variant:"card",defaultOpen:o,children:d.jsxs("div",{className:"space-y-4","data-testid":"user-memory-section",children:[d.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:s("agentDetail.userMemoryDesc","Persistent per-user memory with LLM tools (remember/recall/forget). Basic longTerm property persistence always works regardless of this toggle.")}),d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium text-foreground",children:[d.jsx("input",{type:"checkbox",checked:o,onChange:()=>u({enableMemoryTools:!o}),disabled:r.isPending,className:"h-3.5 w-3.5 rounded border-input accent-primary"}),d.jsx(Nl,{className:"h-3.5 w-3.5 text-teal-500"}),s("agentDetail.enableMemoryTools","Enable Memory Tools")]}),o&&d.jsxs("div",{className:"space-y-4 rounded-lg border border-teal-500/20 bg-teal-500/5 p-4",children:[d.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.defaultVisibility","Default Visibility")}),d.jsxs("select",{value:a.defaultVisibility??"self",onChange:m=>h({defaultVisibility:m.target.value}),className:"h-7 w-full rounded border border-input bg-background px-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring",children:[d.jsx("option",{value:"self",children:s("agentDetail.visibilitySelf","self")}),d.jsx("option",{value:"global",children:s("agentDetail.visibilityGlobal","global")})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.maxRecallEntries","Max Recall")}),d.jsx(um,{value:a.maxRecallEntries??50,onCommit:m=>h({maxRecallEntries:m}),fallback:50,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.maxEntriesPerUser","Max per User")}),d.jsx(um,{value:a.maxEntriesPerUser??500,onCommit:m=>h({maxEntriesPerUser:m}),fallback:500,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.onCapReached","On Cap Reached")}),d.jsxs("select",{value:a.onCapReached??"evict_oldest",onChange:m=>h({onCapReached:m.target.value}),className:"h-7 w-full rounded border border-input bg-background px-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring",children:[d.jsx("option",{value:"evict_oldest",children:s("agentDetail.onCapEvict","Evict Oldest")}),d.jsx("option",{value:"reject",children:s("agentDetail.onCapReject","Reject")})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.recallOrder","Recall Order")}),d.jsxs("select",{value:a.recallOrder??"most_recent",onChange:m=>h({recallOrder:m.target.value}),className:"h-7 w-full rounded border border-input bg-background px-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring",children:[d.jsx("option",{value:"most_recent",children:s("agentDetail.recallMostRecent","Most Recent")}),d.jsx("option",{value:"most_relevant",children:s("agentDetail.recallMostRelevant","Most Relevant")})]})]})]}),d.jsxs("div",{className:"space-y-2 border-t border-teal-500/20 pt-3",children:[d.jsx("h4",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:s("agentDetail.guardrails","Write Guardrails")}),d.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.maxKeyLength","Max Key Length")}),d.jsx(um,{value:c.maxKeyLength??100,onCommit:m=>f({maxKeyLength:m}),fallback:100,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.maxValueLength","Max Value Length")}),d.jsx(um,{value:c.maxValueLength??1e3,onCommit:m=>f({maxValueLength:m}),fallback:1e3,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.maxWritesPerTurn","Max Writes/Turn")}),d.jsx(um,{value:c.maxWritesPerTurn??10,onCommit:m=>f({maxWritesPerTurn:m}),fallback:10,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]})]})]}),d.jsxs("div",{className:"space-y-2 border-t border-teal-500/20 pt-3",children:[d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium text-foreground",children:[d.jsx("input",{type:"checkbox",checked:l.enabled??!1,onChange:()=>g({enabled:!(l.enabled??!1)}),disabled:r.isPending,className:"h-3.5 w-3.5 rounded border-input accent-primary"}),d.jsx(HSe,{className:"h-3.5 w-3.5 text-indigo-400"}),s("agentDetail.dreamConsolidation","Dream Consolidation")]}),d.jsx("p",{className:"text-[10px] text-muted-foreground ps-5",children:s("agentDetail.dreamDesc","Background LLM job that resolves contradictions, prunes stale entries, and optionally summarizes interactions.")}),l.enabled&&d.jsxs("div",{className:"space-y-3 ps-5",children:[d.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamSchedule","Schedule (cron)")}),d.jsx(k4,{type:"text",value:l.schedule??"0 3 * * *",onCommit:m=>g({schedule:m}),placeholder:"0 3 * * *",className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground font-mono focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamLlmProvider","LLM Provider")}),d.jsx(k4,{type:"text",value:l.llmProvider??"anthropic",onCommit:m=>g({llmProvider:m}),className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamLlmModel","LLM Model")}),d.jsx(k4,{type:"text",value:l.llmModel??"claude-sonnet-4-6",onCommit:m=>g({llmModel:m}),placeholder:"claude-sonnet-4-6",className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground font-mono focus:outline-none focus:ring-1 focus:ring-ring"})]})]}),d.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamMaxCost","Max Cost/Run ($)")}),d.jsx(um,{value:l.maxCostPerRun??5,onCommit:m=>g({maxCostPerRun:m}),fallback:5,step:.01,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamPruneDays","Prune After (days)")}),d.jsx(um,{value:l.pruneStaleAfterDays??90,onCommit:m=>g({pruneStaleAfterDays:m}),fallback:90,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-0.5 block text-[10px] text-muted-foreground",children:s("agentDetail.dreamBatchSize","Batch Size")}),d.jsx(um,{value:l.batchSize??50,onCommit:m=>g({batchSize:m}),fallback:50,className:"h-7 w-full rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]})]}),d.jsxs("div",{className:"flex gap-4",children:[d.jsxs("label",{className:"inline-flex items-center gap-1.5 text-xs text-foreground",children:[d.jsx("input",{type:"checkbox",checked:l.detectContradictions??!0,onChange:m=>g({detectContradictions:m.target.checked}),className:"h-3.5 w-3.5 rounded border-input accent-primary"}),s("agentDetail.detectContradictions","Detect contradictions")]}),d.jsxs("label",{className:"inline-flex items-center gap-1.5 text-xs text-foreground",children:[d.jsx("input",{type:"checkbox",checked:l.summarizeInteractions??!1,onChange:m=>g({summarizeInteractions:m.target.checked}),className:"h-3.5 w-3.5 rounded border-input accent-primary"}),s("agentDetail.summarizeInteractions","Summarize interactions")]})]})]})]})]})]})})}),Dit=L.memo(function({agent:e,agentId:t,version:n}){const{t:s}=xe(),r=wC(),o=e.memoryPolicy??{},a=o.strictWriteDiscipline??{},l=a.enabled??!1;function c(u){r.mutate({id:t,version:n,agent:{...e,memoryPolicy:{...o,strictWriteDiscipline:{...a,...u}}}})}return d.jsx(ls,{label:s("agentDetail.memoryPolicy","Memory Policy"),icon:Uge,accent:"text-rose-500",variant:"card",defaultOpen:l,children:d.jsxs("div",{className:"space-y-3","data-testid":"memory-policy-section",children:[d.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:s("agentDetail.memoryPolicyDesc","Strict Write Discipline governs what happens when property updates fail during a conversation step. Choose how the engine handles partially committed data.")}),d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium text-foreground",children:[d.jsx("input",{type:"checkbox",checked:l,onChange:()=>c({enabled:!l}),disabled:r.isPending,className:"h-3.5 w-3.5 rounded border-input accent-primary","data-testid":"swd-enable"}),d.jsx(Uge,{className:"h-3.5 w-3.5 text-rose-500"}),s("agentDetail.enableSwd","Enable Strict Write Discipline")]}),l&&d.jsx("div",{className:"space-y-3 rounded-lg border border-rose-500/20 bg-rose-500/5 p-3",children:d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:s("agentDetail.onFailure","On Failure Strategy")}),d.jsxs("select",{value:a.onFailure??"digest",onChange:u=>c({onFailure:u.target.value}),disabled:r.isPending,className:"h-8 w-full rounded-md border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-60","data-testid":"swd-on-failure",children:[d.jsx("option",{value:"digest",children:s("agentDetail.onFailureDigest","Digest — rollback changes, report summary to LLM")}),d.jsx("option",{value:"exclude_all",children:s("agentDetail.onFailureExclude","Exclude All — silently drop all property updates")}),d.jsx("option",{value:"keep_all",children:s("agentDetail.onFailureKeep","Keep All — keep changes and log warning")})]})]})})]})})}),Tit=["before_tool","before_action"],Iit=L.memo(function({agent:e,agentId:t,version:n}){const{t:s}=xe(),r=wC(),o=e.sessionManagement??{},a=o.autoSnapshot??{};function l(u){r.mutate({id:t,version:n,agent:{...e,sessionManagement:{...o,...u}}})}function c(u){l({autoSnapshot:{...a,...u}})}return d.jsx(ls,{label:s("agentDetail.sessionManagement","Session Management"),icon:ME,accent:"text-teal-500",variant:"card",defaultOpen:a.enabled??!1,children:d.jsxs("div",{className:"space-y-4","data-testid":"session-management-section",children:[d.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:s("agentDetail.sessionManagementDesc","Memory checkpoints capture conversation state before risky operations, enabling clean rollback on failure.")}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium text-foreground",children:[d.jsx("input",{type:"checkbox",checked:a.enabled??!1,onChange:()=>c({enabled:!(a.enabled??!1)}),disabled:r.isPending,className:"h-3.5 w-3.5 rounded border-input accent-primary","data-testid":"auto-snapshot-enabled"}),s("agentDetail.autoSnapshotEnable","Enable automatic checkpoints")]}),a.enabled&&d.jsxs("div",{className:"space-y-3 ps-5",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-[10px] text-muted-foreground",children:s("agentDetail.triggerOn","Trigger On")}),d.jsx("div",{className:"flex flex-wrap gap-2",children:Tit.map(u=>{const h=(a.triggerOn??[]).includes(u);return d.jsx("button",{type:"button",onClick:()=>{const g=a.triggerOn??[],f=h?g.filter(m=>m!==u):[...g,u];c({triggerOn:f.length>0?f:void 0})},disabled:r.isPending,className:`inline-flex items-center gap-1 rounded-md border px-2.5 py-1 text-[10px] font-medium transition-colors ${h?"border-primary bg-primary/10 text-primary":"border-border text-muted-foreground hover:text-foreground hover:border-foreground/30"}`,children:u==="before_tool"?s("agentDetail.triggerBeforeTool","Before tool execution"):s("agentDetail.triggerBeforeAction","Before action")},u)})})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("label",{className:"text-xs text-foreground whitespace-nowrap",children:s("agentDetail.maxCheckpoints","Max Checkpoints")}),d.jsx(um,{value:o.maxCheckpointsPerConversation??10,onCommit:u=>l({maxCheckpointsPerConversation:u}),min:1,max:100,className:"h-7 w-20 rounded border border-input bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:s("agentDetail.maxCheckpointsHint","per conversation")})]})]})]}),d.jsxs("div",{className:"border-t border-border pt-3 space-y-2",children:[d.jsxs("label",{className:"inline-flex items-center gap-2 text-xs font-medium text-muted-foreground cursor-not-allowed",title:s("agentDetail.forkingDisabledTooltip","Available in a future release"),children:[d.jsx("input",{type:"checkbox",checked:o.forkingEnabled??!1,disabled:!0,className:"h-3.5 w-3.5 rounded border-input accent-primary opacity-50","data-testid":"forking-enabled"}),s("agentDetail.forkingEnabled","Session Forking"),d.jsxs("span",{className:"text-[9px] font-normal text-muted-foreground/70",children:["(",s("agentDetail.comingSoon","coming soon"),")"]})]}),d.jsx("p",{className:"text-[10px] text-muted-foreground ps-5",children:s("agentDetail.forkingNote","Session forking endpoint (POST /v6/conversations/{id}/fork) is not yet available.")}),d.jsxs("div",{className:"flex items-center gap-2 ps-5 opacity-50 cursor-not-allowed",children:[d.jsx("label",{className:"text-xs text-foreground whitespace-nowrap",children:s("agentDetail.maxForks","Max Forks")}),d.jsx("input",{type:"number",value:o.maxForksPerConversation??5,disabled:!0,className:"h-7 w-20 rounded border border-input bg-muted/50 px-2 text-xs text-muted-foreground",title:s("agentDetail.forkingDisabledTooltip","Available in a future release")}),d.jsx("span",{className:"text-[10px] text-muted-foreground",children:s("agentDetail.maxForksHint","per conversation")})]})]})]})})});function Ait(){return typeof window<"u"?`${window.location.origin}/integrations/slack/events`:""}function Rit(){const{t:i}=xe(),[e,t]=L.useState(!1),n=Ait(),[s,r]=L.useState(!1);function o(){navigator.clipboard.writeText(n).then(()=>{r(!0),ze.success(i("agentDetail.slackWebhookCopied","Webhook URL copied")),setTimeout(()=>r(!1),2e3)}).catch(()=>{ze.error(i("common.copyFailed","Failed to copy to clipboard"))})}return d.jsxs("div",{className:"rounded-lg border border-indigo-500/20 bg-indigo-500/5",children:[d.jsxs("button",{type:"button",onClick:()=>t(!e),className:"flex w-full items-center gap-2 px-4 py-2.5 text-start",children:[d.jsx(L7e,{className:"h-4 w-4 text-indigo-500 shrink-0"}),d.jsx("span",{className:"flex-1 text-xs font-semibold text-indigo-600 dark:text-indigo-400",children:i("agentDetail.slackSetupGuide","Slack Setup Guide")}),d.jsx(vb,{className:`h-3.5 w-3.5 text-indigo-500/50 transition-transform ${e?"rotate-180":""}`})]}),e&&d.jsxs("div",{className:"space-y-4 border-t border-indigo-500/20 px-4 py-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("agentDetail.slackWebhookUrl","Webhook URL")}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("code",{className:"flex-1 rounded-md border border-input bg-background px-2.5 py-1.5 font-mono text-xs text-foreground break-all",children:n}),d.jsx("button",{type:"button",onClick:o,className:"shrink-0 rounded-md border border-input p-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground transition-colors",title:i("common.copy","Copy"),children:s?d.jsx(Ns,{className:"h-3.5 w-3.5 text-emerald-500"}):d.jsx(mo,{className:"h-3.5 w-3.5"})})]})]}),d.jsxs("ol",{className:"space-y-1.5 text-xs text-muted-foreground",children:[d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-indigo-500/10 text-[10px] font-bold text-indigo-500",children:"1"}),i("agentDetail.slackStep1","Create a Slack App at api.slack.com/apps and install it to your workspace.")]}),d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-indigo-500/10 text-[10px] font-bold text-indigo-500",children:"2"}),i("agentDetail.slackStep2","Copy the Bot Token (xoxb-…) and Signing Secret into the EDDI vault and configure channels below.")]}),d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx("span",{className:"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-indigo-500/10 text-[10px] font-bold text-indigo-500",children:"3"}),d.jsxs("span",{children:[i("agentDetail.slackStep3","Then enable Event Subscriptions in your Slack App, paste the Webhook URL above, and subscribe to:"),d.jsx("code",{className:"ms-1 rounded bg-muted px-1 py-0.5 font-mono text-[10px]",children:"app_mention"}),","," ",d.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[10px]",children:"message.im"})]})]})]}),d.jsx("p",{className:"text-[10px] text-muted-foreground/70 leading-relaxed",children:i("agentDetail.slackSetupNote","Important: Configure the channel below before enabling Event Subscriptions — Slack sends a URL verification challenge that requires the signing secret to be configured in EDDI.")}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:i("agentDetail.slackRequiredScopes","Required Bot Token Scopes")}),d.jsx("div",{className:"flex flex-wrap gap-1",children:["app_mentions:read","chat:write","channels:history","groups:history","im:history","mpim:history"].map(a=>d.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:a},a))})]})]})]})}function Mit({channel:i,index:e,onUpdate:t,onRemove:n,disabled:s}){const{t:r}=xe(),o=L.useMemo(()=>i.config??{},[i.config]),a=L.useRef(o);L.useEffect(()=>{a.current=o},[o]);const[l,c]=L.useState(o.channelId??""),[u,h]=L.useState(o.groupId??""),[g,f]=L.useState(!1),m=L.useRef(null),x=L.useRef(null);L.useEffect(()=>c(o.channelId??""),[o.channelId]),L.useEffect(()=>h(o.groupId??""),[o.groupId]),L.useEffect(()=>()=>{m.current&&clearTimeout(m.current),x.current&&clearTimeout(x.current)},[]);function v(C){m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{t(e,{...a.current,channelId:C})},600)}function _(C){x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{if(C.trim())t(e,{...a.current,groupId:C});else{const{groupId:E,...D}=a.current;t(e,D)}},600)}function w(C,E){t(e,{...a.current,[C]:E})}const k=!l||/^C[A-Z0-9]+$/.test(l);return d.jsxs("div",{className:"rounded-lg border border-border bg-background","data-testid":`slack-channel-${e}`,children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 py-2.5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Zf,{className:"h-4 w-4 text-indigo-500"}),d.jsx("span",{className:"text-xs font-semibold text-foreground",children:r("agentDetail.slackChannel","Slack Channel")}),l&&d.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:l})]}),d.jsx("button",{type:"button",onClick:()=>f(!0),disabled:s,className:"rounded p-1 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors disabled:opacity-50",title:r("agentDetail.removeChannel","Remove channel"),"data-testid":`remove-channel-${e}`,children:d.jsx(_n,{className:"h-3.5 w-3.5"})})]}),d.jsxs("div",{className:"space-y-3 p-4",children:[d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-[10px] font-medium text-muted-foreground",children:[r("agentDetail.channelId","Channel ID")," ",d.jsx("span",{className:"text-destructive",children:"*"})]}),d.jsx("input",{type:"text",value:l,onChange:C=>{const E=C.target.value;c(E),v(E)},disabled:s,placeholder:"C0123ABCDEF",className:`h-8 w-full rounded-md border bg-background px-2.5 font-mono text-xs text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-60 ${k?"border-input":"border-amber-500"}`,"data-testid":`channel-id-${e}`}),!k&&d.jsx("p",{className:"mt-0.5 text-[10px] text-amber-600 dark:text-amber-400",children:r("agentDetail.channelIdHint","Channel IDs start with C followed by uppercase alphanumeric characters")})]}),d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-[10px] font-medium text-muted-foreground",children:[r("agentDetail.botToken","Bot Token")," ",d.jsx("span",{className:"text-destructive",children:"*"})]}),d.jsx(Rd,{value:o.botToken??"",onChange:C=>w("botToken",C),readOnly:s,placeholder:r("agentDetail.botTokenPlaceholder","xoxb-… or ${vault:slack-bot-token}"),testId:`bot-token-${e}`}),d.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground/70",children:r("agentDetail.botTokenHint","Slack Bot User OAuth Token. Use a vault reference for security.")})]}),d.jsxs("div",{children:[d.jsxs("label",{className:"mb-1 block text-[10px] font-medium text-muted-foreground",children:[r("agentDetail.signingSecret","Signing Secret")," ",d.jsx("span",{className:"text-destructive",children:"*"})]}),d.jsx(Rd,{value:o.signingSecret??"",onChange:C=>w("signingSecret",C),readOnly:s,placeholder:r("agentDetail.signingSecretPlaceholder","Hex string or ${vault:slack-signing-secret}"),testId:`signing-secret-${e}`}),d.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground/70",children:r("agentDetail.signingSecretHint","From your Slack App's Basic Information page. Use a vault reference for security.")})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1 block text-[10px] font-medium text-muted-foreground",children:r("agentDetail.groupIdOptional","Group ID (optional)")}),d.jsx("input",{type:"text",value:u,onChange:C=>{const E=C.target.value;h(E),_(E)},disabled:s,placeholder:r("agentDetail.groupIdPlaceholder","Multi-agent group config ID"),className:"h-8 w-full rounded-md border border-input bg-background px-2.5 font-mono text-xs text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-ring disabled:opacity-60","data-testid":`group-id-${e}`}),d.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground/70",children:r("agentDetail.groupIdHint",'Set this to enable "group: question" multi-agent discussions from this Slack channel.')})]})]}),d.jsx(sl,{open:g,onOpenChange:f,title:r("agentDetail.removeChannelConfirm","Remove this Slack channel connector?"),description:r("agentDetail.removeChannelDesc","This action will permanently disconnect this channel."),confirmLabel:r("common.delete","Delete"),cancelLabel:r("common.cancel","Cancel"),onConfirm:()=>{n(e),f(!1)},isPending:s})]})}const Pit=L.memo(function({agent:e,agentId:t,version:n}){const{t:s}=xe(),r=wC(),o=e.channels??[],a=o.filter(g=>g.type==="slack"),l=a.length>0;function c(){const g={type:"slack",config:{channelId:"",botToken:"",signingSecret:""}};r.mutate({id:t,version:n,agent:{...e,channels:[...o,g]}})}function u(g,f){let m=0;const x=o.map(v=>{if(v.type==="slack"){if(m===g)return m++,{...v,config:f};m++}return v});r.mutate({id:t,version:n,agent:{...e,channels:x}})}function h(g){let f=0;const m=o.filter(x=>{if(x.type==="slack"){if(f===g)return f++,!1;f++}return!0});r.mutate({id:t,version:n,agent:{...e,channels:m}})}return d.jsx(ls,{label:s("agentDetail.channels","Channel Connectors"),icon:vb,accent:"text-indigo-500",variant:"card",defaultOpen:l,children:d.jsxs("div",{className:"space-y-4","data-testid":"channels-section",children:[d.jsx(Rit,{}),d.jsx("p",{className:"text-[10px] text-muted-foreground leading-relaxed",children:s("agentDetail.channelsDesc","Connect this agent to Slack channels. Each channel connector is independently configured with its own credentials, supporting multi-workspace setups.")}),!l&&d.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed border-border py-8 text-center",children:[d.jsx(vb,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"mt-2 text-sm font-medium text-muted-foreground",children:s("agentDetail.noChannels","No channels configured")}),d.jsx("p",{className:"mt-0.5 max-w-xs text-xs text-muted-foreground/70",children:s("agentDetail.noChannelsDesc","Add a Slack channel to let users interact with this agent from Slack.")})]}),a.map((g,f)=>d.jsx(Mit,{channel:g,index:f,onUpdate:u,onRemove:h,disabled:r.isPending},`slack-chan-${f}`)),d.jsxs("button",{type:"button",onClick:c,disabled:r.isPending,className:"inline-flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-indigo-500/30 bg-indigo-500/5 px-4 py-2.5 text-xs font-medium text-indigo-600 transition-colors hover:bg-indigo-500/10 hover:border-indigo-500/50 disabled:opacity-50 dark:text-indigo-400","data-testid":"add-slack-channel-btn",children:[d.jsx(Gt,{className:"h-3.5 w-3.5"}),s("agentDetail.addSlackChannel","Add Slack Channel")]})]})})}),_Le={READY:{icon:Ih,color:"text-emerald-500",bg:"bg-emerald-500/10"},IN_PROGRESS:{icon:Zr,color:"text-amber-500",bg:"bg-amber-500/10"},ERROR:{icon:Vi,color:"text-destructive",bg:"bg-destructive/10"},NOT_FOUND:{icon:qSe,color:"text-muted-foreground",bg:"bg-muted"}},Oit={production:"agentDetail.envProduction",test:"agentDetail.envTest"};function jit(){var Ke,ht,Ct,Ft,Ve;const{id:i}=K_(),{t:e}=xe(),t=il(),n=cn(),[s,r]=L.useState(void 0),[o,a]=L.useState(!1),[l,c]=L.useState(null),[u,h]=L.useState(!1),[g,f]=L.useState(!1);L.useEffect(()=>{r(void 0)},[i]);const{data:m}=bEe(i),x=s??((Ke=m==null?void 0:m[0])==null?void 0:Ke.version)??1,{data:v,isLoading:_,isError:w,refetch:k}=GJe(i,x),{data:C}=mEe(i,x),{data:E}=YJe(i,x),D=_Ee(),T=yEe(),I=xEe(),R=vEe(),P=uit(),j=BM(),B=(C==null?void 0:C.status)??"NOT_FOUND",U=_Le[B],$=U.icon,z={READY:e("status.deployed","Deployed"),IN_PROGRESS:e("status.deploying","Deploying..."),ERROR:e("status.error","Error"),NOT_FOUND:e("status.notDeployed","Not deployed")}[B]??B,G=B==="READY",ne=D.isPending||T.isPending||B==="IN_PROGRESS",te=L.useMemo(()=>((v==null?void 0:v.workflows)??[]).filter(tt=>tt.includes("://")),[v==null?void 0:v.workflows]),{data:H}=bLe(te);L.useEffect(()=>{if(l){const tt=setTimeout(()=>c(null),3e3);return()=>clearTimeout(tt)}},[l]);function Q(){D.mutate({agentId:i,version:x},{onSuccess:()=>ze.success(e("agents.deploySuccess","Deployment started")),onError:tt=>ze.error(Vs(tt))})}function Y(){T.mutate({agentId:i,version:x},{onSuccess:()=>ze.success(e("agents.undeploySuccess","Agent undeployed")),onError:tt=>ze.error(Vs(tt))})}function V(){I.mutate({id:i,version:x},{onSuccess:()=>{ze.success(e("common.delete")+" ✓"),h(!1),t("/manage/agents")},onError:tt=>ze.error(Vs(tt))})}async function ue(){try{const tt=await R.mutateAsync({id:i,version:x,deepCopy:!0});ze.success(e("agentDetail.duplicateSuccess"));const{id:qt}=uo(tt.location);t(`/manage/agentview/${qt}`)}catch(tt){ze.error(Vs(tt))}}function he(tt){if(!(v!=null&&v.workflows))return;const qt=v.workflows.filter(It=>It!==tt);P.mutate({agentId:i,version:x,workflows:qt},{onSuccess:()=>ze.success(e("agentDetail.workflowRemoved","Workflow removed")),onError:It=>ze.error(Vs(It))})}function Te(tt){const qt=(v==null?void 0:v.workflows)??[];qt.includes(tt)||(P.mutate({agentId:i,version:x,workflows:[...qt,tt]},{onSuccess:()=>ze.success(e("agentDetail.workflowAdded","Workflow added")),onError:It=>ze.error(Vs(It))}),a(!1))}function nt(tt,qt){if(!(v!=null&&v.workflows))return;const It=v.workflows.map(Zt=>Zt===tt?Zt.replace(/([?&]version=)\d+/,`$1${qt}`):Zt);P.mutate({agentId:i,version:x,workflows:It},{onSuccess:()=>ze.success(e("agentDetail.workflowUpdated","Workflow updated to latest version")),onError:Zt=>ze.error(Vs(Zt))})}const ge=L.useCallback(tt=>{r(tt)},[]);if(_&&!v)return d.jsx("div",{className:"flex items-center justify-center py-20",children:d.jsx(xi,{className:"h-8 w-8 animate-spin text-primary"})});if(w||!v)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(Bpe,{}),d.jsxs("div",{className:"flex flex-col items-center justify-center rounded-xl border border-destructive/30 bg-destructive/5 py-16",children:[d.jsx(Lo,{className:"h-12 w-12 text-destructive"}),d.jsx("p",{className:"mt-4 text-lg font-medium text-destructive",children:e("common.error")}),d.jsx("button",{onClick:()=>k(),className:"mt-4 rounded-lg bg-destructive/10 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/20",children:e("common.retry")})]})]});const _e=((ht=m==null?void 0:m[0])==null?void 0:ht.version)??x,$e=x<_e;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Bpe,{}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(ai,{className:"h-8 w-8 text-primary"}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-3xl font-bold text-foreground",children:((Ct=m==null?void 0:m.find(tt=>tt.version===x))==null?void 0:Ct.name)||e("agentDetail.title","Agent Detail")}),d.jsxs("p",{className:"font-mono text-sm text-muted-foreground",children:[i,d.jsxs("span",{className:"ms-2 inline-flex items-center rounded-md bg-primary/10 px-1.5 py-0.5 text-xs font-semibold text-primary",children:["v",x]})]})]})]}),m&&m.length>0&&d.jsx(Fit,{versions:m,current:x,onChange:ge})]}),d.jsxs("div",{className:"flex flex-col gap-2 items-end",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsxs("div",{className:be("inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium",U.bg,U.color),"data-testid":"deployment-status",children:[d.jsx($,{className:"h-4 w-4"}),z]}),d.jsx("button",{onClick:G?Y:Q,disabled:ne,className:be("rounded-lg px-4 py-2 text-sm font-medium transition-colors",G?"bg-destructive/10 text-destructive hover:bg-destructive/20":"bg-primary text-primary-foreground hover:bg-primary/90",ne&&"cursor-not-allowed opacity-50"),"data-testid":"deploy-btn",children:e(ne?"common.loading":G?"agents.undeploy":"agents.deploy")}),!G&&!ne&&d.jsxs("button",{onClick:async()=>{const tt=_c.getState(),qt=Oi.getState();tt.open(i,i),tt.setStep("deploying");try{await ese("production",i,x);for(let It=0;It<15;It++){await new Promise(En=>setTimeout(En,2e3));const Zt=await FM("production",i,x);if(Zt.status==="READY")break;if(Zt.status==="ERROR")throw new Error("Deploy failed")}n.invalidateQueries({queryKey:["agents"]}),n.invalidateQueries({queryKey:["chat","deployedAgents"]}),tt.setStep("starting"),qt.clearMessages(),qt.setSelectedAgent(i,i),await j.mutateAsync({agentId:i}),tt.setStep("ready")}catch(It){tt.setStep("error",Vs(It))}},disabled:j.isPending,className:"inline-flex items-center gap-1.5 rounded-lg bg-emerald-500/10 px-4 py-2 text-sm font-medium text-emerald-600 hover:bg-emerald-500/20 transition-colors dark:text-emerald-400 disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"deploy-chat-btn",children:[d.jsx(Ih,{className:"h-4 w-4","aria-hidden":"true"}),e("agents.deployAndChat","Deploy & Chat")]}),d.jsxs("div",{className:"inline-flex",children:[d.jsxs("button",{onClick:async()=>{const tt=_c.getState(),qt=Oi.getState();if(tt.open(i,i),G){tt.setStep("starting"),qt.clearMessages(),qt.setSelectedAgent(i,i);try{await j.mutateAsync({agentId:i}),tt.setStep("ready")}catch(It){tt.setStep("error",Vs(It))}}},disabled:j.isPending,className:be("inline-flex items-center gap-1.5 bg-emerald-500/10 px-4 py-2 text-sm font-medium text-emerald-600 hover:bg-emerald-500/20 transition-colors dark:text-emerald-400 disabled:opacity-50 disabled:cursor-not-allowed",G?"rounded-s-lg":"rounded-lg"),"data-testid":"chat-btn","aria-label":e("agents.chat","Chat"),children:[d.jsx(Zl,{className:"h-4 w-4","aria-hidden":"true"}),e("agents.chat","Chat")]}),G&&d.jsx("a",{href:`/chat/production/${i}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center rounded-e-lg border-s border-emerald-500/20 bg-emerald-500/10 px-2.5 py-2 text-emerald-600 hover:bg-emerald-500/20 transition-colors dark:text-emerald-400",title:e("agents.openExternalChat","Open in new tab"),"aria-label":e("agents.openExternalChat","Open in new tab"),"data-testid":"external-chat-btn",children:d.jsx(To,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[d.jsxs(Kn,{to:`/manage/studio/${i}`,className:"inline-flex items-center gap-1.5 rounded-lg bg-primary/10 px-3 py-1.5 text-xs font-medium text-primary hover:bg-primary/20 transition-colors","data-testid":"open-studio-btn",children:[d.jsx(Ll,{className:"h-3.5 w-3.5"}),e("agentDetail.openStudio","Open in Studio")]}),d.jsxs("button",{onClick:ue,disabled:R.isPending,className:"inline-flex items-center gap-1.5 rounded-lg border border-input px-3 py-1.5 text-xs font-medium text-foreground hover:bg-secondary transition-colors disabled:opacity-50","data-testid":"duplicate-agent-btn",children:[d.jsx(mo,{className:"h-3.5 w-3.5"}),R.isPending?e("agentDetail.duplicating"):e("agentDetail.duplicate")]}),d.jsxs("button",{onClick:()=>f(!0),className:"inline-flex items-center gap-1.5 rounded-lg border border-input px-3 py-1.5 text-xs font-medium text-foreground hover:bg-secondary transition-colors","data-testid":"export-agent-btn",children:[d.jsx(Q_,{className:"h-3.5 w-3.5"}),e("agents.export","Export")]}),d.jsx("button",{onClick:()=>h(!0),className:"inline-flex items-center gap-1.5 rounded-lg bg-destructive/10 px-3 py-1.5 text-xs font-medium text-destructive hover:bg-destructive/20 transition-colors","data-testid":"delete-agent-btn","aria-label":e("agents.deleteAgent","Delete agent"),children:d.jsx(_n,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]}),$e&&d.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-amber-400/30 bg-amber-50 px-4 py-3 dark:bg-amber-900/15 dark:border-amber-700/30","data-testid":"non-latest-warning",children:[d.jsx(_d,{className:"h-5 w-5 text-amber-600 dark:text-amber-400 shrink-0"}),d.jsx("p",{className:"flex-1 text-sm text-amber-800 dark:text-amber-300",children:e("agentDetail.viewingOldVersion","You are viewing version {{current}}. Latest is version {{latest}}.",{current:x,latest:_e})}),d.jsx("button",{onClick:()=>ge(_e),className:"rounded-md bg-amber-600 px-3 py-1.5 text-xs font-semibold text-white hover:bg-amber-700 transition-colors shrink-0",children:e("agentDetail.switchToLatest","Switch to latest")})]}),l&&d.jsx("div",{className:be("rounded-lg px-4 py-2 text-sm font-medium transition-all",l.type==="success"?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-destructive/10 text-destructive"),"data-testid":"save-feedback",role:"status","aria-live":"polite",children:l.text}),E&&E.length>0&&d.jsx(Bit,{statuses:E,onDeploy:tt=>D.mutate({environment:tt,agentId:i,version:x},{onError:qt=>ze.error(Vs(qt))}),onUndeploy:tt=>T.mutate({environment:tt,agentId:i,version:x},{onError:qt=>ze.error(Vs(qt))}),isBusy:ne}),d.jsxs("section",{className:"rounded-xl border bg-card shadow-sm",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-border p-5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ed,{className:"h-5 w-5 text-primary"}),d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e("agentDetail.packages","Workflows")}),d.jsx("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:((Ft=v.workflows)==null?void 0:Ft.length)??0})]}),d.jsxs("button",{onClick:()=>a(!o),className:"inline-flex items-center gap-1.5 rounded-lg bg-primary/10 px-3 py-1.5 text-sm font-medium text-primary hover:bg-primary/20 transition-colors","data-testid":"add-workflow-btn",children:[d.jsx(Gt,{className:"h-4 w-4"}),e("agentDetail.addWorkflow","Add Workflow")]})]}),d.jsxs("div",{className:"divide-y divide-border",children:[(!v.workflows||v.workflows.length===0)&&d.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[d.jsx(Ed,{className:"h-10 w-10 opacity-50"}),d.jsx("p",{className:"mt-3 text-sm",children:e("agentDetail.noWorkflows","No workflows added yet")})]}),(Ve=v.workflows)==null?void 0:Ve.map(tt=>{const{id:qt,version:It}=uo(tt),Zt=H==null?void 0:H[qt],En=Zt!==void 0&&Zt>It,Xi=`/manage/workflowview/${qt}?agentId=${i}&agentVer=${x}`;return d.jsxs("div",{className:be("group flex items-center gap-3 px-5 py-4 transition-colors",En?"bg-amber-50/50 dark:bg-amber-900/10 hover:bg-amber-50 dark:hover:bg-amber-900/20":"hover:bg-secondary/50"),children:[d.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10 shrink-0",children:d.jsx(Ed,{className:"h-4 w-4 text-primary"})}),d.jsxs(Kn,{to:Xi,className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-semibold text-foreground group-hover:text-primary transition-colors truncate",children:qt}),d.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[d.jsxs("span",{className:"inline-flex items-center rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:["v",It]}),En&&d.jsx("span",{className:"text-[10px] text-amber-600 dark:text-amber-400 font-medium",children:e("agentDetail.outdated","outdated")})]})]}),d.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[En&&d.jsxs("button",{onClick:zi=>{zi.preventDefault(),nt(tt,Zt)},disabled:P.isPending,className:"inline-flex items-center gap-1 rounded-md bg-amber-100 px-2 py-1 text-[10px] font-semibold text-amber-800 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:hover:bg-amber-900/50 transition-colors disabled:opacity-50",title:e("agentDetail.updateToLatest","Update to latest version"),"data-testid":`update-workflow-${qt}`,children:[d.jsx(NSe,{className:"h-3 w-3"}),"v",Zt]}),d.jsxs(Kn,{to:Xi,className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2.5 py-1 text-xs font-medium text-primary hover:bg-primary/20 transition-colors",children:[e("agentDetail.openWorkflow","Open"),d.jsx(To,{className:"h-3 w-3"})]}),d.jsx("button",{onClick:()=>he(tt),disabled:P.isPending,className:"rounded-md p-1.5 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors disabled:opacity-50",title:e("common.delete"),children:d.jsx(_n,{className:"h-4 w-4"})})]})]},tt)})]})]}),o&&d.jsx(Hit,{currentWorkflows:v.workflows??[],onAdd:Te,onClose:()=>a(!1)}),d.jsx(zit,{agent:v,agentId:i,version:x}),d.jsx(wit,{agent:v,agentId:i,version:x}),d.jsx(Eit,{agent:v,agentId:i,version:x}),d.jsx(Lit,{agent:v,agentId:i,version:x}),d.jsx(Dit,{agent:v,agentId:i,version:x}),d.jsx(Iit,{agent:v,agentId:i,version:x}),d.jsx(Pit,{agent:v,agentId:i,version:x}),d.jsx(Vit,{agent:v}),d.jsx(sl,{open:u,onOpenChange:h,title:e("agents.confirmDelete"),description:e("agents.confirmDeleteDescription","This action cannot be undone. The agent and all its data will be permanently removed."),confirmLabel:e("common.delete"),cancelLabel:e("common.cancel"),onConfirm:V,isPending:I.isPending}),d.jsx(REe,{open:g,onClose:()=>f(!1),agentId:i,agentVersion:x})]})}function Bpe(){const{t:i}=xe();return d.jsxs(Kn,{to:"/manage/agents",className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[d.jsx(El,{className:"h-4 w-4"}),i("agentDetail.backToAgents","Back to Agents")]})}function Fit({versions:i,current:e,onChange:t}){return i.length<=1?d.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md bg-muted px-2.5 py-1 text-xs font-medium text-muted-foreground","data-testid":"version-badge",children:["v",e]}):d.jsx("select",{value:e,onChange:n=>t(Number(n.target.value)),className:"rounded-md border border-input bg-background px-2.5 py-1 text-xs font-medium text-foreground shadow-sm transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1","data-testid":"version-picker",children:i.map(n=>d.jsxs("option",{value:n.version,children:["v",n.version,n.lastModifiedOn?` — ${Tw(n.lastModifiedOn)}`:""]},n.version))})}function Bit({statuses:i,onDeploy:e,onUndeploy:t,isBusy:n}){const{t:s}=xe(),r={READY:s("status.deployed","Deployed"),IN_PROGRESS:s("status.deploying","Deploying..."),ERROR:s("status.error","Error"),NOT_FOUND:s("status.notDeployed","Not deployed")};return d.jsxs("section",{className:"overflow-hidden rounded-xl border bg-card shadow-sm","data-testid":"env-badges",children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-5 py-3",children:[d.jsx(rb,{className:"h-5 w-5 text-primary"}),d.jsx("h2",{className:"text-sm font-semibold text-foreground",children:s("agentDetail.environments","Environments")})]}),d.jsx("div",{className:"grid grid-cols-1 gap-0 divide-y divide-border sm:grid-cols-2 sm:divide-x sm:divide-y-0",children:i.map(({environment:o,status:a})=>{const l=_Le[a],c=l.icon,u=a==="READY";return d.jsxs("div",{className:"flex items-center justify-between gap-3 px-5 py-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:be("rounded-full p-1.5",l.bg),children:d.jsx(c,{className:be("h-3.5 w-3.5",l.color)})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:s(Oit[o]??o)}),d.jsx("p",{className:be("text-xs",l.color),children:r[a]??a})]})]}),d.jsx("button",{onClick:()=>u?t(o):e(o),disabled:n,className:be("rounded-md px-2.5 py-1 text-xs font-medium transition-colors",u?"bg-destructive/10 text-destructive hover:bg-destructive/20":"bg-primary/10 text-primary hover:bg-primary/20",n&&"cursor-not-allowed opacity-50"),children:s(u?"agents.undeploy":"agents.deploy")})]},o)})})]})}function Hit({currentWorkflows:i,onAdd:e,onClose:t}){const{t:n}=xe(),[s,r]=L.useState(""),{data:o,isLoading:a}=iit(100,0,s),l=(o??[]).filter(c=>!i.includes(c.resource));return d.jsxs("section",{className:"rounded-xl border bg-card shadow-sm",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-border p-5",children:[d.jsx("h3",{className:"text-lg font-semibold text-foreground",children:n("agentDetail.selectWorkflow","Select Workflow to Add")}),d.jsx("button",{onClick:t,className:"text-sm text-muted-foreground hover:text-foreground",children:n("common.cancel")})]}),d.jsx("div",{className:"p-5",children:d.jsx("input",{type:"text",value:s,onChange:c=>r(c.target.value),placeholder:n("common.search"),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"})}),d.jsxs("div",{className:"max-h-64 divide-y divide-border overflow-y-auto",children:[a&&d.jsx("div",{className:"flex items-center justify-center py-8",children:d.jsx(xi,{className:"h-5 w-5 animate-spin text-primary"})}),!a&&l.length===0&&d.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:n("common.noResults")}),l.map(c=>d.jsxs("button",{onClick:()=>e(c.resource),className:"flex w-full items-center justify-between px-5 py-3 text-start hover:bg-secondary/50 transition-colors",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:c.name||uo(c.resource).id}),d.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1",children:c.description||n("agents.noDescription","No description")})]}),d.jsx(Gt,{className:"h-4 w-4 text-primary"})]},c.resource))]})]})}function Wit(i){const e=/("(?:[^"\\]|\\.)*")\s*:|"(?:[^"\\]|\\.)*"|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|\btrue\b|\bfalse\b|\bnull\b/g,t=[];let n=0,s,r=0;for(;(s=e.exec(i))!==null;){s.index>n&&t.push(i.slice(n,s.index));const o=s[0];if(r++,o.endsWith(":")){const a=o.slice(0,-1);t.push(d.jsx("span",{className:"text-primary",children:a},`k${r}`),":")}else o.startsWith('"')?t.push(d.jsx("span",{className:"text-emerald-600 dark:text-emerald-400",children:o},`s${r}`)):o==="true"||o==="false"?t.push(d.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:o},`b${r}`)):o==="null"?t.push(d.jsx("span",{className:"text-muted-foreground italic",children:o},`n${r}`)):t.push(d.jsx("span",{className:"text-sky-600 dark:text-sky-400",children:o},`d${r}`));n=s.index+o.length}return nn(!t),className:"flex w-full items-center justify-between p-5 text-start","aria-expanded":t,"aria-controls":"raw-config-content",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(xp,{className:"h-5 w-5 text-muted-foreground","aria-hidden":"true"}),d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e("agentDetail.rawConfig","Raw Configuration")})]}),t?d.jsx(Rn,{className:"h-4 w-4 text-muted-foreground"}):d.jsx(hs,{className:"h-4 w-4 text-muted-foreground"})]}),t&&d.jsx("div",{className:"border-t border-border p-5",id:"raw-config-content",children:d.jsx("pre",{className:"overflow-x-auto rounded-lg bg-secondary p-4 text-sm font-mono leading-relaxed",children:Wit(JSON.stringify(i,null,2))})})]})}function zit({agent:i,agentId:e,version:t}){const{t:n}=xe(),s=wC(),[r,o]=L.useState(""),[a,l]=L.useState(i.description??""),[c,u]=L.useState(!1),[h,g]=L.useState(null);L.useEffect(()=>l(i.description??""),[i.description]);const f=i.a2aEnabled??!1;function m(){s.mutate({id:e,version:t,agent:{...i,a2aEnabled:!f}})}function x(){a!==(i.description??"")&&s.mutate({id:e,version:t,agent:{...i,description:a}})}function v(){const R=r.trim();if(!R)return;const P=i.a2aSkills??[];P.includes(R)||(s.mutate({id:e,version:t,agent:{...i,a2aSkills:[...P,R]}}),o(""))}function _(R){const P=(i.a2aSkills??[]).filter((j,B)=>B!==R);s.mutate({id:e,version:t,agent:{...i,a2aSkills:P}})}function w(R,P){navigator.clipboard.writeText(R).then(()=>{g(P),setTimeout(()=>g(null),2e3)})}const k=window.location.origin,C=`${k}/a2a/agents/${e}/agent.json`,E=`${k}/a2a/agents/${e}`,D={name:`EDDI Agent ${e}`,description:i.description||"EDDI conversational AI agent",url:E,provider:"EDDI",version:"6.0.0",capabilities:{streaming:!1,pushNotifications:!1,stateTransitionHistory:!0},skills:i.a2aSkills&&i.a2aSkills.length>0?i.a2aSkills.map(R=>({id:R.toLowerCase().replace(/ /g,"-"),name:R,description:`Skill: ${R}`})):[{id:"chat",name:"Conversational AI",description:"General conversational AI agent powered by EDDI"}]},[T,I]=L.useState(!1);return d.jsxs("section",{className:"rounded-xl border bg-card shadow-sm","data-testid":"a2a-section",children:[d.jsxs("button",{type:"button",onClick:()=>I(!T),className:be("flex w-full items-center gap-2 p-5 text-start",T&&"border-b border-border"),children:[T?d.jsx(Rn,{className:"h-4 w-4 text-muted-foreground"}):d.jsx(hs,{className:"h-4 w-4 text-muted-foreground"}),d.jsx(pG,{className:"h-5 w-5 text-primary"}),d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n("agentDetail.a2aSection","Agent-to-Agent (A2A)")}),f&&d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-xs font-medium text-emerald-600 dark:text-emerald-400",children:[d.jsx(Dw,{className:"h-3 w-3"}),n("agentDetail.a2aEnabled","Enabled")]})]}),T&&d.jsx("div",{className:"p-5",children:f?d.jsxs("div",{className:"space-y-5",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-foreground",children:n("agentDetail.a2aDescription","Agent Description")}),d.jsx("input",{type:"text",value:a,onChange:R=>l(R.target.value),onBlur:x,onKeyDown:R=>{R.key==="Enter"&&(R.preventDefault(),x())},placeholder:n("agentDetail.a2aDescPlaceholder","What does this agent do?"),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring transition-shadow","data-testid":"a2a-description"}),d.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n("agentDetail.a2aDescHint","Shown in the Agent Card — helps other agents understand what this agent does")})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-foreground",children:n("agentDetail.a2aSkills","A2A Skills")}),d.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-2",children:[(i.a2aSkills??[]).map((R,P)=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:[R,d.jsx("button",{type:"button",onClick:()=>_(P),className:"rounded p-0.5 hover:bg-primary/20 transition-colors","aria-label":`Remove ${R}`,children:d.jsx(An,{className:"h-3 w-3"})})]},P)),(i.a2aSkills??[]).length===0&&d.jsx("span",{className:"text-xs text-muted-foreground italic",children:n("agentDetail.a2aNoSkills","No skills — a default 'chat' skill will be used")})]}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx("input",{type:"text",value:r,onChange:R=>o(R.target.value),onKeyDown:R=>{R.key==="Enter"&&(R.preventDefault(),v())},placeholder:n("agentDetail.a2aSkillPlaceholder","e.g. translation, code-review"),className:"h-8 flex-1 rounded-md border border-input bg-background px-2 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"a2a-skill-input"}),d.jsx("button",{type:"button",onClick:v,className:"inline-flex h-8 items-center gap-1 rounded-md border border-input px-2 text-xs font-medium text-foreground transition-colors hover:bg-secondary",children:d.jsx(Gt,{className:"h-3 w-3"})})]})]}),d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-sm font-medium text-foreground",children:n("agentDetail.a2aEndpoints","Endpoints")}),d.jsx("div",{className:"space-y-1.5",children:[{method:"GET",url:C,label:"card"},{method:"POST",url:E,label:"rpc"}].map(({method:R,url:P,label:j})=>d.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-secondary/50 px-3 py-2",children:[d.jsx("span",{className:be("rounded px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider",R==="GET"?"bg-sky-500/10 text-sky-600 dark:text-sky-400":"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400"),children:R}),d.jsx("code",{className:"flex-1 truncate font-mono text-xs text-foreground",dir:"ltr",children:P}),d.jsx("button",{type:"button",onClick:()=>w(P,j),className:"rounded p-1 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Copy URL",children:h===j?d.jsx("span",{className:"text-[10px] font-medium text-emerald-500",children:"✓"}):d.jsx(mo,{className:"h-3.5 w-3.5"})})]},j))})]}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>u(!c),className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors","data-testid":"a2a-card-toggle",children:[c?d.jsx(Rn,{className:"h-3 w-3"}):d.jsx(hs,{className:"h-3 w-3"}),n("agentDetail.agentCardPreview","Agent Card Preview")]}),c&&d.jsx("pre",{className:"mt-2 max-h-48 overflow-auto rounded-lg bg-secondary p-3 text-xs text-foreground font-mono",children:JSON.stringify(D,null,2)})]})]}):d.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[d.jsx(pG,{className:"h-10 w-10 text-muted-foreground/50"}),d.jsx("p",{className:"mt-3 text-sm text-muted-foreground max-w-md",children:n("agentDetail.a2aEnabledDesc","Make this agent discoverable by other agents via the A2A protocol. Other EDDI instances can find and call this agent as a tool.")}),d.jsxs("button",{onClick:m,disabled:s.isPending,className:"mt-4 inline-flex items-center gap-2 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm transition-all hover:bg-primary/90 hover:shadow-md disabled:opacity-50","data-testid":"enable-a2a-btn",children:[d.jsx(Dw,{className:"h-4 w-4"}),n("agentDetail.a2aEnable","Enable A2A")]})]})})]})}function Uit({workflow:i,onDuplicate:e,onDelete:t}){const{t:n}=xe(),[s,r]=L.useState(!1),o=$it(i.lastModifiedOn);return d.jsxs("div",{className:be("group relative flex flex-col rounded-xl border bg-card p-5 shadow-sm transition-all duration-200","hover:shadow-md hover:border-primary/30"),"data-testid":`workflow-card-${i.id}`,children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsx("div",{className:"rounded-lg bg-primary/10 p-2",children:d.jsx(Ed,{className:"h-5 w-5 text-primary"})}),d.jsxs("div",{className:"relative",children:[d.jsx("button",{onClick:()=>r(!s),className:"rounded-md p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-secondary hover:text-foreground group-hover:opacity-100","data-testid":`workflow-menu-${i.id}`,children:d.jsx(c7,{className:"h-4 w-4"})}),s&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>r(!1)}),d.jsxs("div",{className:"absolute inset-e-0 z-50 mt-1 w-44 rounded-lg border bg-popover py-1 shadow-lg",children:[d.jsxs("button",{onClick:()=>{e(i.id,i.version),r(!1)},className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-popover-foreground hover:bg-secondary",children:[d.jsx(mo,{className:"h-4 w-4"}),n("common.duplicate","Duplicate")]}),d.jsxs("button",{onClick:()=>{t(i.id,i.version),r(!1)},className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-destructive hover:bg-destructive/10",children:[d.jsx(_n,{className:"h-4 w-4"}),n("common.delete")]})]})]})]})]}),d.jsxs("div",{className:"mt-4 flex-1",children:[d.jsxs(Kn,{to:`/manage/workflowview/${i.id}`,className:"text-lg font-semibold text-foreground hover:text-primary transition-colors",children:[i.name||n("packages.unnamed","Unnamed Workflow"),d.jsx(To,{className:"ms-1 inline h-3.5 w-3.5 opacity-0 group-hover:opacity-50"})]}),d.jsx("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground/70 truncate",title:i.id,children:i.id}),d.jsx("p",{className:"mt-1 line-clamp-2 text-sm text-muted-foreground",children:i.description||n("packages.noDescription","No description")})]}),d.jsxs("div",{className:"mt-4 flex items-center justify-between border-t border-border pt-3",children:[d.jsx("span",{className:"text-xs text-muted-foreground",title:new Date(i.lastModifiedOn).toLocaleString(),children:o}),d.jsxs("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:["v",i.version]})]})]})}function $it(i){const t=Date.now()-i,n=Math.floor(t/6e4),s=Math.floor(t/36e5),r=Math.floor(t/864e5);return n<1?"Just now":n<60?`${n}m ago`:s<24?`${s}h ago`:r<30?`${r}d ago`:new Date(i).toLocaleDateString()}function qit({open:i,onClose:e}){const{t}=xe(),n=il(),s=lit(),[r,o]=L.useState(""),[a,l]=L.useState("");async function c(u){u.preventDefault();try{const h=await s.mutateAsync({config:{workflowSteps:[]},name:r,description:a});if(ze.success(t("packages.createSuccess","Workflow created successfully")),o(""),l(""),e(),h.location){const f=new URL(h.location,"http://dummy").pathname.split("/").filter(Boolean),m=f[f.length-1];m&&n(`/manage/workflowview/${m}`)}}catch(h){ze.error(Vs(h))}}return d.jsx(YM,{open:i,onClose:e,title:t("packages.createTitle","Create New Workflow"),testId:"create-workflow-dialog",children:d.jsxs("form",{onSubmit:c,className:"space-y-4 p-5",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"workflow-name",className:"mb-1.5 block text-sm font-medium text-foreground",children:t("packages.name","Name")}),d.jsx("input",{id:"workflow-name",type:"text",value:r,onChange:u=>o(u.target.value),placeholder:t("packages.namePlaceholder","My Workflow"),className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring",autoFocus:!0})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"workflow-description",className:"mb-1.5 block text-sm font-medium text-foreground",children:t("packages.description","Description")}),d.jsx("textarea",{id:"workflow-description",value:a,onChange:u=>l(u.target.value),placeholder:t("packages.descriptionPlaceholder","Describe what this workflow does..."),rows:3,className:"w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring resize-none"})]}),d.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[d.jsx("button",{type:"button",onClick:e,className:"rounded-lg px-4 py-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:t("common.cancel")}),d.jsx("button",{type:"submit",disabled:s.isPending,className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",children:s.isPending?t("common.loading"):t("common.create")})]})]})})}function Kit(){const{t:i}=xe(),[e,t]=L.useState(""),[n,s]=L.useState(!1),[r,o]=L.useState(null),[a,l]=L.useState(()=>WE("workflows")),[c,u]=L.useState("modified"),[h,g]=L.useState("desc"),f=$s(U=>U.maybeAutoStart);L.useEffect(()=>{const U=setTimeout(()=>f("workflows"),500);return()=>clearTimeout(U)},[f]);const{data:m,isLoading:x,isError:v,refetch:_,fetchNextPage:w,hasNextPage:k,isFetchingNextPage:C}=sit(e),E=mLe(),D=dit(),T=L.useMemo(()=>{const U=(m==null?void 0:m.pages.flat())??[];return[...hit(U)].sort((K,z)=>{let G=0;return c==="name"?G=(K.name??"").localeCompare(z.name??""):c==="version"?G=K.version-z.version:G=new Date(K.lastModifiedOn).getTime()-new Date(z.lastModifiedOn).getTime(),h==="asc"?G:-G})},[m,c,h]),I=L.useCallback(U=>{c===U?g($=>$==="asc"?"desc":"asc"):(u(U),g(U==="modified"?"desc":"asc"))},[c]);function R(U,$){o({id:U,version:$})}function P(){r&&E.mutate(r,{onSuccess:()=>{ze.success(i("common.delete")+" ✓"),o(null)},onError:U=>ze.error(Vs(U))})}function j(U,$){D.mutate({id:U,version:$,deepCopy:!1},{onSuccess:()=>{ze.success(i("common.duplicate","Duplicate")+" ✓")},onError:K=>ze.error(Vs(K))})}function B(U){l(U),JM("workflows",U)}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{children:[d.jsxs("h1",{className:"flex items-center gap-2 text-3xl font-bold text-foreground",children:[d.jsx(Ed,{className:"h-8 w-8 text-primary"}),i("pages.packages.title")]}),d.jsx("p",{className:"mt-1 text-muted-foreground",children:i("pages.packages.subtitle")})]}),d.jsxs(Yt,{onClick:()=>s(!0),"data-testid":"create-workflow-btn",children:[d.jsx(Gt,{className:"h-4 w-4"}),i("packages.createWorkflow")]})]}),d.jsxs("div",{className:"flex items-center gap-3","data-tour":"workflows-search",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx(br,{className:"absolute inset-s-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),d.jsx("input",{type:"text",value:e,onChange:U=>t(U.target.value),placeholder:i("common.search"),className:"w-full rounded-lg border border-input bg-background py-2.5 ps-10 pe-4 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring transition-shadow","data-testid":"workflow-search"})]}),d.jsx(zL,{view:a,onChange:B})]}),d.jsxs("div",{"data-tour":"workflows-content",children:[x&&d.jsx("div",{className:"cq-card-grid",children:Array.from({length:4}).map((U,$)=>d.jsxs("div",{className:"rounded-xl border border-border bg-card p-5 space-y-3",children:[d.jsx(bi,{className:"h-5 w-3/4"}),d.jsx(bi,{className:"h-4 w-1/2"}),d.jsx(bi,{className:"h-4 w-full"})]},$))}),v&&d.jsx(ep,{message:i("common.error"),onRetry:()=>_(),retryLabel:i("common.retry")}),!x&&!v&&T.length===0&&d.jsx(ZM,{icon:Ed,title:i(e?"common.noResults":"packages.empty"),description:e?void 0:i("packages.emptyDescription","Workflows define the processing pipeline for your agents."),actionLabel:e?void 0:i("packages.createWorkflow"),onAction:e?void 0:()=>s(!0)}),!x&&!v&&T.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[i("packages.count",{count:T.length}),k&&"+"]}),a==="card"?d.jsx("div",{className:"cq-card-grid","data-testid":"workflow-grid",children:T.map(U=>d.jsx(Uit,{workflow:U,onDuplicate:j,onDelete:R},U.resource))}):d.jsx("div",{className:"overflow-hidden rounded-xl border bg-card shadow-sm","data-testid":"workflow-list",children:d.jsxs("table",{className:"w-full",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border bg-secondary/50",children:[d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>I("name"),children:d.jsxs("span",{className:"inline-flex items-center gap-1",children:[i("common.name","Name"),c==="name"?h==="asc"?d.jsx(zv,{className:"h-3 w-3"}):d.jsx(zf,{className:"h-3 w-3"}):d.jsx(pN,{className:"h-3 w-3 opacity-30"})]})}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground",children:i("common.id","ID")}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>I("version"),children:d.jsxs("span",{className:"inline-flex items-center gap-1",children:[i("common.version","Version"),c==="version"?h==="asc"?d.jsx(zv,{className:"h-3 w-3"}):d.jsx(zf,{className:"h-3 w-3"}):d.jsx(pN,{className:"h-3 w-3 opacity-30"})]})}),d.jsx("th",{className:"px-5 py-3 text-start text-xs font-medium uppercase tracking-wider text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>I("modified"),children:d.jsxs("span",{className:"inline-flex items-center gap-1",children:[i("common.modified","Modified"),c==="modified"?h==="asc"?d.jsx(zv,{className:"h-3 w-3"}):d.jsx(zf,{className:"h-3 w-3"}):d.jsx(pN,{className:"h-3 w-3 opacity-30"})]})}),d.jsx("th",{className:"px-5 py-3 text-end text-xs font-medium uppercase tracking-wider text-muted-foreground",children:i("conversations.actions","Actions")})]})}),d.jsx("tbody",{className:"divide-y divide-border",children:T.map(U=>d.jsxs("tr",{className:"hover:bg-secondary/30 transition-colors",children:[d.jsx("td",{className:"px-5 py-3",children:d.jsxs(Kn,{to:`/manage/workflowview/${U.id}`,className:"text-sm font-medium text-foreground hover:text-primary transition-colors",children:[U.name||i("packages.unnamed","Unnamed Workflow"),d.jsx(To,{className:"ms-1 inline h-3 w-3 opacity-40"})]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[U.id.slice(0,12),"…"]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsxs("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:["v",U.version]})}),d.jsx("td",{className:"px-5 py-3",children:d.jsx("span",{className:"text-sm text-muted-foreground",children:new Date(U.lastModifiedOn).toLocaleString()})}),d.jsx("td",{className:"px-5 py-3 text-end",children:d.jsxs("div",{className:"inline-flex items-center gap-1",children:[d.jsx("button",{onClick:()=>j(U.id,U.version),className:"rounded-md p-1.5 text-muted-foreground hover:bg-secondary hover:text-foreground transition-colors",title:i("common.duplicate","Duplicate"),children:d.jsx(mo,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>R(U.id,U.version),className:"rounded-md p-1.5 text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",title:i("common.delete"),children:d.jsx(_n,{className:"h-4 w-4"})})]})})]},U.resource))})]})}),d.jsx(fLe,{onLoadMore:()=>w(),isFetchingMore:C,hasMore:!!k})]})]}),d.jsx(qit,{open:n,onClose:()=>s(!1)}),d.jsx(sl,{open:r!==null,onOpenChange:U=>!U&&o(null),title:i("packages.confirmDelete"),description:i("packages.confirmDeleteDescription","This action cannot be undone. The workflow and all its data will be permanently removed."),confirmLabel:i("common.delete"),cancelLabel:i("common.cancel"),onConfirm:P,isPending:E.isPending})]})}function Git(){for(var i=arguments.length,e=new Array(i),t=0;tn=>{e.forEach(s=>s(n))},e)}const P7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function UL(i){const e=Object.prototype.toString.call(i);return e==="[object Window]"||e==="[object global]"}function Wse(i){return"nodeType"in i}function Fd(i){var e,t;return i?UL(i)?i:Wse(i)&&(e=(t=i.ownerDocument)==null?void 0:t.defaultView)!=null?e:window:window}function Vse(i){const{Document:e}=Fd(i);return i instanceof e}function eP(i){return UL(i)?!1:i instanceof Fd(i).HTMLElement}function yLe(i){return i instanceof Fd(i).SVGElement}function $L(i){return i?UL(i)?i.document:Wse(i)?Vse(i)?i:eP(i)||yLe(i)?i.ownerDocument:document:document:document}const tp=P7?L.useLayoutEffect:L.useEffect;function zse(i){const e=L.useRef(i);return tp(()=>{e.current=i}),L.useCallback(function(){for(var t=arguments.length,n=new Array(t),s=0;s{i.current=setInterval(n,s)},[]),t=L.useCallback(()=>{i.current!==null&&(clearInterval(i.current),i.current=null)},[]);return[e,t]}function CA(i,e){e===void 0&&(e=[i]);const t=L.useRef(i);return tp(()=>{t.current!==i&&(t.current=i)},e),t}function tP(i,e){const t=L.useRef();return L.useMemo(()=>{const n=i(t.current);return t.current=n,n},[...e])}function Rj(i){const e=zse(i),t=L.useRef(null),n=L.useCallback(s=>{s!==t.current&&(e==null||e(s,t.current)),t.current=s},[]);return[t,n]}function WG(i){const e=L.useRef();return L.useEffect(()=>{e.current=i},[i]),e.current}let AU={};function nP(i,e){return L.useMemo(()=>{if(e)return e;const t=AU[i]==null?0:AU[i]+1;return AU[i]=t,i+"-"+t},[i,e])}function wLe(i){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s{const a=Object.entries(o);for(const[l,c]of a){const u=r[l];u!=null&&(r[l]=u+i*c)}return r},{...e})}}const xN=wLe(1),SA=wLe(-1);function Qit(i){return"clientX"in i&&"clientY"in i}function Use(i){if(!i)return!1;const{KeyboardEvent:e}=Fd(i.target);return e&&i instanceof e}function Xit(i){if(!i)return!1;const{TouchEvent:e}=Fd(i.target);return e&&i instanceof e}function VG(i){if(Xit(i)){if(i.touches&&i.touches.length){const{clientX:e,clientY:t}=i.touches[0];return{x:e,y:t}}else if(i.changedTouches&&i.changedTouches.length){const{clientX:e,clientY:t}=i.changedTouches[0];return{x:e,y:t}}}return Qit(i)?{x:i.clientX,y:i.clientY}:null}const kA=Object.freeze({Translate:{toString(i){if(!i)return;const{x:e,y:t}=i;return"translate3d("+(e?Math.round(e):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(i){if(!i)return;const{scaleX:e,scaleY:t}=i;return"scaleX("+e+") scaleY("+t+")"}},Transform:{toString(i){if(i)return[kA.Translate.toString(i),kA.Scale.toString(i)].join(" ")}},Transition:{toString(i){let{property:e,duration:t,easing:n}=i;return e+" "+t+"ms "+n}}}),Hpe="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Zit(i){return i.matches(Hpe)?i:i.querySelector(Hpe)}const Jit={display:"none"};function est(i){let{id:e,value:t}=i;return ft.createElement("div",{id:e,style:Jit},t)}function tst(i){let{id:e,announcement:t,ariaLiveType:n="assertive"}=i;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ft.createElement("div",{id:e,style:s,role:"status","aria-live":n,"aria-atomic":!0},t)}function nst(){const[i,e]=L.useState("");return{announce:L.useCallback(n=>{n!=null&&e(n)},[]),announcement:i}}const CLe=L.createContext(null);function ist(i){const e=L.useContext(CLe);L.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of ");return e(i)},[i,e])}function sst(){const[i]=L.useState(()=>new Set),e=L.useCallback(n=>(i.add(n),()=>i.delete(n)),[i]);return[L.useCallback(n=>{let{type:s,event:r}=n;i.forEach(o=>{var a;return(a=o[s])==null?void 0:a.call(o,r)})},[i]),e]}const rst={draggable:` - To pick up a draggable item, press the space bar. - While dragging, use the arrow keys to move the item. - Press space again to drop the item in its new position, or press escape to cancel. - `},ost={onDragStart(i){let{active:e}=i;return"Picked up draggable item "+e.id+"."},onDragOver(i){let{active:e,over:t}=i;return t?"Draggable item "+e.id+" was moved over droppable area "+t.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(i){let{active:e,over:t}=i;return t?"Draggable item "+e.id+" was dropped over droppable area "+t.id:"Draggable item "+e.id+" was dropped."},onDragCancel(i){let{active:e}=i;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function ast(i){let{announcements:e=ost,container:t,hiddenTextDescribedById:n,screenReaderInstructions:s=rst}=i;const{announce:r,announcement:o}=nst(),a=nP("DndLiveRegion"),[l,c]=L.useState(!1);if(L.useEffect(()=>{c(!0)},[]),ist(L.useMemo(()=>({onDragStart(h){let{active:g}=h;r(e.onDragStart({active:g}))},onDragMove(h){let{active:g,over:f}=h;e.onDragMove&&r(e.onDragMove({active:g,over:f}))},onDragOver(h){let{active:g,over:f}=h;r(e.onDragOver({active:g,over:f}))},onDragEnd(h){let{active:g,over:f}=h;r(e.onDragEnd({active:g,over:f}))},onDragCancel(h){let{active:g,over:f}=h;r(e.onDragCancel({active:g,over:f}))}}),[r,e])),!l)return null;const u=ft.createElement(ft.Fragment,null,ft.createElement(est,{id:n,value:s.draggable}),ft.createElement(tst,{id:a,announcement:o}));return t?hg.createPortal(u,t):u}var Ca;(function(i){i.DragStart="dragStart",i.DragMove="dragMove",i.DragEnd="dragEnd",i.DragCancel="dragCancel",i.DragOver="dragOver",i.RegisterDroppable="registerDroppable",i.SetDroppableDisabled="setDroppableDisabled",i.UnregisterDroppable="unregisterDroppable"})(Ca||(Ca={}));function Mj(){}function Wpe(i,e){return L.useMemo(()=>({sensor:i,options:e??{}}),[i,e])}function lst(){for(var i=arguments.length,e=new Array(i),t=0;t[...e].filter(n=>n!=null),[...e])}const Sg=Object.freeze({x:0,y:0});function SLe(i,e){return Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))}function kLe(i,e){let{data:{value:t}}=i,{data:{value:n}}=e;return t-n}function cst(i,e){let{data:{value:t}}=i,{data:{value:n}}=e;return n-t}function Vpe(i){let{left:e,top:t,height:n,width:s}=i;return[{x:e,y:t},{x:e+s,y:t},{x:e,y:t+n},{x:e+s,y:t+n}]}function NLe(i,e){if(!i||i.length===0)return null;const[t]=i;return t[e]}function zpe(i,e,t){return e===void 0&&(e=i.left),t===void 0&&(t=i.top),{x:e+i.width*.5,y:t+i.height*.5}}const dst=i=>{let{collisionRect:e,droppableRects:t,droppableContainers:n}=i;const s=zpe(e,e.left,e.top),r=[];for(const o of n){const{id:a}=o,l=t.get(a);if(l){const c=SLe(zpe(l),s);r.push({id:a,data:{droppableContainer:o,value:c}})}}return r.sort(kLe)},ust=i=>{let{collisionRect:e,droppableRects:t,droppableContainers:n}=i;const s=Vpe(e),r=[];for(const o of n){const{id:a}=o,l=t.get(a);if(l){const c=Vpe(l),u=s.reduce((g,f,m)=>g+SLe(c[m],f),0),h=Number((u/4).toFixed(4));r.push({id:a,data:{droppableContainer:o,value:h}})}}return r.sort(kLe)};function hst(i,e){const t=Math.max(e.top,i.top),n=Math.max(e.left,i.left),s=Math.min(e.left+e.width,i.left+i.width),r=Math.min(e.top+e.height,i.top+i.height),o=s-n,a=r-t;if(n{let{collisionRect:e,droppableRects:t,droppableContainers:n}=i;const s=[];for(const r of n){const{id:o}=r,a=t.get(o);if(a){const l=hst(a,e);l>0&&s.push({id:o,data:{droppableContainer:r,value:l}})}}return s.sort(cst)};function fst(i,e,t){return{...i,scaleX:e&&t?e.width/t.width:1,scaleY:e&&t?e.height/t.height:1}}function ELe(i,e){return i&&e?{x:i.left-e.left,y:i.top-e.top}:Sg}function pst(i){return function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;r({...o,top:o.top+i*a.y,bottom:o.bottom+i*a.y,left:o.left+i*a.x,right:o.right+i*a.x}),{...t})}}const mst=pst(1);function bst(i){if(i.startsWith("matrix3d(")){const e=i.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(i.startsWith("matrix(")){const e=i.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function xst(i,e,t){const n=bst(e);if(!n)return i;const{scaleX:s,scaleY:r,x:o,y:a}=n,l=i.left-o-(1-s)*parseFloat(t),c=i.top-a-(1-r)*parseFloat(t.slice(t.indexOf(" ")+1)),u=s?i.width/s:i.width,h=r?i.height/r:i.height;return{width:u,height:h,top:c,right:l+u,bottom:c+h,left:l}}const vst={ignoreTransform:!1};function qL(i,e){e===void 0&&(e=vst);let t=i.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:u}=Fd(i).getComputedStyle(i);c&&(t=xst(t,c,u))}const{top:n,left:s,width:r,height:o,bottom:a,right:l}=t;return{top:n,left:s,width:r,height:o,bottom:a,right:l}}function Upe(i){return qL(i,{ignoreTransform:!0})}function _st(i){const e=i.innerWidth,t=i.innerHeight;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function yst(i,e){return e===void 0&&(e=Fd(i).getComputedStyle(i)),e.position==="fixed"}function wst(i,e){e===void 0&&(e=Fd(i).getComputedStyle(i));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const r=e[s];return typeof r=="string"?t.test(r):!1})}function O7(i,e){const t=[];function n(s){if(e!=null&&t.length>=e||!s)return t;if(Vse(s)&&s.scrollingElement!=null&&!t.includes(s.scrollingElement))return t.push(s.scrollingElement),t;if(!eP(s)||yLe(s)||t.includes(s))return t;const r=Fd(i).getComputedStyle(s);return s!==i&&wst(s,r)&&t.push(s),yst(s,r)?t:n(s.parentNode)}return i?n(i):t}function LLe(i){const[e]=O7(i,1);return e??null}function RU(i){return!P7||!i?null:UL(i)?i:Wse(i)?Vse(i)||i===$L(i).scrollingElement?window:eP(i)?i:null:null}function DLe(i){return UL(i)?i.scrollX:i.scrollLeft}function TLe(i){return UL(i)?i.scrollY:i.scrollTop}function zG(i){return{x:DLe(i),y:TLe(i)}}var qa;(function(i){i[i.Forward=1]="Forward",i[i.Backward=-1]="Backward"})(qa||(qa={}));function ILe(i){return!P7||!i?!1:i===document.scrollingElement}function ALe(i){const e={x:0,y:0},t=ILe(i)?{height:window.innerHeight,width:window.innerWidth}:{height:i.clientHeight,width:i.clientWidth},n={x:i.scrollWidth-t.width,y:i.scrollHeight-t.height},s=i.scrollTop<=e.y,r=i.scrollLeft<=e.x,o=i.scrollTop>=n.y,a=i.scrollLeft>=n.x;return{isTop:s,isLeft:r,isBottom:o,isRight:a,maxScroll:n,minScroll:e}}const Cst={x:.2,y:.2};function Sst(i,e,t,n,s){let{top:r,left:o,right:a,bottom:l}=t;n===void 0&&(n=10),s===void 0&&(s=Cst);const{isTop:c,isBottom:u,isLeft:h,isRight:g}=ALe(i),f={x:0,y:0},m={x:0,y:0},x={height:e.height*s.y,width:e.width*s.x};return!c&&r<=e.top+x.height?(f.y=qa.Backward,m.y=n*Math.abs((e.top+x.height-r)/x.height)):!u&&l>=e.bottom-x.height&&(f.y=qa.Forward,m.y=n*Math.abs((e.bottom-x.height-l)/x.height)),!g&&a>=e.right-x.width?(f.x=qa.Forward,m.x=n*Math.abs((e.right-x.width-a)/x.width)):!h&&o<=e.left+x.width&&(f.x=qa.Backward,m.x=n*Math.abs((e.left+x.width-o)/x.width)),{direction:f,speed:m}}function kst(i){if(i===document.scrollingElement){const{innerWidth:r,innerHeight:o}=window;return{top:0,left:0,right:r,bottom:o,width:r,height:o}}const{top:e,left:t,right:n,bottom:s}=i.getBoundingClientRect();return{top:e,left:t,right:n,bottom:s,width:i.clientWidth,height:i.clientHeight}}function RLe(i){return i.reduce((e,t)=>xN(e,zG(t)),Sg)}function Nst(i){return i.reduce((e,t)=>e+DLe(t),0)}function Est(i){return i.reduce((e,t)=>e+TLe(t),0)}function Lst(i,e){if(e===void 0&&(e=qL),!i)return;const{top:t,left:n,bottom:s,right:r}=e(i);LLe(i)&&(s<=0||r<=0||t>=window.innerHeight||n>=window.innerWidth)&&i.scrollIntoView({block:"center",inline:"center"})}const Dst=[["x",["left","right"],Nst],["y",["top","bottom"],Est]];let $se=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=O7(t),s=RLe(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[r,o,a]of Dst)for(const l of o)Object.defineProperty(this,l,{get:()=>{const c=a(n),u=s[r]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}};class q2{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...t)})},this.target=e}add(e,t,n){var s;(s=this.target)==null||s.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Tst(i){const{EventTarget:e}=Fd(i);return i instanceof e?i:$L(i)}function MU(i,e){const t=Math.abs(i.x),n=Math.abs(i.y);return typeof e=="number"?Math.sqrt(t**2+n**2)>e:"x"in e&&"y"in e?t>e.x&&n>e.y:"x"in e?t>e.x:"y"in e?n>e.y:!1}var ah;(function(i){i.Click="click",i.DragStart="dragstart",i.Keydown="keydown",i.ContextMenu="contextmenu",i.Resize="resize",i.SelectionChange="selectionchange",i.VisibilityChange="visibilitychange"})(ah||(ah={}));function $pe(i){i.preventDefault()}function Ist(i){i.stopPropagation()}var es;(function(i){i.Space="Space",i.Down="ArrowDown",i.Right="ArrowRight",i.Left="ArrowLeft",i.Up="ArrowUp",i.Esc="Escape",i.Enter="Enter",i.Tab="Tab"})(es||(es={}));const MLe={start:[es.Space,es.Enter],cancel:[es.Esc],end:[es.Space,es.Enter,es.Tab]},Ast=(i,e)=>{let{currentCoordinates:t}=e;switch(i.code){case es.Right:return{...t,x:t.x+25};case es.Left:return{...t,x:t.x-25};case es.Down:return{...t,y:t.y+25};case es.Up:return{...t,y:t.y-25}}};class qse{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new q2($L(t)),this.windowListeners=new q2(Fd(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ah.Resize,this.handleCancel),this.windowListeners.add(ah.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ah.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Lst(n),t(Sg)}handleKeyDown(e){if(Use(e)){const{active:t,context:n,options:s}=this.props,{keyboardCodes:r=MLe,coordinateGetter:o=Ast,scrollBehavior:a="smooth"}=s,{code:l}=e;if(r.end.includes(l)){this.handleEnd(e);return}if(r.cancel.includes(l)){this.handleCancel(e);return}const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:Sg;this.referenceCoordinates||(this.referenceCoordinates=u);const h=o(e,{active:t,context:n.current,currentCoordinates:u});if(h){const g=SA(h,u),f={x:0,y:0},{scrollableAncestors:m}=n.current;for(const x of m){const v=e.code,{isTop:_,isRight:w,isLeft:k,isBottom:C,maxScroll:E,minScroll:D}=ALe(x),T=kst(x),I={x:Math.min(v===es.Right?T.right-T.width/2:T.right,Math.max(v===es.Right?T.left:T.left+T.width/2,h.x)),y:Math.min(v===es.Down?T.bottom-T.height/2:T.bottom,Math.max(v===es.Down?T.top:T.top+T.height/2,h.y))},R=v===es.Right&&!w||v===es.Left&&!k,P=v===es.Down&&!C||v===es.Up&&!_;if(R&&I.x!==h.x){const j=x.scrollLeft+g.x,B=v===es.Right&&j<=E.x||v===es.Left&&j>=D.x;if(B&&!g.y){x.scrollTo({left:j,behavior:a});return}B?f.x=x.scrollLeft-j:f.x=v===es.Right?x.scrollLeft-E.x:x.scrollLeft-D.x,f.x&&x.scrollBy({left:-f.x,behavior:a});break}else if(P&&I.y!==h.y){const j=x.scrollTop+g.y,B=v===es.Down&&j<=E.y||v===es.Up&&j>=D.y;if(B&&!g.x){x.scrollTo({top:j,behavior:a});return}B?f.y=x.scrollTop-j:f.y=v===es.Down?x.scrollTop-E.y:x.scrollTop-D.y,f.y&&x.scrollBy({top:-f.y,behavior:a});break}}this.handleMove(e,xN(SA(h,this.referenceCoordinates),f))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}qse.activators=[{eventName:"onKeyDown",handler:(i,e,t)=>{let{keyboardCodes:n=MLe,onActivation:s}=e,{active:r}=t;const{code:o}=i.nativeEvent;if(n.start.includes(o)){const a=r.activatorNode.current;return a&&i.target!==a?!1:(i.preventDefault(),s==null||s({event:i.nativeEvent}),!0)}return!1}}];function qpe(i){return!!(i&&"distance"in i)}function Kpe(i){return!!(i&&"delay"in i)}class Kse{constructor(e,t,n){var s;n===void 0&&(n=Tst(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:o}=r;this.props=e,this.events=t,this.document=$L(o),this.documentListeners=new q2(this.document),this.listeners=new q2(n),this.windowListeners=new q2(Fd(o)),this.initialCoordinates=(s=VG(r))!=null?s:Sg,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ah.Resize,this.handleCancel),this.windowListeners.add(ah.DragStart,$pe),this.windowListeners.add(ah.VisibilityChange,this.handleCancel),this.windowListeners.add(ah.ContextMenu,$pe),this.documentListeners.add(ah.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Kpe(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(qpe(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:s}=this.props;s(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ah.Click,Ist,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ah.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:s,props:r}=this,{onMove:o,options:{activationConstraint:a}}=r;if(!s)return;const l=(t=VG(e))!=null?t:Sg,c=SA(s,l);if(!n&&a){if(qpe(a)){if(a.tolerance!=null&&MU(c,a.tolerance))return this.handleCancel();if(MU(c,a.distance))return this.handleStart()}if(Kpe(a)&&MU(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}e.cancelable&&e.preventDefault(),o(l)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===es.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const Rst={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Gse extends Kse{constructor(e){const{event:t}=e,n=$L(t.target);super(e,Rst,n)}}Gse.activators=[{eventName:"onPointerDown",handler:(i,e)=>{let{nativeEvent:t}=i,{onActivation:n}=e;return!t.isPrimary||t.button!==0?!1:(n==null||n({event:t}),!0)}}];const Mst={move:{name:"mousemove"},end:{name:"mouseup"}};var UG;(function(i){i[i.RightClick=2]="RightClick"})(UG||(UG={}));class Pst extends Kse{constructor(e){super(e,Mst,$L(e.event.target))}}Pst.activators=[{eventName:"onMouseDown",handler:(i,e)=>{let{nativeEvent:t}=i,{onActivation:n}=e;return t.button===UG.RightClick?!1:(n==null||n({event:t}),!0)}}];const PU={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ost extends Kse{constructor(e){super(e,PU)}static setup(){return window.addEventListener(PU.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(PU.move.name,e)};function e(){}}}Ost.activators=[{eventName:"onTouchStart",handler:(i,e)=>{let{nativeEvent:t}=i,{onActivation:n}=e;const{touches:s}=t;return s.length>1?!1:(n==null||n({event:t}),!0)}}];var K2;(function(i){i[i.Pointer=0]="Pointer",i[i.DraggableRect=1]="DraggableRect"})(K2||(K2={}));var Pj;(function(i){i[i.TreeOrder=0]="TreeOrder",i[i.ReversedTreeOrder=1]="ReversedTreeOrder"})(Pj||(Pj={}));function jst(i){let{acceleration:e,activator:t=K2.Pointer,canScroll:n,draggingRect:s,enabled:r,interval:o=5,order:a=Pj.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:h,threshold:g}=i;const f=Bst({delta:h,disabled:!r}),[m,x]=Yit(),v=L.useRef({x:0,y:0}),_=L.useRef({x:0,y:0}),w=L.useMemo(()=>{switch(t){case K2.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case K2.DraggableRect:return s}},[t,s,l]),k=L.useRef(null),C=L.useCallback(()=>{const D=k.current;if(!D)return;const T=v.current.x*_.current.x,I=v.current.y*_.current.y;D.scrollBy(T,I)},[]),E=L.useMemo(()=>a===Pj.TreeOrder?[...c].reverse():c,[a,c]);L.useEffect(()=>{if(!r||!c.length||!w){x();return}for(const D of E){if((n==null?void 0:n(D))===!1)continue;const T=c.indexOf(D),I=u[T];if(!I)continue;const{direction:R,speed:P}=Sst(D,I,w,e,g);for(const j of["x","y"])f[j][R[j]]||(P[j]=0,R[j]=0);if(P.x>0||P.y>0){x(),k.current=D,m(C,o),v.current=P,_.current=R;return}}v.current={x:0,y:0},_.current={x:0,y:0},x()},[e,C,n,x,r,o,JSON.stringify(w),JSON.stringify(f),m,c,E,u,JSON.stringify(g)])}const Fst={x:{[qa.Backward]:!1,[qa.Forward]:!1},y:{[qa.Backward]:!1,[qa.Forward]:!1}};function Bst(i){let{delta:e,disabled:t}=i;const n=WG(e);return tP(s=>{if(t||!n||!s)return Fst;const r={x:Math.sign(e.x-n.x),y:Math.sign(e.y-n.y)};return{x:{[qa.Backward]:s.x[qa.Backward]||r.x===-1,[qa.Forward]:s.x[qa.Forward]||r.x===1},y:{[qa.Backward]:s.y[qa.Backward]||r.y===-1,[qa.Forward]:s.y[qa.Forward]||r.y===1}}},[t,e,n])}function Hst(i,e){const t=e!=null?i.get(e):void 0,n=t?t.node.current:null;return tP(s=>{var r;return e==null?null:(r=n??s)!=null?r:null},[n,e])}function Wst(i,e){return L.useMemo(()=>i.reduce((t,n)=>{const{sensor:s}=n,r=s.activators.map(o=>({eventName:o.eventName,handler:e(o.handler,n)}));return[...t,...r]},[]),[i,e])}var NA;(function(i){i[i.Always=0]="Always",i[i.BeforeDragging=1]="BeforeDragging",i[i.WhileDragging=2]="WhileDragging"})(NA||(NA={}));var $G;(function(i){i.Optimized="optimized"})($G||($G={}));const Gpe=new Map;function Vst(i,e){let{dragging:t,dependencies:n,config:s}=e;const[r,o]=L.useState(null),{frequency:a,measure:l,strategy:c}=s,u=L.useRef(i),h=v(),g=CA(h),f=L.useCallback(function(_){_===void 0&&(_=[]),!g.current&&o(w=>w===null?_:w.concat(_.filter(k=>!w.includes(k))))},[g]),m=L.useRef(null),x=tP(_=>{if(h&&!t)return Gpe;if(!_||_===Gpe||u.current!==i||r!=null){const w=new Map;for(let k of i){if(!k)continue;if(r&&r.length>0&&!r.includes(k.id)&&k.rect.current){w.set(k.id,k.rect.current);continue}const C=k.node.current,E=C?new $se(l(C),C):null;k.rect.current=E,E&&w.set(k.id,E)}return w}return _},[i,r,t,h,l]);return L.useEffect(()=>{u.current=i},[i]),L.useEffect(()=>{h||f()},[t,h]),L.useEffect(()=>{r&&r.length>0&&o(null)},[JSON.stringify(r)]),L.useEffect(()=>{h||typeof a!="number"||m.current!==null||(m.current=setTimeout(()=>{f(),m.current=null},a))},[a,h,f,...n]),{droppableRects:x,measureDroppableContainers:f,measuringScheduled:r!=null};function v(){switch(c){case NA.Always:return!1;case NA.BeforeDragging:return t;default:return!t}}}function PLe(i,e){return tP(t=>i?t||(typeof e=="function"?e(i):i):null,[e,i])}function zst(i,e){return PLe(i,e)}function Ust(i){let{callback:e,disabled:t}=i;const n=zse(e),s=L.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:r}=window;return new r(n)},[n,t]);return L.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function j7(i){let{callback:e,disabled:t}=i;const n=zse(e),s=L.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:r}=window;return new r(n)},[t]);return L.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function $st(i){return new $se(qL(i),i)}function Ype(i,e,t){e===void 0&&(e=$st);const[n,s]=L.useState(null);function r(){s(l=>{if(!i)return null;if(i.isConnected===!1){var c;return(c=l??t)!=null?c:null}const u=e(i);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const o=Ust({callback(l){if(i)for(const c of l){const{type:u,target:h}=c;if(u==="childList"&&h instanceof HTMLElement&&h.contains(i)){r();break}}}}),a=j7({callback:r});return tp(()=>{r(),i?(a==null||a.observe(i),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),o==null||o.disconnect())},[i]),n}function qst(i){const e=PLe(i);return ELe(i,e)}const Qpe=[];function Kst(i){const e=L.useRef(i),t=tP(n=>i?n&&n!==Qpe&&i&&e.current&&i.parentNode===e.current.parentNode?n:O7(i):Qpe,[i]);return L.useEffect(()=>{e.current=i},[i]),t}function Gst(i){const[e,t]=L.useState(null),n=L.useRef(i),s=L.useCallback(r=>{const o=RU(r.target);o&&t(a=>a?(a.set(o,zG(o)),new Map(a)):null)},[]);return L.useEffect(()=>{const r=n.current;if(i!==r){o(r);const a=i.map(l=>{const c=RU(l);return c?(c.addEventListener("scroll",s,{passive:!0}),[c,zG(c)]):null}).filter(l=>l!=null);t(a.length?new Map(a):null),n.current=i}return()=>{o(i),o(r)};function o(a){a.forEach(l=>{const c=RU(l);c==null||c.removeEventListener("scroll",s)})}},[s,i]),L.useMemo(()=>i.length?e?Array.from(e.values()).reduce((r,o)=>xN(r,o),Sg):RLe(i):Sg,[i,e])}function Xpe(i,e){e===void 0&&(e=[]);const t=L.useRef(null);return L.useEffect(()=>{t.current=null},e),L.useEffect(()=>{const n=i!==Sg;n&&!t.current&&(t.current=i),!n&&t.current&&(t.current=null)},[i]),t.current?SA(i,t.current):Sg}function Yst(i){L.useEffect(()=>{if(!P7)return;const e=i.map(t=>{let{sensor:n}=t;return n.setup==null?void 0:n.setup()});return()=>{for(const t of e)t==null||t()}},i.map(e=>{let{sensor:t}=e;return t}))}function Qst(i,e){return L.useMemo(()=>i.reduce((t,n)=>{let{eventName:s,handler:r}=n;return t[s]=o=>{r(o,e)},t},{}),[i,e])}function OLe(i){return L.useMemo(()=>i?_st(i):null,[i])}const Zpe=[];function Xst(i,e){e===void 0&&(e=qL);const[t]=i,n=OLe(t?Fd(t):null),[s,r]=L.useState(Zpe);function o(){r(()=>i.length?i.map(l=>ILe(l)?n:new $se(e(l),l)):Zpe)}const a=j7({callback:o});return tp(()=>{a==null||a.disconnect(),o(),i.forEach(l=>a==null?void 0:a.observe(l))},[i]),s}function Zst(i){if(!i)return null;if(i.children.length>1)return i;const e=i.children[0];return eP(e)?e:i}function Jst(i){let{measure:e}=i;const[t,n]=L.useState(null),s=L.useCallback(c=>{for(const{target:u}of c)if(eP(u)){n(h=>{const g=e(u);return h?{...h,width:g.width,height:g.height}:g});break}},[e]),r=j7({callback:s}),o=L.useCallback(c=>{const u=Zst(c);r==null||r.disconnect(),u&&(r==null||r.observe(u)),n(u?e(u):null)},[e,r]),[a,l]=Rj(o);return L.useMemo(()=>({nodeRef:a,rect:t,setRef:l}),[t,a,l])}const ert=[{sensor:Gse,options:{}},{sensor:qse,options:{}}],trt={current:{}},N4={draggable:{measure:Upe},droppable:{measure:Upe,strategy:NA.WhileDragging,frequency:$G.Optimized},dragOverlay:{measure:qL}};class G2 extends Map{get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return(t=(n=this.get(e))==null?void 0:n.node.current)!=null?t:void 0}}const nrt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new G2,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Mj},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:N4,measureDroppableContainers:Mj,windowRect:null,measuringScheduled:!1},irt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Mj,draggableNodes:new Map,over:null,measureDroppableContainers:Mj},F7=L.createContext(irt),jLe=L.createContext(nrt);function srt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new G2}}}function rrt(i,e){switch(e.type){case Ca.DragStart:return{...i,draggable:{...i.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case Ca.DragMove:return i.draggable.active==null?i:{...i,draggable:{...i.draggable,translate:{x:e.coordinates.x-i.draggable.initialCoordinates.x,y:e.coordinates.y-i.draggable.initialCoordinates.y}}};case Ca.DragEnd:case Ca.DragCancel:return{...i,draggable:{...i.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ca.RegisterDroppable:{const{element:t}=e,{id:n}=t,s=new G2(i.droppable.containers);return s.set(n,t),{...i,droppable:{...i.droppable,containers:s}}}case Ca.SetDroppableDisabled:{const{id:t,key:n,disabled:s}=e,r=i.droppable.containers.get(t);if(!r||n!==r.key)return i;const o=new G2(i.droppable.containers);return o.set(t,{...r,disabled:s}),{...i,droppable:{...i.droppable,containers:o}}}case Ca.UnregisterDroppable:{const{id:t,key:n}=e,s=i.droppable.containers.get(t);if(!s||n!==s.key)return i;const r=new G2(i.droppable.containers);return r.delete(t),{...i,droppable:{...i.droppable,containers:r}}}default:return i}}function ort(i){let{disabled:e}=i;const{active:t,activatorEvent:n,draggableNodes:s}=L.useContext(F7),r=WG(n),o=WG(t==null?void 0:t.id);return L.useEffect(()=>{if(!e&&!n&&r&&o!=null){if(!Use(r)||document.activeElement===r.target)return;const a=s.get(o);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const h=Zit(u);if(h){h.focus();break}}})}},[n,e,s,o,r]),null}function art(i,e){let{transform:t,...n}=e;return i!=null&&i.length?i.reduce((s,r)=>r({transform:s,...n}),t):t}function lrt(i){return L.useMemo(()=>({draggable:{...N4.draggable,...i==null?void 0:i.draggable},droppable:{...N4.droppable,...i==null?void 0:i.droppable},dragOverlay:{...N4.dragOverlay,...i==null?void 0:i.dragOverlay}}),[i==null?void 0:i.draggable,i==null?void 0:i.droppable,i==null?void 0:i.dragOverlay])}function crt(i){let{activeNode:e,measure:t,initialRect:n,config:s=!0}=i;const r=L.useRef(!1),{x:o,y:a}=typeof s=="boolean"?{x:s,y:s}:s;tp(()=>{if(!o&&!a||!e){r.current=!1;return}if(r.current||!n)return;const c=e==null?void 0:e.node.current;if(!c||c.isConnected===!1)return;const u=t(c),h=ELe(u,n);if(o||(h.x=0),a||(h.y=0),r.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const g=LLe(c);g&&g.scrollBy({top:h.y,left:h.x})}},[e,o,a,n,t])}const FLe=L.createContext({...Sg,scaleX:1,scaleY:1});var $x;(function(i){i[i.Uninitialized=0]="Uninitialized",i[i.Initializing=1]="Initializing",i[i.Initialized=2]="Initialized"})($x||($x={}));const drt=L.memo(function(e){var t,n,s,r;let{id:o,accessibility:a,autoScroll:l=!0,children:c,sensors:u=ert,collisionDetection:h=gst,measuring:g,modifiers:f,...m}=e;const x=L.useReducer(rrt,void 0,srt),[v,_]=x,[w,k]=sst(),[C,E]=L.useState($x.Uninitialized),D=C===$x.Initialized,{draggable:{active:T,nodes:I,translate:R},droppable:{containers:P}}=v,j=T!=null?I.get(T):null,B=L.useRef({initial:null,translated:null}),U=L.useMemo(()=>{var _s;return T!=null?{id:T,data:(_s=j==null?void 0:j.data)!=null?_s:trt,rect:B}:null},[T,j]),$=L.useRef(null),[K,z]=L.useState(null),[G,ne]=L.useState(null),te=CA(m,Object.values(m)),H=nP("DndDescribedBy",o),Q=L.useMemo(()=>P.getEnabled(),[P]),Y=lrt(g),{droppableRects:V,measureDroppableContainers:ue,measuringScheduled:he}=Vst(Q,{dragging:D,dependencies:[R.x,R.y],config:Y.droppable}),Te=Hst(I,T),nt=L.useMemo(()=>G?VG(G):null,[G]),ge=qc(),_e=zst(Te,Y.draggable.measure);crt({activeNode:T!=null?I.get(T):null,config:ge.layoutShiftCompensation,initialRect:_e,measure:Y.draggable.measure});const $e=Ype(Te,Y.draggable.measure,_e),Ke=Ype(Te?Te.parentElement:null),ht=L.useRef({activatorEvent:null,active:null,activeNode:Te,collisionRect:null,collisions:null,droppableRects:V,draggableNodes:I,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ct=P.getNodeFor((t=ht.current.over)==null?void 0:t.id),Ft=Jst({measure:Y.dragOverlay.measure}),Ve=(n=Ft.nodeRef.current)!=null?n:Te,tt=D?(s=Ft.rect)!=null?s:$e:null,qt=!!(Ft.nodeRef.current&&Ft.rect),It=qst(qt?null:$e),Zt=OLe(Ve?Fd(Ve):null),En=Kst(D?Ct??Te:null),Xi=Xst(En),zi=art(f,{transform:{x:R.x-It.x,y:R.y-It.y,scaleX:1,scaleY:1},activatorEvent:G,active:U,activeNodeRect:$e,containerNodeRect:Ke,draggingNodeRect:tt,over:ht.current.over,overlayNodeRect:Ft.rect,scrollableAncestors:En,scrollableAncestorRects:Xi,windowRect:Zt}),Tr=nt?xN(nt,R):null,Fs=Gst(En),qo=Xpe(Fs),Ge=Xpe(Fs,[$e]),mt=xN(zi,qo),tn=tt?mst(tt,zi):null,Ln=U&&tn?h({active:U,collisionRect:tn,droppableRects:V,droppableContainers:Q,pointerCoordinates:Tr}):null,Un=NLe(Ln,"id"),[vs,_r]=L.useState(null),Js=qt?zi:xN(zi,Ge),Ei=fst(Js,(r=vs==null?void 0:vs.rect)!=null?r:null,$e),wi=L.useRef(null),ii=L.useCallback((_s,ys)=>{let{sensor:on,options:Nn}=ys;if($.current==null)return;const vn=I.get($.current);if(!vn)return;const Ci=_s.nativeEvent,zr=new on({active:$.current,activeNode:vn,event:Ci,options:Nn,context:ht,onAbort(Si){if(!I.get(Si))return;const{onDragAbort:Bs}=te.current,Ai={id:Si};Bs==null||Bs(Ai),w({type:"onDragAbort",event:Ai})},onPending(Si,bo,Bs,Ai){if(!I.get(Si))return;const{onDragPending:lr}=te.current,Oa={id:Si,constraint:bo,initialCoordinates:Bs,offset:Ai};lr==null||lr(Oa),w({type:"onDragPending",event:Oa})},onStart(Si){const bo=$.current;if(bo==null)return;const Bs=I.get(bo);if(!Bs)return;const{onDragStart:Ai}=te.current,ws={activatorEvent:Ci,active:{id:bo,data:Bs.data,rect:B}};hg.unstable_batchedUpdates(()=>{Ai==null||Ai(ws),E($x.Initializing),_({type:Ca.DragStart,initialCoordinates:Si,active:bo}),w({type:"onDragStart",event:ws}),z(wi.current),ne(Ci)})},onMove(Si){_({type:Ca.DragMove,coordinates:Si})},onEnd:Ii(Ca.DragEnd),onCancel:Ii(Ca.DragCancel)});wi.current=zr;function Ii(Si){return async function(){const{active:Bs,collisions:Ai,over:ws,scrollAdjustedTranslate:lr}=ht.current;let Oa=null;if(Bs&&lr){const{cancelDrop:gc}=te.current;Oa={activatorEvent:Ci,active:Bs,collisions:Ai,delta:lr,over:ws},Si===Ca.DragEnd&&typeof gc=="function"&&await Promise.resolve(gc(Oa))&&(Si=Ca.DragCancel)}$.current=null,hg.unstable_batchedUpdates(()=>{_({type:Si}),E($x.Uninitialized),_r(null),z(null),ne(null),wi.current=null;const gc=Si===Ca.DragEnd?"onDragEnd":"onDragCancel";if(Oa){const xa=te.current[gc];xa==null||xa(Oa),w({type:gc,event:Oa})}})}}},[I]),Ko=L.useCallback((_s,ys)=>(on,Nn)=>{const vn=on.nativeEvent,Ci=I.get(Nn);if($.current!==null||!Ci||vn.dndKit||vn.defaultPrevented)return;const zr={active:Ci};_s(on,ys.options,zr)===!0&&(vn.dndKit={capturedBy:ys.sensor},$.current=Nn,ii(on,ys))},[I,ii]),Vr=Wst(u,Ko);Yst(u),tp(()=>{$e&&C===$x.Initializing&&E($x.Initialized)},[$e,C]),L.useEffect(()=>{const{onDragMove:_s}=te.current,{active:ys,activatorEvent:on,collisions:Nn,over:vn}=ht.current;if(!ys||!on)return;const Ci={active:ys,activatorEvent:on,collisions:Nn,delta:{x:mt.x,y:mt.y},over:vn};hg.unstable_batchedUpdates(()=>{_s==null||_s(Ci),w({type:"onDragMove",event:Ci})})},[mt.x,mt.y]),L.useEffect(()=>{const{active:_s,activatorEvent:ys,collisions:on,droppableContainers:Nn,scrollAdjustedTranslate:vn}=ht.current;if(!_s||$.current==null||!ys||!vn)return;const{onDragOver:Ci}=te.current,zr=Nn.get(Un),Ii=zr&&zr.rect.current?{id:zr.id,rect:zr.rect.current,data:zr.data,disabled:zr.disabled}:null,Si={active:_s,activatorEvent:ys,collisions:on,delta:{x:vn.x,y:vn.y},over:Ii};hg.unstable_batchedUpdates(()=>{_r(Ii),Ci==null||Ci(Si),w({type:"onDragOver",event:Si})})},[Un]),tp(()=>{ht.current={activatorEvent:G,active:U,activeNode:Te,collisionRect:tn,collisions:Ln,droppableRects:V,draggableNodes:I,draggingNode:Ve,draggingNodeRect:tt,droppableContainers:P,over:vs,scrollableAncestors:En,scrollAdjustedTranslate:mt},B.current={initial:tt,translated:tn}},[U,Te,Ln,tn,I,Ve,tt,V,P,vs,En,mt]),jst({...ge,delta:R,draggingRect:tn,pointerCoordinates:Tr,scrollableAncestors:En,scrollableAncestorRects:Xi});const ba=L.useMemo(()=>({active:U,activeNode:Te,activeNodeRect:$e,activatorEvent:G,collisions:Ln,containerNodeRect:Ke,dragOverlay:Ft,draggableNodes:I,droppableContainers:P,droppableRects:V,over:vs,measureDroppableContainers:ue,scrollableAncestors:En,scrollableAncestorRects:Xi,measuringConfiguration:Y,measuringScheduled:he,windowRect:Zt}),[U,Te,$e,G,Ln,Ke,Ft,I,P,V,vs,ue,En,Xi,Y,he,Zt]),ll=L.useMemo(()=>({activatorEvent:G,activators:Vr,active:U,activeNodeRect:$e,ariaDescribedById:{draggable:H},dispatch:_,draggableNodes:I,over:vs,measureDroppableContainers:ue}),[G,Vr,U,$e,_,H,I,vs,ue]);return ft.createElement(CLe.Provider,{value:k},ft.createElement(F7.Provider,{value:ll},ft.createElement(jLe.Provider,{value:ba},ft.createElement(FLe.Provider,{value:Ei},c)),ft.createElement(ort,{disabled:(a==null?void 0:a.restoreFocus)===!1})),ft.createElement(ast,{...a,hiddenTextDescribedById:H}));function qc(){const _s=(K==null?void 0:K.autoScrollEnabled)===!1,ys=typeof l=="object"?l.enabled===!1:l===!1,on=D&&!_s&&!ys;return typeof l=="object"?{...l,enabled:on}:{enabled:on}}}),urt=L.createContext(null),Jpe="button",hrt="Draggable";function grt(i){let{id:e,data:t,disabled:n=!1,attributes:s}=i;const r=nP(hrt),{activators:o,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:h,over:g}=L.useContext(F7),{role:f=Jpe,roleDescription:m="draggable",tabIndex:x=0}=s??{},v=(l==null?void 0:l.id)===e,_=L.useContext(v?FLe:urt),[w,k]=Rj(),[C,E]=Rj(),D=Qst(o,e),T=CA(t);tp(()=>(h.set(e,{id:e,key:r,node:w,activatorNode:C,data:T}),()=>{const R=h.get(e);R&&R.key===r&&h.delete(e)}),[h,e]);const I=L.useMemo(()=>({role:f,tabIndex:x,"aria-disabled":n,"aria-pressed":v&&f===Jpe?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[n,f,x,v,m,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:I,isDragging:v,listeners:n?void 0:D,node:w,over:g,setNodeRef:k,setActivatorNodeRef:E,transform:_}}function frt(){return L.useContext(jLe)}const prt="Droppable",mrt={timeout:25};function brt(i){let{data:e,disabled:t=!1,id:n,resizeObserverConfig:s}=i;const r=nP(prt),{active:o,dispatch:a,over:l,measureDroppableContainers:c}=L.useContext(F7),u=L.useRef({disabled:t}),h=L.useRef(!1),g=L.useRef(null),f=L.useRef(null),{disabled:m,updateMeasurementsFor:x,timeout:v}={...mrt,...s},_=CA(x??n),w=L.useCallback(()=>{if(!h.current){h.current=!0;return}f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{c(Array.isArray(_.current)?_.current:[_.current]),f.current=null},v)},[v]),k=j7({callback:w,disabled:m||!o}),C=L.useCallback((I,R)=>{k&&(R&&(k.unobserve(R),h.current=!1),I&&k.observe(I))},[k]),[E,D]=Rj(C),T=CA(e);return L.useEffect(()=>{!k||!E.current||(k.disconnect(),h.current=!1,k.observe(E.current))},[E,k]),L.useEffect(()=>(a({type:Ca.RegisterDroppable,element:{id:n,key:r,disabled:t,node:E,rect:g,data:T}}),()=>a({type:Ca.UnregisterDroppable,key:r,id:n})),[n]),L.useEffect(()=>{t!==u.current.disabled&&(a({type:Ca.SetDroppableDisabled,id:n,key:r,disabled:t}),u.current.disabled=t)},[n,r,t,a]),{active:o,rect:g,isOver:(l==null?void 0:l.id)===n,node:E,over:l,setNodeRef:D}}function Yse(i,e,t){const n=i.slice();return n.splice(t<0?n.length+t:t,0,n.splice(e,1)[0]),n}function xrt(i,e){return i.reduce((t,n,s)=>{const r=e.get(n);return r&&(t[s]=r),t},Array(i.length))}function E5(i){return i!==null&&i>=0}function vrt(i,e){if(i===e)return!0;if(i.length!==e.length)return!1;for(let t=0;t{let{rects:e,activeIndex:t,overIndex:n,index:s}=i;const r=Yse(e,n,t),o=e[s],a=r[s];return!a||!o?null:{x:a.left-o.left,y:a.top-o.top,scaleX:a.width/o.width,scaleY:a.height/o.height}},L5={scaleX:1,scaleY:1},yrt=i=>{var e;let{activeIndex:t,activeNodeRect:n,index:s,rects:r,overIndex:o}=i;const a=(e=r[t])!=null?e:n;if(!a)return null;if(s===t){const c=r[o];return c?{x:0,y:tt&&s<=o?{x:0,y:-a.height-l,...L5}:s=o?{x:0,y:a.height+l,...L5}:{x:0,y:0,...L5}};function wrt(i,e,t){const n=i[e],s=i[e-1],r=i[e+1];return n?tn.map(D=>typeof D=="object"&&"id"in D?D.id:D),[n]),m=o!=null,x=o?f.indexOf(o.id):-1,v=c?f.indexOf(c.id):-1,_=L.useRef(f),w=!vrt(f,_.current),k=v!==-1&&x===-1||w,C=_rt(r);tp(()=>{w&&m&&u(f)},[w,f,m,u]),L.useEffect(()=>{_.current=f},[f]);const E=L.useMemo(()=>({activeIndex:x,containerId:h,disabled:C,disableTransforms:k,items:f,overIndex:v,useDragOverlay:g,sortedRects:xrt(f,l),strategy:s}),[x,h,C.draggable,C.droppable,k,f,v,l,g,s]);return ft.createElement(WLe.Provider,{value:E},e)}const Srt=i=>{let{id:e,items:t,activeIndex:n,overIndex:s}=i;return Yse(t,n,s).indexOf(e)},krt=i=>{let{containerId:e,isSorting:t,wasDragging:n,index:s,items:r,newIndex:o,previousItems:a,previousContainerId:l,transition:c}=i;return!c||!n||a!==r&&s===o?!1:t?!0:o!==s&&e===l},Nrt={duration:200,easing:"ease"},VLe="transform",Ert=kA.Transition.toString({property:VLe,duration:0,easing:"linear"}),Lrt={roleDescription:"sortable"};function Drt(i){let{disabled:e,index:t,node:n,rect:s}=i;const[r,o]=L.useState(null),a=L.useRef(t);return tp(()=>{if(!e&&t!==a.current&&n.current){const l=s.current;if(l){const c=qL(n.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&o(u)}}t!==a.current&&(a.current=t)},[e,t,n,s]),L.useEffect(()=>{r&&o(null)},[r]),r}function Trt(i){let{animateLayoutChanges:e=krt,attributes:t,disabled:n,data:s,getNewIndex:r=Srt,id:o,strategy:a,resizeObserverConfig:l,transition:c=Nrt}=i;const{items:u,containerId:h,activeIndex:g,disabled:f,disableTransforms:m,sortedRects:x,overIndex:v,useDragOverlay:_,strategy:w}=L.useContext(WLe),k=Irt(n,f),C=u.indexOf(o),E=L.useMemo(()=>({sortable:{containerId:h,index:C,items:u},...s}),[h,s,C,u]),D=L.useMemo(()=>u.slice(u.indexOf(o)),[u,o]),{rect:T,node:I,isOver:R,setNodeRef:P}=brt({id:o,data:E,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...l}}),{active:j,activatorEvent:B,activeNodeRect:U,attributes:$,setNodeRef:K,listeners:z,isDragging:G,over:ne,setActivatorNodeRef:te,transform:H}=grt({id:o,data:E,attributes:{...Lrt,...t},disabled:k.draggable}),Q=Git(P,K),Y=!!j,V=Y&&!m&&E5(g)&&E5(v),ue=!_&&G,he=ue&&V?H:null,nt=V?he??(a??w)({rects:x,activeNodeRect:U,activeIndex:g,overIndex:v,index:C}):null,ge=E5(g)&&E5(v)?r({id:o,items:u,activeIndex:g,overIndex:v}):C,_e=j==null?void 0:j.id,$e=L.useRef({activeId:_e,items:u,newIndex:ge,containerId:h}),Ke=u!==$e.current.items,ht=e({active:j,containerId:h,isDragging:G,isSorting:Y,id:o,index:C,items:u,newIndex:$e.current.newIndex,previousItems:$e.current.items,previousContainerId:$e.current.containerId,transition:c,wasDragging:$e.current.activeId!=null}),Ct=Drt({disabled:!ht,index:C,node:I,rect:T});return L.useEffect(()=>{Y&&$e.current.newIndex!==ge&&($e.current.newIndex=ge),h!==$e.current.containerId&&($e.current.containerId=h),u!==$e.current.items&&($e.current.items=u)},[Y,ge,h,u]),L.useEffect(()=>{if(_e===$e.current.activeId)return;if(_e!=null&&$e.current.activeId==null){$e.current.activeId=_e;return}const Ve=setTimeout(()=>{$e.current.activeId=_e},50);return()=>clearTimeout(Ve)},[_e]),{active:j,activeIndex:g,attributes:$,data:E,rect:T,index:C,newIndex:ge,items:u,isOver:R,isSorting:Y,isDragging:G,listeners:z,node:I,overIndex:v,over:ne,setNodeRef:Q,setActivatorNodeRef:te,setDroppableNodeRef:P,setDraggableNodeRef:K,transform:Ct??nt,transition:Ft()};function Ft(){if(Ct||Ke&&$e.current.newIndex===C)return Ert;if(!(ue&&!Use(B)||!c)&&(Y||ht))return kA.Transition.toString({...c,property:VLe})}}function Irt(i,e){var t,n;return typeof i=="boolean"?{draggable:i,droppable:!1}:{draggable:(t=i==null?void 0:i.draggable)!=null?t:e.draggable,droppable:(n=i==null?void 0:i.droppable)!=null?n:e.droppable}}function Oj(i){if(!i)return!1;const e=i.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const Art=[es.Down,es.Right,es.Up,es.Left],Rrt=(i,e)=>{let{context:{active:t,collisionRect:n,droppableRects:s,droppableContainers:r,over:o,scrollableAncestors:a}}=e;if(Art.includes(i.code)){if(i.preventDefault(),!t||!n)return;const l=[];r.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const g=s.get(h.id);if(g)switch(i.code){case es.Down:n.topg.top&&l.push(h);break;case es.Left:n.left>g.left&&l.push(h);break;case es.Right:n.left1&&(u=c[1].id),u!=null){const h=r.get(t.id),g=r.get(u),f=g?s.get(g.id):null,m=g==null?void 0:g.node.current;if(m&&f&&h&&g){const v=O7(m).some((D,T)=>a[T]!==D),_=zLe(h,g),w=Mrt(h,g),k=v||!_?{x:0,y:0}:{x:w?n.width-f.width:0,y:w?n.height-f.height:0},C={x:f.left,y:f.top};return k.x&&k.y?C:SA(C,k)}}}};function zLe(i,e){return!Oj(i)||!Oj(e)?!1:i.data.current.sortable.containerId===e.data.current.sortable.containerId}function Mrt(i,e){return!Oj(i)||!Oj(e)||!zLe(i,e)?!1:i.data.current.sortable.indexnme(e.type)-nme(t.type))}function Brt(i){try{const e=i.startsWith("eddi://")?i.replace("eddi://","http://"):i,n=new URL(e,"http://dummy").pathname.split("/").filter(Boolean);if(n.length>=3){const s={rulestore:"rules",apicallstore:"apicalls",llmstore:"llm",outputstore:"output",dictionarystore:"dictionary",propertysetterstore:"propertysetter",mcpcallsstore:"mcpcalls",ragstore:"rag",snippetstore:"snippets"},r=n[0],o=n[2];if(r&&o)return{slug:s[r]??r,id:o}}}catch{}return null}function Hrt({items:i,onChange:e,onRemove:t,disabled:n=!1,workflowId:s,workflowVersion:r,agentId:o,agentVer:a,latestVersions:l,onUpdateVersion:c}){const{t:u}=xe(),h=lst(Wpe(Gse,{activationConstraint:{distance:5}}),Wpe(qse,{coordinateGetter:Rrt}));function g(f){const{active:m,over:x}=f;if(x&&m.id!==x.id){const v=i.findIndex(w=>w.id===m.id),_=i.findIndex(w=>w.id===x.id);v!==-1&&_!==-1&&e(Yse(i,v,_))}}return i.length===0?d.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground","data-testid":"pipeline-empty",children:[d.jsx(OM,{className:"h-10 w-10 opacity-50"}),d.jsx("p",{className:"mt-3 text-sm",children:u("packageEditor.noTasks","No tasks in this workflow")}),d.jsx("p",{className:"mt-1 text-xs text-muted-foreground/70",children:u("packageEditor.addHint","Add tasks to build your processing pipeline")})]}):d.jsx(drt,{sensors:h,collisionDetection:dst,onDragEnd:g,children:d.jsx(Crt,{items:i.map(f=>f.id),strategy:yrt,children:d.jsx("div",{className:"divide-y divide-border","data-testid":"pipeline-list",role:"list","aria-label":u("packageEditor.pipeline","Pipeline"),children:i.map((f,m)=>d.jsx(Wrt,{item:f,position:m+1,total:i.length,onRemove:()=>t(f.index),disabled:n,workflowId:s,workflowVersion:r,agentId:o,agentVer:a,latestVersions:l,onUpdateVersion:c},f.id))})})})}function Wrt({item:i,position:e,total:t,onRemove:n,disabled:s,workflowId:r,workflowVersion:o,agentId:a,agentVer:l,latestVersions:c,onUpdateVersion:u}){var U;const{t:h}=xe(),{attributes:g,listeners:f,setNodeRef:m,transform:x,transition:v,isDragging:_}=Trt({id:i.id,disabled:s}),w={transform:kA.Transform.toString(x),transition:v,opacity:_?.5:1,zIndex:_?50:void 0},k=i.extension,C=VE(k.type),E=qG(k.type),D=(U=k.config)==null?void 0:U.uri,T=D?Brt(D):null;let I=!1,R=0,P=0;if(D&&T&&c){const $=D.match(/[?&]version=(\d+)/);R=$?parseInt($[1],10):1,P=c[T.id]??R,I=P>R}function j(){if(!D||!u)return;const $=D.replace(/([?&]version=)\d+/,`$1${P}`);u(i.index,$)}const B=T?(()=>{let $=`/manage/resources/${T.slug}/${T.id}`;const K=new URLSearchParams;r&&o&&(K.set("wfId",r),K.set("wfVer",String(o))),a&&K.set("agentId",a),l&&K.set("agentVer",l);const z=K.toString();return z&&($+=`?${z}`),$})():null;return d.jsxs("div",{ref:m,style:w,className:`group flex items-center gap-3 px-5 py-3 transition-colors ${_?"bg-primary/5 shadow-lg rounded-lg":I?"bg-amber-50/50 dark:bg-amber-900/10 hover:bg-amber-50 dark:hover:bg-amber-900/20":"hover:bg-secondary/50"}`,role:"listitem","data-testid":`pipeline-item-${i.index}`,children:[d.jsx("button",{...g,...f,className:"cursor-grab rounded-md p-1 text-muted-foreground hover:bg-secondary active:cursor-grabbing disabled:cursor-not-allowed disabled:opacity-50",tabIndex:0,"aria-label":h("packageEditor.reorder","Reorder task"),disabled:s,children:d.jsx(p7e,{className:"h-4 w-4"})}),d.jsx("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-bold text-primary",children:e}),d.jsx(C,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),B?d.jsxs(Kn,{to:B,className:"min-w-0 flex-1",children:[d.jsx("p",{className:"text-sm font-medium text-foreground group-hover:text-primary transition-colors",children:E}),d.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[d.jsx("span",{className:"text-xs text-muted-foreground truncate",children:T.id}),d.jsxs("span",{className:"inline-flex items-center rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:["v",R]})]})]}):d.jsx("div",{className:"min-w-0 flex-1",children:d.jsx("p",{className:"text-sm font-medium text-foreground",children:E})}),d.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[I&&d.jsxs("button",{onClick:j,disabled:s,className:"inline-flex items-center gap-1 rounded-md bg-amber-100 px-1.5 py-0.5 text-[10px] font-semibold text-amber-800 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:hover:bg-amber-900/50 transition-colors shrink-0",title:h("packageEditor.updateToLatest","Update to latest version"),"data-testid":`update-version-${i.index}`,children:[d.jsx(NSe,{className:"h-3 w-3"}),"v",P]}),B&&d.jsxs(Kn,{to:B,className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-1 text-xs font-medium text-primary hover:bg-primary/20 transition-colors",children:[d.jsx(To,{className:"h-3 w-3"}),h("common.edit","Edit")]}),d.jsx("button",{onClick:n,disabled:s,className:"rounded-md p-1.5 text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors disabled:opacity-50",title:h("common.delete"),"data-testid":`remove-ext-${i.index}`,children:d.jsx(_n,{className:"h-4 w-4"})})]}),e